Skip to content

Commit

Permalink
feat(my-recruit): duedate 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
qkrdmstlr3 committed Aug 30, 2024
1 parent c310470 commit ae4d2a3
Show file tree
Hide file tree
Showing 25 changed files with 176 additions and 276 deletions.
1 change: 1 addition & 0 deletions src/app/(sidebar)/(my-info)/apis/useGetOnboadaStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const getOnboardStatus = () => {};
12 changes: 6 additions & 6 deletions src/app/(sidebar)/(my-info)/containers/Onboarding/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export function Logo() {
<path
id="Vector 2726 (Stroke)"
opacity="0.9"
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M84.5041 57.4366L72.1562 51.8438L73.8116 47.0156L86.7633 50.2167L84.5041 57.4366Z"
fill="#007D4F"
/>
Expand All @@ -26,16 +26,16 @@ export function Logo() {
<path
id="Line 316 (Stroke)"
opacity="0.9"
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M56.0012 47.4627L42.4691 45.2332L43.9172 39.1254L56.8653 42.8553L56.0012 47.4627Z"
fill="#007D4F"
/>
<path
id="Line 317 (Stroke)"
opacity="0.9"
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M66.6703 54.2593L64.9401 66.384L58.1172 65.6953L61.6844 53.1675L66.6703 54.2593Z"
fill="#007D4F"
/>
Expand Down
12 changes: 6 additions & 6 deletions src/app/(sidebar)/(my-info)/containers/Onboarding/LogoLeaf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function LogoLeaf() {
/>
<path
opacity="0.9"
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M12.5042 11.0016L10.3408 9.86802L10.6884 9.0166L12.9852 9.72614L12.5042 11.0016Z"
fill="#007D4F"
/>
Expand All @@ -19,15 +19,15 @@ export function LogoLeaf() {
/>
<path
opacity="0.9"
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M7.47524 8.91236L5.06404 8.3716L5.38759 7.28785L7.67825 8.09248L7.47524 8.91236Z"
fill="#007D4F"
/>
<path
opacity="0.9"
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M9.32851 10.2445L8.89211 12.4077L7.67188 12.2134L8.4429 9.99665L9.32851 10.2445Z"
fill="#007D4F"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ export function OnboardingDialog({}: OnboardingDialogProps) {
animate={step}
className="absolute bg-white top-0 left-0 w-full h-full rounded-[24px]">
<If condition={step === 'finish'}>
<div className="absolute right-0 top-[-32px]">
<button className="absolute right-0 top-[-32px]" onClick={() => setOpen(false)}>
<Icon size={24} name="close" color={color.neutral95} />
</div>
</button>
</If>
<motion.div
initial={{ opacity: 0 }}
Expand All @@ -189,7 +189,7 @@ export function OnboardingDialog({}: OnboardingDialogProps) {
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.7 }}
transition={{ delay: 1 }}
className="px-[20px] py-[13px] flex items-center gap-[6px] text-white bg-neutral-95 rounded-[6px] text-bold2 font-semibold whitespace-pre">
<LogoLeaf />
<span className="flex items-center">
Expand Down
2 changes: 1 addition & 1 deletion src/app/(sidebar)/my-recruit/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function CompanyDetail({ params: { id: recruitId } }: { params: {
</div>
</Dropdown.Trigger>
<Dropdown.Content align="end" className="gap-[8px]">
<DueDateDialog id={Number(recruitId)} onDuedateAppend={() => {}} />
<DueDateDialog id={Number(recruitId)} />
</Dropdown.Content>
</Dropdown>

Expand Down
6 changes: 4 additions & 2 deletions src/app/(sidebar)/my-recruit/api/usePostRecruitSchedule.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { http } from '@/apis/http';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { GET_RECRUIT_SCHEDULE } from '@/app/(sidebar)/my-recruit/api/useGetRecruitSchedule';
import { GET_ALL_RECRUITS_KEY } from '@/app/(sidebar)/my-recruit/api/useGetAllRecruits';
import { GET_PROGRESSING_RECRUITS_KEY } from '@/app/(sidebar)/my-recruit/api/useGetProgressingRecruits';

interface Request {
id: number;
Expand All @@ -18,7 +19,8 @@ export function usePostRecruitSchedule() {
const mutate = useMutation({
mutationFn: (data: Request) => postRecruitSchedule(data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: [GET_RECRUIT_SCHEDULE] });
queryClient.invalidateQueries({ queryKey: [GET_ALL_RECRUITS_KEY] });
queryClient.invalidateQueries({ queryKey: [GET_PROGRESSING_RECRUITS_KEY] });
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ interface Props extends ComponentProps<'input'> {

export function InputField({ required = false, right, value, ...inputProps }: Props) {
return (
<div className="w-full flex justify-between items-center px-16 py-12 bg-neutral-1 border-neutral-20 rounded-[8px] border-[1px]">
<div className="w-full flex justify-between items-center px-16 py-12 bg-neutral-1 border-neutral-20 rounded-[8px] border-[1px] whitespace-pre">
<If condition={required}>
<div className="text-mint-40 text-label1">*</div>
<div className="text-mint-40 text-label1">* </div>
</If>
<input value={value} className="flex-1 outline-none bg-transparent" {...inputProps} />
<If condition={right != null}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function NewRecruitDialogContent({ onSubmit }: NewRecruitDialogContentPro
const [title, setTitle] = useState('');
const [siteUrl, setSiteUrl] = useState('');
const [selectedDate, setSelectedDate] = useState<Date>();
const [currentRecruitStage, setCurrentRecruitStage] = useState<string>(recruitStatusList[3].text);
const [currentRecruitStage, setCurrentRecruitStage] = useState<string>(recruitScheduleStageList[0]);

const [selectedSeason, setSelectedSeason] = useState<string>();
const seasonList = useGetSeasons()?.data ?? [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export function ProgressingRecruitList() {
<BoxCard
key={`${cardInfo.id}-${cardInfo.season}-${cardInfo.title}`}
{...cardInfo}
onDuedateAppend={() => {}}
onRecruitDelete={deleteRecruit}
onRecruitStatusChange={(id, status) => {
patchRecruitStatus({ id, recruitStatus: status });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import { dday } from '@/utils/date';
import { MoreButton } from '@/app/(sidebar)/my-recruit/containers/components/Card/common/MoreButton';
import { StatusButton } from '@/app/(sidebar)/my-recruit/containers/components/Card/common/StatusButton';
import { Dialog } from '@/system/components/Dialog/ShadcnDialog';
import Link from 'next/link';
import { DueDateDialog } from '../DueDateDialog/DueDateDialog';
import { RecruitCard } from '@/app/(sidebar)/my-recruit/type';
import { useRouter } from 'next/navigation';
import { AsyncBoundaryWithQuery } from '@/lib';

interface BoxCardProps extends RecruitCard {
onRecruitDelete: (id: number) => void;
onRecruitStatusChange: (id: number, status: string) => void;
onDuedateAppend: () => void;
}

export const MIN_CARD_WIDTH = 250;
Expand All @@ -24,7 +23,6 @@ export function BoxCard({
recruitStatus,
season,
nearestSchedule,
onDuedateAppend,
onRecruitStatusChange,
onRecruitDelete,
}: BoxCardProps) {
Expand All @@ -41,7 +39,9 @@ export function BoxCard({
<Icon name="add" size={24} color={color.neutral50} />
</Dialog.Trigger>
<Dialog.Content className="w-400">
<DueDateDialog id={id} title={title} onDuedateAppend={() => onDuedateAppend()} />
<AsyncBoundaryWithQuery pendingFallback={<></>}>
<DueDateDialog id={id} title={title} />
</AsyncBoundaryWithQuery>
</Dialog.Content>
</Dialog>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function RowCard({
<div
className={cn('w-full rounded-[10px] overflow-hidden flex cursor-pointer', pointerEventsClassName)}
onClick={() => router.push(`/my-recruit/${id}`)}>
<div className={cn('w-12 disabled:bg-neutral-10 h-70', rightMarkBackgroundColorClassName)} />
<div className={cn('w-12 disabled:bg-neutral-10', rightMarkBackgroundColorClassName)} />
<div
className={cn(
'px-24 py-22 flex-1 flex items-center border-1 border-l-transparent rounded-r-[10px] justify-between hover:border-neutral-95 hover:border-l-transparent',
Expand All @@ -53,7 +53,7 @@ export function RowCard({
<div className="px-6 py-4 rounded-[4px] bg-neutral-95 flex gap-[2px]">
<Icon name="clover" size={20} color={color.mint30} />
<span className="text-white text-label2 ">
{recruitStatus} D-{dday(nearestSchedule?.deadLine!)}
{nearestSchedule?.recruitScheduleStage} D-{dday(nearestSchedule?.deadLine!)}
</span>
</div>
</If>
Expand Down
105 changes: 0 additions & 105 deletions src/app/(sidebar)/my-recruit/containers/components/DueDateDialog.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export function AddIcon() {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
<mask
id="mask0_3514_30875"
style={{
maskType: 'alpha',
}}
maskUnits="userSpaceOnUse"
x="0"
y="0"
width="16"
height="16">
<rect width="16" height="16" fill="#D9D9D9" />
</mask>
<g mask="url(#mask0_3514_30875)">
<path d="M8.28288 4V12.5658M12.5658 8.28288H4" stroke="#878A93" strokeWidth="1.5" />
</g>
</svg>
);
}
Loading

0 comments on commit ae4d2a3

Please sign in to comment.