PageSourceSearch

https://clovehr.com/static/js/5042.ca9f7709.chunk.js

js clovehr.com collected 2026-09-24 14:42:48 UTC 89,676 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhrms=self.webpackChunkhrms||[]).push([[5042],{24225:(e,l,t)=>{t.d(l,{A:()=>s});t(65043);const s=t.p+"static/media/remove.359c8195a19228802cf72f3d54dbd001.svg"},75042:(e,l,t)=>{t.r(l),t.d(l,{default:()=>U});var s=t(89379),a=t(65043),o=t(326),d=(t(98763),t(69808)),i=t(91036),n=t(90127),r=t(10615),c=t(30370),m=t(96209),u=(t(28517),t(46475),t(6061)),v=(t(13737),t(61432)),p=t(82867),h=t(55945),g=t(3541),x=t(10953),A=t(47417),S=t(70579);const N=e=>{let{pickerKeyhelpdeskAllReq:l,updateBulkTicketStatus:t,issueTypeNamehelpdesk:s,handleAdminRequestsSorting:o,allRequestHelpDeskViewModel:d,getAllRequesthelpdeskView:i,allRequestRowClick:N,resetAllRequestFilter:j,dateAllRequest:y,AllRequestdatePickerFilter:f,multiSelectRewardAllStatus:k,AllRewardStatus:b,selectedValueAllRewardStatusArr:R,onSelectAllRewardStatus:C,onRemovedAllRewardStatus:I,AllHelpTypeArr:w,selectedValueAllHelpdesk:M,onSelectTeamMember:T,onRemoveTeamMember:q,MyRequestHistoryModal:D,employeeHelpdeskMyTeamList:E,selectedValueEmpAllReimArr:F,onSelectAllReimbursedEmpName:H,onRemovedAllReimbursedEmpName:Y,EmpNameAllHelpArr:O,multiSelectReimAllName:B,EmployeeListAdmin:V,selectedValueEmpName:U,onSelectedEmpNameAdmin:J,onRemovedEmpNameAdmin:P,EmpNameAdminArr:L,multiSelectEmpNameAdmin:W,recordStatus:G,selectedValueAllRequestHelpdesk:Q,onSelectStatus:K,onRemoveStatus:z,AllHelpStatusArr:Z,allRequestStatusFilter:X,allRequestIssueType:_,ticketPriority:$,state:ee,setState:le,rowClasses:te,defaultSorted:se,allRequest:ae,handleSearchAllRequestFilter:oe,newSearchAllRequestText:de,totalPagesAllLearning:ie,pgNumberEmployeeListForForm:ne,onPageChangeEmployeeListForForm:re,onPageEmployeeListForForm:ce,pageNoEmployeeListForFormArr:me,onPageNoChangeEmployeeListForForm:ue,totalCountEmployeeListForForm:ve,pgSizeEmployeeListForForm:pe,deleteModal:he,employeeStatusAllRequest:ge,changeHandleEmployeeFilter:xe,initialSettings:Ae,selectedEmployeeStatus:Se,handleEmployeeStatus:Ne,employeeStatusOptions:je,handleIssueTypeChange:ye,leavetypeDataWithCapitalizedNames:fe,handlePriorityStatus:ke,handleEmployeeSelectAdmin:be,handleHelpdeskEmployeeSelect:Re,handleStatusSelect:Ce,handleDepartmentChange:Ie,departmentsIds:we,departmentOptions:Me,selectedAllReqDepartments:Te,options:qe,employeeTypeAllReq:De,selectedEmpTypesAllReq:Ee,onSelectEmpTypeAllReq:Fe,onRemoveEmpTypeAllReq:He,helpdeskDataWithCapitalizedNames:Ye}=e;const[Oe,Be]=(0,a.useState)([]),[Ve,Ue]=(0,a.useState)(null),[Je,Pe]=(0,a.useState)(!1),[Le,We]=(0,a.useState)(!1),[Ge,Qe]=(0,a.useState)(!1),Ke=(0,a.useRef)(Oe),{renderSortArrow:ze}=(0,A.A)(o);(0,a.useEffect)((()=>{Ke.current=Oe,(()=>{let e=!1,l=!1,t=!1,s=!1,a=[];Oe.forEach((o=>{a.push(o.ticketStatus),"Withdrawn"!=o.ticketStatus&&"Rejected"!=o.ticketStatus&&"Closed"!=o.ticketStatus||(e=!0,l=!0,t=!0,s=!0),"Manager Review"!=o.ticketStatus&&"Open"!=o.ticketStatus||(t=!0),"In Progress"==o.ticketStatus&&(e=!0,l=!0)})),new Set(a).size>1&&(e=!0,l=!0,t=!0,s=!0),Pe(e),We(s),Qe(t)})()}),[Oe]);let Ze=[{text:"SELECT",dataField:"select",formatter:(e,l)=>{var t;const s=((null===l||void 0===l?void 0:l.status)||(null===l||void 0===l?void 0:l.ticketStatus)||"").toLowerCase().trim();return(0,S.jsx)("div",{className:"all-payroll-table",children:(0,S.jsx)("input",{disabled:"Closed"==l.ticketStatus||"Withdrawn"==l.ticketStatus||"rejected"===s,type:"checkbox",className:"mt-0 helpdesk-table-select-input",defaultChecked:null===(t=Ke.current)||void 0===t?void 0:t.map((e=>e.id)).includes(null===l||void 0===l?void 0:l.id),onClick:e=>{e.stopPropagation(),((e,l)=>{var t;null!==(t=Ke.current)&&void 0!==t&&t.map((e=>e.id)).includes(e)?Be((l=>l.filter((l=>l.id!==e)))):Be((t=>[...t,{id:e,ticketStatus:l}]))})(null===l||void 0===l?void 0:l.id,null===l||void 0===l?void 0:l.ticketStatus)}},Math.floor(1e7*Math.random()))})}},{text:"ISSUE ID",dataField:"issueSerialNumber",sort:!1,headerFormatter:()=>(0,S.jsxs)(S.Fragment,{children:["ISSUE ID",ze("id")]}),formatter:(e,l)=>(0,S.jsx)("div",{className:"all-payroll-table",children:(0,S.jsx)("span",{children:l.issueSerialNumber})})},{text:"EMPLOYEE",dataField:"raiseBy",sort:!1,headerFormatter:()=>
1(0,S.jsxs)(S.Fragment,{children:["EMPLOYEE",ze("raiseBy")]}),formatter:(e,l)=>(0,S.jsxs)("div",{className:"helpdesk-team-employee-item mr-1 ",children:[(0,S.jsx)("div",{children:l.image&&1===l.image.length?(0,S.jsx)("img",{className:"helpdesk-userImg mr-2",src:l.image[0],"data-holder-rendered":"true",alt:"user-pic"}):(0,S.jsx)("img",{className:"rounded-circle helpdesk-userImg mr-2",src:h,"data-holder-rendered":"true",alt:"user-logo-pic"})}),(0,S.jsxs)("div",{className:"helpdesk-team-employee-details",children:[(0,S.jsx)("div",{className:"empName-leave",children:(0,S.jsx)("span",{children:["bottom"].map((e=>{var t;return(0,S.jsx)(c.A,{placement:e,overlay:(0,S.jsx)(r.A,{className:"",id:"tooltip-".concat(e),children:l.userName}),children:(0,S.jsx)("a",{variant:"secondary",className:"helpdesk-team-employee-name",children:(null===(t=l.userName)||void 0===t?void 0:t.length)<=12?l.userName:"".concat(l.userName.substring(0,11),"...")})},e)}))})}),(0,S.jsx)("div",{className:"designation-margin-helpdesk",children:(0,S.jsx)("span",{children:["bottom"].map((e=>{var t;return(0,S.jsx)(c.A,{placement:e,overlay:(0,S.jsx)(r.A,{className:"",id:"tooltip-".concat(e),children:l.employeeId}),children:(0,S.jsx)("a",{variant:"secondary",className:"helpdesk-team-employee-id",children:(null===(t=l.employeeId)||void 0===t?void 0:t.length)>10?"".concat(l.employeeId.substring(0,10),"..."):l.employeeId})},e)}))})})]})]})},{text:"ASSIGNED TO",dataField:"defaultAssigneeName",sort:!1,headerFormatter:()=>(0,S.jsxs)(S.Fragment,{children:["ASSIGNED TO",ze("assignee")]}),formatter:(e,l)=>(0,S.jsx)("div",{className:"all-payroll-table",children:(0,S.jsx)(S.Fragment,{children:["bottom"].map((e=>{var t;return(0,S.jsx)(c.A,{placement:e,overlay:(0,S.jsx)(r.A,{className:"",id:"tooltip-".concat(e),children:l.defaultAssigneeName}),children:(0,S.jsx)("a",{variant:"secondary",children:(null===(t=l.defaultAssigneeName)||void 0===t?void 0:t.length)<=12?l.defaultAssigneeName:"".concat(l.defaultAssigneeName.substring(0,11),"...")})},e)}))})})},{text:"ISSUE TYPE",dataField:"issueType",sort:!1,headerFormatter:()=>(0,S.jsxs)(S.Fragment,{children:["ISSUE TYPE",ze("issueType")]}),formatter:(e,l)=>(0,S.jsx)("div",{className:"all-payroll-table",children:(0,S.jsx)(S.Fragment,{children:["bottom"].map((e=>{var t;return(0,S.jsx)(c.A,{placement:e,overlay:(0,S.jsx)(r.A,{className:"",id:"tooltip-".concat(e),children:l.issueType}),children:(0,S.jsx)("a",{variant:"secondary",children:(null===(t=l.issueType)||void 0===t?void 0:t.length)>10?"".concat(l.issueType.substring(0,10),"..."):l.issueType})},e)}))})})},{text:"CREATED ON",dataField:"createdDate",sort:!1,headerFormatter:()=>(0,S.jsxs)(S.Fragment,{children:["CREATED ON",ze("createdDate")]}),formatter:(e,l)=>(0,S.jsx)("div",{className:"all-payroll-table",children:(0,S.jsx)("span",{children:l.createdDate})})},{text:"PRIORITY",dataField:"priority",formatter:(e,l)=>{var t,s,a;return(0,S.jsx)("div",{className:"all-payroll-table",children:(null===(t=l.ticketPriority)||void 0===t||null===(s=t.charAt(0))||void 0===s?void 0:s.toUpperCase())+(null===(a=l.ticketPriority)||void 0===a?void 0:a.slice(1))})}},{text:"STATUS",dataField:"status",sort:!1,headerFormatter:()=>(0,S.jsxs)(S.Fragment,{children:["STATUS",ze("status")]}),formatter:(e,l)=>(0,S.jsxs)("div",{className:"all-payroll-table",children:["In Progress"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle status-in-progress",children:l.ticketStatus}):"","Closed"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle status-closed",children:l.ticketStatus}):"","Rejected"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle status-rejected",children:l.ticketStatus}):"","Open"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle status-open",children:l.ticketStatus}):"","Withdrawn"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle status-withdrawn",children:l.ticketStatus}):"","Manager Review"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle setMngReviewUI ",children:l.ticketStatus}):"","Not Approved"==l.ticketStatus?(0,S.jsx)("p",{className:"RequeststatusStyle notApproved",children:l.ticketStatus}):""]})},{text:"ACTIONS",dataField:"actions",formatter:(e,l)=>(0,S.jsx)("div",{className:"payroll-reimbursment-action",children:(0,S.jsxs)(n.A,{className:"issueAssignedDropdown",onToggle:()=>{return e=l.id,void Ue((l=>l===e?null:e));var e},show:Ve===l.id,children:[(0,S.jsx)(n.A.Toggle,{variant:"transparent",className:"sucessBtn no-boxshadow",id:"dropdown-basic",children:(0,S.jsx)("i",{className:"fa fa-ellipsis-h","aria-hidden":"true"})}),(0,S.jsxs)(n.A.Menu,{className:"setdropdown",children:[(0,S.jsx)(n.A.Item,{onClick:()=>{i(l),d()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-md-12 d-flex",children:[(0,S.jsx)("div",{className:"col-md-2",children:(0,S.jsx)("i",{className:"fa fa-eye","aria-hidden":"true","aria-expanded":"false","data-toggle":"modal"})}),(0,S.jsx)("div",{className:"col-md-10 text-left text-dark",children:"View"})]})})}),(0,S.jsx)(n.A.Item,{onClick:()=>{D(l)},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-md-12 d-flex",children:[(0,S.jsx)("div",{className:"col-md-2",children:(0,S.jsx)("i",{className:"fa fa-history","aria-hidden":"true","aria-expanded":"false","data-toggle":"modal"})}),(0,S.jsx)("div",{className:"col-md-10 text-left",children:"History"})]})})}),(0,S.jsx)(n.A.Item,{onClick:()=>{he(l)},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-md-12 d-flex",children:[(0,S.jsx)("div",{className:"col-md-2",children:(0,S.jsx)("i",{className:"fa fa-tras
1h cursorpointer text-danger","aria-hidden":"true","aria-expanded":"false","data-toggle":"modal"})}),(0,S.jsx)("div",{className:"col-md-10 text-left",children:(0,S.jsx)("span",{className:"text-danger",children:"Delete"})})]})})})]})]})}),events:{onClick:(e,l,t,s)=>{e.stopPropagation()}}}];return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:"row mt-3 ml-2",children:[(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles mt-4",children:(0,S.jsx)(v.Multiselect,{options:Me,selectedValues:Te,onSelect:Ie,onRemove:Ie,value:we,closeOnSelect:!1,showArrow:!1,showCheckbox:"true",displayValue:"label",id:"departmentsIds",name:"departmentsIds",inputId:"departmentsIds",placeholder:"Department"},"dept-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles filterWidth mt-4",children:(0,S.jsx)(v.Multiselect,{closeOnSelect:!1,options:je,selectedValues:Se,onSelect:Ne,onRemove:Ne,value:ge,id:"employeeStatusAllRequest",inputId:"employeeStatusAllRequest",name:"employeeStatusAllRequest","data-testid":"employeeStatusAllRequest",placeholder:"Employee Status",showCheckbox:"true",displayValue:"label",className:"leave-multi-select filter-style-allmodules"},"empStatus-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles mt-4",children:(0,S.jsx)(v.Multiselect,{closeOnSelect:!1,options:qe,selectedValues:Ee,onSelect:Fe,onRemove:He,value:De,id:"employeeFormControlSelect",name:"employeeTypeLeaveOverview","data-testid":"employeeTypeLeaveOverview",placeholder:"Employment Type",showCheckbox:"true",displayValue:"label",className:"leave-multi-select filter-style-allmodules"},"empType-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles mt-4",children:(0,S.jsx)(v.Multiselect,{options:V,selectedValues:U,onSelect:be,onRemove:be,value:L,"data-testid":"employeeNumberAndName",closeOnSelect:!1,showCheckbox:"true",placeholder:"Employee",displayValue:"employeeNumberAndName",ref:W},"emp-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 filterWidth mt-4",children:(0,S.jsx)("input",{type:"text",onInput:g.A,className:"form-control helpdesk-filter-styles no-spinners",placeholder:"Ticket ID",onChange:oe,value:de})}),(0,S.jsx)("div",{className:"col-md-2  asset-multi-select-styles filterWidth mt-4",children:(0,S.jsx)(v.Multiselect,{options:E,selectedValues:F,onSelect:Re,onRemove:Re,value:O,"data-testid":"employeeNumberAndName",closeOnSelect:!1,showCheckbox:"true",placeholder:"Assigned To",displayValue:"employeeNumberAndName",ref:B},"assignedTo-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles mt-4",children:(0,S.jsx)(v.Multiselect,{options:Ye,selectedValues:M,onSelect:ye,onRemove:ye,value:w,"data-testid":"issueTypeName",name:"issueTypeName",closeOnSelect:!1,showCheckbox:"true",placeholder:"Issue Type",displayValue:"issueTypeName",ref:_},"issueType-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles mt-4",children:(0,S.jsx)(v.Multiselect,{className:"chipsview",options:G,selectedValues:Q,onSelect:Ce,onRemove:Ce,value:Z,"data-testid":"status",name:"status",closeOnSelect:!1,showCheckbox:"true",placeholder:"Issue Status",displayValue:"status",ref:X},"issueStatus-filter-".concat(l))}),(0,S.jsx)("div",{className:"col-md-2 asset-multi-select-styles mt-4",children:(0,S.jsx)(v.Multiselect,{options:b,selectedValues:R,onSelect:ke,onRemove:ke,value:$,"data-testid":"name",closeOnSelect:!1,showCheckbox:"true",placeholder:"Priorty",displayValue:"name",ref:k},"priority-filter-".concat(l))}),(0,S.jsx)("div",{className:"",children:(0,S.jsx)("div",{className:"col-md-2 iconsCalaenders asset-multi-select-styles mt-4 date-helpdesk-my-team mr-5",children:(0,S.jsx)(u.A,{onCallback:f,initialSettings:{autoUpdateInput:!1,locale:{format:"DD-MMM-YYYY"}},children:(0,S.jsx)("input",{className:"iconsCalaenders daterange-filter-allmodules form-control date-helpdesk",value:y,id:"dateAllrequest",onChange:()=>{},placeholder:"DD-MMM-YYYY"})},y)})}),(0,S.jsx)("div",{className:"col-md-1 mt-3 d-flex align-items-center",children:(0,S.jsx)("button",{disabled:Je||0==(null===Oe||void 0===Oe?void 0:Oe.length),className:"helpdesk-accept-button-styles",onClick:async()=>{var e,l;let s;s="Open"==(null===Ke||void 0===Ke||null===(e=Ke.current)||void 0===e||null===(l=e[0])||void 0===l?void 0:l.ticketStatus)?2:1,await(()=>{var e,l;let s;s="Open"==(null===Ke||void 0===Ke||null===(e=Ke.current)||void 0===e||null===(l=e[0])||void 0===l?void 0:l.ticketStatus)?2:1,t(s,Ke.current),Be([])})()},children:"Accept"})}),(0,S.jsx)("div",{className:"col-md-1 mt-3 d-flex align-items-center",children:(0,S.jsx)("button",{className:"helpdesk-reject-button-styles",onClick:async()=>{await(t(4,Ke.current),void Be([]))},disabled:Le||0==(null===Oe||void 0===Oe?void 0:Oe.length),children:"Reject"})}),(0,S.jsx)("div",{className:"col-md-1 mt-3 d-flex align-items-center",children:(0,S.jsx)("button",{className:"helpdesk-close-button-styles",onClick:async()=>{await(t(3,Ke.current),void Be([]))},disabled:Ge||0==(null===Oe||void 0===Oe?void 0:Oe.length),children:"Close"})}),(0,S.jsx)("div",{className:" mt-3 ml-3",children:(0,S.jsx)("button",{className:"btn reset-btn-selffeedback reset-btn-allReq",onClick:()=>j(),children:(0,S.jsx)("img",{className:"img-selfreset",src:p,alt:"reset"})})})]}),(0,S.jsx)("div",{className:"row mt-4 ml-0",children:(0,S.jsx)("div",{className:"col-md-12",children:ae.length>0?(0,S.jsxs)("div",{className:" w-100 m-0 mb-3 ",children:[(0,S.jsx)("div",{className:"card-body mb-3 w-100 m-0  p-0 custom-table-wrapper mb-3 emp-name-helpdesks",children:(0,S.jsx)(m.A,{bootstrap4:!0,keyField:"id",state:ee,setState:le,columns:Ze,classes:"custom-table",rowClasse
1s:te,data:ae,defaultSorted:se,rowEvents:{onClick:(e,l)=>{N(l)}}})}),0!==ie&&(0,S.jsxs)("div",{className:"row mt-4 mb-4",children:[(0,S.jsxs)("div",{className:"col-4 text-start record-size-pagination",children:["Showing Pages ",ne," of ",ie]}),(0,S.jsxs)("div",{className:"col-4 text-center",children:[(0,S.jsx)("button",{disabled:1===ne,className:"mr-3 ml-2 page-button",onClick:()=>re("prev"),children:"<<"}),(0,S.jsx)("button",{disabled:1===ne,className:"mr-3 ml-2 page-button",onClick:()=>ce("prev"),children:"<"}),me.map((e=>(0,S.jsx)("button",{className:"mr-3 ml-2 page-button ".concat(e===ne?"page-no-designation":""),onClick:()=>ue(e),children:e},e))),(0,S.jsx)("button",{disabled:ne===ie||0===(null===ae||void 0===ae?void 0:ae.length),className:"mr-3 ml-2 page-button",onClick:()=>ce("next"),children:">"}),(0,S.jsx)("button",{disabled:ne===ie||0===(null===ae||void 0===ae?void 0:ae.length),className:"mr-3 ml-2 page-button",onClick:()=>re("next"),children:">>"})]}),(0,S.jsx)("div",{className:"col-4 d-flex justify-content-end record-size-pagination",children:(0,S.jsxs)("div",{children:["Showing Records ",ve>0?(ne-1)*pe+1:0," - ",ve>0?ne===ie?ve:ne*pe:0," of ",ve]})})]})]}):(0,S.jsx)("img",{className:"norecordsImg mb-5",src:x,alt:"No Record Found"})})})]})};var j=t(11665),y=t(45019),f=t(61035),k=t(34977),b=t(22125),R=t(29617),C=t(24225),I=t(83846);t(92008),t(97402);const w=e=>{var l;const[t,s]=(0,a.useState)(!1),o=e.allRejecteModal||e.allOpenRejectModal||e.allmanageRejectModal,d=(null===(l=e.comments)||void 0===l?void 0:l.trim())||"";(0,a.useEffect)((()=>{s(!!o&&!d)}),[d,o]);return(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(j.A,{className:"modal-center employee-delete-meatadata",show:e.allapproveModal||e.allRejecteModal||e.allCloseModal||e.allOpenRejectModal||e.allmanageRejectModal||e.allApproveRejectModal||e.allUpdateCommentModal,children:(0,S.jsx)(j.A.Body,{className:"modal-delete-employee",children:(0,S.jsxs)("div",{className:"",children:[(0,S.jsxs)("div",{className:"d-flex justify-content-between mb-1",children:[(0,S.jsx)("div",{children:(0,S.jsx)("span",{className:"confirm-message-employee",children:e.headingtext})}),(0,S.jsx)("div",{children:(0,S.jsx)("img",{src:I,className:"close-icon-employee",alt:"close_icon",onClick:()=>{e.allapproveModal?e.adminapproveModalClose():e.allRejecteModal?e.allrejectmodalClose():e.allCloseModal?e.allCloseModalClose():e.allOpenRejectModal?e.allOpenRejectModalClose():e.allmanageRejectModal?e.allMAnageRejectModalClose():e.allApproveRejectModal?e.allManageApprovetModalClose():e.allUpdateCommentModal&&e.allCommentModalClose()}})})]}),(0,S.jsxs)("div",{className:"row",children:[(0,S.jsx)("div",{className:"text-left text-size confirm-message-for-delete textforhelpdeskpopup mt-2 ml-4",children:(0,S.jsxs)("span",{className:"text-center",children:[e.text,o&&(0,S.jsx)("span",{className:"text-danger ml-1",children:"*"})]})}),(0,S.jsx)("div",{className:"col-md-12",children:(0,S.jsx)("textarea",{className:"form-control lableColor curview",rows:4,name:"comment",value:e.comments||"",id:"exampleFormControlSelect1",onChange:l=>{e.setComment&&"function"===typeof e.setComment&&e.setComment(l.target.value)},onClick:e=>e.stopPropagation(),placeholder:"Remarks"})})]}),(0,S.jsxs)("div",{className:"d-flex justify-content-between mb-1 modal-btn action-btn-employee",children:[(0,S.jsx)("div",{className:"d-flex align-items-center modal-button-confirm-employee",onClick:()=>{e.allapproveModal?e.adminapproveModalClose():e.allRejecteModal?e.allrejectmodalClose():e.allCloseModal?e.allCloseModalClose():e.allOpenRejectModal?e.allOpenRejectModalClose():e.allmanageRejectModal?e.allMAnageRejectModalClose():e.allApproveRejectModal?e.allManageApprovetModalClose():e.allUpdateCommentModal&&e.allCommentModalClose()},children:(0,S.jsx)("div",{children:(0,S.jsx)("span",{children:"Cancel"})})}),(0,S.jsx)("div",{className:"d-flex align-items-center yesbutton modal-button-confirm-delete confirm-btn-employee-delete yesBtn ".concat(t?"disabled-btn":""),onClick:t?void 0:()=>{o&&!d||(e.allapproveModal?(e.updateHelpDeskTicketAcceptStatus(e.comments,e.remark),e.adminapproveModalClose()):e.allRejecteModal?(e.updateTicketStatusRejectAllRequest(e.comments,e.remark),e.allrejectmodalClose()):e.allCloseModal?(e.updateTicketStatusCloseAllRequest(e.comments,e.remark),e.allCloseModalClose()):e.allOpenRejectModal?(e.updateTicketStatusRejectAllRequest(e.comments,e.remark),e.allOpenRejectModalClose()):e.allmanageRejectModal?(e.updateTicketStatusMngRejectAllRequest(e.comments,e.remark),e.allMAnageRejectModalClose()):e.allApproveRejectModal?(e.updateHelpDeskTicketAllRequest(e.comments,e.remark),e.allManageApprovetModalClose()):e.allUpdate
1CommentModal&&(e.editHelpdeskTicketByAdmin(e.comments),e.allCommentModalClose()))},children:(0,S.jsx)("div",{children:(0,S.jsx)("span",{children:"Yes"})})})]})]})})})})};var M=t(67947);const T=e=>{let{allRequestHelpDeskViewsModel:l,allRequestHelpDeskViewModelClose:t,userName:s,ticketStatus:o,reportingManager:i,displayIssueId:n,issueTypeNamehelpdesk:r,issueTypeId:c,ticketPriority:m,handleChangeUrgencyIssue:u,escalationTime:v,createdOn:p,defaultAssigneeId:h,issueTitle:g,comment:x,handleDeleteCatalogFile:A,files:N,commentData:I,editHelpdeskTicketByAdmin:T,handleFileChange:q,handleChangeIssue:D,handleChangeIssues:E,updateHelpDeskTicketAcceptStatus:F,updateHelpDeskTicketAllRequest:H,updateTicketStatusRejectAllRequest:Y,updateTicketStatusMngRejectAllRequest:O,updateTicketStatusCloseAllRequest:B,fileInputRef:V,handleChange:U,assigneeData:J,handleCommetChangeIssue:P,defaultAssigneeName:L,ticketId:W}=e;const[G,Q]=(0,a.useState)(!1),[K,z]=(0,a.useState)(!1),[Z,X]=(0,a.useState)(!1),[_,$]=(0,a.useState)(!1),[ee,le]=(0,a.useState)(!1),[te,se]=(0,a.useState)(!1),[ae,oe]=(0,a.useState)("view"),[de,ie]=(0,a.useState)(""),[ne,re]=(0,a.useState)(!1),[ce,me]=(0,a.useState)(""),[ue,ve]=(0,a.useState)([]),[pe,he]=(0,a.useState)(!1),[ge,xe]=(0,a.useState)({ticketPriority:"",defaultAssigneeId:""});(0,a.useEffect)((()=>{l&&(xe({issueTypeId:c||"",ticketPriority:m||"",defaultAssigneeId:h||"",remark:"",filesCount:(null===N||void 0===N?void 0:N.length)||0}),ie(""))}),[l]);const Ae=c!==ge.issueTypeId||m!==ge.ticketPriority||h!==ge.defaultAssigneeId||""!==de.trim()||((null===N||void 0===N?void 0:N.length)||0)!==ge.filesCount,Se=[{employeeId:s||"Unknown User"}],Ne=Array.isArray(ue)?ue.map(((e,l)=>{var t,s;return{imageUrl:(null===e||void 0===e||null===(t=e.imageUrl)||void 0===t?void 0:t[0])||(null===e||void 0===e||null===(s=e.image)||void 0===s?void 0:s[0])||"",updatedBy:(null===e||void 0===e?void 0:e.updatedBy)||"Unknown",updatedAt:(null===e||void 0===e?void 0:e.updatedAt)||"Unknown Date",comment:(null===e||void 0===e?void 0:e.comment)||"",ticketStatus:(null===e||void 0===e?void 0:e.ticketStatus)||o,action:(null===e||void 0===e?void 0:e.action)||"",attachments:(null===e||void 0===e?void 0:e.attachmentData)||(null===e||void 0===e?void 0:e.attachments)||[],updatedByEmployeeId:(null===e||void 0===e?void 0:e.updatedByEmployeeId)||""}})):(null===I||void 0===I?void 0:I.map(((e,l)=>({imageUrl:"",updatedBy:e.commentByName,updatedByEmployeeId:"",updatedAt:e.createdAt,comment:e.comment,ticketStatus:o}))))||[],je=async e=>{oe(e),"history"===e&&(await(async()=>{const e=W;if(e)try{he(!0);const n={ticketId:e},r=await d.A.getTicketHistory(n);if(r&&r.data&&!r.data.error){var l,t,s,a,o,i;const e=(null===r||void 0===r||null===(l=r.data)||void 0===l||null===(t=l.data)||void 0===t||null===(s=t.records)||void 0===s?void 0:s[1])||[];null===r||void 0===r||null===(a=r.data)||void 0===a||null===(o=a.data)||void 0===o||null===(i=o.records)||void 0===i||i[0],ve(Array.isArray(e)?e:[])}else ve([])}catch(n){ve([])}finally{he(!1)}})(),re(!0))};return(0,S.jsxs)("div",{children:[l?(0,S.jsxs)(j.A,{fullscreen:!0,show:l,onHide:t,children:[(0,S.jsx)(j.A.Header,{className:"modalbody modal-header-allmodules",children:(0,S.jsxs)("div",{className:"row",children:[(0,S.jsx)("div",{className:"col-md-8 addhelpdeskheading helpdesk-heading",children:(0,S.jsxs)("h4",{className:"ml-3",children:["Issue ID | ",n]})}),(0,S.jsx)("div",{className:"col-md-3 ",children:(0,S.jsxs)("div",{children:["Withdrawn"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle status-withdrawn",children:o}),"In Progress"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle status-in-progress",children:o}),"Open"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle status-open",children:o}),"Rejected"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle status-rejected",children:o}),"Closed"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle status-closed",children:o}),"Manager Review"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle mngReviewLearning",children:o}),"Not Approved"==o&&(0,S.jsx)("p",{className:"RequeststatusStyle notApproved",children:o})]})}),(0,S.jsx)("div",{className:"col-md-1  pr-0",children:(0,S.jsx)("img",{width:40,height:40,src:y.A,onClick:t,alt:"close"})})]})}),(0,S.jsxs)(j.A.Body,{className:"modalbody1",children:[(0,S.jsx)("div",{className:"row mt-3",children:(0,S.jsx)("div",{className:"col-lg-12",children:(0,S.jsx)("div",{className:"card cards-section",children:(0,S.jsx)("div",{className:"card-body d-flex justify-content-between",children:(0,S.jsx)("div",{className:"col-md-8 advance-pay-tab",children:(0,S.jsxs)("ul",{className:"nav nav-pills navStyles",children:[(0,S.jsx)("li",{className:"nav-item",children:(0,S.jsx)("a",{className:"nav-link rounded_tab ml-2 pointer ".concat("view"===ae?"active":""),onClick:()=>je("view"),children:"Ticket Details"})}),(0,S.jsx)("li",{className:"nav-item",children:(0,S.jsx)("a",{className:"nav-link rounded_tab ml-2 pointer ".concat("history"===ae?"active":""),onClick:()=>je("history"),children:"Comment History"})})]})})})})})}),"view"===ae&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:"row mt-3",children:[(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Employee Name"}),(0,S.jsx)("input",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"issueTypeId",disabled:!0,value:s,id:"exampleFormControlSelect1",onChange:U})]}),(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Reporting Manager"}),(0,S.jsx)("input",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"reportingManager",disabled:!0,value:i,id:"exampleFormControlSelect1",onChange:U})]})]}),(0,S.jsxs)("div",{className:"row mt-2",children:[(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Issue Type"}),(0,S.jsxs)("select",{className:"form-control mt-2 lableColor curview input-fields-allmodules",disabled:"Closed"==o||"Rejected"==o||"Withdrawn"==o,name:"issueTypeId",value:c,id:"exampleFormControlSelect1",onChange:E,children:[(0,S.jsx)("option",{value:"",defaultValue:!0,children:"-Select-"}),r&&r.map(((e,l)=>(0,S.jsx)("option",{value:e.id,children:e.issueTypeName})))]})]}),(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Urgency"}),(0,S.jsxs)("select",{className:"form-control mt-2 lableColor curview input-fields-allmodules",disabled:"Closed"==o||"Rejected"==o||"Withdrawn"==o,name:"ticketPriority",value:m,id:"exampleFormControlSelect1",onChange:u,children:[(0,S.jsx)("option",{value:"",defaultValue:!0,children:"-Select-"}),(0,S.jsx)("option",{value:"low",defaultValue:!0,children:"Low"}),(0,S.jsx)("option",{value:"medium",defaultValue:!0,children:"Medium"}),(0,S.jsx)("option",{value:"high",defaultValue:!0,children:"High"})]})]})]}),(0,S.jsxs)("div",{className:"row mt-3",children:[(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Escalation Time (hrs)"}),(0,S.jsx)("input",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"escalationTime",disabled:!0,value:v,id:"exampleFormControlSelect1",onChange:U})]}),"Closed"==o||"Rejected"==o||"Withdrawn"==o?(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Assigned To"}),(0,S.jsx)("input",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"defaultAssigneeId",disabled:!0,value:L,id:"exampleFormControlSelect1",onChange:U})]}):(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Assigned To"}),(0,S.jsxs)("select",{className:"form-control curview input-fields-allmodules",name:"defaultAssigneeId",disabled:"Closed"==o||"Rejected"==o||"Withdrawn"==o,id:"defaultAssigneeId",onChange:D,value:h,children:[(0,S.jsx)("option",{value:"",children:"-Select-"}),J&&J.map(((e,l)=>(0,S.jsx)("option",{value:e.userId,children:e.employeeNumberAndName},l)))]})]})]}),(0,S.jsx)("div",{className:"row mt-3",children:(0,S.jsxs)("div",{className:"col-md-6",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Created On"}),(0,S.jsx)("input",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"reportingManager",disabled:!0,value:p,id:"exampleFormControlSelect1",onChange:U})]})}),(0,S.jsx)("div",{className:"row mt-2",children:(0,S.jsxs)("div",{className:"col-md-12",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Title"}),(0,S.jsx)("textarea",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"issueTitle",readOnly:!0,value:g,id:"exampleFormControlSelect1",onChange:U})]})}),(0,S.jsx)("div",{className:"row mt-2",children:(0,S.jsxs)("div",{className:"col-md-12",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Description"}),(0,S.jsx)("textarea",{className:"form-control mt-2 lableColor curview input-fields-allmodules",name:"comment",disabled:"Closed"==o||"Rejected"==o||"Withdrawn"==o,readOnly:!0,value:(null===I||void 0===I?void 0:I.length)>0?I[0].comment:"",id:"exampleFormControlSelect1",onChange:P})]})}),(0,S.jsx)("div",{className:"mb-3",children:(0,S.jsxs)("div",{className:"mt-3",children:[(0,S.jsx)("div",{children:(0,S.jsx)("h4",{className:"heading_component_payroll ",children:"Attachment (jpg, jpeg, png, pdf)"})}),(0,S.jsx)("div",{className:"input-group mb-3 mt-3",children:(0,S.jsxs)("div",{className:"custom-file custom-file-label",children:[(0,S.jsx)("input",{type:"file",id:"attachment",ref:V,multiple:!0,disabled:"Closed"==o||"Rejected"==o||"Withdrawn"==o,accept:"pdf/*",className:"custom-file-input curview",onChange:e=>{q(e.target.files)}}),"Closed"==o||"Rejected"==o||"Withdrawn"==o?"":(0,S.jsx)("label",{className:"textlabel",htmlFor:"attachment",children:"Choose file"})]})}),(0,S.jsx)("div",{children:(0,S.jsx)("h4",{className:"heading_component_payroll",children:'"Maximum attachments allowed: 3, with a file size limit of 2MB per attachment."'})}),(0,S.jsx)("div",{className:"row mr-3",children:Array.isArray(I)&&I.map((e=>(0,S.jsx)("div",{className:"comment-block",children:(0,S.jsx)("div",{className:"row ml-4",children:e.attachmentData&&e.attachmentData.map(((e,l)=>(0,S.jsx)("div",{className:"col-auto",children:(0,S.jsx)("div",{className:"py-4",children:(0,S.jsx)("div",{className:"p-2 document-icon-payroll-attach-reimbursement",children:(0,S.jsx)("a",{target:"_blank",href:e.key,rel:"noopener noreferrer",children:(0,S.jsx)("img",{src:R,className:"mt-1 doc-icon-payroll ml-2",alt:"attachment",title:e.name})})})})},l)))})},e.commentId)))})]})}),(0,S.jsx)("div",{className:"row imag-uploaded flex flex-wrap items-center h-full",children:N&&Array.isArray(N)&&N.length>0&&N.map(((e,l)=>(0,S.jsxs)("div",{className:"col-auto mr-3",children:[(0,S.jsx)("div",{className:"py-4",children:(0,S.jsx)("div",{className:"p-2 document-icon-payroll-attach-reimbursement",children:(0,S.jsx)("img",{src:R,className:"mt-1 doc-icon-payroll ml-2",alt:"remove-support",title:e.name})})}),(0,S.jsx)("img",{src:C.A,className:"support-close remove-icon-payroll-reimbursement",alt:"remove-support",onClick:e=>A(l)})]},l)))}),!("Closed"===o||"Rejected"===o||"Withdrawn"===o)&&(0,S.jsx)("div",{className:"row mt-2",children:(0,S.jsxs)("div",{className:"col-md-12",children:[(0,S.jsx)("h4",{className:"lableColor",children:"Remark"}),(0,S.jsx)("textarea",{className:"form-control mt-2 lableColor curview",rows:4,placeholder:"Remarks",value:de,onChange:e=>ie(e.target.value)})]})})]})]}),(0,S.jsx)(j.A.Footer,{className:"helpdeskfooter",children:(0,S.jsx)("div",{className:"row",children:"Open"===o?(0,S.jsxs)("div",{className:"col-md-12 d-flex ml-1 helpdeskcancel marginfooter",children:[(0,S.jsx)("div",{className:"col-md-3 ml-0  ml-2 pl-0  text-left",children:(0,S.jsx)("button",{type:"button",className:"border-helpdesk-cancel-btn-assigning-open","data-testid":"reset","data-dismiss":"modal",onClick:()=>{t()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsx)("div",{className:"col-sm-12 d-flex",children:(0,S.jsx)("div",{className:"col-sm-12 mt-1 helpdeskBalanceButton helpdeskBalanceCancelButton ",children:"Cancel"})})})})}),(0,S.jsxs)("div",{className:"col-md-9 mx-0 px-0 helpdesksubbutton ",children:[(0,S.jsx)("button",{type:"button",className:"acceptheldesk-btn new-btn-for-helpdesk","data-testid":"reset","data-dismiss":"modal",onClick:()=>{Q((e=>!e))},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:k})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Accept"})]})})}),(0,S.jsx)("button",{type:"button",className:"rejectheldesk-btn-all ml-4 new-btn-for-helpdesk","data-testid":"reset","data-dismiss":"modal",onClick:()=>{z((e=>!e))},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:b})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Reject"})]})})}),(0,S.jsx)("button",{type:"button",disabled:!Ae,onClick:()=>{T(de),ie("")},className:"sbmtBtnbgclr addhelpdeskbtn text-right ml-4 new-btn-for-helpdesk","data-testid":"submit","data-dismiss":"modal",children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:f})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Update"})]})})})]})]}):"Manager Review"===o?(0,S.jsxs)("div",{className:"col-md-12 d-flex helpdeskcancel marginfooter",children:[(0,S.jsx)("div",{className:"col-md-3 ml-0 pl-0 ml-2 text-left",children:(0,S.jsx)("button",{type:"button",className:"border-helpdesk-cancel-btn-assigning-all","data-testid":"reset","data-dismiss":"modal",onClick:()=>{t()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:["                          ",(0,S.jsx)("div",{className:"col-sm-12 mt-1 footer-btn helpdeskBalanceButton helpdeskBalanceCancelButton ",children:"Cancel"})]})})})}),(0,S.jsxs)("div",{className:"col-md-9 mx-0 helpdeskaceptbtn px-0",children:[(0,S.jsx)("button",{type:"button",className:"acceptheldesk-btn new-btn-for-helpdesk","data-testid":"reset","data-dismiss":"modal",onClick:()=>{se((e=>!e))},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:k})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Accept"})]})})}),(0,S.jsx)("button",{type:"button",className:"rejectheldesk-btn-all ml-4 new-btn-for-helpdesk","data-testid":"reset","data-dismiss":"modal",onClick:()=>{le((e=>!e))},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:b})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Reject"})]})})}),(0,S.jsx)("button",{type:"button",disabled:!Ae,onClick:()=>{T(de),ie("")},className:"sbmtBtnbgclr addhelpdeskbtn text-right ml-4 new-btn-for-helpdesk","data-testid":"submit","data-dismiss":"modal",children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:f})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Update"})]})})})]})]}):"In Progress"===o?(0,S.jsxs)("div",{className:"col-md-12 helpdeskcancel marginfooter d-flex",children:[(0,S.jsx)("div",{className:"col-md-3  ml-2 text-left ml-0 pl-0",children:(0,S.jsx)("button",{type:"button",className:"border-helpdesk-cancel-btn-assigning-all","data-testid":"reset","data-dismiss":"modal",onClick:()=>{t()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsx)("div",{className:"col-sm-12 d-flex",children:(0,S.jsx)("div",{className:"col-sm-12 mt-1 footer-btn  helpdeskBalanceButton helpdeskBalanceCancelButton",children:"Cancel"})})})})}),(0,S.jsxs)("div",{className:"col-md-9 mx-0 helpdesksubbutton ml-1 px-0",children:[(0,S.jsx)("button",{type:"button",className:"acceptheldesk-btn new-btn-for-helpdesk","data-testid":"reset","data-dismiss":"m
1odal",onClick:()=>{X((e=>!e))},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:k})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Close"})]})})}),(0,S.jsx)("button",{type:"button",className:"rejectheldesk-btn-all ml-4 new-btn-for-helpdesk","data-testid":"reset","data-dismiss":"modal",onClick:()=>{$((e=>!e))},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:b})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Reject"})]})})}),(0,S.jsx)("button",{type:"button",disabled:!Ae,onClick:()=>{T(de),ie("")},className:"sbmtBtnbgclr addhelpdeskbtn ml-4 text-right new-btn-for-helpdesk","data-testid":"submit","data-dismiss":"modal",children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:f})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Update"})]})})})]})]}):(0,S.jsxs)("div",{className:"col-md-12 helpdeskcancel marginfooter d-flex",children:[(0,S.jsx)("div",{className:"col-md-6  text-left",children:(0,S.jsx)("button",{type:"button",className:"border-helpdesk-cancel-btn-assigning-all","data-testid":"reset","data-dismiss":"modal",onClick:()=>{t()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsx)("div",{className:"col-sm-12 d-flex",children:(0,S.jsx)("div",{className:"col-sm-12 mt-1 footer-btn helpdeskBalanceButton helpdeskBalanceCancelButton",children:"Cancel"})})})})}),"Closed"===o||"Not Approved"===o||"Rejected"===o||"Withdrawn"===o?"":(0,S.jsx)("div",{className:"col-md-6 text-right",children:(0,S.jsx)("button",{disabled:!Ae,type:"button",onClick:()=>{T(de),ie("")},className:"sbmtBtnbgclr addhelpdeskbtn new-btn-for-helpdesk","data-testid":"submit","data-dismiss":"modal",children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:f,alt:"Update"})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 footer-btn",children:"Update"})]})})})})]})})})]}):"",ne&&(0,S.jsx)(M.A,{myRequestHistoryModal:ne,MyRequestHistoryClose:()=>{re(!1),oe("view")},payrollEmpData:Se,payrollHistoryArr:Ne,isFromView:!0}),(0,S.jsx)(w,{updateTicketStatusRejectAllRequest:Y,allOpenRejectModal:_,comments:ce,setComment:me,remark:de,headingtext:"Reject",text:"Are You Sure You Want To Reject?",allOpenRejectModalClose:()=>{$(!1),me("")}}),(0,S.jsx)(w,{updateHelpDeskTicketAcceptStatus:F,allapproveModal:G,comments:ce,setComment:me,remark:de,headingtext:"Accept",text:"Are You Sure You Want To Accept?",adminapproveModalClose:()=>{Q(!1),me("")}}),(0,S.jsx)(w,{updateTicketStatusRejectAllRequest:Y,allRejecteModal:K,comments:ce,setComment:me,remark:de,headingtext:"Reject",text:"Are You Sure You Want To Reject?",allrejectmodalClose:()=>{z(!1),me("")}}),(0,S.jsx)(w,{updateTicketStatusCloseAllRequest:B,allCloseModal:Z,comments:ce,setComment:me,remark:de,headingtext:"Close",text:"Are You Sure You Want To Close?",allCloseModalClose:()=>{X(!1),me("")}}),(0,S.jsx)(w,{updateTicketStatusMngRejectAllRequest:O,allmanageRejectModal:ee,comments:ce,setComment:me,remark:de,headingtext:"Reject",text:"Are You Sure You Want To Reject?",allMAnageRejectModalClose:()=>{le(!1),me("")}}),(0,S.jsx)(w,{updateHelpDeskTicketAllRequest:H,allApproveRejectModal:te,comments:ce,setComment:me,remark:de,headingtext:"Accept",text:"Are You Sure You Want To Accept?",allManageApprovetModalClose:()=>{se(!1),me("")}})]})};var q=t(96189);const D=e=>{let{showSubmitsDialog:l,handleShowSubmitDialogtClose:t,statusReason:s,handleChangeStatusReason:a,leaveTypeToggle:o}=e;return(0,S.jsx)("div",{children:(0,S.jsxs)(j.A,{fullscreen:!0,show:l,onHide:t,children:[(0,S.jsx)(j.A.Header,{className:"modalbody",children:(0,S.jsx)("div",{className:"row policySection",children:(0,S.jsxs)("div",{className:"col-md-12 d-flex mt-3",children:[(0,S.jsx)("div",{className:"col-md-6 leaveType",children:(0,S.jsx)("h4",{className:"addPolicy",children:"Add Comment"})}),(0,S.jsx)("div",{className:"col-md-6 text-right mt-2 pr-0",children:(0,S.jsx)("img",{className:"imagecss",src:I,onClick:()=>{t()}})})]})})}),(0,S.jsxs)(j.A.Body,{className:"modalbody1",children:[(0,S.jsx)("label",{children:"Reason"}),(0,S.jsx)("span",{className:"text-danger",children:"*"}),(0,S.jsx)("textarea",{className:"form-control helpdesk-reason-textarea",type:"text",id:"statusReason",name:"statusReason",onChange:a,value:s})]}),(0,S.jsx)(j.A.Footer,{children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-md-12 d-flex",children:[(0,S.jsx)("div",{className:"col-md-6 text-left",children:(0,S.jsx)("button",{type:"button",className:"cancelBtn btn_addcancelbutton btn_cancelhelpdesk","data-testid":"reset","data-dismiss":"modal",onClick:()=>{t()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:I})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 btn-heading-all-modules",children:"Cancel"})]})})})}),(0,S.jsx)("div",{className:"col-md-6 btn_addsubmitbutton text-right",children:o?(0,S.jsx)("button",{onClick:()=>{t()},className:"sbmtBtnbgclr  addhelpdeskbtn","data-testid":"submit","data-dismiss":"modal",children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-4",children:(0,S.jsx)("img",{src:f})}),(0,S.jsx)("div",{className:"col-sm-8 mt-1 btn-heading-all-modules",children:"Update"})]})})}):(0,S.jsx)("button",{type:"button",className:"sbmtBtnbgclr addhelpdeskbtn","data-testid":"submit","data-dismiss":"modal",onClick:()=>{t()},children:(0,S.jsx)("div",{className:"row",children:(0,S.jsxs)("div",{className:"col-sm-12 d-flex",children:[(0,S.jsx)("div",{className:"col-sm-2",children:(0,S.jsx)("img",{src:f})}),(0,S.jsx)("div",{className:"col-sm-10 mt-1",children:"Update"})]})})})})]})})})]})})};var E=t(86178),F=t.n(E),H=t(82588),Y=t(28761),O=t(6078),B=t(13941),V=t(92522);const U=()=>{const[e,l]=(0,a.useState)(""),[t,n]=(0,a.useState)(""),{loaderState:r,toggleLoader:c}=(0,Y.A)(),[m,u]=(0,a.useState)([]),[v,p]=(0,a.useState)([]),[h,g]=(0,a.useState)(!1),[x,A]=(0,a.useState)(!1),[j,y]=(0,a.useState)("createdDate"),[f,k]=(0,a.useState)("DESC"),[b,R]=(0,a.useState)(""),[C,I]=(0,a.useState)("DD-MM-YYYY"),[w,E]=(0,a.useState)(!1),[U,J]=(0,a.useState)([]),[P,L]=(0,a.useState)([]),[W,G]=(0,a.useState)(""),[Q,K]=(0,a.useState)([]),[z,Z]=(0,a.useState)([]),[X,_]=(0,a.useState)([]),[$,ee]=(0,a.useState)([]),[le,te]=(0,a.useState)([]),[se,ae]=(0,a.useState)([]),[oe,de]=(0,a.useState)([]),[ie,ne]=(0,a.useState)([]),[re,ce]=(0,a.useState)([]),[me,ue]=(0,a.useState)([]),[ve,pe]=(0,a.useState)([]),[he,ge]=(0,a.useState)([]),[xe,Ae]=(0,a.useState)([]),[Se,Ne]=(0,a.useState)(!0),[je,ye]=(0,a.useState)([]),[fe,ke]=(0,a.useState)([]),[be,Re]=(0,a.useState)([]),[Ce,Ie]=(0,a.useState)([]),[we,Me]=(0,a.useState)([]),[Te,qe]=(0,a.useState)([]),[De,Ee]=(0,a.useState)(""),[Fe,He]=(0,a.useState)(""),[Ye,Oe]=(0,a.useState)(""),[Be,Ve]=(0,a.useState)(""),[Ue,Je]=(0,a.useState)(""),[Pe,Le]=(0,a.useState)(1),[We,Ge]=(0,a.useState)(""),[Qe,Ke]=(0,a.useState)(""),[ze,Ze]=(0,a.useState)(""),[Xe,_e]=(0,a.useState)(""),[$e,el]=(0,a.useState)([]),[ll,tl]=(0,a.useState)([]),[sl,al]=(0,a.useState)(null),[ol,dl]=(0,a.useState)([]),[il,nl]=(0,a.useState)([]),[rl,cl]=(0,a.useState)(""),[ml,ul]=(0,a.useState)(0),[vl,pl]=(0,a.useState)(1),[hl,gl]=(0,a.useState)([]),[xl,Al]=(0,a.useState)(1),[Sl,Nl]=(0,a.useState)(50),[jl,yl]=(0,a.useState)(!1),[fl,kl]=(0,a.useState)(),[bl,Rl]=(0,a.useState)({autoUpdateInput:!1,locale:{format:"DD-MMM-YYYY"}}),Cl=(null===m||void 0===m?void 0:m.length)>0?[{id:"",issueTypeName:"Select All"},...m.map((e=>{var l;return(0,s.A)((0,s.A)({},e),{},{issueTypeName:(null===(l=e.issueTypeName)||void 0===l?void 0:l.charAt(0).toUpperCase())+e.issueTypeName.slice(1)})}))]:[],Il=[{name:"Select All",status:""},{name:"Low",status:"low"},{name:"Medium",status:"medium"},{name:"High",status:"high"}],wl=(0,a.useRef)(),Ml=(0,a.useRef)(),Tl=(0,a.useRef)(),ql=(0,a.useRef)(),Dl=(0,a.useRef)(),El=(0,a.useRef)(),[Fl,Hl]=(0,a.useState)([]),[Yl,Ol]=(0,a.useState)([]),Bl=[{value:"",label:"Select All"},{label:"Active",value:"active"},{label:"Inactive",value:"inactive"}],Vl=e=>{try{const l=localStorage.getItem(e);if(!l||"undefined"===l||"null"===l)return[];const t=null===JSON||void 0===JSON?void 0:JSON.parse(l);return null!==Array&&void 0!==Array&&Array.isArray(t)?t:[t]}catch(l){return[]}},Ul=e=>{try{return"string"===typeof e?null===JSON||void 0===JSON?void 0:JSON.parse(e):[]}catch(l){return[]}};(0,a.useEffect)((()=>{const e=Vl("employeeStatusAllRequest");
1if(Hl(e),(null===e||void 0===e?void 0:e.length)>0&&(null===Bl||void 0===Bl?void 0:Bl.length)>0){const l=null===Bl||void 0===Bl?void 0:Bl.slice(1),t=null===l||void 0===l?void 0:l.filter((l=>null===e||void 0===e?void 0:e.includes(l.value))),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{label:"Select All",value:""},...t]:t;Ol(s),Hl(s)}}),[]),(0,a.useEffect)((()=>{const e=Vl("EmpNamehelpArr");if((null===e||void 0===e?void 0:e.length)>0&&(null===we||void 0===we?void 0:we.length)>0){const l=null===we||void 0===we?void 0:we.slice(1),t=l.filter((l=>null===e||void 0===e?void 0:e.includes(l.userId))),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{employeeNumberAndName:"Select All",userId:""},...t]:t;qe(s),tl(e)}}),[we]),(0,a.useEffect)((()=>{const e=Vl("EmpNameAllHelpArr");if((null===e||void 0===e?void 0:e.length)>0&&(null===ve||void 0===ve?void 0:ve.length)>0){const l=null===ve||void 0===ve?void 0:ve.slice(1),t=null===l||void 0===l?void 0:l.filter((l=>null===e||void 0===e?void 0:e.includes(l.userId))),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{employeeNumberAndName:"Select All",userId:""},...t]:t;ue(s),ge(e)}}),[ve]),(0,a.useEffect)((()=>{const e=Vl("AllHelpStatusArr");if((null===e||void 0===e?void 0:e.length)>0&&(null===be||void 0===be?void 0:be.length)>0){const l=null===be||void 0===be?void 0:be.slice(1),t=null===l||void 0===l?void 0:l.filter((l=>null===e||void 0===e?void 0:e.includes(l.id))),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{status:"Select All",id:""},...t]:t;Ie(s),el(e)}}),[be]);(0,a.useEffect)((()=>{Fl&&Pl()}),[Fl]),(0,a.useEffect)((()=>{const e=Vl("ticketPriority");if(K(e),(null===e||void 0===e?void 0:e.length)>0&&(null===Il||void 0===Il?void 0:Il.length)>0){const l=null===Il||void 0===Il?void 0:Il.slice(1),t=null===l||void 0===l?void 0:l.filter((l=>null===e||void 0===e?void 0:e.includes(l.status))),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{name:"Select All",status:""},...t]:t;Z(s),K(s),Zl(1,[])}}),[]),(0,a.useEffect)((()=>{const e=localStorage.getItem("startDateAllHelpdesk"),l=localStorage.getItem("endDateAllHelpdesk");if(l){const t=F()(e).format("DD-MMM-YYYY"),s=F()(l).format("DD-MMM-YYYY");Rl({displayStart:t,displayEnd:s}),I("".concat(t," - ").concat(s))}else Rl({autoUpdateInput:!1,locale:{format:"DD-MMM-YYYY"}}),I("")}),[]),(0,a.useEffect)((()=>{Xl(),_l(),Kl(),Gl(),Wl();const e=localStorage.getItem("startDateAllHelpdesk"),l=localStorage.getItem("endDateAllHelpdesk");e&&l&&I("".concat(F()(e).format("DD-MMM-YYYY")," - ").concat(F()(l).format("DD-MMM-YYYY")));const t=localStorage.getItem("employeeStatusAllRequest");t&&Hl(t)}),[]);const Jl=(0,a.useRef)(""),Pl=()=>{var e;const l=localStorage.getItem("employeeStatusAllRequest"),t=localStorage.getItem("departmentIdAllReq"),s=localStorage.getItem("employeeTypeAllRequest"),a={empStatus:(null===(e=Ul(l))||void 0===e?void 0:e.length)>0?Ul(l):["active"],department:Ul(t)||[],empType:Ul(s)||[]},o=JSON.stringify(a);Jl.current!==o&&(Jl.current=o,H.A.getEmployeeListReimbursement(a).then((e=>{var l,t,s,a,o,d,i;let n=(null===e||void 0===e||null===(l=e.data)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.records)||[];n.length>0&&(n=[{userId:0,employeeNumberAndName:"Select All"},...n]),Me([...n]);const r=localStorage.getItem("EmpNamehelpArr");if(r&&(null===r||void 0===r?void 0:r.length)>0){var c,m;const e=null===JSON||void 0===JSON?void 0:JSON.parse(r);tl(e);const l=null===e||void 0===e||null===(c=e.map((e=>{var l;return null===(l=n)||void 0===l?void 0:l.find((l=>l.userId===e))})))||void 0===c?void 0:c.filter(Boolean);(null===l||void 0===l?void 0:l.length)===(null===(m=n)||void 0===m?void 0:m.length)-1&&(null===l||void 0===l||l.unshift({userId:0,employeeNumberAndName:"Select All"})),qe(l)}const u=[{label:"Select",value:"",id:""}];null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a||a.records.map(((e,l)=>{var t;u.push({name:e.name,label:null===(t=e.employeeNumberAndName)||void 0===t?void 0:t.toUpperCase(),value:l,id:e.userId})}));let v=(null===e||void 0===e||null===(o=e.data)||void 0===o||null===(d=o.data)||void 0===d?void 0:d.records)||[];(null===(i=v)||void 0===i?void 0:i.length)>0&&(v=[{userId:0,employeeNumberAndName:"Select All"},...v]),pe(v);const p=localStorage.getItem("EmpNameAllHelpArr");if(p&&p.length>0){var h,g;const e=null===JSON||void 0===JSON?void 0:JSON.parse(p),l=null===e||void 0===e||null===(h=e.map((e=>{var l;return null===(l=n)||void 0===l?void 0:l.find((l=>l.userId===e))}
1)))||void 0===h?void 0:h.filter(Boolean);(null===l||void 0===l?void 0:l.length)===(null===(g=n)||void 0===g?void 0:g.length)-1&&(null===l||void 0===l||l.unshift({userId:0,employeeNumberAndName:"Select All"})),ue(l),ge(e)}const x=localStorage.getItem("EmpNameMyTeamReimArr");if(x){const l=JSON.parse(x);let t=[];l.forEach((l=>{var s,a;const o=null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records.find((e=>(null===e||void 0===e?void 0:e.userId)===l));o&&t.push(o)}))}Jl.current=""}),(e=>{Jl.current="",(0,i.oR)(e.message)})))},Ll=[{label:"Select All",value:""},...(null===oe||void 0===oe?void 0:oe.map((e=>{var l,t,s;return{label:(null===(l=e.name)||void 0===l||null===(t=l.charAt(0))||void 0===t?void 0:t.toUpperCase())+(null===(s=e.name)||void 0===s?void 0:s.slice(1)),value:e.id}})))||[]];(0,a.useEffect)((()=>{const e=Vl("departmentIdAllReq");if(Ll&&!((null===Ll||void 0===Ll?void 0:Ll.length)<=1)&&(ce(e),(null===e||void 0===e?void 0:e.length)>0)){const l=null===Ll||void 0===Ll?void 0:Ll.slice(1),t=null===l||void 0===l?void 0:l.filter((l=>null===e||void 0===e?void 0:e.includes(l.value))),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{label:"Select All",value:0},...t]:t;ne(s)}}),[null===Ll||void 0===Ll?void 0:Ll.length]);const Wl=e=>{V.A.getDepartment({pageNumber:"",pageSize:"",sort:"nameAToZ"}).then((e=>{var l;de(null===e||void 0===e||null===(l=e.data.data)||void 0===l?void 0:l.records)}))},Gl=()=>{B.A.getEmpType({sort:"nameAToZ"}).then((e=>{var l,t;const s=[{id:0,name:"Select All",seriesCode:""},...(null===e||void 0===e||null===(l=e.data)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.records)||[]];ae(s);const a=(null===JSON||void 0===JSON?void 0:JSON.parse(localStorage.getItem("employeeTypeLeaveOverview")))||[];if(Array.isArray(a)&&a.length>0){const e=s.filter((e=>a.includes(e.id))).map((e=>({label:e.name,value:e.id})));_(e),ee(a)}}))},Ql=(null===se||void 0===se?void 0:se.map((e=>{var l,t,s;return{value:e.id,label:(null===(l=e.name)||void 0===l||null===(t=l.charAt(0))||void 0===t?void 0:t.toUpperCase())+(null===(s=e.name)||void 0===s?void 0:s.slice(1))}})))||[];(0,a.useEffect)((()=>{const e=Vl("employeeTypeAllRequest");if(te(e),(null===e||void 0===e?void 0:e.length)>0&&(null===se||void 0===se?void 0:se.length)>0){var l,t;let s=null===se||void 0===se||null===(l=se.filter((l=>null===e||void 0===e?void 0:e.includes(l.id))))||void 0===l?void 0:l.map((e=>{var l,t,s;return{label:(null===(l=e.name)||void 0===l||null===(t=l.charAt(0))||void 0===t?void 0:t.toUpperCase())+(null===(s=e.name)||void 0===s?void 0:s.slice(1)),value:e.id}}));(null===(t=s)||void 0===t?void 0:t.length)===(null===se||void 0===se?void 0:se.length)-1&&(s=[{label:"Select All",value:0},...s]),_(s)}}),[se]);const Kl=()=>{q.A.getModulesByUser().then((e=>{var l,t;const{isAdmin:s,records:a}=null===e||void 0===e||null===(l=e.data)||void 0===l?void 0:l.data;a.forEach((e=>{Ae(e.permissions)}));const o=null===xe||void 0===xe||null===(t=xe.find((e=>"Help Desk"===e.moduleName)))||void 0===t?void 0:t.submodules;o&&o.forEach((e=>{"All Request"===e.moduleName&&e.modulePermission.forEach((e=>{"Read"===e.displayName&&!0===e.isSelected&&p(!0)}))}))}))};(0,a.useEffect)((()=>{var e;const l=null!==(e=localStorage.getItem("searchTextAllRequestHelpdesk"))&&void 0!==e?e:"";cl(l),Zl(1,[])}),[Sl,xl,j,f,Fl]);const zl=(0,a.useRef)(""),Zl=(e,l)=>{var t;const s=localStorage.getItem("AllHelpStatusArr"),a=localStorage.getItem("AllHelpTypeArr"),o=localStorage.getItem("startDateAllHelpdesk"),n=localStorage.getItem("endDateAllHelpdesk"),r=localStorage.getItem("EmpNameAllHelpArr"),m=localStorage.getItem("EmpNamehelpArr"),u=localStorage.getItem("ticketPriority"),v=localStorage.getItem("searchTextAllRequestHelpdesk"),h=localStorage.getItem("employeeStatusAllRequest"),g=localStorage.getItem("departmentIdAllReq"),x=localStorage.getItem("employeeTypeAllRequest"),A={pageNumber:e||xl,pageSize:Sl,helpdeskStatus:s?Ul(s):[],sortBy:j,sortOrder:f,issueTypeId:a?Ul(a):[],startDate:o||"",endDate:n||"",employeeId:m?Ul(m):[],assigneeId:r?Ul(r):[],ticketPriority:u?Ul(u):[],search:v||"",employeeStatus:(null===(t=Ul(h))||void 0===t?void 0:t.length)>0?Ul(h):[],department:Ul(g)||[],employeeType:Ul(x)||[]},S=JSON.stringify(A);zl.current!==S&&(zl.current=S,c(),d.A.getAllTicketsAdmin(A).then((l=>{var t;if(c(),null===l||void 0===l||null===(t=l.data)||void 0===t||!t.error){var s,a,o,d;p((null===l||void 0===l||null===(s=l.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records)||[]);const t=null===l||void 0===l||null===(o=l.data)||void 0===o||null===(d=o.data)||void 0===d?void 0:d.count;ul(t);const i=t/Sl,n=Math.ceil(i);pl(n);const r=e||xl||1,c=5;let m=Math.max(1,r-Math.floor(c/2)),u=Math.min(n,m+c-1);u-m+1<c&&(m=Math.max(1,u-c+1));const v=[];for(let e=m;e<=u;e++)v.push(e);gl(v),zl.current=""}}),(e=>{var l,t,s,a,o,d,n,r;(zl.current="",null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors)?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d?void 0:d.errors[0].msg):(0,i.oR)(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message)})).catch((e=>{zl.current="",c()})))},Xl=()=>{d.A.getIssueTypes({pageNumber:"",pageSize:"",sort:"nameAToZ"}).then((e=>{var l;if(null===e||void 0===e||null===(l=e.data)||void 0===l||!l.error){var t,a;const l=(null===e||void 0===e||null===(t=e.data)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.records)||[];u(l);const i=localStorage.getItem("AllHelpTypeArr")||[];if(i&&(null===i||void 0===i?void 0:i.length)>0){var o,d;const l=(null===JSON||void 0===JSON?void 0:JSON.parse(i))||[];ke(l);const t=(null===e||void 0===e||null===(o=e.data)||void 0===o||null===(d=o.data)||void 0===d?void 0:d.records)||[],a=null===l||void 0===l?void 0:l.map((e=>{const l=null===t||void 0===t?void 0:t.find((l=>(null===l||void 0===l?void 0:l.id)===e));var a,o,d;return l?(0,s.A)((0,s.A)({},l),{},{issueTypeName:(null===l||void 0===l||null===(a=l.issueTypeName)||void 0===a||null===(o=a.charAt(0))||void 0===o?void 0:o.toUpperCase())+(null===l||void 0===l||null===(d=l.issueTypeName)||void 0===d?void 0:d.slice(1))}):null}
1)).filter(Boolean),n=(null===a||void 0===a?void 0:a.length)===(null===t||void 0===t?void 0:t.length)&&(null===t||void 0===t?void 0:t.length)>0?[{id:"",issueTypeName:"Select All"},...a]:a;ye(n)}}}),(e=>{var l,t;(0,i.oR)(null===e||void 0===e||null===(l=e.response)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.message)}))},_l=()=>{d.A.getHelpdeskStatus({pageNumber:"",pageSize:"",sort:"nameAToZ"}).then((e=>{var l;if(null===e||void 0===e||null===(l=e.data)||void 0===l||!l.error){var t,s;const l=(null===e||void 0===e||null===(t=e.data)||void 0===t||null===(s=t.data)||void 0===s?void 0:s.records)||[];let o=l;(null===l||void 0===l?void 0:l.length)>0&&(o=[{id:"",status:"Select All"},...l]),Re(o);const d=localStorage.getItem("AllHelpStatusArr");if(d&&(null===d||void 0===d?void 0:d.length)>0){var a;const e=null===JSON||void 0===JSON?void 0:JSON.parse(d),t=null===e||void 0===e||null===(a=e.map((e=>{var l;return null===(l=o)||void 0===l?void 0:l.find((l=>l.id===e))})))||void 0===a?void 0:a.filter(Boolean),s=(null===t||void 0===t?void 0:t.length)===(null===l||void 0===l?void 0:l.length)?[{id:"",status:"Select All"},...t]:t;Ie(s),el(e)}}}),(e=>{var l,t;(0,i.oR)(null===e||void 0===e||null===(l=e.response)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.message)}))},$l=()=>{l(""),L(""),Ee(""),He(""),Oe(""),Ve(""),Je(""),n("")},et=e=>{g(!1),J([]),Ze(""),He(""),Je(""),_e(""),R(""),K(""),L([]),Ve(""),al(null);const t={id:e.id};d.A.ticketCompleteDetail(t).then((t=>{var s,a;const o=null===t||void 0===t||null===(s=t.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records[0];o&&(K(o.priority),He(o.ticketStatus),Je(o.userName),l(o.issueTypeId),J(o.commentData),Ge(o.defaultAssigneeId),Ke(o.issueId),Ze(o.issueTitle),n(o.statusReason),_e(o.defaultAssigneeName),Ee(o.escalationTime),Oe(o.reportingManager),G(e.issueSerialNumber),R(o.createdDate),tt(o.issueTypeId),g(!0))}),(e=>{var l,t;(0,i.oR)(null===e||void 0===e||null===(l=e.response)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.message)}))},lt=()=>{g(!0)},tt=e=>{const l={id:e};d.A.getIssueTypes(l).then((e=>{var l,t,s;al(null===e||void 0===e||null===(l=e.data)||void 0===l||null===(t=l.data)||void 0===t||null===(s=t.records[0])||void 0===s?void 0:s.assigneeData)}),(e=>{var l,t,s,a,o,d,n,r;null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d?void 0:d.errors[0].msg):(0,i.oR)(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message)}))},st=e=>{const l={ticketId:e.id};d.A.getTicketHistory(l).then((e=>{var l,t,s,a;dl(null===e||void 0===e||null===(l=e.data)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.records[1]),nl(null===e||void 0===e||null===(s=e.data)||void 0===s||null===(a=s.data)||void 0===a?void 0:a.records[0])}))},at=()=>{g(!1),$l()},ot=e=>{const l={id:e};d.A.getIssueTypes(l).then((e=>{var l,t,s,a,o,d;al(null===e||void 0===e||null===(l=e.data)||void 0===l||null===(t=l.data)||void 0===t||null===(s=t.records[0])||void 0===s?void 0:s.assigneeData),Ge(null===e||void 0===e||null===(a=e.data)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.records[0])||void 0===d?void 0:d.defaultAssigneeId)}),(e=>{var l,t,s,a,o,d,n,r;null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d?void 0:d.errors[0].msg):(0,i.oR)(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message)}))},dt=e=>{kl(e.id),yl(!0)},it=()=>{yl(!1)};return(0,S.jsxs)("div",{children:[(0,S.jsx)(N,{pickerKeyhelpdeskAllReq:Pe,handleIssueTypeChange:(e,l)=>{const t=null===Cl||void 0===Cl?void 0:Cl.filter((e=>""!==e.id&&0!==e.id)),s=t.map((e=>e.id));let a=e.map((e=>e.id)).filter((e=>""!==e&&0!==e));if("Select All"===(null===l||void 0===l?void 0:l.issueTypeName)){const e=s.every((e=>a.includes(e)));a=e?[]:s}const o=a.length===(null===s||void 0===s?void 0:s.length)?[{id:"",issueTypeName:"Select All"},...t]:t.filter((e=>a.includes(e.id)));ye(o),ke(a),a.length?localStorage.setItem("AllHelpTypeArr",JSON.stringify(a)):localStorage.removeItem("AllHelpTypeArr"),Al(1),gl([]),Zl(1,[])},selectedAllReqDepartments:ie,handleDepartmentChange:function(){var e,l;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;const a=(null===Ll||void 0===Ll?void 0:Ll.slice(1))||[],o=(null===a||void 0===a?void 0:a.map((e=>e.value)))||[];let d=(t||[]).filter((e=>e&&"Select All"!==e.label)).map((e=>e.value));if("Select All"===(null===s||void 0===s?void 0:s.label)){const e=null===o||void 0===o?void 0:o.every((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e)}));d=e?[]:[...o]}var i;"Select All"!==(null===s||void 0===s?void 0:s.label)&&null!==t&&void 0!==t&&t.some((e=>"Select All"===e.label))&&(d=null===(i=d)||void 0===i?void 0:i.filter((e=>0!==e)));const n=(null===(e=d)||void 0===e?void 0:e.length)===(null===o||void 0===o?void 0:o.length)&&(null===o||void 0===o?void 0:o.length)>0?[{label:"Select All",value:0},...a]:null===a||void 0===a?void 0:a.filter((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e.value)}));ne(n),ce(d),(null===(l=d)||void 0===l?void 0:l.length)>0?localStorage.setItem("departmentIdAllReq",JSON.stringify(d)):localStorage.removeItem("departmentIdAllReq"),qe([]),localStorage.removeItem("EmpNamehelpArr"),tl([]),Al(1),gl([]),Zl(1,[]),Pl()},departmentsIds:re,departmentOptions:Ll,options:Ql,employeeTypeAllReq:le,selectedEmpTypesAllReq:X,onSelectEmpTypeAllReq:(e,l)=>{if("Select All"===(null===l||void 0===l?void 0:l.label)){const e=null===se||void 0===se?void 0:se.filter((e=>"Select All"!==e.name)),l=null===e||void 0===e?void 0:e.map((e=>e.id));_([{label:"Select All",value:0},...e.map((e=>({label:e.name.charAt(0).toUpperCase()+e.name.slice(1),value:e.id})))]),te(l),localStorage.setItem("employeeTypeAllRequest",JSON.stringify(l))}else{const t=null===e||void 0===e?void 0:e.filter((e=>
10!==e.value)),s=[...Array.isArray(le)?le:[],l.value||l.id],a=[...new Set(s)];te(a),localStorage.setItem("employeeTypeAllRequest",JSON.stringify(a)),se.length-1===t.length?_([...t,{label:"Select All",value:0}]):_(t)}qe(null),tl(null),localStorage.removeItem("EmpNamehelpArr"),Al(1),gl([]),Zl(1,[]),Pl()},onRemoveEmpTypeAllReq:(e,l)=>{if("Select All"===(null===l||void 0===l?void 0:l.label))localStorage.removeItem("employeeTypeAllRequest"),_([]),te([]);else{const t=null===le||void 0===le?void 0:le.filter((e=>e!==l.value)),s=null===e||void 0===e?void 0:e.filter((e=>0!==e.value));_(s),te(t),localStorage.setItem("employeeTypeAllRequest",JSON.stringify(t))}qe(null),tl(null),localStorage.removeItem("EmpNamehelpArr"),Al(1),gl([]),Zl(1,[]),Pl()},helpdeskDataWithCapitalizedNames:Cl,handlePriorityStatus:(e,l)=>{var t,s;const a=null===Il||void 0===Il?void 0:Il.slice(1),o=null===a||void 0===a?void 0:a.map((e=>e.status));let d=null===e||void 0===e?void 0:e.map((e=>e.status));if("Select All"===(null===l||void 0===l?void 0:l.name)){const e=null===o||void 0===o?void 0:o.every((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e)}));d=e?[]:o}else if("Select All"!==(null===l||void 0===l?void 0:l.name)&&e.some((e=>"Select All"===e.name))){var i;d=null===(i=d)||void 0===i?void 0:i.filter((e=>e))}const n=(null===(t=d)||void 0===t?void 0:t.length)===(null===o||void 0===o?void 0:o.length)?[{name:"Select All",status:""},...a]:null===a||void 0===a?void 0:a.filter((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e.status)}));Z(n),K(n);const r=null===(s=d)||void 0===s?void 0:s.filter((e=>e));null!==r&&void 0!==r&&r.length?localStorage.setItem("ticketPriority",JSON.stringify(r)):localStorage.removeItem("ticketPriority"),Al(1),gl([]),Zl(1,[])},handleEmployeeSelectAdmin:(e,l)=>{const t=(null===we||void 0===we?void 0:we.slice(1))||[],s=t.map((e=>e.userId));let a=(e||[]).map((e=>e.userId));if("Select All"===(null===l||void 0===l?void 0:l.employeeNumberAndName)){const e=s.every((e=>a.includes(e)));a=e?[]:s}else if(null!==e&&void 0!==e&&e.some((e=>"Select All"===e.employeeNumberAndName))){var o;a=null===(o=a)||void 0===o?void 0:o.filter((e=>""!==e))}const d=a.length===s.length?[{userId:"",employeeNumberAndName:"Select All"},...t]:null===t||void 0===t?void 0:t.filter((e=>a.includes(e.userId)));qe(d),tl(a),a.length>0?(localStorage.setItem("helpdeskSelectedEmployees",JSON.stringify(d)),localStorage.setItem("EmpNamehelpArr",JSON.stringify(a))):(localStorage.removeItem("helpdeskSelectedEmployees"),localStorage.removeItem("EmpNamehelpArr")),Al(1),gl([]),Zl(1,[])},employeeStatusOptions:Bl,handleEmployeeStatus:(e,l)=>{var t,s;const a=null===Bl||void 0===Bl?void 0:Bl.slice(1),o=null===a||void 0===a?void 0:a.map((e=>e.value));let d=null===e||void 0===e?void 0:e.map((e=>e.value));if("Select All"===(null===l||void 0===l?void 0:l.label)){const e=null===o||void 0===o?void 0:o.every((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e)}));d=e?[]:o}var i;"Select All"!==(null===l||void 0===l?void 0:l.label)&&e.some((e=>"Select All"===e.label))&&(d=null===(i=d)||void 0===i?void 0:i.filter((e=>""!==e)));const n=(null===(t=d)||void 0===t?void 0:t.length)===(null===o||void 0===o?void 0:o.length)?[{label:"Select All",value:""},...a]:null===a||void 0===a?void 0:a.filter((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e.value)}));Ol(n),Hl(n),null!==(s=d)&&void 0!==s&&s.length?localStorage.setItem("employeeStatusAllRequest",null===JSON||void 0===JSON?void 0:JSON.stringify(d)):localStorage.removeItem("employeeStatusAllRequest"),qe(""),localStorage.removeItem("EmpNamehelpArr"),tl("")},selectedEmployeeStatus:Yl,rowClasses:(e,l)=>l%2===0?"red-rows":"black-row",updateBulkTicketStatus:(e,l)=>{const t={statusId:e,ids:l.map((e=>e.id))};d.A.updateBulkTicketStatus(t).then((e=>{var l,t,s;null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):(Zl(),(0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message))}),(e=>{var l,t,s,a,o,d,n;null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d||null===(n=d.errors[0])||void 0===n?void 0:n.msg):(0,i.oR)(null===e||void 0===e?void 0:e.response.data.message)}))},handleAdminRequestsSorting:(e,l)=>{y(e),k(l.toUpperCase())},multiSelectRewardAllStatus:El,getAllTicketsAdmin:Zl,getAllRequesthelpdeskView:et,allRequestHelpDeskViewModel:lt,ShowSubmitDialogs:D,resetAllRequestFilter:()=>{Le((e=>e+1)),localStorage.removeItem("AllHelpStatusArr"),localStorage.removeItem("AllHelpTypeArr"),localStorage.removeItem("startDateAllHelpdesk"),localStorage.removeItem("endDateAllHelpdesk"),localStorage.removeItem("userIdAdminHelpdesk"),localStorage.removeItem("EmpNameAllHelpArr"),localStorage.removeItem("EmpNamehelpArr"),localStorage.removeItem("ticketPriority"),localStorage.removeItem("searchTextAllRequestHelpdesk"),localStorage.removeItem("employeeStatusAllRequest"),localStorage.removeItem("helpdeskSelectedEmployees"),localStorage.removeItem("EmpNamehelpArr"),localStorage.removeItem("EmpNameAllHelpArr"),localStorage.removeItem("AllHelpTypeArr"),localStorage.removeItem("AllHelpStatusArr"),localStorage.removeItem("ticketPriority"),ne([]),qe([]),ye([]),Z([]),K([]),Ie([]),el([]),ke([]),ue([]),ge([]),tl([]),ce([]),localStorage.removeItem("departmentIdAllReq"),localStorage.removeItem("employeeTypeAllRequest"),_([]),te([]),Rl({autoUpdateInput:!1,locale:{format:"DD-MMM-YYYY"}}),Hl([]),Ol([]),El.current&&El.current.resetSelectedValues(),ql.current&&ql.current.resetSelectedValues(),Dl.current&&Dl.current.resetSelectedValues(),I(""),ke(""),el(""),cl(""),wl.current&&wl.current.resetSelectedValues(),Ml.current&&Ml.current.resetSelectedValues(),Al(1),gl([]),Zl(1,[])},AllRequestdatePickerFilter:(e,l)=>{const t=F()(e).format("YYYY-MM-DD"),s=F()(l).format("YYYY-MM-DD"),a=(F()(t).format("DD-MM-YYYY"),F()(e).format("DD-MMM-YYYY")),o=F()(l).format("DD-MMM-YYYY"),d="".concat(a," - ").concat(o);Rl({startDataDisplay:a,endDataDisplay:o}),localStorage.setItem("startDateAllHelpdesk",t),localStorage.setItem("endDateAllHelpdesk",s),I(d),Al(1),gl([]),Zl(1,[])},handleStatusSelect:(e,l)=>{var t,s;const a=null===be||void 0===be?void 0:be.slice(1),o=null===a||void 0===a?void 0:a.map((e=>e.id));let d=null===e||void 0===e?void 0:e.map((e=>e.id));if("Select All"===(null===l||void 0===l?void 0:l.status)){const e=null===o||void 0===o?void 0:o.every((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e)}));d=e?[]:o}var i;"Select All"!==(null===l||void 0===l?void 0:l.status)&&null!==e&&void 0!==e&&e.some((e=>"Select All"===e.status))&&(d=null===(i=d)||void 0===i?void 0:i.filter((e=>""!==e)));const n=(null===(t=d)||void 0===t?void 0:t.length)===(null===o||void 0===o?void 0:o.length)?[{status:"Select All",id:""},...a]:null===a||void 0===a?void 0:a.filter((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e.id)}
1));Ie(n),el(d),null!==(s=d)&&void 0!==s&&s.length?localStorage.setItem("AllHelpStatusArr",JSON.stringify(d)):localStorage.removeItem("AllHelpStatusArr"),Al(1),gl([]),Zl(1,[])},allRequestStatusFilter:wl,allRequestIssueType:Ml,MyRequestHistoryModal:e=>{E(!0),st(e)},allRequestRowClick:(e,l,t)=>{et(e)},handleHelpdeskEmployeeSelect:(e,l)=>{var t,s;const a=null===ve||void 0===ve?void 0:ve.slice(1),o=null===a||void 0===a?void 0:a.map((e=>e.userId));let d=null===e||void 0===e?void 0:e.map((e=>e.userId));if("Select All"===(null===l||void 0===l?void 0:l.employeeNumberAndName)){const e=null===o||void 0===o?void 0:o.every((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e)}));d=e?[]:o}var i;"Select All"!==(null===l||void 0===l?void 0:l.employeeNumberAndName)&&null!==e&&void 0!==e&&e.some((e=>"Select All"===e.employeeNumberAndName))&&(d=null===(i=d)||void 0===i?void 0:i.filter((e=>""!==e)));const n=(null===(t=d)||void 0===t?void 0:t.length)===(null===o||void 0===o?void 0:o.length)?[{employeeNumberAndName:"Select All",userId:""},...a]:null===a||void 0===a?void 0:a.filter((e=>{var l;return null===(l=d)||void 0===l?void 0:l.includes(e.userId)}));ue(n),ge(d),null!==(s=d)&&void 0!==s&&s.length?localStorage.setItem("EmpNameAllHelpArr",null===JSON||void 0===JSON?void 0:JSON.stringify(d)):localStorage.removeItem("EmpNameAllHelpArr"),Al(1),gl([]),Zl(1,[])},multiSelectEmpTypeAdmin:Tl,multiSelectReimAllName:ql,multiSelectEmpNameAdmin:Dl,allRequest:v,issueTypeNamehelpdesk:m,issueTypeId:e,dateAllRequest:C,AllRewardStatus:Il,selectedValueAllRewardStatusArr:z,allHelpTypeArr:fe,selectedValueAllHelpdesk:je,myRequestHistoryModal:w,employeeHelpdeskMyTeamList:ve,selectedValueEmpAllReimArr:me,EmpNameAllHelpArr:he,EmployeeListAdmin:we,selectedValueEmpName:Te,EmpNameAdminArr:ll,recordStatus:be,selectedValueAllRequestHelpdesk:Ce,AllHelpStatusArr:$e,ticketPriority:Q,handleSearchAllRequestFilter:e=>{const l=e.target.value;/^\d*$/.test(l)&&(cl(l),localStorage.setItem("searchTextAllRequestHelpdesk",l),Al(1),gl([]),Zl(1,[]))},newSearchAllRequestText:rl,totalPagesAllLearning:vl,pgNumberEmployeeListForForm:xl,onPageChangeEmployeeListForForm:e=>{let l;l="next"===e?vl:1,Al(l);let t=[];if(1===l)for(let s=1;s<=Math.min(5,vl);s++)t.push(s);else{for(let e=Math.max(1,vl-5+1);e<=vl;e++)t.push(e)}gl(t),Zl(l,[])},onPageEmployeeListForForm:e=>{const l="prev"===e&&xl>1&&xl-1||"next"===e&&xl<vl&&xl+1;if(!l)return;Al(l);let t=[...hl];if("next"===e&&l>Math.max(...hl)){let e=l-5+1,s=Math.min(vl,l);t=[];for(let l=e;l<=s;l++)t.push(l)}else if("prev"===e&&l<Math.min(...hl)){const e=5;let s=Math.max(1,l),a=Math.min(vl,s+e-1);t=[];for(let l=s;l<=a;l++)t.push(l)}gl(t),Zl(l,[])},pageNoEmployeeListForFormArr:hl,onPageNoChangeEmployeeListForForm:e=>{Al(e);let l=[...hl];if(!hl.includes(e)){const t=5;let s=Math.max(1,e-Math.floor(t/2)),a=Math.min(vl,s+t-1);a-s+1<t&&(s=Math.max(1,a-t+1)),l=[];for(let e=s;e<=a;e++)l.push(e);gl(l)}Zl(e,[])},totalCountEmployeeListForForm:ml,pgSizeEmployeeListForForm:Sl,deleteModal:dt,deleteModalCloseForAll:it,deleteModalForAll:jl,employeeStatusAllRequest:Fl,initialSettings:bl}),(0,S.jsx)(M.A,{myRequestHistoryModal:w,MyRequestHistoryClose:()=>{E(!1)},payrollHistoryArr:ol,payrollEmpData:il,isFromView:!1}),(0,S.jsx)(T,{allRequestHelpDeskViewModel:lt,allRequestHelpDeskViewsModel:h,allRequestHelpDeskViewModelClose:at,handleAllRequest:e=>{"Select"===e.label?Ge(""):(Ge(e.value),_e(e.label))},editHelpdeskTicketByAdmin:l=>{const t=new FormData;t.set("id",Qe),t.set("issueTypeId",e),void 0!==l&&t.set("remark",l),t.set("ticketPriority",Q),t.set("issueTitle",ze),t.set("defaultAssigneeId",We);for(let e=0;e<P.length;e++)t.append("file",P[e]);d.A.editIssueByAdmin(t).then((e=>{var l,t,s;(at(),Zl(),null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error)?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):(0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message)})).catch((e=>{var l,t,s,a,o,d,n,r,c;null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d||null===(n=d.errors[0])||void 0===n?void 0:n.msg):(0,i.oR)(null===e||void 0===e||null===(r=e.response)||void 0===r||null===(c=r.data)||void 0===c?void 0:c.message)}))},ShowSubmitDialogs:D,AllRequestViewModal:T,handleFileChange:e=>{const l=Array.from(e);P.length+l.length>3?alert("Maximum attachments allowed: 3 files, with a file size limit of 2MB per attachment."):L((e=>[...e,...l]))}
1,handleDeleteCatalogFile:e=>{const l=[...P];l.splice(e,1),L(l)},handleChangeIssue:e=>{const{name:l,value:t}=e.target;Ge(t)},handleCommetChangeIssue:e=>{const{name:l,value:t}=e.target;Ve(t)},handleChangeIssues:e=>{const{name:t,value:s}=e.target;"issueTypeId"===t&&l(s),ot(s)},updateHelpDeskTicketAcceptStatus:(l,t)=>{c();const s=new FormData;s.set("id",Qe),s.set("issueTypeId",e);const a=l||Be;void 0!==a&&s.set("comment",a),void 0!==t&&s.set("remark",t),s.set("ticketPriority",Q),s.set("issueTitle",ze),s.set("defaultAssigneeId",We),s.set("statusId",2);for(let e=0;e<P.length;e++)s.append("file",P[e]);d.A.updateTicketStatus(s).then((e=>{var l,t,s;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error)?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):((0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message),Zl())}),(e=>{var l,t,s,a,o,d,n,r;(at(),c(),null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors)?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data.message)||void 0===o||null===(d=o.errors[0])||void 0===d?void 0:d.msg):((0,i.oR)(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message),$l())}))},updateHelpDeskTicketAllRequest:(l,t)=>{c();const s=new FormData;s.set("id",Qe),s.set("issueTypeId",e);const a=l||Be;void 0!==a&&s.set("comment",a),void 0!==t&&s.set("remark",t),s.set("ticketPriority",Q),s.set("issueTitle",ze),s.set("defaultAssigneeId",We),s.set("statusId",1);for(let e=0;e<P.length;e++)s.append("file",P[e]);d.A.updateTicketStatus(s).then((e=>{var l,t,s;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error)?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):((0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message),Zl())}),(e=>{var l,t,s,a,o,d,n,r;(at(),c(),null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors)?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data.message)||void 0===o||null===(d=o.errors[0])||void 0===d?void 0:d.msg):((0,i.oR)(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.message),$l())}))},updateTicketStatusRejectAllRequest:(l,t)=>{c();const s=new FormData;s.set("id",Qe),s.set("issueTypeId",e);const a=l||Be;void 0!==a&&s.set("comment",a),void 0!==t&&s.set("remark",t),s.set("ticketPriority",Q),s.set("issueTitle",ze),s.set("defaultAssigneeId",We),s.set("statusId",4);for(let e=0;e<P.length;e++)s.append("file",P[e]);d.A.updateTicketStatus(s).then((e=>{var l,t,s;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error)?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):((0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message),Zl())}),(e=>{var l,t,s,a,o,d,n,r,m;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors)?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d||null===(n=d.errors[0])||void 0===n?void 0:n.msg):((0,i.oR)(null===e||void 0===e||null===(r=e.response)||void 0===r||null===(m=r.data)||void 0===m?void 0:m.message),$l())}))},updateTicketStatusMngRejectAllRequest:(l,t)=>{c();const s=new FormData;s.set("id",Qe),s.set("issueTypeId",e);const a=l||Be;void 0!==a&&s.set("comment",a),void 0!==t&&s.set("remark",t),s.set("ticketPriority",Q),s.set("issueTitle",ze),s.set("defaultAssigneeId",We),s.set("statusId",4);for(let e=0;e<P.length;e++)s.append("file",P[e]);d.A.updateTicketStatus(s).then((e=>{var l,t,s;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error)?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):((0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message),Zl())}),(e=>{var l,t,s,a,o,d,n,r,m;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors)?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d||null===(n=d.errors[0])||void 0===n?void 0:n.msg):((0,i.oR)(null===e||void 0===e||null===(r=e.response)||void 0===r||null===(m=r.data)||void 0===m?void 0:m.message),$l())}))},updateTicketStatusCloseAllRequest:(l,t)=>
1{c();const s=new FormData;s.set("id",Qe),s.set("issueTypeId",e);const a=l||Be;void 0!==a&&s.set("comment",a),void 0!==t&&s.set("remark",t),s.set("ticketPriority",Q),s.set("issueTitle",ze),s.set("defaultAssigneeId",We),s.set("statusId",3);for(let e=0;e<P.length;e++)s.append("file",P[e]);d.A.updateTicketStatus(s).then((e=>{var l,t,s;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error)?(0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message):((0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message),Zl())}),(e=>{var l,t,s,a,o,d,n,r,m;(c(),at(),null!==e&&void 0!==e&&null!==(l=e.response)&&void 0!==l&&null!==(t=l.data)&&void 0!==t&&null!==(s=t.message)&&void 0!==s&&s.errors)?(0,i.oR)(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(o=a.data)||void 0===o||null===(d=o.message)||void 0===d||null===(n=d.errors[0])||void 0===n?void 0:n.msg):((0,i.oR)(null===e||void 0===e||null===(r=e.response)||void 0===r||null===(m=r.data)||void 0===m?void 0:m.message),$l())}))},userName:Ue,ticketStatus:Fe,reportingManager:Ye,displayIssueId:W,issueTypeNamehelpdesk:m,issueTypeId:e,ticketPriority:Q,escalationTime:De,defaultAssigneeName:Xe,createdOn:b,defaultAssigneeId:We,issueTitle:ze,comment:Be,files:P,commentData:U,assigneeData:sl,handleChangeUrgencyIssue:e=>{const{name:l,value:t}=e.target;K(t)},ticketId:Qe}),(0,S.jsx)(D,{showSubmitsDialog:x,handleShowSubmitDialogtClose:()=>{setTimeout((()=>{A(!1),n("")}),300)},handleChangeStatusReason:e=>{const{name:l,value:t}=e.target;"statusReason"===l&&n(t)},statusReason:t,leaveTypeToggle:Se}),(0,S.jsx)(O.A,{deleteModal:dt,handleDelete:()=>{const e={requestId:fl};d.A.deleteallRequestData(e).then((e=>{var l,t,s;null!==e&&void 0!==e&&null!==(l=e.data)&&void 0!==l&&l.error?((0,i.oR)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.message),it()):(it(),Zl(),(0,i.oR)(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message))}),(e=>{var l,t;it(),(0,i.oR)(null===e||void 0===e||null===(l=e.response)||void 0===l||null===(t=l.data)||void 0===t?void 0:t.message)}))},deleteModalCloseForAll:it,deleteModalForAll:jl}),r?(0,S.jsx)(o.A,{}):null]})}},67947:(e,l,t)=>{t.d(l,{A:()=>r});var s=t(11665),a=t(45019),o=(t(13009),t(98763),t(54085)),d=t(29706),i=t(65043),n=t(70579);const r=e=>{let{myRequestHistoryModal:l,MyRequestHistoryClose:t,payrollEmpData:r,payrollHistoryArr:c,isFromView:m}=e;const[u,v]=(0,i.useState)("history");return(0,n.jsx)("div",{children:(0,n.jsxs)(s.A,{fullscreen:!0,show:l,onHide:t,children:[(0,n.jsx)(s.A.Header,{className:"modalbody modal-header-allmodules",children:(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("div",{className:"col-md-11 addhelpdeskheading helpdesk-heading",children:(0,n.jsx)("h4",{className:"ml-3",children:" Issue History "})}),(0,n.jsx)("div",{className:"col-md-1 pr-0",children:(0,n.jsx)("img",{width:40,height:40,src:a.A,onClick:t,alt:"close"})})]})}),(0,n.jsxs)(s.A.Body,{children:[!0===m&&(0,n.jsx)("div",{className:"row mt-3 mb-5",children:(0,n.jsx)("div",{className:"col-lg-12",children:(0,n.jsx)("div",{className:"card cards-section",children:(0,n.jsx)("div",{className:"card-body d-flex justify-content-between",children:(0,n.jsx)("div",{className:"col-md-8 advance-pay-tab",children:(0,n.jsxs)("ul",{className:"nav nav-pills navStyles",children:[(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)("a",{className:"nav-link rounded_tab ml-2 pointer ".concat("view"===u?"active":""),onClick:t,children:"Ticket Details"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)("a",{className:"nav-link rounded_tab ml-2 pointer ".concat("history"===u?"active":""),onClick:t,children:"Comment History"})})]})})})})})}),c&&c.map(((e,l)=>{var t;return(0,n.jsxs)("div",{className:"history-status ",children:[(0,n.jsxs)("div",{className:"dot-line-container",children:[(0,n.jsx)("div",{className:"history-dot"}),l!==c.length-1&&(0,n.jsx)("div",{className:"history-line"})]}),(0,n.jsxs)("div",{className:"card mb-3 history-payroll ml-4 mr-1 width-myrequest-history",children:[(0,n.jsx)("div",{className:"row mt-3 ml-2"}),(0,n.jsxs)("div",{className:"row ml-2 mt-3 history-gap-myrequest",children:[(0,n.jsx)("div",{className:"col-md-1 mt-3",children:(0,n.jsx)("img",{src:(null===(t=e.imageUrl)||void 0===t?void 0:t.length)>0?e.imageUrl:o,className:"imageUrlHelpdeskHistory",alt:"image_pic"})}),(0,n.jsx)("div",{className:"col-md-5 history_component_name mt-4",children:(0,n.jsxs)("p",{children:[e.updatedByEmployeeId,"-",e.updatedBy," ",(0,n.jsx)("br",{}),(0,d.uN)(e.updatedAt)," ",(0,n.jsx)("br",{}),0!==l&&(0,n.jsxs)(n.Fragment,{children:["Remarks : ",e.comment&&""!==e.comment.trim()?e.comment:""]})]})}),(0,n.jsx)("div",{className:"col-md-2",children:(0,n.jsx)("p",{})}),(0,n.jsx)("div",{className:"col-md-4 pr-0 mt-1 history-status",children:"Withdrawn"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle withdran-status",children:e.ticketStatus}):"In Progress"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle inprogress-status",children:e.ticketStatus}):"Open"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle open-status",children:e.ticketStatus}):"Rejected"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle reject-status",children:e.ticketStatus}):"Closed"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle closed-status",children:e.ticketStatus}):"Manager Review"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle mngReviewLearning",children:e.ticketStatus}):"Not Approved"===e.ticketStatus?(0,n.jsx)("p",{className:"RequeststatusStyle notApproved",children:e.ticketStatus}):null})]})]})]},l)}))]}),(0,n.jsx)(s.A.Footer,{className:"p-0",children:(0,n.jsx)("div",{className:"row mt-3 mb-3",children:(0,n.jsx)("div",{className:"col-md-12 d-flex",children:(0,n.jsx)("div",{className:"col-md-6 text-left",children:(0,n.jsx)("button",{type:"button",className:"all-hands-cancel-button historybutton btn_generate_cancel","data-testid":"reset","data-dismiss":"modal",onClick:t,children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-sm-12 d-flex",children:(0,n.jsx)("div",{className:"col-sm-12 mt-1 btn-size-history",children:"Cancel"})})})})})})})})]})})}},6078:(e,l,t)=>{t.d(l,{A:()=>d});var s=t(11665),a=t(83846),o=(t(92008),t(41813),t(70579));const d=e=>{let{deleteModalForAll:l,handleDelete:t,deleteModalCloseForAll:d,confirmMessage:i,confirmLabel:n,title:r}=e;return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(s.A,{className:"modal-center employee-delete-meatadata",
1show:l,onHide:d,children:(0,o.jsxs)(s.A.Body,{className:"modal-delete-employee",children:[(0,o.jsxs)("div",{className:"d-flex justify-content-between mb-4",children:[(0,o.jsx)("div",{children:(0,o.jsx)("span",{className:"confirm-message-employee",children:r||"Delete"})}),(0,o.jsx)("div",{children:(0,o.jsx)("img",{src:a,className:"close-icon-employee",alt:"close_icon",onClick:d})})]}),(0,o.jsx)("div",{className:"text-center mt-5 confirm-message-for-delete",children:(0,o.jsx)("span",{className:"text-center",children:i||"Are You Sure You Want To Delete?"})}),(0,o.jsxs)("div",{className:"d-flex justify-content-between mb-3 action-btn-employee ml-5",children:[(0,o.jsx)("div",{className:"d-flex align-items-center modal-button-confirm-employee",onClick:d,children:(0,o.jsx)("div",{children:(0,o.jsx)("span",{children:"Cancel"})})}),(0,o.jsx)("div",{className:"d-flex align-items-center modal-button-confirm-delete confirm-btn-employee-delete mr-5",onClick:()=>t(),children:(0,o.jsx)("div",{children:(0,o.jsx)("span",{children:n||"Delete"})})})]})]})})})}},3541:(e,l,t)=>{t.d(l,{A:()=>s});const s=e=>{e.target.value=e.target.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1")}},47417:(e,l,t)=>{t.d(l,{A:()=>o});var s=t(65043),a=t(70579);const o=e=>{const[l,t]=s.useState(null),[o,d]=s.useState("ASC");return{renderSortArrow:s=>{const i=l===s,n=i?o.toLowerCase():null;return(0,a.jsx)("span",{onClick:l=>{l.stopPropagation();const a=i&&"ASC"===o?"DESC":"ASC";t(s),d(a),e(s,a)},children:"asc"===n?(0,a.jsx)("span",{className:"caret-4-asc"}):"desc"===n?(0,a.jsx)("span",{className:"caret-4-desc"}):(0,a.jsx)("span",{className:"order-4"})})}}}},13009:()=>{},29617:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAuCAYAAABap1twAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMnSURBVHgB7ZhPbtpAFMafbdR1jgA3AJlG3dXcwJwAcoJASyt1VbNuI8gJgBPENyjdVW2j5gYlJyjLSoCn3zMeCsYGG4+NIuWTLMMDjX/zPr/5pxF0f2N/FEQdEnRBGaVp5Jhv3T4pkga4gRCAUyiVkDrg2qRYaNNhV0iBtJ+fbSG/1HuuRidqu51N4woyqVOOUpHJXAFZWSFzB2RlgSwEkHUqZGGArFMgCwVkpYUsHJCVBvIsgKykkGcDZDHksf+cFTCJSqRIaabJqGkxTk83g/fOq8S9DMt0vp286AirVMRDsujZYqlfA7u8WtGINKqS2I3Xuu6M0gKqtJghPI++YNx7BFyztKTZskRlLGjbgP6Nqm5iFHApDaBKMRyux5fvXGsrPMM1Bdwc9xE6MUUm55QUUJXF/nSGlkql6L2PYZCDLLYWHtn4OqakgCosDt47h3StXevezTYxob2uv7mb8HfOGrL4oHlUjmoj1ypma/GejSXMJiaElbSN3CyW1uoGbXZ1UbEgyxY+9lMBZrE41tpQjBVU91cU0JTSAGaRtNYMWxuK+UcuOG5BATXi2lIOmNJaB4BdOVAH4+W1rlNfDjlKAaNs/PHJtvyFaYS1fgH13OF2DLed8VAZIOAuwjYGsRE+7lmbJMtKAQGy94CoWJoCUgYY2NjB1TCD9+n7jd32j/VirD1WQFJKBmo0PuAHyKGCM2IQ8Y7tth5lrR5hrZ5yHEyqwJ4qrisZw7xqGWI9z8pYVLHEFZBSQIbj++V790HGdEFVD0srM6jGqGKJKyDlgJ5GF/r+pDiF5S0sAmxkcQqQwYEC6h5qn09Y/+Ce+fDcWFCl9uH/yhjt8vh27T8Ea7+VQc3L7jrLXEDoFGcvdqEqxWfUt6RAy9B6Dw/uIHsVZKpm9tyKhNspoCNwLH9BEPS2RdkyOQdQ7dD+goWqHcFaS1//d36sUWX7DnSSx7IyhotGHGSwOHA4s8c6IqVsJsFDm6joIW+CADKGtRPeHPFvixfImKCW4Or26ArWzpK2q3xzHhQAvy7WVpitnKATw6SZk8rt9IDHOfq7fqe3q/tZResfJSIGRPcGwFgAAAAASUVORK5CYII="},34977:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAQxJREFUSEvtlL8VgjAQh+82cARHsPRhgxP4bEQrwwQ6gm7gBsTKP5Uj2IiWjuAIugDx4hMMECFoaHzSUBC+797v7oJQ84M18+Ev0CbMVu0mH50u8qP1iPxNhwuAHkDkc++4syqQcCp6DCBuAsHlg/BsTfCCEx6FT3ApsxMRWzsLRJxIoAq3ImBbh6HAQAf/WlAGzwlovFwar73JdpvAU4K4SdkMdTJTeEpQ1ChVUgWeiyg1ahD15aJ8A9c2OYkK4AoounJZ5MGqlceFaRctK6HDrWQUQcy5F85MBqFwTFUJVdF4ApeBd2Cm8NI9UHtChyvDSwWP7OkakG8+DKdVKi/swSegd/9Yu01/V3AHVNaWGY8mOfMAAAAASUVORK5CYII="},22125:e=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAQpJREFUSEvtlNENgjAQhltuAUmcgoTYDcQNdBOdRDfRDcQNakiYwkQXKLVFmlRSrtcH3uD57v+ux38/ZzN/fGZ9tgCiGw6u6F0UQgGcAeCQS/nBVN5CrJRSV1DqlLetHNcGAa+yrDnnW1MssyzbTUGseNd1d1MntNaPddNUJEDfqFTNON9MQXxxpvUzA6hCg0y6CINQxe1rUJuGILbJrQWb3K0qegdjyNAoKOLRF7gpRhBGFU8DDG4ZoKi7fCfRVuTEjVv6ZsRdJJv+rcYTt1bsf3LEwqQXYFak3AnqIorPqRA8KpALtRP6kLSo+IXdxYTdnhh2NxN2R3LYRTM4oSBq0wStYOkCiG7wC3sI4BnxjOsGAAAAAElFTkSuQmCC"}}]);
2//# sourceMappingURL=5042.ca9f7709.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.