From 1d6e7e7d563746c656ceee801e730d084c1c00b0 Mon Sep 17 00:00:00 2001 From: Andy Neillans <andy@neillans.co.uk> Date: Tue, 23 Jan 2024 12:39:35 +0000 Subject: [PATCH] Confirmation on unschedule (#300) --- .../ScheduledSubmissions.tsx | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ui/src/views/submissions/scheduled-submissions/ScheduledSubmissions.tsx b/ui/src/views/submissions/scheduled-submissions/ScheduledSubmissions.tsx index c7bb429d..b93e32f6 100644 --- a/ui/src/views/submissions/scheduled-submissions/ScheduledSubmissions.tsx +++ b/ui/src/views/submissions/scheduled-submissions/ScheduledSubmissions.tsx @@ -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 { @@ -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(