PageSourceSearch

https://www.excelrs.dev/_next/static/chunks/app/admin/add-candidate/%5Busername%5D/page-16b87e10a32d4264.js

js excelrs.dev collected 2026-10-02 01:54:29 UTC 9,835 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3625],{33298:function(e,t,r){Promise.resolve().then(r.bind(r,1404))},39350:function(e,t,r){"use strict";r.d(t,{w_:function(){return s}});var a=r(2265),n={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=a.createContext&&a.createContext(n),l=function(){return(l=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},c=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)0>t.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};function s(e){return function(t){return a.createElement(i,l({attr:l({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return a.createElement(t.tag,l({key:r},t.attr),e(t.child))})}(e.child))}}function i(e){var t=function(t){var r,n=e.attr,o=e.size,s=e.title,i=c(e,["attr","size","title"]),u=o||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),a.createElement("svg",l({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,i,{className:r,style:l(l({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),s&&a.createElement("title",null,s),e.children)};return void 0!==o?a.createElement(o.Consumer,null,function(e){return t(e)}):t(n)}},1404:function(e,t,r){"use strict";r.r(t);var a=r(57437),n=r(2265),o=r(65118),l=r(57913),c=r(24485),s=r(14063),i=r(95956);let u=[{type:"complex",fields:[{label:"Availability",name:"availability"}]},{type:"normal",label:"Summary",name:"summary",value:""}];t.default=e=>{let{params:t}=e,[r,d]=(0,n.useState)(0),[f,m]=(0,n.useState)(u),{username:h}=t,{isLoading:p,isError:y,data:g}=(0,o.a)({queryKey:["feedReview",h],queryFn:()=>(0,c.RF)(h)});if(p||y)return(0,a.jsx)("div",{className:"flex items-center justify-center h-screen",children:(0,a.jsx)(s.lbL,{
1className:"animate-spin text-4xl text-gray-500"})});let x=async e=>{e.preventDefault();let t=null==g?void 0:g._id,a={scores:f.filter(e=>"complex"===e.type).map(()=>({availability:r,communication:r,leadership:r,ownership:r,technical:r})),summary:f.filter(e=>"normal"===e.type).map(e=>e.value||"").join(" "),candidateId:t};console.log(a,"final data");try{let e=await (0,c.qr)(a);if(console.log("API Response:",e),m(u),i.Am.success("Feedback added successfully",{position:"top-center",autoClose:3e3}),e.status>=200&&e.status<300){let t=e.data;console.log("Feedback added successfully:",t)}}catch(e){console.error("Error giving feedback:",e),i.Am.error("Something went wrong, please try again",{position:"top-center",autoClose:3e3})}};return(0,a.jsxs)("div",{className:"bg-stone-200 p-4 md:p-8 min-h-screen flex flex-col md:gap-2",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-center",children:"Write a Review"}),(0,a.jsx)("div",{className:"flex flex-col grid p-2 gap-6 items-start w-full md:w-[50%] lg:w-[50%] mx-auto",children:(0,a.jsxs)("form",{onSubmit:e=>x(e),className:"flex flex-col mt-4",children:[f.map((e,t)=>(0,a.jsx)("div",{children:"complex"===e.type&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold mb-2",children:"Rate ".concat(null==g?void 0:g.fullName," for :")}),e.fields&&e.fields.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start mt-4 flex-col",children:[(0,a.jsx)("span",{className:"font-bold text-lg",children:e.label}),(0,a.jsx)("div",{className:"flex flex-row bg-white flex p-2 rounded-md w-full md:w-[100%] lg:w-[100%] ",children:(0,a.jsx)(l.Z,{initialValue:r,onClick:e=>d(e)})})]},t))]})},t)),f.map((e,t)=>(0,a.jsx)("div",{children:"normal"===e.type&&(0,a.jsxs)("div",{className:"flex flex-col mt-6",children:[(0,a.jsx)("span",{className:"text-2xl font-semibold mb-2",children:e.label}),(0,a.jsx)("textarea",{id:e.name,name:e.name,value:e.value,onChange:e=>m(r=>{let a=[...r];return a[t].value=e.target.value,a}),placeholder:"Enter your ".concat(e.label.toLowerCase(),"..."),className:"p-4 rounded-md border border-gray-300 focus:outline-none",rows:6})]})},t)),(0,a.jsx)("div",{className:"items-center",children:(0,a.jsx)("button",{type:"submit",className:"px-4 py-2 w-full bg-blue-500 text-white rounded-md",children:"Submit"})})]})})]})}},57913:function(e,t,r){"use strict";var a=r(57437),n=r(2265);t.Z=e=>{let{initialValue:t,onClick:r}
1=e,[o,l]=(0,n.useState)(t),c=Array.from({length:5},(e,t)=>t+1),s=e=>{let t=o===e?e-1:e;l(t),r(t)};return(0,a.jsx)("div",{children:c.map(e=>(0,a.jsx)("span",{onClick:()=>s(e),style:{cursor:"pointer",color:e<=o?"gold":"gray",fontSize:"1.5em",padding:3},children:"★"},e))})}},58357:function(e,t,r){"use strict";r.d(t,{CT:function(){return a},bz:function(){return o},nL:function(){return n}});let a=(r(20357).env.NEXT_PUBLIC_CLOUD_API_URL||"https://excelrs-cloud-new-1069037816864.asia-south1.run.app").replace(/\/+$/,""),n="https://powr-api.lawazia.tech";function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=String(e||"").replace(/^\/+/,"");return t?"".concat(n,"/").concat(t):n}},28388:function(e,t,r){"use strict";r.d(t,{oD:function(){return n}});var a=r(20357);let n=120;a.env.STATIC_PROFILE_PARAM_LIMIT},24485:function(e,t,r){"use strict";r.d(t,{Q_:function(){return x},Ax:function(){return w},p8:function(){return m},XQ:function(){return g},RF:function(){return f},qm:function(){return y},Fe:function(){return v},qr:function(){return p}});var a=r(65399),n=r(2265),o=r(58357),l=(r(28388),r(38472));let c=()=>{try{let{useAuthStore:e}=r(96450);return e.getState().token}catch(t){var e;return console.warn("Store not available, falling back to localStorage"),null===(e=localStorage)||void 0===e?void 0:e.getItem("accessToken")}return""},s=l.Z.create({baseURL:"/api"});async function i(e){let t="".concat(o.CT,"/profiles/by-username/").concat(encodeURIComponent(e)),r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(404===r.status)return null;if(!r.ok){let e=await r.text();throw Error("Error fetching candidate: ".concat(r.statusText," - ").concat(e))}return r.json()}async function u(e,t){let r="".concat(o.CT,"/profiles/by-username/").concat(encodeURIComponent(e)),a=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}});if(404===a.status)return null;if(!a.ok){let e=await a.text();throw Error("Error fetching candidate: ".concat(a.statusText," - ").concat(e))}return a.json()}s.interceptors.request.use(e=>{let t=c();return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),l.Z.create({baseURL:"/api"}).interceptors.request.use(e=>{let t=c();return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),(0,n.cache)(i);let d=(0,n.cache)(u),f=async(e,t)=>{let r=null!=t?t:"";if(!r){let t=await i(e);if(null===t)throw Error("Error fetching candidate: Not Found");return t}let a=await d(e,r);if(null===a)throw Error("Error fetching candidate: Not Found");return a},m=async e=>{try{let t=new URLSearchParams;e.skills&&t.set("skills",JSON.stringify(e.skills)),e.pageNo&&t.set("pageNo",e.pageNo.toString()),e.pageSize&&t.set("pageSize",e.pageSize.toString());let r="/candidate/getAll?".concat(t.toString()),{data:a}=await s.get(r);return console.log("Fetched data:",a),a}catch(e){throw e}},h=e=>{var t;let r=null===(t=e.response)||void 0===t?void 0:t.data;throw Error((null==r?void 0:r.message)||"An unexpected error occurred")},p=async e=>{try{return(await s.post("/api/candidate/feedback",e)).data}catch(e){h(e)}},y=async e=>{let t=await fetch("/api/candidate/".concat(e));if(!t.ok)throw Error("Error fetching candidate feedback: ".concat(t.statusText));return t.json()},g=async()=>{let e=await fetch("/api/candidate/skills");if(!e.ok)throw Error("Error fetching candidate skills: ".concat(e.statusText));return e.json()},x=async e=>{try{return(await s.post("/api/candidate",e)).data}catch(e){h(e)}},v=async()=>{try{return(await s.get("/api/filter/".concat(a.h))).data}catch(e){h(e)}},w=async(e,t)=>{try{let r=await fetch("".concat(o.CT,"/users/admins"),{method:"GET",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"}});if(r.ok){let t=await r.json();return(Array.isArray(t.admins)?t.admins:[]).some(t=>t._id===e)}return!1}catch(e){return!1}}},96450:function(e,t,r){"use strict";r.r(t),r.d(t,{useAuthStore:function(){return i}});var a=r(10903),n=r(89291),o=r(44785),l=r(34080),c=r(76934);let s=r(20357).env.NEXT_PUBLIC_PROJECT_ID||"678db178f70e70f6056b2c3d",i=(0,a.U)()((0,n.tJ)((e,t)=>({user:null,token:null,refreshToken:null,isHydrated:!1,setAuthData:function(t,r){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e({user:t,token:r,refreshToken:a,isHydrated:!0}),o.Z.set("auth-token",r,{expires:7,secure:!0,sameSite:"lax"}),localStorage.setItem("auth-token",r),localStorage.setItem("accessToken",r),localStorage.setItem("token",r),localStorage.setItem("user",JSON.stringify(t)),a?localStorage.setItem("refreshToken",a):localStorage.removeItem("refreshToken")},clearAuthData:()=>{(0,c.notifyImpersonationExit)({projectId:s}).catch(()=>{}),(0,l.P4)();let r=t();if(null!==r.user||null!==r.token||null!==r.refreshToken){e({user:null,token:null,refreshToken:null,isHydrated:!0});try{localStorage.removeItem("auth-store")}catch(e){console.warn("Failed to clear localStorage:",e)}}}}),{name:"auth-store",storage:(0,n.FL)(()=>localStorage),skipHydration:!0,onRehydrateStorage:()=>e=>{e&&(e.isHydrated=!0)}}));try{i.persist.rehydrate()}catch(e){console.warn("Failed to rehydrate auth store:",e)}}},function(e){e.O(0,[9715,7971,7279,2420,251,5171,9465,8472,5956,1336,41,2971,7023,1744],function(){return e(e.s=33298)}),_N_E=e.O()}]);

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.