From 482c0b49822a9af78add2f2f1a5defdea999aeeb Mon Sep 17 00:00:00 2001 From: Anubhav Singh Date: Fri, 24 Nov 2023 00:21:09 +0530 Subject: [PATCH] BUG-1569 - Add Lock Option for List View --- .../_layouts/list/_components/resume-item.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/client/src/pages/dashboard/resumes/_layouts/list/_components/resume-item.tsx b/apps/client/src/pages/dashboard/resumes/_layouts/list/_components/resume-item.tsx index 5891d83dd..183954e67 100644 --- a/apps/client/src/pages/dashboard/resumes/_layouts/list/_components/resume-item.tsx +++ b/apps/client/src/pages/dashboard/resumes/_layouts/list/_components/resume-item.tsx @@ -3,6 +3,8 @@ import { CopySimple, DotsThreeVertical, FolderOpen, + Lock, + LockOpen, PencilSimple, TrashSimple, } from "@phosphor-icons/react"; @@ -38,6 +40,7 @@ type Props = { export const ResumeListItem = ({ resume }: Props) => { const navigate = useNavigate(); const { open } = useDialog("resume"); + const { open: lockOpen } = useDialog("lock"); const { url } = useResumePreview(resume.id); @@ -55,6 +58,10 @@ export const ResumeListItem = ({ resume }: Props) => { open("duplicate", { id: "resume", item: resume }); }; + const onLockChange = () => { + lockOpen(resume.locked ? "update" : "create", { id: "lock", item: resume }); + }; + const onDelete = () => { open("delete", { id: "resume", item: resume }); }; @@ -153,6 +160,17 @@ export const ResumeListItem = ({ resume }: Props) => { {t`Duplicate`} + {resume.locked ? ( + + + {t`Unlock`} + + ) : ( + + + {t`Lock`} + + )}