PageSourceSearch

https://clovehr.com/static/js/833.7d718e02.chunk.js

js clovehr.com collected 2026-09-24 14:41:09 UTC 25,261 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhrms=self.webpackChunkhrms||[]).push([[833],{70069:(e,s,a)=>{a.r(s),a.d(s,{default:()=>y});var l=a(89379),i=a(65043),d=a(73216),n=a(60941),o=a(10615),t=a(30370),r=a(32615),m=a(82588),c=a(91036),v=(a(20562),a(10850)),u=a(10986),p=a(24976),h=a(11665),g=a(83846),x=(a(92008),a(68908),a(70579));const N=e=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(h.A,{className:"modal-center Submit-Appraisalform modal",show:e.submitSelfAppraisalModal,onHide:e.submitSelfAppraisalModalClose,children:(0,x.jsxs)(h.A.Body,{className:"modal-delete-employee",children:[(0,x.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,x.jsx)("div",{children:(0,x.jsx)("span",{className:"confirm-message-employee",children:"Confirm"})}),(0,x.jsx)("div",{children:(0,x.jsx)("img",{src:g,className:"close-icon-employee",alt:"close_icon",onClick:e.submitSelfAppraisalModalClose})})]}),(0,x.jsx)("div",{className:"text-center mt-5 confirm-message-for-delete",children:(0,x.jsx)("span",{className:"text-center",children:"Are You Sure To Submit?"})}),(0,x.jsxs)("div",{className:"d-flex justify-content-between mb-3 action-btn-employee",children:[(0,x.jsx)("div",{className:"d-flex align-items-center modal-button-confirm-employee",onClick:()=>e.submitSelfAppraisalModalClose(),children:(0,x.jsx)("div",{children:(0,x.jsx)("span",{children:"No"})})}),(0,x.jsx)("div",{className:"d-flex align-items-center modal-button-confirm-delete confirm-btn-employee-delete",onClick:()=>{e.submitFormForStageSelf()},children:(0,x.jsx)("div",{children:(0,x.jsx)("span",{children:"Yes"})})})]})]})})});var j=a(29649),I=a(20065),b=a(28761),A=a(326);const y=function(){const{formId:e,stageId:s,id:a,userId:h}=(0,d.g)(),{loaderState:g,toggleLoader:y}=(0,b.A)(),[f,w]=(0,i.useState)(""),[E,F]=(0,i.useState)(""),[R,S]=(0,i.useState)({}),[C,k]=(0,i.useState)([]),[T,q]=(0,i.useState)([]),[D,O]=(0,i.useState)([]),[L,_]=(0,i.useState)([]),[M,B]=(0,i.useState)([]),[P,V]=(0,i.useState)(!1),[G,Y]=(0,i.useState)(!1),[z,H]=(0,i.useState)(!1),[U,W]=(0,i.useState)(s),[J,K]=(0,i.useState)({appraisalFields:[],formId:null,stageId:null,employeeFormId:null,userId:null,stageIds:null,constStageId:null,id:null}),Q=[1,2,3,4,5,6,7,8,9,10];(0,i.useEffect)((()=>{setTimeout((()=>{e&&(K((i=>(0,l.A)((0,l.A)({},i),{},{formId:e,stageId:s,employeeFormId:a,userId:h,stageIds:s,constStageId:s}))),Z()),a&&(K((e=>(0,l.A)((0,l.A)({},e),{},{id:a}))),$())}),300)}),[e,s,a,h]);const X=(e,s)=>{e.target.name.replace(/[0-9]/g,"").replaceAll(".","");const a=D.map((a=>(0,l.A)((0,l.A)({},a),{},{sections:a.sections.map((a=>a.sectionId==s.sectionId?(0,l.A)((0,l.A)({},a),{},{questions:a.questions.map((a=>a.questionId==s.questionId&&"radiobutton"==a.answerType?(0,l.A)((0,l.A)({},a),{},{values:a.values.map((s=>s.valueId==e.target.value?(0,l.A)((0,l.A)({},s),{},{selected:!0}):(0,l.A)((0,l.A)({},s),{},{selected:!1}))),onChanged:!0}):a))}):a))})));O(a)},Z=async()=>{y();const l={userId:h,employeeFormId:a,stageId:s,formId:e};try{var i,d,n,o,t,r,v,u,p,g,x;const e=await m.A.getFormForEmployee(l);O(null===e||void 0===e||null===(i=e.data)||void 0===i||null===(d=i.data)||void 0===d?void 0:d.records),F((null===e||void 0===e||null===(n=e.data)||void 0===n||null===(o=n.data)||void 0===o||null===(t=o.records[0])||void 0===t?void 0:t.stageRating)||""),w((null===e||void 0===e||null===(r=e.data)||void 0===r||null===(v=r.data)||void 0===v||null===(u=v.records[0])||void 0===u?void 0:u.comment)||""),S(null===e||void 0===e||null===(p=e.data)||void 0===p||null===(g=p.data)||void 0===g||null===(x=g.records[0])||void 0===x?void 0:x.sections.reduce(((e,s,a)=>(e[a]=!0,e)),{}))}catch(I){var N,j;(0,c.oR)((null===(N=I.response)||void 0===N||null===(j=N.data)||void 0===j?void 0:j.message)||"Error loading form")}finally{y()}},$=async()=>{y();const e={id:a,stageType:"publish",useTab:"self"};try{var s,l;const a=await m.A.getEmployeeFormStages(e);_(null===a||void 0===a||null===(s=a.data)||void 0===s||null===(l=s.data)||void 0===l?void 0:l.records)}catch(n){var i,d;(0,c.oR)((null===(i=n.response)||void 0===i||null===(d=i.data)||void 0===d?void 0:d.message)||"Error loading stages")}
1finally{y()}},ee=a=>{var l,i;y();const d=[];if(((null===(l=D[0])||void 0===l?void 0:l.sections)||[]).forEach((e=>{e.questions.forEach((e=>{var s;if(e.required)switch(e.answerType){case"checkbox":case"radiobutton":case"dropdown":null!==(s=e.values)&&void 0!==s&&s.some((e=>e.selected))||d.push(e.label);break;case"textbox":case"textarea":e.values&&"string"===typeof e.values&&""!==e.values.trim()||d.push(e.label)}}))})),d.length>0)return(0,c.oR)("Please fill all the required fields"),void y();const{employeeFormId:n}=J,o={userId:h,stageId:s,formId:e,employeeFormId:n,sections:null===(i=D[0])||void 0===i?void 0:i.sections,comment:f,stageRating:E};m.A.submitFormForEmployee(o).then((e=>{y(),V(!0)}),(e=>{var s,a,l,i,d,n;(y(),null!==e&&void 0!==e&&null!==(s=e.response)&&void 0!==s&&null!==(a=s.data)&&void 0!==a&&null!==(l=a.message)&&void 0!==l&&l.errors)?(0,c.oR)(null===(i=e.response.data.message.errors[0])||void 0===i?void 0:i.msg):(0,c.oR)(null===e||void 0===e||null===(d=e.response)||void 0===d||null===(n=d.data)||void 0===n?void 0:n.message)}))},se=e=>{S((s=>(0,l.A)((0,l.A)({},s),{},{[e]:!s[e]})))},ae=s=>{y();const a=L.find((e=>e.stageId===s)),{employeeFormId:l}=J,i={userId:h,employeeFormId:l,stageId:null===a||void 0===a?void 0:a.stageId,formId:e};m.A.getFormForEmployee(i).then((e=>{var s,a;y();const l=null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records;O(l||[]),l&&l.length>0&&(F(l[0].stageRating),w(l[0].comment),S(l[0].sections.reduce(((e,s,a)=>(e[a]=!0,e)),{})))}),(e=>{var s,a,l,i,d,n,o,t,r;(y(),null!==e&&void 0!==e&&null!==(s=e.response)&&void 0!==s&&null!==(a=s.data)&&void 0!==a&&null!==(l=a.message)&&void 0!==l&&l.errors)?(0,c.oR)(null===e||void 0===e||null===(i=e.response)||void 0===i||null===(d=i.data)||void 0===d||null===(n=d.message)||void 0===n||null===(o=n.errors[0])||void 0===o?void 0:o.msg):(0,c.oR)(null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.message)}))},le=e=>{const{name:s,value:a}=e.target;"comment"===s?w(a):"stageRating"===s&&F(a)},ie=()=>V(!1),de=()=>{window.location.href="/home/Performance/Appraisal"},ne=["Completed","Open","In Emp. Assessment","In HR Review","In RM Review","Final RM Review"],oe=e=>{const s={id:e.employeeFormId,stageType:""};m.A.getEmployeeFormStagesCommentRating(s).then((e=>{var s,a;B(null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records)}),(e=>{var s,a,l,i,d,n,o;null!==e&&void 0!==e&&null!==(s=e.response)&&void 0!==s&&null!==(a=s.data)&&void 0!==a&&null!==(l=a.message)&&void 0!==l&&l.errors?(0,c.oR)(null===e||void 0===e||null===(i=e.response)||void 0===i||null===(d=i.data)||void 0===d||null===(n=d.message)||void 0===n||null===(o=n.errors[0])||void 0===o?void 0:o.msg):(0,c.oR)(null===e||void 0===e?void 0:e.response.data.message)})).catch((e=>{}))},te=e=>{const s={employeeFormId:e.employeeFormId};m.A.getFeedbackForEmployee(s).then((e=>{var s,a,l,i;k(null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.feedBackCount),q(null===e||void 0===e||null===(l=e.data)||void 0===l||null===(i=l.data)||void 0===i?void 0:i.records)}),(e=>{var s,a,l,i,d,n,o;null!==e&&void 0!==e&&null!==(s=e.response)&&void 0!==s&&null!==(a=s.data)&&void 0!==a&&null!==(l=a.message)&&void 0!==l&&l.errors?(0,c.oR)(null===e||void 0===e||null===(i=e.response)||void 0===i||null===(d=i.data)||void 0===d||null===(n=d.message)||void 0===n||null===(o=n.errors[0])||void 0===o?void 0:o.msg):(0,c.oR)(null===e||void 0===e?void 0:e.response.data.message)})).catch((e=>{}))};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{children:D&&D.map(((i,d)=>(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{children:[(0,x.jsxs)("div",{className:"row appraisal-new-header-container",children:[(0,x.jsx)("div",{className:"col-md-1 back-cursor-container",children:(0,x.jsx)("img",{className:"",onClick:de,src:n,alt:"BackArror"})}),(0,x.jsxs)("div",{className:"col-md-5 mt-3 d-flex",children:[(0,x.jsxs)("p",{className:"AppraisalName",children:[i.appraisalCycleName," "]}),"Pending for self"==i.displayName?(0,x.jsx)("p",{className:"pendingself-status-appraisalmain ml-4",children:i.displayName}):"","In Emp. Assessment"==i.displayName?(0,x.jsx)("p",{className:"publishself-status-appraisalmain  ml-4",children:i.displayName}):"","In RM Review"==i.displayName?(0,x.jsx)("p",{className:"inrmreview-status-appraisalmain ml-4",children:i.displayName}):"","In HR Review"==i.displayName?(0,x.jsx)("p",{className:"inhrreview-status-appraisalmain  ml-4",children:i.displayName}):"","Completed"==i.displayName?(0,x.jsx)("p",{className:"completedform-status-appraisalmain  ml-4",children:i.displayName}):"","Final RM Review"===i.displayName&&(0,x.jsx)("p",{className:"inrmreview-status-appraisalmain ml-4",children:i.displayName}),null!==ne&&void 0!==ne&&ne.includes(i.displayName)?null:(0,x.jsx)("p",{className:"instage-status-appraisalmain  ml-4",children:i.displayName})]}),(0,x.jsxs)("div",{className:"col-md-6 text-right mt-2",children:[(0,x.jsx)("button",{type:"button",className:"cancel-single-assigne-appraisal mr-2 cancel-button-no-border","data-testid":"reset","data-dismiss":"modal",onClick:de,children:(0,x.jsx)("div",{className:"row",children:(0,x.jsx)("div",{className:"col-sm-12 appraisal-self-btn-style",children:I.A.CANCEL})})}),(0,x.jsx)("button",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),type:"button",className:"btn-save-next-apprasial mr-2","data-testid":"submit","data-dismiss":"modal",onClick:l=>{(async()=>{var l;y();const i={userId:h,stageId:s,formId:e,employeeFormId:a,sections:(null===(l=D[0])||void 0===l?void 0:l.sections)||[],comment:f,stageRating:E};try{const e=await m.A.submitFormForEmployee(i);var d;e&&(0,c.oR)(null===e||void 0===e||null===(d=e.data)||void 0===d?void 0:d.message)}catch(r){var n,o,t;Array.isArray(null===r||void 0===r||null===(n=r.response)||void 0===n||null===(o=n.data)||void 0===o||null===(t=o.message)||void 0===t?void 0:t.errors)?r.response.data.message.errors.forEac
1h((e=>(0,c.oR)(e.msg))):(0,c.oR)("Error submitting form")}finally{y()}})()},children:(0,x.jsx)("div",{className:"row",children:(0,x.jsx)("div",{className:"col-sm-12 appraisal-self-btn-style",children:I.A.SAVE})})}),"In Emp. Assessment"==(null===i||void 0===i?void 0:i.displayName)?(0,x.jsx)("button",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),type:"button",className:"btn-save-next-apprasial","data-testid":"submit","data-dismiss":"modal",onClick:e=>{ee()},children:(0,x.jsx)("div",{className:"row",children:(0,x.jsx)("div",{className:"col-sm-12 btn-benifits-modal",children:I.A.SUBMIT})})}):""]})]}),(0,x.jsxs)("div",{className:"row mt-5 ml-2",children:[(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.PROCESS_PERIOD," :"," ",(0,x.jsxs)("span",{className:"answerby-heading",children:[i.appraisalStartDate," To ",i.appraisalEndDate]})]}),(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.EFFECTIVE_DATE," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.appraisalEffectiveDate})]}),(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.PUBLISH_DATE," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.publishDate})]})]}),(0,x.jsxs)("div",{className:"row mt-4 ml-2",children:[(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.EMPLOYEE_NAME," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.employeeInfo[0].employeeNumberAndName})]}),(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.EMAIL," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.employeeInfo[0].email})]}),(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.GRADE," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.employeeInfo[0].gradeName})]})]}),(0,x.jsxs)("div",{className:"row mt-4 ml-2",children:[(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.DATE_OF_JOINING," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.employeeInfo[0].dateofJoining})]}),(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.DESIGNATION," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.employeeInfo[0].designation})]}),(0,x.jsxs)("div",{className:"col-md-4 section-sub-name-heading-visible",children:[I.A.TOTAL_EXPERIENCE," :"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.employeeInfo[0].experience})]})]}),(0,x.jsx)("hr",{}),(0,x.jsxs)("div",{className:"row mt-4 ml-2",children:[i.goalRatingToggle?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"col-md-3 section-sub-name-heading-visible",children:[I.A.EMPLOYEE_GOAL_RATING," :"," ",(0,x.jsxs)("span",{className:"answerby-heading",children:[i.goalRating,(0,x.jsx)(x.Fragment,{children:["bottom"].map((e=>(0,x.jsx)(t.A,{placement:e,overlay:(0,x.jsx)(o.A,{className:"",id:"tooltip-".concat(e),children:(0,x.jsx)("h3",{children:"This rating is the average of the goal ratings over the past 12 months, starting from last appraisal month"})}),children:(0,x.jsx)("a",{href:"#",className:"secondary",children:(0,x.jsx)("img",{className:"ml-2 goal-rating-comment",src:r,alt:"Information"})})},e)))})]})]}),(0,x.jsx)("div",{className:"col-md-1"})]}):"",(0,x.jsxs)("div",{className:"col-md-3 section-sub-name-heading-visible d-flex",children:[I.A.RATING," :"," ",(0,x.jsxs)("span",{className:"answerby-heading d-flex",children:[" ",(0,x.jsxs)("select",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),className:"appraisal-new-single-item-input ml-2 mr-2",name:"stageRating",onChange:le,value:E,children:[(0,x.jsx)("option",{defaultValue:!0,children:"0"}),Q&&(null===Q||void 0===Q?void 0:Q.map((e=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("option",{value:e,children:e},e)}))))]}),"/10"]})]}),(0,x.jsx)("div",{className:"col-md-1"}),(0,x.jsx)("div",{className:"col-md-3 section-sub-name-heading-visible",children:(0,x.jsxs)("p",{className:"",children:["Overall Rating:"," ",(0,x.jsx)("span",{className:"answerby-heading",children:i.overallRating})]})}),"Completed"==i.displayName?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{className:"col-md-3 section-sub-name-heading-visible",children:(0,x.jsx)("p",{className:"rating-other-heading",onClick:e=>{var s;s=i,Y(!0),oe(s)},children:I.A.VIEW_OTHER_RATING})})}):""]}),i.feedbackRatingToggle?(0,x.jsx)("div",{className:"row mt-4 ml-2",children:(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{className:"col-md-3 section-sub-name-heading-visible",children:(0,x.jsx)("p",{className:"rating-other-heading",onClick:e=>{var s;s=i,H(!0),te(s)},children:I.A.VIEW_FEEDBACK_RATING})})})}):"","Completed"==i.displayName?(0,x.jsxs)("div",{className:"row mt-3",children:[(0,x.jsx)("div",{className:"col-md-10"}),(0,x.jsxs)("div",{className:"col-md-2 text-right",children:[(0,x.jsx)("h4",{className:"text-left answerby-heading",children:I.A.VIEW_STAGE_RESPONSE}),(0,x.jsx)("select",{name:"stageIds","data-testid":"stageIds",value:U,onChange:e=>{(e=>{const s=e.target.value;L.find((e=>e.stageId===parseInt(s,10)))&&(W(s),ae(parseInt(s,10)))})(e)},className:"filter-size-appraisal filter-appraisal-form form-control",children:L&&L.map(((e,s)=>(0,x.jsx)("option",{value:e.stageId,children:e.stageTitle},e.stageId)))})]})]}):"",(0,x.jsx)("div",{className:"row mt-3 ml-2",children:(0,x.jsxs)("div",{className:"col-md-12 section-sub-name-heading-visible",children:[(0,x.jsx)("h4",{className:"section-sub-name-heading-visible",children:I.A.COMMENT}),(0,x.jsx)("textarea",{readOnly:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),className:"form-control comment-text-area-style",type:"text",id:"comment",name:f,value:f,onChange:e=>(e=>{w(e.target.value)})(e)})]})}),i.sections&&i.sections.map(((e,s)=>{var a;return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{children:(0,x.jsxs)("div",{className:"section-heading ml-4 mt-4 pb-3 mb-4",children:[(0,x.jsxs)("div",{className:"row  ml-2 mr-2 pl-2 pr-2  mb-2",children:[(0,x.jsx)("div",{className:"col-md-2 section-design-appraisal",children:e.showCount}),(0,x.jsx)("div",{className:"col-md-10",children:(0,x.jsxs)("div",{className:"section-name-heading",children:[e.sectionName,R[s]?(0,x.jsxs)("span",{children:[" ",(0,x.jsx)("img",{onClick:()=>se(s),className:"ml-3 icon-section-question",src:p.A})," "]}):(0,x.jsxs)("span",{children:[" ",(0,x.jsx)("img",{onClick:()=>se(s),className:"ml-3 icon-section-question",src:u.A})," "]})]})})]}),!R[s]&&(null===e||void 0===e?void 0:e.questions)&&(null===e||void 0===e||null===(a=e.questions)||void 0===a?void 0:a.map(((e,s)=>{var a,d,n,m;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{className:"section-heading pl-4 pr-4 ml-3 mr-3 mt-3 mb-3 pt-2 pb-2",children:[(0,x.jsx)("div",{className:"row mt-3",children:(0,x.jsxs)("div",{className:"col-md-12 font-question-heading-main",children:[I.A.QUES,":"," ",(0,x.jsx)("span",{className:"section-name-heading",children:e.label}),e.required?(0,x.jsx)("span",{className:"text-danger",children:"*"}):(0,x.jsx)("span",{}),e.commentBox?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(x.Fragment,{children:["bottom"].map((s=>(0,x.jsx)(t.A,{placement:s,overlay:(0,x.jsx)(o.A,{className:"",id:"tooltip-".concat(s),children:(0,x.jsx)("h3",{children:e.comment})}),children:(0,x.jsx)("a",{href:"#",className:"secondary",children:(0,x.jsx)("img",{className:"ml-2 info-height-icon",src:r,alt:"Information"})})},s)))})}):""]})},s),(0,x.jsxs)(x.Fragment,{children:["checkbox"==e.answerType?(0,x.jsx)("div",{className:"row mt-3",children:null===e||void 0===e||null===(a=e.values)||void 0===a?void 0:a.map(((s,a)=>(0,x.jsx)("div",{className:"d-flex",children:(0,x.jsxs)("div",{className:"d-flex col-md-12 custom-checkbox",children:[(0,x.jsx)("input",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||!e.answeredBy||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),className:"self-review-input-radio-width",type:"checkbox",class:"radio",name:e.type,value:s.valueId,checked:s.selected,onChange:s=>((e,s)=>{const a=D.map((a=>(0,l.A)((0,l.A)({},a),{},{sections:a.sections.map((a=>a.sectionId==s.sectionId?(0,l.A)((0,l.A)({},a),{},{questions:a.questions.map((a=>a.questionId==s.questionId?(0,l.A)((0,l.A)({},a),{},{values:a.values.map((s=>s.valueId==e.target.value?(0,l.A)((0,l.A)({},s),{},{selected:!s.selected}):s)),onChanged:!0}):a))}):a))})));O(a)})(s,e)}),(0,x.jsx)("label",{className:"mt-3 ml-3",children:s.value})]})})))}):"","radiobutton"==e.answerType?(0,x.jsx)(x.Fragment,{children:!0===e.verticalOptions?(0,x.jsx)("div",{className:"row mt-3 form-check",children:null===e||void 0===e||null===(d=e.values)||void 0===d?void 0:d.map(((s,a)=>(0,x.jsx)("div",{className:"d-flex",children:(0,x.jsxs)("div",{className:"d-flex col-md-12 mb-3 ",children:[(0,x.jsx)("input",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||!e.answeredBy||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),className:"self-review-input-radio-width",type:"radio",name:null===e||void 0===e?void 0:e.type,checked:s.selected,onChange:s=>X(s,e),value:s.valueId}),(0,x.jsx)("label",{className:"mt-3 ml-3",id:"flexRadioDefault1",children:s.value})]})},a)))}):""}):"","radiobutton"==e.answerType?(0,x.jsx)(x.Fragment,{children:1==e.horizontalOptions?(0,x.jsxs)("div",{className:"row mt-3 form-check form-check-inline",children:[(0,x.jsx)("div",{className:"row ml-1 mb-2",children:(0,x.jsx)("div",{className:"col-md-12 fontNameEditfor",children:null===e||void 0===e?void 0:e.leftText})}),null===e||void 0===e||null===(n=e.values)||void 0===n?void 0:n.map(((s,a)=>(0,x.jsx)("div",{className:"d-flex",children:(0,x.jsxs)("div",{className:"d-flex col-md-12 mb-3 ",children:[(0,x.jsx)("input",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||!e.answeredBy||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),className:"self-review-input-radio-width",type:"radio",name:null===e||void 0===e?void 0:e.type,checked:s.selected,onChange:s=>X(s,e),value:s.valueId}),(0,x.jsx)("label",{className:"mt-3 ml-3",id:"flexRadioDefault1",children:s.value})]})},a))),(0,x.jsx)("div",{className:"row mb-2",children:(0,x.jsx)("div",{className:"col-md-12 fontNameEditfor",children:null===e||void 0===e?void 0:e.rightText})})]}):""}):"","textbox"==e.answerType?(0,x.jsx)("div",{className:"row mt-3",children:(0,x.jsx)("div",{className:"col-md-12 mb-3",children:(0,x.jsx)("input",{readOnly:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||!e.answeredBy||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),placeholder:I.A.ENTER_YOUR_ANSWER,name:e.type,onCh
1ange:s=>{((e,s)=>{const a=D.map((a=>(0,l.A)((0,l.A)({},a),{},{sections:a.sections.map((a=>a.sectionId===s.sectionId?(0,l.A)((0,l.A)({},a),{},{questions:a.questions.map((a=>a.questionId==s.questionId?(0,l.A)((0,l.A)({},a),{},{values:e.target.value,onChanged:!0}):a))}):a))})));O(a)})(s,e)},value:e.values,className:"form-control inputSizeAppraisal"})})}):"","textarea"==e.answerType?(0,x.jsx)("div",{className:"row mt-3",children:(0,x.jsx)("div",{className:"col-md-12 mb-3",children:(0,x.jsx)("textarea",{readOnly:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||!e.answeredBy||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),placeholder:I.A.ENTER_YOUR_ANSWER,className:"form-control inputSizeAppraisal",name:null===e||void 0===e?void 0:e.type,onChange:s=>((e,s)=>{const a=D.map((a=>(0,l.A)((0,l.A)({},a),{},{sections:a.sections.map((a=>a.sectionId===s.sectionId?(0,l.A)((0,l.A)({},a),{},{questions:a.questions.map((a=>a.questionId==s.questionId?(0,l.A)((0,l.A)({},a),{},{values:e.target.value,onChanged:!0}):a))}):a))})));O(a)})(s,e),value:e.values})})}):"","dropdown"==e.answerType?(0,x.jsx)("div",{className:"row mt-3",children:(0,x.jsx)("div",{className:"col-md-12 mb-3",children:(0,x.jsxs)("select",{disabled:J.constStageId!=J.stageIds||"In Emp. Assessment"!==(null===i||void 0===i?void 0:i.displayName)||!e.answeredBy||(null===i||void 0===i?void 0:i.isLocked)||(null===i||void 0===i?void 0:i.isFormDisabled),className:"form-control cursorview inputSizedropdownAppraisal",name:(null===e||void 0===e?void 0:e.type)||"question-".concat(e.questionId),value:(null===(m=e.values.find((e=>e.selected)))||void 0===m?void 0:m.valueId)||"",onChange:s=>((e,s)=>{const a=D.map((a=>(0,l.A)((0,l.A)({},a),{},{sections:a.sections.map((a=>a.sectionId===s.sectionId?(0,l.A)((0,l.A)({},a),{},{questions:a.questions.map((a=>a.questionId==s.questionId&&Array.isArray(a.values)?(0,l.A)((0,l.A)({},a),{},{values:a.values.map((s=>s.valueId==e.target.value?(0,l.A)((0,l.A)({},s),{},{selected:!0}):(0,l.A)((0,l.A)({},s),{},{selected:!1}))),onChanged:!0}):a))}):a))})));O(a)})(s,e),children:[(0,x.jsx)("option",{id:"null",value:"",children:I.A.SELECT}),e.values&&e.values.map((e=>(0,x.jsx)("option",{id:e.valueId,value:e.valueId,children:e.value},e.valueId)))]})})}):""]})]})})})))]})},s)})}))]},d)})))}),(0,x.jsx)(v.A,{ViewReviewRatingModal:G,ViewReviewRatingClose:()=>{Y(!1)},employeeRatingListData:M}),(0,x.jsx)(N,{submitSelfAppraisalModal:P,submitSelfAppraisalModalClose:ie,submitFormForStageSelf:()=>{y();const l={id:a,stageId:s};m.A.submitFormForStage(l).then((a=>{var l;y(),ie(),(()=>{y();const{employeeFormId:a}=J,l={userId:h,employeeFormId:a,stageId:s,formId:e};m.A.getFormForEmployee(l).then((e=>{var s,a;y();const l=(null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records)||[];if(O(l),l.length>0){F(l[0].stageRating),w(l[0].comment);const e=l[0].sections.reduce(((e,s,a)=>(e[a]=!0,e)),{});S(e)}}),(e=>{}))})(),(0,c.oR)(null===a||void 0===a||null===(l=a.data)||void 0===l?void 0:l.message)}),(e=>{var s,a;y();const l=null===e||void 0===e||null===(s=e.response)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.message;var i;null!==l&&void 0!==l&&l.errors?(0,c.oR)(null===(i=l.errors[0])||void 0===i?void 0:i.msg):(0,c.oR)(l)}))}}),(0,x.jsx)(j.A,{ViewFeedbackRatingModal:z,ViewFeedbackRatingClose:()=>{H(!1)},RatingEmployeeData:T,FeedBackCountAppraisal:C}),g?(0,x.jsx)(A.A,{}):null]})}},68908:()=>{}}]);
2//# sourceMappingURL=833.7d718e02.chunk.js.map

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.