PageSourceSearch

https://ergodotisi.com/_next/static/chunks/2195-d6ad98c56d165676.js

js ergodotisi.com collected 2026-10-02 16:36:38 UTC 33,379 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e8bb1cf4-3de6-4053-939d-48b4e6e22eac",e._sentryDebugIdIdentifier="sentry-dbid-e8bb1cf4-3de6-4053-939d-48b4e6e22eac")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2195],{46571:function(e,t,a){var r=a(85893);a(67294);var s=a(41664),n=a.n(s),l=a(18304),i=a(5233);t.Z=e=>{let{href:t,label:a,typography:s="heading_H4_bold"}=e,{t:o}=(0,i.$G)("common");return(0,r.jsxs)(n(),{className:"".concat(s," flex items-center gap-2 text-brand-orange-600 underline-offset-4 transition duration-300 ease-in-out hover:underline hover:brightness-125 md:gap-4"),href:t,"data-sentry-element":"Link","data-sentry-component":"BackToList","data-sentry-source-file":"BackToList.tsx",children:[(0,r.jsx)(l.Z,{"data-sentry-element":"BackArrow","data-sentry-source-file":"BackToList.tsx"}),(0,r.jsx)("span",{children:o(a)})]})}},52972:function(e,t,a){var r=a(85893);a(67294),t.Z=()=>(0,r.jsx)("svg",{width:"4",height:"5",viewBox:"0 0 4 5",fill:"none","data-sentry-element":"svg","data-sentry-component":"Dot","data-sentry-source-file":"Dot.tsx",children:(0,r.jsx)("circle",{cx:"2",cy:"2.5",r:"2",fill:"#9E9E9E","data-sentry-element":"circle","data-sentry-source-file":"Dot.tsx"})})},88388:function(e,t,a){var r=a(85893);a(67294);var s=a(5233);t.Z=e=>{let{completed:t,sign:a="Almost there"}=e,{t:n}=(0,s.$G)("common");return(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3","data-sentry-component":"ProgressBar","data-sentry-source-file":"index.tsx",children:[(0,r.jsx)("p",{className:"paragraph_normal_bold text-gray-600",children:"".concat(n(a),"... ").concat(t,"%")}),(0,r.jsx)("div",{className:"h-2 w-[200px] rounded-20px bg-gray-300",children:(0,r.jsx)("div",{className:"h-2 rounded-20px bg-brand-orange-600 transition duration-100 ease-in",style:{width:"".concat(t,"%")}})})]})}},97632:function(e,t,a){a.d(t,{Z:function(){return eb}});var r,s,n=a(85893),l=a(67294),i=a(30381),o=a.n(i),d=a(11163);a(50837);var c=a(91444),u=a(48823),m=a(14986),p=a(98442);let h=()=>{let e=(0,d.useRouter)();return{isGeneratedCV:e.asPath.includes("/documents/generatedCVs"),isUploadedData:e.asPath.includes("/documents/uploadedOtherDocuments")||e.asPath.includes("/documents/uploadedCVs")}};var x=a(836),f=a(5233),g=a(46571),y=e=>{let{title:t,isEmpty:a,children:r,setIsFileUploadOpen:s}=e,{isUploadedData:l,isGeneratedCV:i}=h(),{t:o}=(0,f.$G)("dashboard");return(0,n.jsxs)("div",{"data-sentry-component":"DocumentsCard","data-sentry-source-file":"DocumantsCard.tsx",children:[!a&&(0,n.jsx)(n.Fragment,{children:i||l?(0,n.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,n.jsx)(g.Z,{label:"Back to Documents",href:"/employee-dashboard/documents",typography:"paragraph_large_bold lg:heading_H4_bold"}),l?(0,n.jsx)(m.Z,{label:"Upload file",rightIcon:(0,n.jsx)(p.Z,{}),onClick:()=>s(!0),changingSizeRules:"medium md:large",shape:"rectangular"}):(0,n.jsx)(u.Z,{label:"Create CV",href:"/employee-dashboard/cv-generator",variant:"primary",shape:"rectangular",changingSizeRules:"medium md:large"})]}):(0,n.jsxs)("div",{className:"paragraph_large_bold mb-4 flex items-center gap-2 text-gray-600",children:[(0,n.jsx)("span",{children:x.x}),o(t)]})}),(0,n.jsx)("div",{className:"flex flex-col items-center rounded-20px text-start shadow-xs",children:(0,n.jsx)("div",{className:"flex w-full flex-col p-6 text-start",children:r})})]})},v=a(25675),b=a.n(v),j={src:"/_next/static/media/emptyDocuments.d1746d55.png",height:270,width:300,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAATlBMVEXt6vXu7vfj2/D29vjx7/f+/v35+fz08fn39vr////9/P76+Pvw8Pf29vnBstr///+Odbv8/P/z8vn7+/2JZraZfMCHZLX//v/59v/VxesQTHWqAAAAF3RSTlP8D/4p+ocz/uQD6nEiXf48/ri5ot3LmPoNl60AAAAJcEhZcwAACxMAAAsTAQCanBgAAAA9SURBVHicJcbJAYAgDATA5QhJwFthsf9GfTivQWp3PT04KhlhlnBpPrY4C9pUaGbBrvgTjCTfAV9WEenPB0hJAnZDC1RQAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:7},C=a(81076),_=a(98635),w=a(48732),N=a(85444),U=e=>
1{let{title:t,tooltipContent:a=null,setIsOpen:r,isLoading:s,hasAPIError:l}=e,i="Other documents"===t,{t:o}=(0,f.$G)("dashboard");return(0,n.jsxs)("div",{className:"w-full","data-sentry-component":"EmptyUploadedData","data-sentry-source-file":"EmptyUploadedData.tsx",children:[(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2.5 border-b border-solid border-gray-300 pb-2",children:[(0,n.jsxs)("p",{className:"paragraph_large_bold text-start text-gray-600",children:["0 ",o(t)]}),!!a&&(0,n.jsx)(C.Z,{content:a,children:(0,n.jsx)(_.Z,{type:"button"})})]}),(0,n.jsx)("div",{className:"flex h-[400px] flex-col items-center justify-center ".concat(i?"":"py-10"),children:l?(0,n.jsx)(w.Z,{}):s?(0,n.jsx)(N.Z,{}):(0,n.jsxs)(n.Fragment,{children:["Uploaded CVs"===t&&(0,n.jsx)(b(),{src:j,alt:"empty documents",width:200,priority:!0}),(0,n.jsx)("div",{className:"mt-6 text-center",children:(0,n.jsx)("p",{className:"paragraph_large_bold text-gray-600",children:i?"".concat(o("No documents uploaded yet"),"."):"".concat(o("You haven’t published any CVs yet"),".")})}),(0,n.jsx)("div",{className:"mt-6",children:(0,n.jsx)(m.Z,{label:"Upload file",rightIcon:(0,n.jsx)(p.Z,{}),onClick:()=>r(!0),changingSizeRules:"medium md:large",shape:"rectangular"})})]})})]})},D=e=>{let{title:t,tooltipContent:a="",isLoading:r,hasAPIError:s}=e,{t:l}=(0,f.$G)("dashboard");return(0,n.jsxs)("div",{className:"w-full","data-sentry-component":"EmptyGeneratedCVs","data-sentry-source-file":"EmptyGeneratedCVs.tsx",children:[(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2.5 border-b border-solid border-gray-300 pb-2",children:[(0,n.jsxs)("p",{className:"paragraph_large_bold text-start text-gray-600",children:["0 ",l(t)]}),!!a&&(0,n.jsx)(C.Z,{content:a,children:(0,n.jsx)(_.Z,{type:"button"})})]}),(0,n.jsx)("div",{className:"flex w-full flex-col justify-center items-center h-[400px] gap-6",children:s?(0,n.jsx)(w.Z,{}):r?(0,n.jsx)(N.Z,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"pt-6 text-center",children:[(0,n.jsxs)("p",{className:"paragraph_large_bold text-gray-600",children:[l("No CVs generated yet"),"."]}),(0,n.jsxs)("p",{className:"paragraph_normal_regular text-gray-500",children:[l("Generated a CV in minutes, with our easy CV tool"),"!"]})]}),(0,n.jsx)(u.Z,{href:"/employee-dashboard/cv-generator",label:"Create CV",shape:"rectangular",variant:"primary",changingSizeRules:"medium md:large"})]})})]})},A=a(94809),Z=a(53453),S=a(66613),F=a(22546),V=a(58378),k=a(57871),E=a(74231),R=a(87536),P=a(47533),O=a(36038),T=a(78551),I=a(2994);let q=()=>{var e,t;let a=(0,d.useRouter)(),r={locale:(null===(e=a.locale)||void 0===e?void 0:e.split("-").shift())||"en",defaultLocale:(null===(t=a.defaultLocale)||void 0===t?void 0:t.split("-").shift())||"en"},s=(0,T.a)({queryKey:["jobCategories",r.locale],queryFn:I.c.bind(null,r),refetchOnWindowFocus:!1});return{jobCategories:s.data,isLoading:s.isLoading,isError:s.isError}};var G=a(48425),M=a(7852),B=a(82798),L=()=>(0,n.jsx)("svg",{width:"12",height:"4",viewBox:"0 0 12 4",fill:"none","data-sentry-element":"svg","data-sentry-component":"MinusIcon","data-sentry-source-file":"MinusIcon.tsx",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1.9998C0 1.68154 0.126428 1.37632 0.351472 1.15128C0.576516 0.926233 0.88174 0.799805 1.2 0.799805H10.8C11.1183 0.799805 11.4235 0.926233 11.6485 1.15128C11.8736 1.37632 12 1.68154 12 1.9998C12 2.31806 11.8736 2.62329 11.6485 2.84833C11.4235 3.07338 11.1183 3.1998 10.8 3.1998H1.2C0.88174 3.1998 0.576516 3.07338 0.351472 2.84833C0.126428 2.62329 0 2.31806 0 1.9998Z",fill:"currentColor","data-sentry-element":"path","data-sentry-source-file":"MinusIcon.tsx"})}),z=e=>{let{value:t,onChange:a,label:r}=e;return(0,n.jsxs)("div",{className:"gap-2 flex w-full flex-col justify-start text-gray-500","data-sentry-component":"UploadCV","data-sentry-source-file":"UploadCV.tsx",children:[(0,n.jsx)("label",{className:"paragraph_normal_bold text-start",children:r}),t?(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-md border border-solid border-gray-300 bg-gray-100 p-[7px] ",children:[(0,n.jsx)("p",{children:null==t?void 0:t.fileName}),(0,n.jsx)("div",{className:"mr-3 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full transition duration-100 hover:bg-gray-300 text-gray-333",onClick:()=>{a(null)},children:(0,n.jsx)(L,{})})]}):(0,n.jsx)(B.Z,{onChange:a,value:t,fileTypes:[".pdf",".doc",".docx"],maxSize:M.fT,isBorder:!0})]})},J=a(82493);let H=E.Ry({includeInSeek4U:E.O7(),jobCategories:E.IX().of(E.Ry({id:E.Z_().required(),title:E.Z_().required(),tid:E.Rx().required(),name:E.Z_().required()})).min(1,J.$).max(3,"The number of selected job categories shouldn't be more than 3").optional(),file:E.Ry({url:E.Z_(),fileName:E.Z_().required("File name is required"),file:E.nK()}).required("File is required")});var Y=e=>{let{onChange:t,handleClose:a}=e,{t:r}=(0,f.$G)(["common","dashboard"]),[s,i]=(0,l.useState)([]),{jobCategories:o,isError:d,isLoading:c}=q(),{control:u,handleSubmit:p,trigger:h,formState:{isValid:x}}=(0,R.cI)({defaultValues:{includeInSeek4U:!0,jobCategories:[]},mode:"onSubmit",resolver:(0,P.X)(H)});function g(e,t){let a=[...s],r=a.findIndex(t=>t.id===e);a[r].selected=!a[r].selected,i(a),t(a.filter(e=>e.selected).map(e=>({title:e.title,id:e.id,tid:e.tid,name:e.name})))}return(0,l.useEffect)(function(){o&&i(null==o?void 0:o.map(e=>({title:e.title,selected:!1,id:e.id,tid:e.tid,name:e.name})))},[o]),d?(0,n.jsx)(w.Z,{}):c?(0,n.jsx)(N.Z,{}):(0,n.jsxs)("form",{onSubmit:p(e=>{t(e),a()}),className:"flex px-8 flex-col w-full pt-8 gap-3","data-sentry-component":"UploadCVForm","data-sentry-source-file":"UploadCVForm.tsx",children:[(0,n.jsx)(R.Qr,{name:"file",control:u,render:e=>{let{field:t}=e;return(0,n.jsx)(z,{label:r("Upload CV"),value:t.value,onChange:t.onChange})},"data-sentry-element":"Controller","data-sentry-source-file":"UploadCVForm.tsx"}),(0,n.jsx)(R.Qr,{name:"jobCategories",control:u,render:e=>{let{field:t,fieldState:a}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)("p",{className:"text-start paragraph_normal_bold text-gray-500",children:r("Job categories")}),(0,n.jsx)(O.Z,{isEditing:!0,resetJobCategories:()=>{var e;e=t.onChange,i(e=>e.map(e=>({...e,selected:!1}))),e([]),h("jobCategories")},onChange:e=>{g(e,t.onChange),h("jobCategories")},listOfCategories:s}),(0,n.jsx)("div",{className:"text-[13px] text-red-500",children:a.error&&r(a.error.message)}),t.value&&!!t.value.length&&(0,n.jsx)("ul",{className:"flex max-h-[110px] w-full flex-wrap gap-2 overflow-y-auto rounded-b-lg bg-white py-2 pl-0 pr-2 ".concat(M.ZF),children:t.value.map(e=>(0,n.jsxs)("button",{onClick:()=>{g(e.id,t.onChange),h("jobCategories")},type:"button",className:"button_large_bold flex items-center gap-2 rounded-full border border-solid border-brand-orange-600 px-4 py-2 text-brand-orange-600 transition duration-200 ease-in-out",children:[e.title,(0,n.jsx)(G.Z,{size:"small"})]},e.id))})]})},"data-sentry-element":"Controller","data-sentry-source-file":"UploadCVForm.tsx"}),(0,n.jsx)(R.Qr,{name:"includeInSeek4U",control:u,render:e=>{var t;let{field:a}=e;return(0,n.jsx)(k.Z,{className:"!text-gray-500 text-start",question:r("Include CV in Seek4U Bank when upload is complete",{ns:"dashboard"}),isYes:null!==(t=a.value)&&void 0!==t&&t,setIsYes:a.onChange,tooltipContent:r("Include CV in Seek4U Bank when upload is complete",{ns:"dashboard"})})},"data-sentry-element":"Controller","data-sentry-source-file":"UploadCVForm.tsx"}),(0,n.jsxs)("div",{className:"flex w-full justify-center gap-4",children:[(0,n.jsx)(m.Z,{onClick:a,type:"button",label:r("Cancel"),variant:"outline-primary",changingSizeRules:"medium md:large",className:"w-[150px] sm:w-fit","data-sentry-element":"Button","data-sentry-source-file":"UploadCVForm.tsx"}),(0,n.jsx)(m.Z,{type:"submit",disabled:!x,label:r("Submit"),variant:"primary",changingSizeRules:"medium md:large",className:"w-[150px] sm:w-fit","data-sentry-element":"Button","data-sentry-source-file":"UploadCVForm.tsx"})]})]})},$=e=>{let{isOpen:t,setIsOpen:a,isUploadedCV:r,onChange:s}=e,{t:i}=(0,f.$G)("common"),o=()=>{a(!1)};return(0,n.jsx)(S.u,{appear:!0,show:t,as:l.Fragment,"data-sentry-element":"Transition","data-sentry-component":"UploadFilePopUp","data-sentry-source-file":"UploadFilePopUp.tsx",children:(0,n.jsxs)(F.Vq,{as:"div",className:"relative z-10",onClose:a,"data-sentry-element":"Dialog","data-sentry-source-file":"UploadFilePopUp.tsx",children:[(0,n.jsx)(S.x,{as:l.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0","data-sentry-element":"TransitionChild","data-sentry-source-file":"UploadFilePopUp.tsx",children:(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-70"})}),(0,n.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,n.jsx)("div",{className:"flex justify-center p-4 pt-[15vh] text-center",children:(0,n.jsx)(S.x,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95","data-sentry-element":"TransitionChild","data-sentry-source-file":"UploadFilePopUp.tsx",children:(0,n.jsxs)(F.EM,{className:"relative flex w-[343px] transform flex-col items-center justify-center rounded-3xl bg-white pb-8 pt-4 transition-all md:w-[566px]","data-sentry-element":"DialogPanel","data-sentry-source-file":"UploadFilePopUp.tsx",children:[(0,n.jsx)(V.Z,{className:"absolute right-4 top-4",onClose:o,"data-sentry-element":"CloseButtonMini","data-sentry-source-file":"UploadFilePopUp.tsx"}),r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"px-8 md:paragraph_large_bold paragraph_normal_bold text-center text-gray-500",children:i("Upload CV (All fields are mandatory)")}),(0,n.jsx)(Y,{onChange:s,handleClose:o})]}):(0,n.jsx)("div",{className:"w-full px-6 pt-8",children:(0,n.jsx)(B.Z,{isBorder:!0,maxSize:M.fT,fileTypes:[".pdf",".doc",".docx"],onChange:e=>{s({file:e})}})})]})})})})]})})},Q=a(98737),K=a(84615),W=a(52972),X=a(36846),ee=a(88388),et=e=>{let{isOpen:t,setIsOpen:a,progress:r}=e,{t:s}=(0,f.$G)("common");return(0,n.jsx)(S.u,{appear:!0,show:!!r,as:l.Fragment,"data-sentry-element":"Transition","data-sentry-component":"UploadFileProgress","data-sentry-source-file":"UploadFileProgress.tsx",children:(0,n.jsxs)(F.Vq,{as:"div",className:"relative z-10",onClose:a,"data-sentry-element":"Dialog","data-sentry-source-file":"UploadFileProgress.tsx",children:[(0,n.jsx)(S.u.Child,{as:l.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0","data-sentry-element":"unknown","data-sentry-source-file":"UploadFileProgress.tsx",children:(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-70"})}),(0,n.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,n.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,n.jsx)(S.u.Child,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95","data-sentry-element":"unknown","data-sentry-source-file":"UploadFileProgress.tsx",children:(0,n.jsxs)(F.Vq.Panel,{className:"relative flex w-[343px] transform flex-col items-center justify-center rounded-3xl bg-white p-6 pb-8 pt-12 transition-all md:w-[566px]","data-sentry-element":"unknown","data-sentry-source-file":"UploadFileProgress.tsx",children:[(0,n.jsx)(V.Z,{className:"absolute right-5 top-5",onClose:()=>a(!1),"data-sentry-element":"CloseButtonMini","data-sentry-source-file":"UploadFileProgress.tsx"}),(0,n.jsxs)("div",{className:"dashed_border flex h-[282px] w-full flex-col items-center justify-center py-12 text-center",children:[(0,n.jsx)(ee.Z,{completed:r,sign:"Loading","data-sentry-element":"ProgressBar","data-sentry-source-file":"UploadFileProgress.tsx"}),(0,n.jsx)("p",{className:"paragraph_normal_regular mt-6 text-gray-500",children:s("File is uploading. Please wait few seconds")})]})]})})})})]})})},ea=a(2343),er=a(11734),es=a(64674),en=a(71125),el=a(85024),ei=a(55587),eo=a(10316),ed=a(42160),ec=a(17355),eu=a(59289),em=a(27037),ep=a(7506),eh=a(24139),ex=class extends ep.l{constructor(e,t){super(),this.#e=void 0,this.#t=e,this.setOptions(t),this.bindMethods(),this.#a()}#t;#e;#r;#s;bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#t.defaultMutationOptions(e),(0,eh.VS)(t,this.options)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),this.#r?.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#n(e)}getCurrentResult(){return this.#e}reset(){this.#r=void 0,this.#a(),this.#n()}mutate(e,t){return this.#s=t,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){let e=this.#r?.state??(0,eu.R)();this.#e={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){em.V.batch(()=>{this.#s&&this.hasListeners()&&(e?.type==="success"?(this.#s.onSuccess?.(e.data,this.#e.variables,this.#e.context),this.#s.onSettled?.(e.data,null,this.#e.variables,this.#e.context)):e?.type==="error"&&(this.#s.onError?.(e.error,this.#e.variables,this.#e.context),this.#s.onSettled?.(void 0,e.error,this.#e.variables,this.#e.context))),this.listeners.forEac
1h(e=>{e(this.#e)})})}},ef=a(30202),eg=a(86290);function ey(){}(r=s||(s={})).Service="Name",r.Date="Date";let ev=[{icon:(0,n.jsx)(el.Z,{changeColor:!0}),name:"View",key:ei.jI.View},{icon:(0,n.jsx)(Q.Z,{}),name:"Delete",key:ei.jI.Delete}];var eb=e=>{let{documentsData:t,apiError:a,headers:r,title:s,path:i,tooltipContent:x="",isUploaded:g=!1}=e,v="Generated CVs"===s,b="Other documents"===s,{isUploadedData:j,isGeneratedCV:w}=h(),N=(0,d.useRouter)(),{mutate:S}=function(e,t){let a=(0,ef.NL)(void 0),[r]=l.useState(()=>new ex(a,e));l.useEffect(()=>{r.setOptions(e)},[r,e]);let s=l.useSyncExternalStore(l.useCallback(e=>r.subscribe(em.V.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),n=l.useCallback((e,t)=>{r.mutate(e,t).catch(ey)},[r]);if(s.error&&(0,eg.L)(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:n,mutateAsync:s.mutate}}({mutationFn:X.cT,onSuccess:()=>{ew(!1),eC(0)},onError:e=>{ew(!1),eC(0)}}),{t:F}=(0,f.$G)("dashboard"),{confirm:V,setConfirm:k,setIsOpen:E,isOpen:R,onConfirm:P,onCancel:O}=(0,ea.p)(),T=(0,ec.useTaxonomyContext)(),[I,q]=(0,l.useState)(),[G,M]=(0,l.useState)(),[B,L]=(0,l.useState)(1),[z,J]=(0,l.useState)(0),[H,Y]=(0,l.useState)(!1),[ee,el]=(0,l.useState)(!1),[eu,ep]=(0,l.useState)(null),[eh,eb]=(0,l.useState)(null),[ej,eC]=(0,l.useState)(0),[e_,ew]=(0,l.useState)(!1),[eN,eU]=(0,l.useState)(""),eD=(0,l.useRef)(G),eA="Uploaded CVs"===s,eZ=async e=>{let t,a,r,{file:s,includeInSeek4U:n,jobCategories:l}=e;try{t=await (0,ed.G)({type:ei.Jq.MediaDocument,file:s})}catch(e){e.message="UploadFile: "+e.message,console.error(e),c.Am.error(F("Something went wrong"));return}switch(i){case ei.c8.UploadedCVs:a=ei.n_.CV;break;case ei.c8.UploadedOtherDocuments:a=ei.n_.Other;break;default:throw Error("Unknown document type ".concat(i))}let o={title:s.fileName,field_include_in_seek4u:n},d={field_file:{data:{type:ei.Jq.MediaDocument,id:t.id}},field_document_type:{data:{type:ei.Jq.DocumentType,id:T.getDocumentTypeByName(a).id}}};eA&&(null==l?void 0:l.length)&&(d.field_job_categories={data:l.map(e=>({id:e.id,type:ei.Jq.TaxonomyJobCategory}))});try{let e={id:(r=await (0,eo.AW)({type:ei.Jq.Document,extraHeaders:{"Content-Type":"application/vnd.api+json"},body:{data:{type:ei.Jq.Document,attributes:o,relationships:d}}})).data.data.id,mediaDocumentId:t.id,fileName:r.data.data.attributes.title,fileURL:t.url,date:r.data.data.attributes.created,selected:!1,type:a};q([e,...I])}catch(e){e.message="CreateResource: "+e.message,console.error(e),c.Am.error(F("Something went wrong"));return}el(!1)};return(0,l.useEffect)(function(){},[]),(0,l.useEffect)(function(){q(null==t?void 0:t.map(e=>e.hasOwnProperty("selected")?e:{...e,selected:!1}))},[t]),(0,l.useEffect)(function(){void 0!==I&&J(Math.ceil(I.length/5))},[I]),(0,l.useEffect)(function(){if(!z)return;let e=(B-1)*5;M(I.slice(e,e+5))},[z,B,I]),(0,l.useEffect)(function(){V&&Promise.all(eh.map(e=>(0,eo.QG)({id:e.id,type:ei.Jq.Document}))).then(()=>{let e=eh.map(e=>e.id);q([...I.filter(t=>!e.includes(t.id))])}).catch(e=>{e.message="DeleteResource: "+e.message,console.error(e),c.Am.error(F("Something went wrong"))}).finally(()=>{eb(null),eU(null),k(!1)})},[V]),(0,l.useEffect)(()=>{ej&&ew(!0)},[ej]),(0,l.useEffect)(function(){if(eu&&I&&!(I.length<=1))switch(eu.id){case"Name":q(e=>[...e.sort((e,t)=>e.fileName<t.fileName?-1:1)]);break;case"Date":q(e=>[...e.sort((e,t)=>e.date<t.date?-1:1)]);break;default:console.error("Unknown sortedFieldKey",eu.id),c.Am.error(F("Something went wrong"));return}},[eu]),(0,l.useEffect)(()=>{eD.current=G},[G]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(er.Z,{isOpen:R,onConfirm:P,onCancel:O,content:(0,n.jsx)("p",{className:"paragraph_medium_bold md:paragraph_normal_bold text-gray-500",children:(0,n.jsxs)(f.cC,{i18nKey:"you_agreed_to_remove_file",confirmationContent:eN,children:["You agreed to remove file with name “",{confirmationContent:eN},"” permanently."]})}),"data-sentry-element":"Confirmation","data-sentry-source-file":"UploadedOrGeneratedData.tsx"}),(0,n.jsx)(et,{isOpen:e_,setIsOpen:ew,progress:ej,"data-sentry-element":"UploadFileProgress","data-sentry-source-file":"UploadedOrGeneratedData.tsx"}),(0,n.jsx)($,{isOpen:ee,setIsOpen:el,onChange:eZ,isUploadedCV:eA,"data-sentry-element":"UploadFilePopUp","data-sentry-source-file":"UploadedOrGeneratedData.tsx"}),(0,n.jsx)(y,{title:s,isEmpty:!(I&&I.length),setIsFileUploadOpe
1n:el,"data-sentry-element":"DocumentsCard","data-sentry-source-file":"UploadedOrGeneratedData.tsx",children:I&&I.length?(0,n.jsxs)("div",{className:"relative w-full",children:[(0,n.jsxs)("div",{className:"flex flex-col-reverse items-end border-b border-solid border-gray-300 pb-2 sm:flex-row sm:items-center sm:gap-4",children:[(0,n.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,n.jsx)("div",{className:"flex items-center gap-2 ",children:j||w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"paragraph_large_bold text-gray-600",children:[F(s)," (",I.length,")"]}),!!x&&(0,n.jsx)(C.Z,{content:x,children:(0,n.jsx)(_.Z,{type:"button"})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"paragraph_large_bold text-gray-600",children:[I.length," ",b?F(s):F("CVs")]}),(0,n.jsxs)("div",{className:"hidden items-center gap-2 md:flex",children:[(0,n.jsx)(W.Z,{}),(0,n.jsxs)("p",{className:"paragraph_large_regular text-gray-500",children:[F("Last updated")," ",o()(I.reduce((e,t)=>new Date(t.date)>new Date(e.date)?t:e).date,"YYYY-MM-DD").locale(N.locale).format("MMM DD, YYYY")]})]})]})}),(0,n.jsxs)("div",{className:"flex gap-3 text-gray-500",children:[(0,n.jsx)(Z.Z,{isEditing:H,onClick:()=>{Y(e=>!e)}}),H&&(0,n.jsx)("button",{onClick:()=>{let e=I.filter(e=>e.selected);e.length&&(eb(e),eU("".concat(e.map(e=>e.fileName).join(", "),"”")),E(!0))},children:(0,n.jsx)(Q.Z,{})})]})]}),(w||j)&&(0,n.jsx)(es.Z,{setField:ep,fields:[{id:"Name",name:"Name"},{id:"Date",name:"Date"}],selectedField:eu,title:"Sort by"})]}),(null==G?void 0:G.length)?(0,n.jsx)(en.ZP,{headers:r,data:G,actionMenuItems:ev,onAction:function(e){let t=eD.current.find(t=>t.id===(null==e?void 0:e.id));switch(null==e?void 0:e.status){case ei.jI.Delete:eb([t]),eU("".concat(null==t?void 0:t.fileName)),E(!0);break;case ei.jI.View:let a=document.createElement("a");a.href=t.fileURL,a.target="_blank",a.download=t.fileURL.split("/").pop(),document.body.appendChild(a),a.click(),document.body.removeChild(a)}},setDocumentsData:q,canBeMarkedForDelete:H,stripedTable:!0,withAbilityToEditCV:v}):(0,n.jsx)(n.Fragment,{}),w||j?(0,n.jsx)(K.Z,{page:B,onPageChange:e=>L(e),numPages:z}):(0,n.jsxs)("div",{className:"flex items-center justify-between pt-6",children:[g?(0,n.jsx)(m.Z,{label:"Upload file",rightIcon:(0,n.jsx)(p.Z,{}),onClick:()=>el(!0),changingSizeRules:"medium md:large",shape:"rectangular"}):(0,n.jsx)(u.Z,{label:"Create CV",href:"/employee-dashboard/cv-generator",variant:"primary",shape:"rectangular",changingSizeRules:"medium md:large"}),(0,n.jsx)(A.Z,{title:"View all",href:"".concat(N.asPath,"/").concat(i),className:"linkURL_regular_underline text-brand-orange-600"})]})]}):v?(0,n.jsx)(D,{isLoading:void 0===I,hasAPIError:!!a,title:s,tooltipContent:x}):(0,n.jsx)(U,{isLoading:void 0===I,hasAPIError:!!a,setIsOpen:el,tooltipContent:x,title:s,onAddNew:e=>q(t=>[...null!=t?t:[],e])})})]})}},81169:function(e,t,a){var r=a(85893);a(67294);var s=a(90018),n=a(5233),l=a(69236);t.Z=e=>{let{icon:t,title:a}=e,{t:i}=(0,n.$G)("dashboard");return(0,r.jsx)("div",{className:"flex items-center pb-8 text-brand-orange-600 md:pb-12","data-sentry-component":"EmployeeDashboardHeader","data-sentry-source-file":"EmployeeDashboardHeader.tsx",children:(0,r.jsxs)("h3",{className:"heading_H4_bold md:heading_H3_bold flex items-center gap-2 md:gap-3",children:[t||(0,r.jsx)(s.Z,{size:"large"}),(0,l.n3)(i(a))]})})}},84615:function(e,t,a){var r=a(85893),s=a(67294),n=a(2500),l=a(5233),i=a(11163),o=a(8590);t.Z=e=>{let{page:t,onPageChange:a,numPages:d,type:c="others",actualizeURL:u=!1,perPage:m=10}=e,{t:p}=(0,l.$G)("common"),h=(0,i.useRouter)(),x=1;if(u){var f;x=+(0,o.P)(null==h?void 0:null===(f=h.query)||void 0===f?void 0:f._page)}else x=t;return(0,s.useEffect)(()=>{var e,t;if(!u)return;let a={};(null==h?void 0:null===(e=h.query)||void 0===e?void 0:e._page)||(a._page="1"),(null==h?void 0:null===(t=h.query)||void 0===t?void 0:t._limit)||(a._limit=m),h.push({pathname:h.pathname,query:{...h.query,...a}},void 0)},[]),(0,r.jsxs)("div",{className:"paragraph_normal_bold mt-10 flex w-full items-center justify-between","data-sentry-component":"Paginator","data-sentry-source-file":"Paginator.tsx",children:[(0,r.jsxs)("button",{className:"flex items-center gap-3 text-brand-orange-600 disabled:cursor-default disabled:text-gray-400",onClick:()=>{x<=1||(u?h.push({pathname:h.pathname,query:{...h.query,_page:x-1}},void 0,{}):a(x-1))},disabled:x<=1,children:[(0,r.jsx)(n.Z,{"data-sentry-element":"ChevronLeft","data-sentry-source-file":"Paginator.tsx"}),(0,r.jsx)("span",{className:"".concat("applications"===c&&"hidden xl:block"),children:p("Previous")})]}),(0,r.jsxs)("div",{className:"text-gray-500",children:[(0,r.jsx)("span",{className:"text-brand-orange-600",children:x})," ",p("of")," ",(0,r.jsx)("span",{className:"text-brand-orange-600",children:d})]}),(0,r.jsxs)("button",{className:"flex items-center gap-3 text-brand-orange-600 disabled:cursor-default disabled:text-gray-400",onClick:()=>{x>=d||(u?h.push({pathname:h.pathname,query:{...h.query,_page:x+1}},void 0,{}):a(x+1))},disabled:x>=d,children:[(0,r.jsx)("span",{className:"".concat("applications"===c&&"hidden xl:block"),children:p("Next")}),(0,r.jsx)(n.Z,{className:"rotate-180","data-sentry-element":"ChevronLeft","data-sentry-source-file":"Paginator.tsx"})]})]})}},72195:function(e,t,a){a.r(t),a.d(t,{__N_SSP:function(){return x},headers:function(){return f},headersGeneratedCVs:function(){return g}});var r=a(85893),s=a(67294),n=a(81169),l=a(60880),i=a(97632),o=a(19361),d=a(5233),c=a(48377),u=a(55587),m=a(91444),p=a(10218),h=a(59297),x=!0;let f=[{headerTitle:"Name",field:"fileName",id:"1",width:5e3,sortable:!1},{headerTitle:"Upload Date",field:"date",id:"2",sorted:"desc",sortable:!1},{headerTitle:"Actions",field:"action",id:"3",sortable:!1}],g=[{headerTitle:"Name",field:"fileName",id:"1",width:5e3,sortable:!1},{headerTitle:"Status",field:"status",id:"3",sortable:!1},{headerTitle:"Upload Date",field:"date",id:"4",sorted:"desc",sortable:!1},{headerTitle:"Actions",field:"action",id:"5",sortable:!1}],y=()=>{let{t:e}=(0,d.$G)("dashboard"),{user:t}
1=(0,c.useAuthContext)(),[a,o]=(0,s.useState)(),[x,y]=(0,s.useState)(),[v,b]=(0,s.useState)(),[j,C]=(0,s.useState)(),[_,w]=(0,s.useState)(),[N,U]=(0,s.useState)();async function D(){var a;let r;if(!(null==t?void 0:null===(a=t.userData)||void 0===a?void 0:a.id)){console.error("User data are not available"),m.Am.error(e("Something went wrong"));return}try{r=await (0,p.C)(t.userData.uid+"")}catch(t){t.message="GetUserUploadedDocuments: "+t.message,console.error(t),m.Am.error(e("Something went wrong")),y(t),U(t);return}let s=r.reduce((e,t)=>(t.type===u.n_.CV?e[u.n_.CV].push(t):t.type===u.n_.Other&&e[u.n_.Other].push(t),e),{[u.n_.CV]:[],[u.n_.Other]:[]});o(s[u.n_.CV]),w(s[u.n_.Other])}async function A(){var a;let r;if(!(null==t?void 0:null===(a=t.userData)||void 0===a?void 0:a.id)){console.error("User data are not available"),m.Am.error(e("Something went wrong"));return}try{r=await (0,h.k)(t.userData.uid+"")}catch(t){t.message="GetUserGeneratedDocuments: "+t.message,console.error(t),m.Am.error(e("Something went wrong")),C(t);return}b(r)}return(0,s.useEffect)(function(){D(),A()},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.Z,{title:"Documents",icon:(0,r.jsx)(l.Z,{size:"large"}),"data-sentry-element":"EmployeeDashboardHeader","data-sentry-source-file":"index.tsx"}),(0,r.jsxs)("div",{className:"flex flex-col gap-10 md:gap-12",children:[(0,r.jsx)(i.Z,{documentsData:a,apiError:x,title:"Uploaded CVs",tooltipContent:"Uploaded CVs",isUploaded:!0,path:u.c8.UploadedCVs,headers:f,"data-sentry-element":"UploadedOrGeneratedData","data-sentry-source-file":"index.tsx"}),(0,r.jsx)(i.Z,{documentsData:v,apiError:j,title:"Generated CVs",tooltipContent:"Generated CVs",path:u.c8.GeneratedCVs,headers:g,"data-sentry-element":"UploadedOrGeneratedData","data-sentry-source-file":"index.tsx"}),(0,r.jsx)(i.Z,{documentsData:_,apiError:N,title:"Other documents",tooltipContent:"Other documents",isUploaded:!0,path:u.c8.UploadedOtherDocuments,headers:f,"data-sentry-element":"UploadedOrGeneratedData","data-sentry-source-file":"index.tsx"})]})]})};y.getLayout=function(e){return(0,r.jsx)(o.Z,{type:"employee",children:e})},t.default=y},59297:function(e,t,a){a.d(t,{k:function(){return i}});var r=a(75911),s=a(55587),n=a(10316);function l(e){return e.data.map(t=>{var a,r;let n=null==e?void 0:null===(a=e.included)||void 0===a?void 0:a.find(e=>{var a,r;return e.id===(null===(r=t.relationships.field_status)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.id)});return n?{id:t.id,mediaDocumentId:t.id,fileURL:"https://api.ergodotisi.com/en/print/pdf/node/"+(null==t?void 0:null===(r=t.attributes)||void 0===r?void 0:r.drupal_internal__nid),fileName:t.attributes.title,date:t.attributes.created,status:n.attributes.name}:{fileName:'An error occurred for "'.concat(s.Jq.CV,'" with id "').concat(t.id,'".')}})}async function i(e){let t,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw Error("userId is required");let i=new r.B;i.addFilter("uid.meta.drupal_internal__target_id",e),a&&i.addFilter("field_status.name",s.qb.Draft,"<>"),i.addSort("created",s.Sr.Desc),i.addInclude(["field_status"]);try{t=await (0,n.H)({type:s.Jq.CV,params:i,deserializer:l})}catch(e){throw e.messsage="GetCustomResourceCollection: "+e.messsage,e}return t}},10218:function(e,t,a){a.d(t,{C:function(){return o}});var r=a(75911),s=a(55587),n=a(10316),l=a(17194);function i(e){return e.data.map(t=>{var a,r,n,i,o,d,c;let u=null==e?void 0:null===(a=e.included)||void 0===a?void 0:a.find(e=>{var a,r;return e.id===(null===(r=t.relationships.field_document_type)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.id)});if(!u)return{type:s.n_.CV,fileName:'An error occurred for "'.concat(s.Jq.Document,'" with id "').concat(t.id,'".')};let m=null==e?void 0:null===(r=e.included)||void 0===r?void 0:r.find(a=>{var r,s,n;return a.id===(null==e?void 0:null===(n=e.included)||void 0===n?void 0:null===(s=n.find(e=>{var a,r;return e.id===(null===(r=t.relationships.field_file)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.id)}).relationships.field_media_document)||void 0===s?void 0:null===(r=s.data)||void 0===r?void 0:r.id)});return{id:t.id,fileName:t.attributes.title,date:t.attributes.created,mediaDocumentId:null===(i=t.relationships.field_file)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.id,type:null==u?void 0:null===(o=u.attributes)||void 0===o?void 0:o.name,fileURL:(0,l.f)(null==m?void 0:null===(c=m.attributes)||void 0===c?void 0:null===(d=c.uri)||void 0===d?void 0:d.url)}})}async function o(e){let t;if(!e)throw Error("userId is required");let a=new r.B;a.addFilter("uid.meta.drupal_internal__target_id",e),a.addSort("created",s.Sr.Desc),a.addInclude(["field_file.field_media_document","field_document_type"]);try{t=await (0,n.H)({type:s.Jq.Document,params:a,deserializer:i})}catch(e){throw e.messsage="GetCustomResourceCollection: "+e.messsage,e}return t}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.