Skip to content

Commit

Permalink
Confirmation on unschedule (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
aneillans authored Jan 23, 2024
1 parent 517780e commit 1d6e7e7
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SubmissionUtil from '../../../utils/submission.util';
import moment from 'moment';
import { Submission } from 'postybirb-commons';
import { SubmissionPackage } from 'postybirb-commons';
import { Calendar, Button, List, Badge, message } from 'antd';
import { Calendar, Button, List, Badge, message, Popconfirm } from 'antd';
import { ScheduledSubmissionListItem } from './ScheduledSubmissionListItem';

interface Props {
Expand Down Expand Up @@ -81,14 +81,20 @@ export default class ScheduledSubmissions extends React.Component<Props> {
<List
header={
<div>
<Button
type="danger"
block
disabled={!this.props.submissions.length}
onClick={this.unscheduleAll.bind(this)}
<Popconfirm
title="Are you sure to unschedule all items?"
onConfirm={this.unscheduleAll.bind(this)}
okText="Yes"
cancelText="No"
>
Unschedule All
</Button>
<Button
type="danger"
block
disabled={!this.props.submissions.length}
>
Unschedule All
</Button>
</Popconfirm>
</div>
}
dataSource={this.props.submissions.sort(
Expand Down

0 comments on commit 1d6e7e7

Please sign in to comment.