Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qa Release/v0.4.0 - 3차 #171

Merged
merged 4 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -246,6 +248,7 @@ const ApplicationPanel = ({
applicationId,
...restProps
}: ApplicationPanelProps) => {
const { state } = useLocation();
const { handleAddToast } = useToast();
const methods = useForm<FormValues>({
defaultValues: {
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const SmsSendModalDialog = ({
},
},
handleCloseModal: handleRemoveCurrentModal,
closeOnClickOverlay: false,
};

return (
Expand Down
6 changes: 4 additions & 2 deletions src/components/common/Table/Table.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -65,6 +65,7 @@ export interface TableProps<T extends object> {
buttons?: ReactNode[];
};
pagination?: ReactNode;
applicationParams?: ApplicationRequest;
}

interface TableSupportBarProps {
Expand Down Expand Up @@ -249,6 +250,7 @@ const Table = <T extends object>({
sortOptions,
supportBar: { totalCount, totalSummaryText, selectedSummaryText, buttons: supportButtons },
pagination,
applicationParams,
}: TableProps<T>) => {
const navigate = useNavigate();
const { handleAddToast } = useToast();
Expand Down Expand Up @@ -378,7 +380,7 @@ const Table = <T extends object>({
});
},
onSuccess: async () => {
navigate(`${PATH.APPLICATION}/${id}`);
navigate(`${PATH.APPLICATION}/${id}`, { state: applicationParams });
},
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const SmsSendDetailInfoModalDialog = ({ sms }: SmsSendDetailInfoModalDialogProps
},
handleCloseModal: handleRemoveCurrentModal,
isContentScroll: false,
closeOnClickOverlay: false,
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const SmsSendDetailListModalDialog = ({
},
handleCloseModal: handleRemoveCurrentModal,
isContentScroll: false,
closeOnClickOverlay: false,
};

return (
Expand Down
1 change: 1 addition & 0 deletions src/pages/ApplicationList/ApplicationList.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ const ApplicationList = () => {
handleChangePage={handleChangePage}
/>
}
applicationParams={applicationParams}
/>
<BottomCTA
boundaries={{
Expand Down