diff --git a/src/components/ApplicationDetail/ApplicationPanel/ApplicationPanel.component.tsx b/src/components/ApplicationDetail/ApplicationPanel/ApplicationPanel.component.tsx index c9eb98b4..4918dc0b 100644 --- a/src/components/ApplicationDetail/ApplicationPanel/ApplicationPanel.component.tsx +++ b/src/components/ApplicationDetail/ApplicationPanel/ApplicationPanel.component.tsx @@ -3,6 +3,7 @@ import { FormProvider, useForm, useFormContext } from 'react-hook-form'; import dayjs, { Dayjs } from 'dayjs'; import { useRecoilCallback } from 'recoil'; import utc from 'dayjs/plugin/utc'; +import { useLocation } from 'react-router-dom'; import { Button, DatePicker, Select, SelectField } from '@/components'; import * as Styled from './ApplicationPanel.styled'; import { ButtonShape, ButtonSize } from '@/components/common/Button/Button.component'; @@ -26,10 +27,11 @@ import { rangeArray, request } from '@/utils'; import * as api from '@/api'; import { ApplicationConfirmationStatusInDto, + ApplicationRequest, ApplicationResultStatusInDto, ApplicationUpdateResultByIdRequest, } from '@/types'; -import { $applicationById } from '@/store'; +import { $applicationById, $applications } from '@/store'; import { ToastType } from '@/styles'; dayjs.extend(utc); @@ -129,7 +131,7 @@ const ControlArea = ({ confirmationStatus, resultStatus, interviewDate }: Contro ); if (isScreeningPassed) { - return resultOption.slice(1, 6); + return resultOption.slice(1, resultOption.length); } return resultOption.slice(0, 4); @@ -246,6 +248,7 @@ const ApplicationPanel = ({ applicationId, ...restProps }: ApplicationPanelProps) => { + const { state } = useLocation(); const { handleAddToast } = useToast(); const methods = useForm({ defaultValues: { @@ -297,6 +300,7 @@ const ApplicationPanel = ({ errorHandler: handleAddToast, onSuccess: async () => { await refresh($applicationById({ applicationId })); + await refresh($applications(state as ApplicationRequest)); methods.setValue('isEdit', false); handleAddToast({ type: ToastType.success, diff --git a/src/components/common/SmsSendModalDialog/SmsSendModalDialog.component.tsx b/src/components/common/SmsSendModalDialog/SmsSendModalDialog.component.tsx index 38032d26..29c5f7bf 100644 --- a/src/components/common/SmsSendModalDialog/SmsSendModalDialog.component.tsx +++ b/src/components/common/SmsSendModalDialog/SmsSendModalDialog.component.tsx @@ -125,6 +125,7 @@ const SmsSendModalDialog = ({ }, }, handleCloseModal: handleRemoveCurrentModal, + closeOnClickOverlay: false, }; return ( diff --git a/src/components/common/Table/Table.component.tsx b/src/components/common/Table/Table.component.tsx index 8c911dff..9c989f4f 100644 --- a/src/components/common/Table/Table.component.tsx +++ b/src/components/common/Table/Table.component.tsx @@ -8,7 +8,7 @@ import React, { MouseEventHandler, } from 'react'; import { useNavigate } from 'react-router-dom'; -import { NestedKeyOf, ValueOf } from '@/types'; +import { ApplicationRequest, NestedKeyOf, ValueOf } from '@/types'; import { getOwnValueByKey, isArray, isSameObject, request } from '@/utils'; import { colors } from '@/styles'; import QuestionFile from '@/assets/svg/question-file-72.svg'; @@ -65,6 +65,7 @@ export interface TableProps { buttons?: ReactNode[]; }; pagination?: ReactNode; + applicationParams?: ApplicationRequest; } interface TableSupportBarProps { @@ -249,6 +250,7 @@ const Table = ({ sortOptions, supportBar: { totalCount, totalSummaryText, selectedSummaryText, buttons: supportButtons }, pagination, + applicationParams, }: TableProps) => { const navigate = useNavigate(); const { handleAddToast } = useToast(); @@ -378,7 +380,7 @@ const Table = ({ }); }, onSuccess: async () => { - navigate(`${PATH.APPLICATION}/${id}`); + navigate(`${PATH.APPLICATION}/${id}`, { state: applicationParams }); }, }); }; diff --git a/src/components/modal/SmsSendDetailInfoModalDialog/SmsSendDetailInfoModalDialog.component.tsx b/src/components/modal/SmsSendDetailInfoModalDialog/SmsSendDetailInfoModalDialog.component.tsx index b84fb453..f8728ef1 100644 --- a/src/components/modal/SmsSendDetailInfoModalDialog/SmsSendDetailInfoModalDialog.component.tsx +++ b/src/components/modal/SmsSendDetailInfoModalDialog/SmsSendDetailInfoModalDialog.component.tsx @@ -107,6 +107,7 @@ const SmsSendDetailInfoModalDialog = ({ sms }: SmsSendDetailInfoModalDialogProps }, handleCloseModal: handleRemoveCurrentModal, isContentScroll: false, + closeOnClickOverlay: false, }; return ( diff --git a/src/components/modal/SmsSendDetailListModalDialog/SmsSendDetailListModalDialog.component.tsx b/src/components/modal/SmsSendDetailListModalDialog/SmsSendDetailListModalDialog.component.tsx index 02db8a9d..eef11262 100644 --- a/src/components/modal/SmsSendDetailListModalDialog/SmsSendDetailListModalDialog.component.tsx +++ b/src/components/modal/SmsSendDetailListModalDialog/SmsSendDetailListModalDialog.component.tsx @@ -71,6 +71,7 @@ const SmsSendDetailListModalDialog = ({ }, handleCloseModal: handleRemoveCurrentModal, isContentScroll: false, + closeOnClickOverlay: false, }; return ( diff --git a/src/pages/ApplicationList/ApplicationList.page.tsx b/src/pages/ApplicationList/ApplicationList.page.tsx index e8053d8e..79d78cd1 100644 --- a/src/pages/ApplicationList/ApplicationList.page.tsx +++ b/src/pages/ApplicationList/ApplicationList.page.tsx @@ -354,6 +354,7 @@ const ApplicationList = () => { handleChangePage={handleChangePage} /> } + applicationParams={applicationParams} />