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

๐Ÿ› fix: igw-55/127 - ์œ ํ•™์ƒ/๊ณ ์šฉ์ฃผ ์„œ๋ฅ˜์ž‘์„ฑ ๋ฒ„๊ทธ ํ•ด๊ฒฐ #128

Merged
merged 12 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
12 commits
Select commit Hold shift + click to select a range
e5996cc
:bug: fix: ๋ณดํ—˜ ์„ ํƒ ์‹œ enum์œผ๋กœ ์ž…๋ ฅ๋˜๋„๋ก ์ˆ˜์ • #127
MrMirror21 Nov 21, 2024
c4769f2
:bug: fix: ์œ ํ•™์ƒ์ด ์ž…๋ ฅํ•œ ์ •๋ณด ์ค‘ ์„œ๋ช… ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •์ƒ์ ์œผ๋กœ ํ‘œ๊ธฐ๋˜๋„๋ก ์ˆ˜์ • #127
MrMirror21 Nov 21, 2024
09020b6
:bug: fix: ๊ณ ์šฉ์ฃผ ๊ทผ๋กœ๊ณ„์•ฝ์„œ ์ž‘์„ฑ ํ›„ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ๊ฒฝ๋กœ ์ •์ • #127
MrMirror21 Nov 21, 2024
c8fe3c5
:bug: fix: ์›”๊ธ‰์ผ ์ž…๋ ฅ Input prefix ui ์ค„ ๋ฐ”๊ฟˆ ์ˆ˜์ • #127
MrMirror21 Nov 21, 2024
a9dcc7a
:bug: fix : ๊ณ ์šฉ์ฃผ/์œ ํ•™์ƒ ๋”ฐ๋ผ ๋’ค๋กœ๊ฐ€๊ธฐ url ๋ณ€๋™ ์ ์šฉ #127
MrMirror21 Nov 23, 2024
d9ed277
:bug: fix: ๋ฌธ์„œ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ํŽ˜์ด์ง€ ๊ณ ์šฉ์ฃผ/์œ ํ•™์ƒ ๋ณ„ ๋ฌธ๊ตฌ ๋ถ„๋ฆฌ #127
MrMirror21 Nov 23, 2024
928cd3b
:bug: fix: ๊ณ ์šฉ์ฃผ ๊ทผ๋กœ๊ณ„์•ฝ์„œ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์—ฐ๊ฒฐ #127
MrMirror21 Nov 23, 2024
3db5948
:bug: fix: ์„œ๋ฅ˜ ์นด๋“œ ์ ์ƒ‰ ์  ์œ„์น˜ ui ๊นจ์ง ํ˜„์ƒ ์ˆ˜์ • #127
MrMirror21 Nov 23, 2024
096fba0
:bug: fix: ๊ทผ๋กœ๊ณ„์•ฝ์„œ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๊ด€๋ จ api ๋ช…์„ธ ๋ณ€๊ฒฝ ์ ์šฉ #127
MrMirror21 Nov 24, 2024
94934d4
:bug: fix : ์ฃผํœด์ผ ๊ฒ€์ฆ ๋กœ์ง ์ถ”๊ฐ€ #127
MrMirror21 Nov 25, 2024
d9819fb
:bug: fix: ๋ฌธ์„œ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๋‚ด ๋นˆ ๊ฐ’ Null ๋Œ€์ฒด ํ…์ŠคํŠธ ์ ์šฉ #127
MrMirror21 Nov 25, 2024
7b162ad
:bug: fix : ์ดˆ๊ธฐ ๊ฒŒ์ŠคํŠธ ์ƒํƒœ๋กœ ์ง„์ž… ์‹œ ํ™”๋ฉด ์ตœ์ƒ๋‹จ UI ๋ฏธ์ถœ๋ ฅ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ #127
MrMirror21 Nov 25, 2024
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
2 changes: 1 addition & 1 deletion src/components/Common/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Input = ({

return (
<div
className={`w-full flex gap-2 items-center justify-between text-left body-2 border rounded-xl ${inputStyler(currentStatus)} bg-white py-[10px] pl-4 pr-[14px]`}
className={`w-full flex gap-2 whitespace-nowrap items-center justify-between text-left body-2 border rounded-xl ${inputStyler(currentStatus)} bg-white py-[10px] pl-4 pr-[14px]`}
>
{/* ์ ‘๋‘์‚ฌ๊ฐ€ ์กด์žฌํ•  ๊ฒฝ์šฐ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค. */}
{isPrefix && <div className="w-8 body-2 text-[#464646]">{prefix}</div>}
Expand Down
38 changes: 21 additions & 17 deletions src/components/Document/DocumentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import DownloadIcon from '@/assets/icons/DownloadIcon.svg?react';
import CheckIconGreen from '@/assets/icons/CheckIconGreen.svg?react';
import WriteIcon from '@/assets/icons/WriteIcon.svg?react';
import { useNavigate } from 'react-router-dom';
import { usePatchDocumentsStatusConfirmation, usePatchStatusSubmission } from '@/hooks/api/useDocument';
import { useCurrentDocumentIdStore, useCurrentPostIdEmployeeStore } from '@/store/url';
import {
usePatchDocumentsStatusConfirmation,
usePatchStatusSubmission,
} from '@/hooks/api/useDocument';
import {
useCurrentDocumentIdStore,
useCurrentPostIdEmployeeStore,
} from '@/store/url';

const enum DocumentStatus {
TEMPORARY_SAVE = 'TEMPORARY_SAVE',
Expand Down Expand Up @@ -42,8 +48,8 @@ const TemporarySaveCard = ({
<div className="self-stretch rounded-t-[1.125rem] bg-[#fef387] h-7 flex items-center justify-between px-4 pl-6 py-2 relative">
<div className="flex items-center justify-start relative ">
Check my Work Permit Form
<div className="w-1.5 absolute !m-0 top-[-0.3rem] right-[-0.5rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
</div>
<div className="w-1.5 absolute !m-0 top-[0.4rem] left-[8rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
<div className="w-[0.75rem] relative h-[0.75rem] z-[2]">
<div
className="absolute w-full h-full top-0 righ-0 bottom-0 left-0"
Expand Down Expand Up @@ -114,13 +120,12 @@ const BeforeConfirmationCard = ({
<div className="self-stretch rounded-t-[1.125rem] bg-[#fef387] h-7 flex items-center justify-between px-4 pl-6 py-2 relative">
<div className="flex items-center justify-start relative ">
Check my Work Permit Form
<div className="w-1.5 absolute !m-0 top-[-0.3rem] right-[-0.5rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
</div>
<div className="w-1.5 absolute !m-0 top-[0.4rem] left-[8rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
<div className="w-[0.75rem] relative h-[0.75rem] z-[2]">
<div
className="absolute w-full h-full top-0 righ-0 bottom-0 left-0"
onClick={onPreview}
/>
<div
className="pl-1 w-[1.25rem] relative h-[1.25rem] z-[2]"
onClick={onPreview}
>
<ArrowrightIcon />
</div>
</div>
Expand Down Expand Up @@ -271,13 +276,12 @@ const ConfirmationCard = ({
<div className="self-stretch rounded-t-[1.125rem] bg-[#fef387] h-7 flex items-center justify-between px-4 pl-6 py-2 relative">
<div className="flex items-center justify-start relative ">
Check my Work Permit Form
<div className="w-1.5 absolute !m-0 top-[-0.3rem] right-[-0.5rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
</div>
<div className="w-1.5 absolute !m-0 top-[0.4rem] left-[8rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
<div className="w-[0.75rem] relative h-[0.75rem] z-[2]">
<div
className="absolute w-full h-full top-0 righ-0 bottom-0 left-0"
onClick={onPreview}
/>
<div
className="pl-1 w-[1.25rem] relative h-[1.25rem] z-[2]"
onClick={onPreview}
>
<ArrowrightIcon />
</div>
</div>
Expand Down Expand Up @@ -350,8 +354,8 @@ const DocumentCardDispenser = ({
const { mutate: confirmDocument } = usePatchDocumentsStatusConfirmation();
const navigate = useNavigate();
const { updateCurrentDocumentId } = useCurrentDocumentIdStore();
const { currentPostId }= useCurrentPostIdEmployeeStore();
console.log(`current: ${currentPostId}`) // ์ง€์›์ž ์กฐํšŒ - ์ง€์›์ž ์ƒ์„ธ - ์„œ๋ฅ˜ ์ƒ์„ธ ๊ฐ„ ๋’ค๋กœ๊ฐ€๊ธฐ ๋ฌธ์ œ ๊ด€๋ จ
const { currentPostId } = useCurrentPostIdEmployeeStore();
console.log(`current: ${currentPostId}`); // ์ง€์›์ž ์กฐํšŒ - ์ง€์›์ž ์ƒ์„ธ - ์„œ๋ฅ˜ ์ƒ์„ธ ๊ฐ„ ๋’ค๋กœ๊ฐ€๊ธฐ ๋ฌธ์ œ ๊ด€๋ จ
const handleDownload = (url: string) => {
window.open(url, '_blank');
};
Expand Down
4 changes: 3 additions & 1 deletion src/components/Document/write/EmployerInfoSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ const EmployerInfoSection = ({
].includes(key) && (
<div className="w-full self-stretch drop-shadow-[0_1px_2px_rgba(107,110,116,0.04)] rounded-xl flex items-center justify-start py-2.5 pr-3.5 pl-4">
<div className="w-full flex-1 relative">
{propertyToString(String(value))}
{propertyToString(String(value)) === 'Null'
? 'none'
: propertyToString(String(value))}
</div>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ type DocumentCardProps = {
onNext?: () => void;
};

const NullCard = ({
title,
}: {
title: string;
}) => {
const NullCard = ({ title }: { title: string }) => {
return (
<div className="w-full relative rounded-[1.125rem] bg-white border border-[#dcdcdc] flex flex-col items-center justify-center gap-2 caption-2 text-left text-[#1e1926]">
<div className="self-stretch rounded-t-[1.125rem] bg-[#1e1926] h-7 flex items-center justify-between px-4 pl-6 py-2 relative">
Expand Down Expand Up @@ -67,20 +63,24 @@ const TemporarySaveCard = ({
title,
onNext,
onEdit,
onPreview,
}: {
title: string;
onNext: () => void;
onEdit: () => void;
onPreview: () => void;
}) => {
return (
<div className="w-full relative rounded-[1.125rem] bg-white border border-[#dcdcdc] flex flex-col items-center justify-center gap-2 caption-2 text-left text-[#1e1926]">
<div className="self-stretch rounded-t-[1.125rem] bg-[#fef387] h-7 flex items-center justify-between px-4 pl-6 py-2 relative">
<div className="flex items-center justify-start relative ">
ํด๋ฆญํ•ด์„œ ์„œ๋ฅ˜ ๋‚ด์šฉ์„ ํ™•์ธํ•ด๋ณด์„ธ์š”
ํด๋ฆญํ•ด์„œ ์„œ๋ฅ˜ ๋‚ด์šฉ์„ ํ™•์ธํ•ด๋ณด์„ธ์š”.
<div className="w-1.5 absolute !m-0 top-[-0.3rem] right-[-0.5rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
</div>
<div className="w-1.5 absolute !m-0 top-[0.4rem] left-[8rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
<div className="w-[0.75rem] relative h-[0.75rem] z-[2]">
<div className="absolute w-full h-full top-0 righ-0 bottom-0 left-0" />
<div
className="pl-1 w-[1.25rem] relative h-[1.25rem] z-[2]"
onClick={onPreview}
>
<ArrowrightIcon />
</div>
</div>
Expand Down Expand Up @@ -129,7 +129,8 @@ const TemporarySaveCard = ({
);
};

{/*
{
/*
const BeforeConfirmationCard = ({ title }: { title: string }) => {
return (
<div className="w-full relative rounded-[1.125rem] bg-white border border-[#dcdcdc] flex flex-col items-center justify-center gap-2 caption-2 text-left text-[#1e1926]">
Expand Down Expand Up @@ -168,7 +169,8 @@ const TemporarySaveCard = ({
</div>
);
};
*/}
*/
}

const SubmittedCard = ({ title }: { title: string }) => {
return (
Expand Down Expand Up @@ -213,22 +215,26 @@ const RewritingCard = ({
title,
onNext,
onEdit,
onPreview,
reason,
}: {
title: string;
onNext: () => void;
onEdit: () => void;
onPreview: () => void;
reason: string;
}) => {
return (
<div className="w-full relative rounded-[1.125rem] bg-white border border-[#dcdcdc] flex flex-col items-center justify-center gap-2 caption-2 text-left text-[#1e1926]">
<div className="self-stretch rounded-t-[1.125rem] bg-[#fef387] h-7 flex items-center justify-between px-4 pl-6 py-2 relative">
<div className="flex items-center justify-start relative ">
Check my Work Permit Form
ํด๋ฆญํ•ด์„œ ์„œ๋ฅ˜ ๋‚ด์šฉ์„ ํ™•์ธํ•ด๋ณด์„ธ์š”.
<div className="w-1.5 absolute !m-0 top-[-0.3rem] right-[-0.5rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
</div>
<div className="w-1.5 absolute !m-0 top-[0.4rem] left-[8rem] rounded-full bg-[#ff6f61] h-1.5 z-[1]" />
<div className="w-[0.75rem] relative h-[0.75rem] z-[2]">
<div className="absolute w-full h-full top-0 righ-0 bottom-0 left-0" />
<div
className="pl-1 w-[1.25rem] relative h-[1.25rem] z-[2]"
onClick={onPreview}
>
<ArrowrightIcon />
</div>
</div>
Expand Down Expand Up @@ -282,6 +288,7 @@ const ConfirmationCard = ({
}: {
title: string;
document: EmployDocumentInfo;

onDownload: (url: string) => void;
}) => {
return (
Expand All @@ -290,10 +297,6 @@ const ConfirmationCard = ({
<div className="flex items-center justify-start relative text-[#fef387]">
์„œ๋ฅ˜ ์ž‘์„ฑ์ด ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
</div>
<div className="w-[0.75rem] relative h-[0.75rem] z-[2]">
<div className="absolute w-full h-full top-0 righ-0 bottom-0 left-0" />
<ArrowrightIcon />
</div>
</div>
<div className="self-stretch flex flex-col items-start px-4 gap-4 body-1">
<div className="self-stretch border-b border-[#dcdcdc] h-10 flex items-center justify-center pl-2 pb-2 gap-4">
Expand Down Expand Up @@ -360,7 +363,7 @@ const DocumentCardDispenserEmployer = ({
const handleDownload = (url: string) => {
window.open(url, '_blank');
};
const {updateCurrentDocumentId} = useCurrentDocumentIdStore();
const { updateCurrentDocumentId } = useCurrentDocumentIdStore();
const { mutate: submitDocument } = usePatchStatusSubmissionEmployer();
if (!document.status) return <NullCard title={title} />;
switch (document.status) {
Expand All @@ -378,6 +381,14 @@ const DocumentCardDispenserEmployer = ({
},
});
}}
onPreview={() => {
updateCurrentDocumentId(document.id);
navigate(`/document-preview/${document.id}`, {
state: {
type: type,
},
});
}}
/>
);
case DocumentStatusEmployer.SUBMITTED:
Expand All @@ -398,6 +409,14 @@ const DocumentCardDispenserEmployer = ({
},
});
}}
onPreview={() => {
updateCurrentDocumentId(document.id);
navigate(`/document-preview/${document.id}`, {
state: {
type: type,
},
});
}}
/>
);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
LaborContractEmployeeInfoProperty,
} from '@/types/api/document';
import { Address } from '@/types/api/users';
import { getDetailAddress, getImageType } from '@/utils/document';
import { getDetailAddress } from '@/utils/document';
import { renderMap } from '@/utils/map';

const EmployeeInfoSectionKOR = ({
Expand Down Expand Up @@ -70,8 +70,8 @@ const EmployeeInfoSectionKOR = ({
<div className="border border-gray-200 rounded-xl">
{value !== '' && (
<img
src={`data:image/${getImageType(value)};base64,${value}`}
className="w-full h-full object-cover"
src={`data:image/svg+xml;base64,${value}`}
className="w-full h-full object-cover bg-white rounded-xl"
alt="signature preview"
/>
)}
Expand Down
74 changes: 42 additions & 32 deletions src/components/Employer/WriteDocument/EmployerLaborContractForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import InputLayout from '@/components/WorkExperience/InputLayout';
import {
DAYS,
initialLaborContractEmployerInfo,
INSURANCES,
InsuranceInfo,
} from '@/constants/documents';
import { useSearchAddress } from '@/hooks/api/useKaKaoMap';
import {
Expand Down Expand Up @@ -112,10 +112,6 @@ const EmployerLaborContractForm = ({

/* ์ •๋ณด ์ž…๋ ฅ ์‹œ๋งˆ๋‹ค ์œ ํšจ์„ฑ์„ ๊ฒ€์‚ฌํ•ด ๋ชจ๋“  ๊ฐ’์ด ์œ ํšจํ•˜๋ฉด ๋ฒ„ํŠผ์ด ํ™œ์„ฑํ™” */
useEffect(() => {
{
/* work_day_time_list ๋ฐ์ดํ„ฐ๊ฐ€ ์•ˆ ๋“ค์–ด๊ฐ€์„œ ๊ณ„์† ์œ ํšจ์„ฑ ์‹คํŒจ ์ค‘ */
}
console.log(newDocumentData.work_day_time_list);
setIsInvalid(
!validateLaborContractEmployerInformation({
...newDocumentData,
Expand Down Expand Up @@ -608,40 +604,53 @@ const EmployerLaborContractForm = ({
isEssential
>
<div className="w-full flex">
{Object.keys(INSURANCES).map((value, index) => (
<div
className="w-full relative flex items-center justify-start py-2 gap-2 text-left body-3 text-[#656565]"
key={`${value}_${index}`}
>
<div className="w-6 h-6 relative">
<div
className={`w-full h-full border border-[#f4f4f9] flex items-center justify-center ${newDocumentData.insurance.includes(value as Insurance) ? 'bg-[#1E1926]' : 'bg-white'}`}
onClick={() => {
const newInsurance = newDocumentData.insurance.includes(
value as Insurance,
)
? newDocumentData.insurance.filter(
(insurance) => insurance !== value,
)
: [...newDocumentData.insurance, value];
{Object.entries(InsuranceInfo).map(
([insuranceType, info], index) => (
<div
className="w-full relative flex items-center justify-start py-2 gap-2 text-left body-3 text-[#656565]"
key={`${insuranceType}_${index}`}
>
<div className="w-6 h-6 relative">
<div
className={`w-full h-full border border-[#f4f4f9] flex items-center justify-center ${
newDocumentData.insurance.includes(
info.key as Insurance,
)
? 'bg-[#1E1926]'
: 'bg-white'
}`}
onClick={() => {
const newInsurance = newDocumentData.insurance.includes(
info.key as Insurance,
)
? newDocumentData.insurance.filter(
(insurance) => insurance !== info.key,
)
: [
...newDocumentData.insurance,
info.key as Insurance,
];

setNewDocumentData({
...newDocumentData,
insurance: newInsurance as Insurance[],
});
}}
>
<CheckIcon />
setNewDocumentData({
...newDocumentData,
insurance: newInsurance,
});
}}
>
<CheckIcon />
</div>
</div>
<div className="flex items-start justify-start">
{info.name}
</div>
</div>
<div className="flex items-start justify-start">{value}</div>
</div>
))}
),
)}
</div>
</InputLayout>
{/* ์„œ๋ช… ์ž…๋ ฅ */}
<InputLayout title="์„œ๋ช…" isEssential>
<SignaturePad
<SignaturePad
onSave={(signature: string) =>
setNewDocumentData({
...newDocumentData,
Expand All @@ -655,6 +664,7 @@ const EmployerLaborContractForm = ({
})
}
isKorean
previewImg={newDocumentData.signature_base64}
/>
</InputLayout>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/components/Home/HomeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const HomeHeader = () => {
return isRead;
};

if (!data?.success) return <></>;

return (
<section className="w-full pt-[3.125rem] pb-[1rem] px-[1.5rem] bg-[#FEF387]">
<p className="pb-[0.375rem] body-2 text-[#37383C9C]">
Expand All @@ -40,7 +38,7 @@ const HomeHeader = () => {
>
<AlarmIcon />
{/* ์•Œ๋žŒ์ด ์žˆ์„ ๋•Œ๋งŒ ํ‘œ์‹œํ•˜๊ธฐ */}
{isReadAlarms(data?.data?.notification_list) ? (
{data?.success && isReadAlarms(data?.data?.notification_list) ? (
<div className="absolute top-[0.3rem] right-[0.4rem] w-[0.438rem] h-[0.438rem] rounded-full bg-[#FF6F61]"></div>
) : (
<></>
Expand Down
Loading