diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx index 7cdc8f70a..aa8819ea2 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx @@ -29,6 +29,7 @@ export function TimeTicketModalContainer({ bodyshop, }) { const [form] = Form.useForm(); + const [loading, setLoading] = useState(false); const { t } = useTranslation(); const [enterAgain, setEnterAgain] = useState(false); const [insertTicket] = useMutation(INSERT_NEW_TIME_TICKET); @@ -39,6 +40,7 @@ export function TimeTicketModalContainer({ }); const handleFinish = (values) => { + setLoading(true); const emps = EmployeeAutoCompleteData.employees.filter( (e) => e.id === values.employeeid ); @@ -98,6 +100,7 @@ export function TimeTicketModalContainer({ toggleModalVisible(); } setEnterAgain(false); + setLoading(false); }; const handleMutationError = (error) => { @@ -107,6 +110,7 @@ export function TimeTicketModalContainer({ message: JSON.stringify(error), }), }); + setLoading(false); }; const handleCancel = () => { @@ -160,6 +164,7 @@ export function TimeTicketModalContainer({ visible={timeTicketModal.visible} okText={t("general.actions.save")} onOk={() => form.submit()} + okButtonProps={{ loading }} onCancel={handleCancel} forceRender afterClose={() => form.resetFields()} diff --git a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx index 3f3c59955..1990837b8 100644 --- a/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx +++ b/client/src/components/time-tickets-summary-employees/time-tickets-summary-employees.component.jsx @@ -146,7 +146,9 @@ export function TimeTicketsSummaryEmployees({