1import{j as e}from"./logger-KgGCinx1.js";import{m as S,R as F}from"./mycnc__loadShare__react__loadShare__-PAyoiw_s.js";import{cu as Ue,E as $,cv as we,a0 as L,bE as je,x as Y,z as C,G as _,D as Q,au as ge,d as _e,aS as xe,aG as fe,aH as Ee,r as be,y as Re,bh as ve,aD as Pe,ab as se,ag as ye,ah as Te,ai as Ae,B as V,bI as Oe,n as K,cw as de,a5 as Be,a6 as Fe,az as Qe}from"./useRouting-Dqp11Q-s.js";import{w as Se}from"./withPermissionProtection-DvBkFMwp.js";import{u as Ie}from"./useSnackbar-DniIwToJ.js";import{c as qe}from"./withAuthProtection-BhkOVgnT.js";import{v as Ne}from"./fileHandlingHelpers-BdBEeY2F.js";import{i as q}from"./validateEmail-CnibqrCJ.js";import{T as v}from"./Typography-D-W-z5Q1.js";import{C as me}from"./ContentBox-BPLlvzE9.js";import{D as Me}from"./Dropdown-BPYJmZiV.js";import{T as W}from"./TextField-BOADulpL.js";import"./createNumberMask-K9oEwSPn.js";import{T as Je}from"./TextFieldPhone-zjEp7Bi7.js";import{T as Ce}from"./TextFieldEmail-DX1hMSzo.js";import{R as pe}from"./Radio-DMkIs5gG.js";import{T as te}from"./Tooltip-Bj_krePP.js";import{M}from"./Modal-DjqOW1xk.js";import{k as He}from"./ProfileReskin-DfXUmxO4.js";import{A as ce}from"./Accordion-DvJNDlpm.js";import{u as We}from"./index-BEIdKsB3.js";import{A as ue,S as Ve}from"./useMuiTheme-FYS5ZDPz.js";import{S as Ge}from"./SpotlightTextFieldPhone-DXpUv0Po.js";import{S as $e}from"./SpotlightTextField-CdKKQDt4.js";import"./_commonjsHelpers-DaWZu8wl.js";import"./mycnc__mf_v__runtimeInit__mf_v__-CPFIg_re.js";import"./mycnc__loadShare__react_mf_2_dom__loadShare__-Byf9slX8.js";import"./preload-helper-CkTZxt06.js";import"./mycnc__loadShare__react_mf_2_router__loadShare__-BQVaZBX4.js";import"./replacePathRoot-D-2F2OYE.js";import"./phoneMask-tT-yE8Lg.js";import"./phoneMaskUSA-om6p_SLe.js";import"./valid-DeVcQFyE.js";import"./Layout-CuGUsDJS.js";import"./getImagePath-LH39WJcP.js";import"./useConfiguration-DQJ3-Fg4.js";import"./SpotlightDataTable-MTMQm_lR.js";import"./index-CyDsmSCi.js";import"./deepMerge-BQgLu7NS.js";const Ye="_spotlight_List_lcxwf_2",Ke={spotlight_List:Ye},De=S.forwardRef(({children:t,className:c,isDivided:o=!1,type:u="default",size:a="md",...p},n)=>{const b=F.useRef([]),r=F.useRef([]),[h,y]=F.useState(),[A,D]=F.useState(),[g,E]=F.useState(!1);return F.useEffect(()=>{if(!g){const j=setTimeout(()=>{const k=b.current.map(T=>T?.getBoundingClientRect().width||0),x=Math.max(...k);x>0&&y(x);const J=r.current.map(T=>T?.getBoundingClientRect().width||0),H=Math.max(...J);H>0&&D(H),E(!0)},50);return()=>clearTimeout(j)}},[t,u,a,g]),e.jsx(Ue,{ref:n,className:$(Ke.spotlight_List,c),...p,children:F.Children.map(t,(j,k)=>F.isValidElement(j)?F.cloneElement(j,{type:u,hasDivider:u!=="card"&&o,size:a,contentRef:x=>{x&&(b.current[k]=x)},width:g?h:void 0,labelGroupRef:x=>{x&&(r.current[k]=x)},labelWidth:g?A:void 0}):j)})});De.displayName="List";const ze="_spotlight_ListItem_gou9d_2",R={spotlight_ListItem:ze,"spotlight_ListItem-card":"_spotlight_ListItem-card_gou9d_3","spotlight_ListItem-container":"_spotlight_ListItem-container_gou9d_18","spotlight_ListItem-container-sm":"_spotlight_ListItem-container-sm_gou9d_26","spotlight_ListItem-container-md":"_spotlight_ListItem-container-md_gou9d_30","spotlight_ListItem-container-lg":"_spotlight_ListItem-container-lg_gou9d_34","spotlight_ListItem-start-adornment":"_spotlight_ListItem-start-adornment_gou9d_38","spotlight_ListItem-text-content-container":"_spotlight_ListItem-text-content-container_gou9d_47","spotlight_ListItem-text-content-container-sm":"_spotlight_ListItem-text-content-container-sm_gou9d_56","spotlight_ListItem-text-content-container-md":"_spotlight_ListItem-text-content-container-md_gou9d_60","spotlight_ListItem-text-content-container-lg":"_spotlight_ListItem-text-content-container-lg_gou9d_64","spotlight_ListItem-label-group":"_spotlight_ListItem-label-group_gou9d_78","spotlight_ListItem-label-text":"_spotlight_ListItem-label-text_gou9d_85","spotlight_ListItem-label-text-sm":"_spotlight_ListItem-label-text-sm_gou9d_97","spotlight_ListItem-label-text-md":"_spotlight_ListItem-label-text-md_gou9d_100","spotlight_ListItem-label-text-lg":"_spotlight_ListItem-label-text-lg_gou9d_103","spotlight_ListItem-description-text":"_spotlight_ListItem-description-text_gou9d_107","spotlight_ListItem-description-text-sm":"_spotlight_ListItem-description-text-sm_gou9d_119","spotlight_ListItem-description-text-md":"_spotlight_ListItem-description-text-md_gou9d_122","spotlight_ListItem-description-text-lg":"_spotlight_ListItem-description-text-lg_gou9d_125","spotlight_ListItem-content":"_spotlight_ListItem-content_gou9d_129","spotlight_ListItem-end-adornment":"_spotlight_ListItem-end-adornment_gou9d_138","spotlight_ListItem-border":"_spotlight_ListItem-border_gou9d_147"},ke=S.forwardRef(({labelText:t,descriptionText:c,startAdornment:o,content:u,endAdornment:a,hasDivider:p,isLastItem:n,
1className:b,type:r="default",size:h="md",contentRef:y,width:A,labelWidth:D,labelGroupRef:g,...E},j)=>e.jsxs(we,{ref:j,textValue:t,className:$(R.spotlight_ListItem,r==="card"&&R["spotlight_ListItem-card"],b),...E,children:[e.jsxs("div",{className:$(R["spotlight_ListItem-container"],h==="sm"&&R["spotlight_ListItem-container-sm"],h==="md"&&R["spotlight_ListItem-container-md"],h==="lg"&&R["spotlight_ListItem-container-lg"]),children:[o&&e.jsx("div",{className:R["spotlight_ListItem-start-adornment"],children:o}),e.jsxs("div",{className:$(R["spotlight_ListItem-text-content-container"],h==="sm"&&R["spotlight_ListItem-text-content-container-sm"],h==="md"&&R["spotlight_ListItem-text-content-container-md"],h==="lg"&&R["spotlight_ListItem-text-content-container-lg"]),children:[e.jsxs("div",{className:$(R["spotlight_ListItem-label-group"],h==="sm"&&R["spotlight_ListItem-label-group-sm"],h==="md"&&R["spotlight_ListItem-label-group-md"],h==="lg"&&R["spotlight_ListItem-label-group-lg"]),style:D?{minWidth:D,width:D,maxWidth:D,boxSizing:"border-box"}:void 0,ref:g,children:[t&&e.jsx("span",{className:$(R["spotlight_ListItem-label-text"],h==="sm"&&R["spotlight_ListItem-label-text-sm"],h==="md"&&R["spotlight_ListItem-label-text-md"],h==="lg"&&R["spotlight_ListItem-label-text-lg"]),children:t}),c&&e.jsx("span",{className:$(R["spotlight_ListItem-description-text"],h==="sm"&&R["spotlight_ListItem-description-text-sm"],h==="md"&&R["spotlight_ListItem-description-text-md"],h==="lg"&&R["spotlight_ListItem-description-text-lg"]),children:c})]}),u&&e.jsx("div",{className:R["spotlight_ListItem-content"],ref:y,style:A?{minWidth:A,width:A,maxWidth:A,boxSizing:"border-box"}:void 0,children:u})]}),a&&e.jsx("div",{className:R["spotlight_ListItem-end-adornment"],children:a})]}),r!=="card"&&p&&!n&&e.jsx("hr",{className:R["spotlight_ListItem-border"]})]}));ke.displayName="ListItem";const Xe="SpotlightContentBox-module__contentBox___SBipu",Ze="SpotlightContentBox-module__dense___vFjME",et="SpotlightContentBox-module__shadow___HPgPN",tt="SpotlightContentBox-module__shadowTransparent___atHrQ",st="SpotlightContentBox-module__transparent___e-I8z",it="SpotlightContentBox-module__rectangle___STm-t",z={contentBox:Xe,dense:Ze,shadow:et,shadowTransparent:tt,transparent:st,rectangle:it},nt=t=>{const{children:c,className:o,dense:u=!1,shadow:a=!0,transparent:p=!1,rectangle:n=!1,...b}=t,r=L(z.contentBox,u&&z.dense,a&&!p&&z.shadow,a&&p&&z.shadowTransparent,p&&z.transparent,n&&z.rectangle,o);return e.jsx(je,{className:r,...b,children:c})},lt=t=>{const{state:c,modify:o}=t,{show:u,fileName:a,completed:p}=c;return S.useEffect(()=>{p&&o({show:!1})},[p]),e.jsxs(M,{open:u,children:[e.jsx(M.Title,{children:"File Uploading"}),e.jsx(M.Content,{children:e.jsxs(M.ContentText,{children:[`${a} is uploading...`,e.jsx(He,{loading:!p,loadComplete:p})]})})]})},ot=t=>{const{state:c,modify:o,onSubmit:u,errors:a,control:p,fieldRequired:n,formState:b,form:r}=t,{showPce:h,loading:y}=c,A=()=>{o({showPce:!1})},D={validate:g=>q(g)||"Please enter a valid email"};return e.jsxs(M,{id:"PayrollCoordinatorEmailModal",open:h,children:[e.jsxs(M.Title,{id:"PayrollCoordinatorEmailModal-Title",warning:!0,onClose:A,children:[e.jsx(Y,{iconName:"triangle-exclamation"})," Confirm Payroll Coordinator email"]}),e.jsx(M.Content,{children:e.jsx(M.ContentText,{children:e.jsxs(e.Fragment,{children:["The Payroll Coordinator email address provided didn't match our records.",e.jsx("br",{}),"Please re-enter your Payroll Coordinator's email address to continue.",e.jsx(C,{render:({field:{value:g,onChange:E,onBlur:j}})=>e.jsx(Ce,{id:"PayrollCoordinatorEmailModal-payrollCoordinatorEmail",label:"Payroll coordinator email*",placeholder:"Payroll coordinator email",value:g,style:{marginTop:20},onChange:k=>{E(k.currentTarget.value)},onBlur:j,error:!!a.email||!q(g)&&g?.length>3,helperText:a?.email?.message||!q(g)&&g?.length>3?"This field is required":" ",fullWidth:!0}),name:"payrollCoordinatorEmail",control:p,rules:{...n,...D}})]})})}),e.jsx(M.Actions,{style:{marginTop:-24},children:e.jsxs(_,{container:!0,spacing:2,justifyContent:"flex-end",children:[e.jsx(_,{item:!0,children:e.jsx(Q,{id:"PayrollCoordinatorEmailModal-CancelButton",onClick:A,secondary:!0,children:"Cancel"})}),e.jsx(_,{item:!0,children:!b.isValid||!q(r?.payrollCoordinatorEmail)?e.jsx(te,{position:"bottom-left",size:"small",content:"Please fill in all the required fields before submitting the request.",children:e.jsx("span",{children:e.jsx(Q,{id:"PayrollCoordinatorEmailModal-SubmitButton",onClick:()=>{u(),A()},loading:y,disabled:!b.isValid||!q(r?.payrollCoordinatorEmail),children:"Submit"})})}):e.jsx(Q,{id:"PayrollCoordinatorEmailModal-SubmitButton",onClick:()=>{u(),A()},loading:y,disabled:!b.isValid||!q(r?.payrollCoordinatorEmail),children:"Submit"})})]})})]})},at=t=>{const{videoName:c="Submitting_an_Adjustment_Request.mp4",title:o="Tips"}=t,[u,a]=S.useState(null),[p,n]=S.useState(!0),b=ge("getProjectAssetVideo",{request:()=>({name:c}
1),response:r=>r.data.getProjectAssetVideo||null});return S.useEffect(()=>{b().then(r=>a(r)).catch(r=>console.error(r)).finally(()=>n(!1))},[]),p?e.jsx(_e,{}):e.jsxs(e.Fragment,{children:[e.jsxs(v,{h5:!0,center:!0,children:["Watch: ",o]}),e.jsx("div",{style:{textAlign:"center"},children:e.jsx("video",{controls:!0,controlsList:"nodownload",width:"100%",children:e.jsx("source",{src:u,type:"video/mp4"})})})]})},rt=()=>{const t=[{question:"How do I submit an adjustment request?",answer:"Use the Adjustment Request form to fill out the required information about your production company, the type of adjustment request, and a description of the request. If required information is missed on the adjustment form, the Submit button will be disabled until all required fields have been populated. If the adjustment form is correctly completed, youâll receive a confirmation message about the successful submission of your adjustment request."},{question:"What type of adjustments can I submit?",answer:e.jsxs("ul",{children:[e.jsx("p",{children:"You can submit an adjustment request for any of the following:"}),e.jsx("li",{children:"Account Coding"}),e.jsx("li",{children:"Dates Worked"}),e.jsx("li",{children:"Home Plans Transfer"}),e.jsx("li",{children:"Occupation Code Change"}),e.jsx("li",{children:"Overpayment"}),e.jsx("li",{children:"PH&W"}),e.jsx("li",{children:"Reissue"}),e.jsx("li",{children:"Residence State"}),e.jsx("li",{children:"Retro N/U To Union"}),e.jsx("li",{children:"Straight Credit"}),e.jsx("li",{children:"Tax Incentive Coding"}),e.jsx("li",{children:"Underpayment"}),e.jsx("li",{children:"Work State"})]})},{question:"Who will receive my adjustment request?",answer:"Your respective payroll coordinator at Cast & Crew will automatically receive your request upon submission. If there are no outstanding questions or pending information to receive, we will start processing the adjustment and confirm when this is complete. "},{question:"How can I track the progress of the adjustment request submitted?",answer:"Upon submission, you will receive a confirmation email with the ticket number automatically created for your adjustment request. Please contact your payroll coordinator to track the progress of the request."}],[c,o]=S.useState(""),u=a=>(p,n)=>o(n?a:"");return e.jsx(me,{children:e.jsxs(_,{container:!0,spacing:0,justifyContent:"center",style:{marginBottom:40},children:[e.jsx(_,{item:!0,xs:12,children:e.jsx(v,{variant:"h4",center:!0,children:"Client Knowledge Base"})}),e.jsx(_,{item:!0,xs:12,style:{marginBottom:16},children:e.jsx(v,{variant:"h5",center:!0,children:"F.A.Q"})}),(t||[]).map((a,p)=>e.jsxs(ce,{expanded:c===p,onChange:u(p),style:{width:"100%"},children:[e.jsx(ce.Title,{expandedAlign:"left",children:a.question}),e.jsx(ce.Content,{children:a.answer})]},p)),e.jsx(_,{item:!0,xs:12,style:{marginBottom:16,marginTop:16},children:e.jsx(at,{videoName:"Submitting_an_Adjustment_Request.mp4",title:"How to submit an adjustment request"})}),e.jsx(_,{children:e.jsx(v,{center:!0,children:e.jsx(Q,{tertiary:!0,href:"https://support.castandcrew.com/kb/mycastcrew-submitting-adjustment-requests",target:"_blank",rel:"noopener noreferrer",endIcon:e.jsx(Y,{iconName:"chevron-right"}),children:"Open the Help Center"})})})]})})},dt="AdjustmentRequest-module__header___TFxOm",ct="AdjustmentRequest-module__hidden___1H1gR",ut="AdjustmentRequest-module__formContainer___WmBKY",mt="AdjustmentRequest-module__icon___TjyB1",_t="AdjustmentRequest-module__filesContainer___XIcp0",pt="AdjustmentRequest-module__fileButtonContainer___YEqUw",ht="AdjustmentRequest-module__fileButton___xUYgC",jt="AdjustmentRequest-module__uploadButton___YAl-2",gt="AdjustmentRequest-module__filesSelected___dvt0D",xt="AdjustmentRequest-module__radioLabel___tLXMg",ft="AdjustmentRequest-module__tooltipIcon___MY-gh",P={header:dt,hidden:ct,formContainer:ut,icon:mt,filesContainer:_t,fileButtonContainer:pt,fileButton:ht,uploadButton:jt,filesSelected:gt,radioLabel:xt,tooltipIcon:ft},Et=6e6,bt=()=>{const t=S.useRef(),c=Ie(),o=xe(),u=fe(Ee.IN_APP_TOOLTIPS),[a,p]=S.useState({loading:!1,ticketId:"",show:!1,fileName:"",completed:!1,files:0,secondTry:!1,showPce:!1}),[n,b]=S.useState({}),r=l=>p(f=>({...f,...l}
1)),h=be("createAdjustment",{scopes:"adjustment:create",request:l=>({input:l}),response:l=>l?.data?.createAdjustment||!1}),y=qe("uploadAdjustmentFile",{scopes:"adjustment:create",response:l=>l?.data||!1}),{control:A,watch:D,formState:g,register:E,formState:{errors:j},reset:k,handleSubmit:x,getValues:J,setValue:H}=Re({mode:"all",defaultValues:{subject:"",description:"",subType:"",explanationError:"",contactName:o.firstName+" "+o.lastName||"",phone:"",email:o.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}}),T=D(),ie=["Account coding","Dates worked","Home plans transfer","Occupation code change","Overpayment","PH&W","Reissue","Residence state","Retro N/U to union","Straight credit","Tax incentive coding","Underpayment","Work state"].map(l=>({label:l,value:l}));S.useEffect(()=>{r({files:Object.keys(n)?.length})},[n]),S.useEffect(()=>{H("contactName",o.firstName+" "+o.lastName),H("email",o.email)},[o]);const I=["Print checks onsite","Print in office and mail","Special handling"],U={required:"This field is required"},ne=()=>{r({loading:!0}),a.ticketId?Z(0,a.ticketId,a.ticketNumber):h({subject:T.subject||"",Description:T.description||"",subtype:T.subType||"",exceptionoferror:T.explanationError||"",contactname:T.contactName||"",contactnumber:T.phone||"",contactemail:T.email||"",prodco:T.productionCompany||"",project:T.project||"",payrollcoEmail:T.payrollCoordinatorEmail||"",clientNotifiedExpln:"",checkhandling:T.checkHandling||"",DetailsofSpecialHandling:T.detailsSpecialHandling||"",flagforsecondtry:a.secondTry}).then(l=>{const f=JSON.parse(l),s=f.id,i=f.number;r({ticketId:s,ticketNumber:i,loading:!1}),Object.keys(n)?.length>0?Z(0,s,i):(r({ticketId:"",ticketNumber:"",secondTry:!1}),b({}),k({subject:"",description:"",subType:"",explanationError:"",contactName:o.firstName+" "+o.lastName||"",phone:"",email:o.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}),c({type:"success",title:"Success",message:e.jsxs(e.Fragment,{children:["Adjustment request form was submitted successfully! Check your inbox for a confirmation email.",e.jsx("br",{}),e.jsx("br",{}),"Cast & Crew will upload the adjustments to the Studio+ folder where the payroll was initially processed.",e.jsx("br",{}),e.jsx("br",{}),"Ticket number ",i]}),duration:1e4,inline:!1,style:{marginTop:120}}))}).catch(l=>{r({loading:!1}),l.message==="PAYROLL_COORDINATOR_EMAIL"?(k({...J(),payrollCoordinatorEmail:""}),r({secondTry:!0,showPce:!0})):(r({secondTry:!1}),c({type:"error",title:"Connection issue",message:e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"We were unable to save your adjustment request due to a connection issue."}),e.jsx("div",{children:"Please try again or refresh the page."})]}),duration:1e4,inline:!1,style:{marginTop:120},help:"/crew-support"}))})},w=l=>{Ne(l.name)?n[l.name]?c({type:"error",show:!0,message:"Duplicate files are not allowed."}):l.size>=Et?c({type:"error",show:!0,message:"6MB is the maximum file size allowed."}):a.files>2?c({type:"error",show:!0,message:"You already have selected 3 files."}):b(f=>({...f,[l.name]:l})):c({type:"error",show:!0,message:"File type not supported"})},le=l=>{let{[l]:f,...s}=n;b(s)},ae=l=>{l.preventDefault();const f=l.dataTransfer?.files;oe(f)},re=l=>{l.preventDefault();const f=l.target?.files;oe(f),l.target.value=""},oe=l=>{const f=l.length<3-a.files?l.length:3-a.files;for(let s=0;s<f;s++)a.files<3?w(l[s]):c({type:"error",show:!0,message:"You already have selected 3 files."})},Z=(l,f,s)=>{let i=l||0;const m=n[Object.keys(n)[i]];r({completed:!1,loading:!0});const N=new FileReader;N.readAsDataURL(m),N.onload=async()=>{r({fileName:m.name,show:!0});const O={name:m.name,type:m.type,body:N.result.split(",")[1]};try{y({id:a?.ticketId||f,file:O}).then(()=>{if(r({completed:!0,loading:!1}),c({type:"success",title:"Success",message:`${m.name} has been uploaded successfully!`,duration:1e4,inline:!1,style:{marginTop:120}}),i<Object.keys(n)?.length-1){const B=i+1;N.onload=()=>{},Z(B,a?.ticketId||f,a?.ticketNumber||s)}else r({ticketId:"",secondTry:!1}),b({}),k({subject:"",description:"",subType:"",explanationError:"",contactName:o.firstName+" "+o.lastName||"",phone:"",email:o.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}),setTimeout(()=>{c({type:"success",title:"Success",message:e.jsxs(e.Fragment,{children:["Adjustment request form was submitted successfully! Check your inbox for a confirmation email.",e.jsx("br",{}),e.jsx("br",{}),"Cast & Crew will upload the adjustments to the Studio+ folder where the payroll was initially processed.",e.jsx("br",{}),e.jsx("br",{}),"Ticket number ",s]}),duration:1e4,inline:!1,style:{marginTop:120}})},3e3)}).catch(B=>{r({loading:!1,show:!1}),c({type:"error",title:"Upload Error",message:e.jsx(e.Fragment,{children:B.message}),duration:1e4,inline:!1,style:{marginTop:120}})})}catch(B){console.error(B.message)}}};return e.jsxs(e.Fragment,{children:[e.jsx(lt,{state:a,modify:r,completed:a.completed}),e.jsx(ot,{state:a,modify:r,errors:j,control:A,fieldRequired:U,formState:g,form:T,register:E,onSubmit:x(ne)}),e.jsxs(_,{container:!0,spacing:2,justifyContent:"flex-start",children:[e.jsx(_,{item:!0,xs:12,id:"AdjustmentRequest-Header",children:e.jsx(v,{variant:"h2",className:P.header,id:"AdjustmentRequest-Title",children:"Adjustment Request"})}),e.jsx(_,{item:!0,xs:12,children:e.jsxs(_,{container:!0,spacing:2,justifyContent:"flex-start",children:[e.jsx(_,{item:!0,md:8,xs:12,children:e.jsx(me,{id:"AdjustmentRequest-Form",className:P.formContainer,children:e.jsx("form",{onSubmit:x(ne),children:e.jsxs(_,{container:!0,spacing:1,children:[e.jsx(_,{item:!0,xs:12,style:{paddingBottom:24},children:e.jsx(v,{variant:"body2",size:"long",children:"Fill out the form below to request an adjustment to a project in payroll."})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-subject",name:"subject",label:"Subject *",placeholder:"Subject",InputProps:{...E("subject",U)},error:!!j.subject,helperText:j?.subject?.message||" ",fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-description",name:"description",label:"Description *",placeholder:"Description",InputProps:{...E("description",U)},error:!!j.description,helperText:j?.description?.message||" ",multiline:!0,minRows:4,fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(C,{name:"subType",control:A,rules:U,render:({field:{value:l,onBlur:f,onChange:s,ref:i}})=>e.jsx(Me,{id:"AdjustmentRequest-subType",label:"Sub type *",placeholder:"Sub type",value:l||"",data:ie,onChange:s,onBlur:f,inputRef:i,error:!!j.subType,helperText:j?.subType?.message||" ",fullWidth:!0})})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-explanationError",name:"explanationError",label:"Explanation of error *",placeholder:"Explanation of error",InputProps:{...E("explanationError",U)},error:!!j.explanationError,helperText:j?.explanationError?.message||" ",multiline:!0,minRows:4,fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,style:{paddingTop:0,paddingBottom:16},children:e.jsx(v,{variant:"body2",size:"short",medium:!0,style:{marginTop:-8},children:"Contact Information"})}),e.jsx(_,{item:!0,xs:12,lg:8,style:{paddingBottom:16},children:e.jsx(W,{id:"AdjustmentRequest-contactName",name:"contactName",label:"Name *",placeholder:"Name",InputProps:{...E("contactName")},disabled:!0,fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(C,{name:"phone",control:A,rules:U,render:({field:{value:l,onCh
1ange:f,onBlur:s}})=>e.jsx(Je,{id:"AdjustmentRequest-phone",label:"Phone *",placeholder:"Phone",value:l,onChange:i=>{f(i.currentTarget.value)},onBlur:s,error:!!j.phone||l?.replace(/\D/g,"")?.length>0&&l?.replace(/\D/g,"")?.length!==10,helperText:j?.phone?.message||l?.replace(/\D/g,"")?.length>0&&l?.replace(/\D/g,"")?.length!==10?"This field is required":" ",fullWidth:!0,inputProps:{inputMode:"numeric"}})})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-email",name:"email",label:"Email *",placeholder:"Email",InputProps:{...E("email")},disabled:!0,fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,style:{paddingBottom:16},children:e.jsx(v,{variant:"body2",size:"short",medium:!0,children:"Additional Details"})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-productionCompany",name:"productionCompany",label:"Production company *",placeholder:"Production company",InputProps:{...E("productionCompany",U)},error:!!j.productionCompany,helperText:j?.productionCompany?.message||" ",fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-project",name:"project",label:"Project name *",placeholder:"Project name",InputProps:{...E("project",U)},error:!!j.project,helperText:j?.project?.message||" ",fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(C,{render:({field:{value:l,onBlur:f,onChange:s}})=>e.jsx(Ce,{id:"AdjustmentRequest-payrollCoordinatorEmail",label:"Payroll coordinator email *",placeholder:"Payroll coordinator email",value:l,onChange:i=>{s(i.currentTarget.value)},onBlur:f,error:!!j.email||!q(l)&&l?.length>3,helperText:j?.email?.message||!q(l)&&l?.length>3?"This field is required":" ",fullWidth:!0}),name:"payrollCoordinatorEmail",control:A,rules:!a.ticketId&&U})}),e.jsx(_,{item:!0,xs:12,style:{marginTop:-16,paddingBottom:16},children:e.jsx(C,{name:"checkHandling",control:A,rules:U,render:({field:{value:l,onBlur:f,onChange:s}})=>e.jsx(pe.Group,{label:"Check handling instructions *",row:!0,value:l,onChange:i=>{s(i.currentTarget.value)},onBlur:f,children:I.map((i,m)=>e.jsx(pe,{id:`AdjustmentRequest-Radio-${i.replace(/\s/g,"")}`,value:i,children:i==="Print checks onsite"?e.jsxs("span",{className:P.radioLabel,children:[i,u&&e.jsx(te,{position:"top",size:"small",content:"Print checks onsite is only available if you have onsite check printing set up already.",children:e.jsx(Y,{iconName:"circle-info",className:P.tooltipIcon})})]}):i},m))})})}),T.checkHandling==="Special handling"&&e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(W,{id:"AdjustmentRequest-detailsSpecialHandling",name:"detailsSpecialHandling",label:"Details of Special Handling *",placeholder:"Details of special handling",InputProps:{...E("detailsSpecialHandling",U)},error:!!j.detailsSpecialHandling,helperText:j?.detailsSpecialHandling?.message||" ",multiline:!0,minRows:4,fullWidth:!0})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(v,{variant:"body2",size:"short",medium:!0,children:"Attach Files"})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsx(v,{variant:"body1",size:"short",medium:!0,children:"Add up to 3 files. Please upload PDF, JPG or PNG files only with a 6 MB maximum limit per file."})}),e.jsx(_,{item:!0,xs:12,lg:8,children:e.jsxs(_,{container:!0,spacing:2,justifyContent:"flex-start",children:[e.jsxs(_,{item:!0,md:5,xs:12,children:[e.jsx("input",{accept:".pdf",className:P.hidden,id:"FileUpload",type:"file",multiple:!0,ref:t,onChange:re,disabled:Object.keys(n)?.length>2}),e.jsx("label",{htmlFor:"FileUpload",children:e.jsx(Q,{id:"UploadButton",tertiary:!0,component:"span",onDragOver:l=>{l.preventDefault()},onDrop:ae,className:P.uploadButton,disabled:Object.keys(n)?.length>2,children:e.jsxs("div",{style:{width:200,display:"flex"},children:[e.jsx(Y,{iconName:"arrow-up-from-bracket",className:P.icon}),e.jsx(v,{variant:"body1",size:"short",children:Object.keys(n)?.length>2?"You have already selected 3 files.":"Drag and drop files here or click to browse for file."})]})})})]}),e.jsxs(_,{item:!0,md:7,xs:12,children:[e.jsx(me,{id:"AdjustmentRequest-Files",className:P.filesContainer,children:Object.keys(n).slice(0,3).map((l,f)=>e.jsxs("div",{className:P.fileButtonContainer,children:[e.jsx(v,{variant:"body1",short:!0,style:{margin:0},children:l}),e.jsx(Q,{tertiary:!0,short:!0,onClick:()=>
1le(l),className:P.fileButton,children:e.jsx(Y,{iconName:"circle-xmark"})},`FileButton-${l}`)]},`fileButton-${f}`))}),e.jsx(v,{id:"AdjustmentRequest-FilesSelected",variant:"caption",className:P.filesSelected,bold:!0,children:`${Object.keys(n)?.length} file(s) selected`})]})]})}),e.jsx(_,{item:!0,lg:8,xs:12,style:{paddingBottom:48},children:e.jsxs(_,{container:!0,spacing:1,justifyContent:"flex-end",children:[e.jsx(_,{item:!0,children:e.jsx(Q,{id:"AdjustmentRequest-ResetButton",secondary:!0,fullWidth:!0,className:P.backButton,onClick:()=>{b({}),k({subject:"",description:"",subType:"",explanationError:"",contactName:o.firstName+" "+o.lastName||"",phone:"",email:o.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}),r({secondTry:!1})},children:"Reset Form"})}),e.jsx(_,{item:!0,xs:3,lg:2,children:!a.ticketId&&(!g.isValid||!q(T?.payrollCoordinatorEmail)||T?.phone.replace(/\D/g,"").length!==10)?e.jsx(te,{position:"bottom-left",size:"small",content:"Please fill in all the required fields before submitting the request.",children:e.jsx("span",{children:e.jsx(Q,{id:"AdjustmentRequest-SubmitButton",type:"submit",fullWidth:!0,disabled:a.ticketId?!1:!g.isValid||!q(T?.payrollCoordinatorEmail)||T?.phone?.replace(/\D/g,"")?.length!==10,loading:a.loading,children:"Submit"})})}):e.jsx(Q,{id:"AdjustmentRequest-SubmitButton",type:"submit",fullWidth:!0,loading:a.loading,disabled:a.ticketId&&Object.keys(n)?.length===0,children:"Submit"})})]})})]})})})}),e.jsx(_,{item:!0,md:4,xs:12,children:e.jsx(rt,{})})]})})]})]})},xs=Se({permissions:"adjustment:create",fallbackRoute:"/client-registration"})(bt),d={"adjustment-request__header":"AdjustmentRequestReskin-module__adjustment-request__header___G3-Ne","adjustment-request__hidden":"AdjustmentRequestReskin-module__adjustment-request__hidden___iRjAU","adjustment-request__form-container":"AdjustmentRequestReskin-module__adjustment-request__form-container___7ToqX","adjustment-request__file-list":"AdjustmentRequestReskin-module__adjustment-request__file-list___O1gPd","adjustment-request__file-item":"AdjustmentRequestReskin-module__adjustment-request__file-item___wGQAD","adjustment-request__files-selected":"AdjustmentRequestReskin-module__adjustment-request__files-selected___UqzVy","adjustment-request__field":"AdjustmentRequestReskin-module__adjustment-request__field___g9JDg","adjustment-request__label":"AdjustmentRequestReskin-module__adjustment-request__label___As9r2","adjustment-request__text-area":"AdjustmentRequestReskin-module__adjustment-request__text-area___jRqLe","adjustment-request__form-buttons":"AdjustmentRequestReskin-module__adjustment-request__form-buttons___nVlom","adjustment-request__section-title":"AdjustmentRequestReskin-module__adjustment-request__section-title___qTzcz","adjustment-request__special-handling-section":"AdjustmentRequestReskin-module__adjustment-request__special-handling-section___pj1Zx","adjustment-request__form-intro":"AdjustmentRequestReskin-module__adjustment-request__form-intro___MZqEl","adjustment-request__form-intro-text":"AdjustmentRequestReskin-module__adjustment-request__form-intro-text___KLCzj","adjustment-request__submit-button":"AdjustmentRequestReskin-module__adjustment-request__submit-button___fH-SM","adjustment-request__page-container":"AdjustmentRequestReskin-module__adjustment-request__page-container___hUYk5","adjustment-request__content-wrapper":"AdjustmentRequestReskin-module__adjustment-request__content-wrapper___BXspO","adjustment-request__form-grid":"AdjustmentRequestReskin-module__adjustment-request__form-grid___QIv0v","adjustment-request__form-field":"AdjustmentRequestReskin-module__adjustment-request__form-field___Geb2h","adjustment-request__file-upload-wrapper":"AdjustmentRequestReskin-module__adjustment-request__file-upload-wrapper___cnQvB","adjustment-request__upload-button-container":"AdjustmentRequestReskin-module__adjustment-request__upload-button-container___hDznH","adjustment-request__button-group":"AdjustmentRequestReskin-module__adjustment-request__button-group___gQaod","adjustment-request__form-column":"AdjustmentRequestReskin-module__adjustment-request__form-column___furhU","adjustment-request__sidebar-column":"AdjustmentRequestReskin-module__adjustment-request__sidebar-column___ZN2pT","adjustment-request__check-handling-field":"AdjustmentRequestReskin-module__adjustment-request__check-handling-field___RVYih","adjustment-request__radio-label":"AdjustmentRequestReskin-module__adjustment-request__radio-label___lf6z7"},Rt="SpotlightFileUploadButton-module__uploadButton___TLymb",yt="SpotlightFileUploadButton-module__spotlight_Button___bxk2v",Tt="SpotlightFileUploadButton-module__spotlight_Button_body___IMGNn",X={uploadButton:Rt,spotlight_Button:yt,"spotlight_Button-md":"SpotlightFileUploadButton-module__spotlight_Button-md___fChGc","spotlight_Button-outlined":"SpotlightFileUploadButton-module__spotlight_Button-outlined___0pwbI",spotlight_Button_body:Tt},At=({children:t,accept:c=".pdf,.jpg,.png",disabled:o=!1,className:u,tertiary:a,...p})=>{const n=L(X.uploadButton,"spotlight_Button","spotlight_interactive","spotlight_container",o&&"spotlight_interactive-disabled",X.spotlight_Button,X["spotlight_Button-md"],X["spotlight_Button-outlined"],{[X["spotlight_Button--disabled"]]:o},u);return e.jsx(ve,{...p,className:n,disabled:o,children:e.jsxs("div",{className:X.spotlight_Button_body,children:[e.jsx(Pe,{iconName:"file",tone:o?"brand":"info"}),e.jsx("p",{className:"spotlight_body-sm",children:o?"You have already selected 3 files.":e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"spotlight_strong",children:"Click to upload"})," or drag and drop file(s)"]})})]})})},St=t=>{const{t:c}=se(),{state:o,modify:u}=t,{show:a,fileName:p,completed:n}=o;return S.useEffect(()=>{n&&u({show:!1})},[n]),e.jsxs(ye,{isOpen:a,title:c("ADJ_REQUEST_FILE_UPLOADING"),children:[e.jsx(Te,{children:e.jsx(e.Fragment,{})}),e.jsx(Ae,{children:e.jsx(_e,{message:c("ADJ_REQUEST_FILE_IS_UPLOADING",{fileName:p})})})]})},It=t=>{const{t:c}=se(),{state:o,modify:u,onSubmit:a,errors:p,control:n,fieldRequired:b,formState:r,form:h}=t,{showPce:y,loading:A}=o,D=()=>{u({showPce:!1})},g={validate:E=>q(E)||c("ADJ_REQUEST_VALID_EMAIL")};return e.jsxs(ye,{id:"PayrollCoordinatorEmailModal",open:!0,onOpenChange:E=>{E||D()},title:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(Y,{iconName:"triangle-exclamation",familyVariant:"regular"})," ",c("CONFIRM_PAYROLL_COORDINATOR")]}),children:[e.jsx(Te,{children:e.jsx(e.Fragment,{})}),e.jsxs(Ae,{isDismissable:!0,children:[e.jsx("div",{children:e.jsxs(e.Fragment,{children:[c("ADJ_REQUEST_PCE_NOT_MATCH"),e.jsx("br",{}),c("ADJ_REQUEST_PCE_RE_ENTER"),e.jsx(C,{render:({field:{value:E,onChange:j,onBlur:k}})=>e.jsx($e,{id:"PayrollCoordinatorEmailModal-payrollCoordinatorEmail",label:c("PAYROLL_COORDINATOR_EMAIL"),placeholder:c("PAYROLL_COORDINATOR_EMAIL"),value:E,style:{marginTop:20},onChange:x=>{j(x.currentTarget.value)},onBlur:k,isInvalid:!!p.email||!q(E)&&E?.length>3,errorMessage:p?.email?.message||!q(E)&&E?.length>3?c("THIS_FIELD_IS_REQUIRED"):" ",isFullWidth:!0,isRequired:!0}),name:"payrollCoordinatorEmail",control:n,rules:{...b,...g}})]})}),e.jsx("div",{style:{marginTop:16},children:e.jsxs(_,{container:!0,spacing:2,justifyContent:"flex-end",children:[e.jsx(_,{item:!0,children:e.jsx(V,{id:"PayrollCoordinatorEmailModal-CancelButton",onPress:D,buttonVariant:"outlined",slot:"close",children:c("CANCEL")})}),e.jsx(_,{item:!0,children:!r.isValid||!q(h?.payrollCoordinatorEmail)?e.jsx(te,{title:c("ADJ_REQUEST_FILL_REQUIRED"),children:e.jsx("span",{children:e.jsx(V,{id:"PayrollCoordinatorEmailModal-SubmitButton",onPress:()=>{a(),D()},isPending:A,isDisabled:!r.isValid||!q(h?.payrollCoordinatorEmail),children:c("SUBMIT")})})}):e.jsx(V,{id:"PayrollCoordinatorEmailModal-SubmitButton",onPress:()=>{a(),D()},isPending:A,isDisabled:!r.isValid||!q(h?.payrollCoordinatorEmail),children:c("SUBMIT")})})]})})]})]})},G={"client-knowledge-base__container":"ClientKnowledgeBaseReskin-module__client-knowledge-base__container___Qgrui","client-knowledge-base__header":"ClientKnowledgeBaseReskin-module__client-knowledge-base__header___6YZyM","client-knowledge-base__subheader":"ClientKnowledgeBaseReskin-module__client-knowledge-base__subheader___SUW5K","client-knowledge-base__video-section":"ClientKnowledgeBaseReskin-module__client-knowledge-base__video-section___DHG9m","client-knowledge-base__list":"ClientKnowledgeBaseReskin-module__client-knowledge-base__list___eF4-Q","client-knowledge-base__answer":"ClientKnowledgeBaseReskin-module__client-knowledge-base__answer___bJ-jq","client-knowledge-base__link-container":"ClientKnowledgeBaseReskin-module__client-knowledge-base__link-container___WPPNg"},he={"video-tutorial__title":"VideoTutorialReskin-module__video-tutorial__title___H3TSI","video-tutorial__video-container":"
1VideoTutorialReskin-module__video-tutorial__video-container___l-byE"},qt=t=>{const{t:c}=se(),{videoName:o="Submitting_an_Adjustment_Request.mp4",title:u="Tips"}=t,[a,p]=S.useState(null),[n,b]=S.useState(!0),r=ge("getProjectAssetVideo",{request:()=>({name:o}),response:h=>h.data.getProjectAssetVideo||null});return S.useEffect(()=>{r().then(h=>p(h)).catch(h=>console.error(h)).finally(()=>b(!1))},[]),n?e.jsx(_e,{}):e.jsxs(e.Fragment,{children:[e.jsx("h5",{className:L("spotlight_body-md",he["video-tutorial__title"]),children:c("ADJ_REQUEST_VIDEO_WATCH",{title:u})}),e.jsx("div",{className:he["video-tutorial__video-container"],children:e.jsx("video",{controls:!0,controlsList:"nodownload",width:"100%",children:e.jsx("source",{src:a,type:"video/mp4"})})})]})},Nt=()=>{const{t}=se(),c=[{question:t("ADJ_REQUEST_FAQ_Q1"),answer:t("ADJ_REQUEST_FAQ_A1")},{question:t("ADJ_REQUEST_FAQ_Q2"),answer:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:t("ADJ_REQUEST_FAQ_A2_INTRO")}),e.jsxs("ul",{className:G["client-knowledge-base__list"],children:[e.jsx("li",{children:t("ADJ_REQUEST_ACCOUNT_CODING")}),e.jsx("li",{children:t("ADJ_REQUEST_DATES_WORKED")}),e.jsx("li",{children:t("ADJ_REQUEST_HOME_PLANS_TRANSFER")}),e.jsx("li",{children:t("ADJ_REQUEST_OCCUPATION_CODE_CHANGE")}),e.jsx("li",{children:t("ADJ_REQUEST_OVERPAYMENT")}),e.jsx("li",{children:t("ADJ_REQUEST_PHW")}),e.jsx("li",{children:t("ADJ_REQUEST_REISSUE")}),e.jsx("li",{children:t("ADJ_REQUEST_RESIDENCE_STATE")}),e.jsx("li",{children:t("ADJ_REQUEST_RETRO_UNION")}),e.jsx("li",{children:t("ADJ_REQUEST_STRAIGHT_CREDIT")}),e.jsx("li",{children:t("ADJ_REQUEST_TAX_INCENTIVE_CODING")}),e.jsx("li",{children:t("ADJ_REQUEST_UNDERPAYMENT")}),e.jsx("li",{children:t("ADJ_REQUEST_WORK_STATE")})]})]})},{question:t("ADJ_REQUEST_FAQ_Q3"),answer:t("ADJ_REQUEST_FAQ_A3")},{question:t("ADJ_REQUEST_FAQ_Q4"),answer:t("ADJ_REQUEST_FAQ_A4")}],[o,u]=S.useState(""),a=p=>(n,b)=>u(b?p:"");return e.jsx(nt,{children:e.jsxs("div",{className:G["client-knowledge-base__container"],children:[e.jsx("div",{children:e.jsx("h4",{className:L("spotlight_heading-sm",G["client-knowledge-base__header"]),children:t("ADJ_REQUEST_KNOWLEDGE_BASE")})}),e.jsx("div",{children:e.jsx("h5",{className:L("spotlight_body-lg",G["client-knowledge-base__subheader"]),children:t("ADJ_REQUEST_FAQ")})}),e.jsx("div",{children:(c||[]).map((p,n)=>e.jsxs(ue,{expanded:o===n,onChange:a(n),children:[e.jsx(ue.Title,{expandedAlign:"left",children:p.question}),e.jsx(ue.Content,{children:e.jsx("div",{className:L("spotlight_body-base",G["client-knowledge-base__answer"]),children:p.answer})})]},n))}),e.jsx("div",{className:G["client-knowledge-base__video-section"],children:e.jsx(qt,{videoName:"Submitting_an_Adjustment_Request.mp4",title:t("ADJ_REQUEST_VIDEO_TITLE")})}),e.jsx("div",{className:G["client-knowledge-base__link-container"],children:e.jsx(Oe,{href:"https://support.castandcrew.com/kb/mycastcrew-submitting-adjustment-requests",target:"_blank",rel:"noopener noreferrer",children:e.jsx(V,{buttonVariant:"ghost",endAdornment:"chevron-right",children:t("ADJ_REQUEST_HELP_CENTER")})})})]})})},Ct=6e6,Dt=e.jsx("p",{className:"spotlight_body-sm",children:"Print checks onsite is only available if you have onsite check printing set up already."}),kt=()=>{const{t}=se(),c=S.useRef(),o=Ie(),u=xe(),a=We({maxWidth:600}),p=fe(Ee.IN_APP_TOOLTIPS),[n,b]=S.useState({loading:!1,ticketId:"",show:!1,fileName:"",completed:!1,files:0,secondTry:!1,showPce:!1}),[r,h]=S.useState({}),y=s=>b(i=>({...i,...s})),A=be("createAdjustment",{scopes:"adjustment:create",request:s=>({input:s}),response:s=>s?.data?.createAdjustment||!1}),D=qe("uploadAdjustmentFile",{scopes:"adjustment:create",response:s=>s?.data||!1}),{control:g,watch:E,formState:j,register:k,formState:{errors:x},reset:J,handleSubmit:H,getValues:T,setValue:ie}=Re({mode:"all",defaultValues:{subject:"",description:"",subType:"",explanationError:"",contactName:u.firstName+" "+u.lastName||"",phone:"",email:u.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}}),I=E(),U=["Account coding","Dates worked","Home plans transfer","Occupation code change","Overpayment","PH&W","Reissue","Residence state","Retro N/U to union","Straight credit","Tax incentive coding","Underpayment","Work state"].map(s=>({label:s,value:s}));S.useEffect(()=>{y({files:Object.keys(r)?.length})},[r]),S.useEffect(()=>{ie("contactName",u.firstName+" "+u.lastName),ie("email",u.email)},[u]);const ne=[{value:"Print checks onsite",label:e.jsxs("span",{className:d["adjustment-request__radio-label"],children:["Print checks onsite",p&&e.jsx(Ve,{title:Dt,placement:"top",children:e.jsx(Y,{iconName:"
1circle-info",size:"sm"})})]})},{value:"Print in office and mail",label:"Print in office and mail"},{value:"Special handling",label:"Special handling"}],w={required:t("THIS_FIELD_IS_REQUIRED")},le=()=>{y({loading:!0}),n.ticketId?f(0,n.ticketId,n.ticketNumber):A({subject:I.subject||"",Description:I.description||"",subtype:I.subType||"",exceptionoferror:I.explanationError||"",contactname:I.contactName||"",contactnumber:I.phone||"",contactemail:I.email||"",prodco:I.productionCompany||"",project:I.project||"",payrollcoEmail:I.payrollCoordinatorEmail||"",clientNotifiedExpln:"",checkhandling:I.checkHandling||"",DetailsofSpecialHandling:I.detailsSpecialHandling||"",flagforsecondtry:n.secondTry}).then(s=>{const i=JSON.parse(s),m=i.id,N=i.number;y({ticketId:m,ticketNumber:N,loading:!1}),Object.keys(r)?.length>0?f(0,m,N):(y({ticketId:"",ticketNumber:"",secondTry:!1}),h({}),J({subject:"",description:"",subType:"",explanationError:"",contactName:u.firstName+" "+u.lastName||"",phone:"",email:u.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}),o({type:"success",title:t("SUCCESS"),message:e.jsxs(e.Fragment,{children:[t("ADJ_REQUEST_SUBMIT_SUCCESS_MSG1"),e.jsx("br",{}),e.jsx("br",{}),t("ADJ_REQUEST_SUBMIT_SUCCESS_MSG2"),e.jsx("br",{}),e.jsx("br",{}),t("ADJ_REQUEST_TICKET_NUMBER",{ticketNumber:N})]}),duration:1e4,inline:!1,style:{marginTop:120}}))}).catch(s=>{y({loading:!1}),s.message==="PAYROLL_COORDINATOR_EMAIL"?(J({...T(),payrollCoordinatorEmail:""}),y({secondTry:!0,showPce:!0})):(y({secondTry:!1}),o({type:"error",title:t("ADJ_REQUEST_CONNECTION_ISSUE"),message:e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t("ADJ_REQUEST_CONNECTION_ERROR_MSG1")}),e.jsx("div",{children:t("ADJ_REQUEST_CONNECTION_ERROR_MSG2")})]}),duration:1e4,inline:!1,style:{marginTop:120},help:"/crew-support"}))})},ae=s=>{Ne(s.name)?r[s.name]?o({type:"error",show:!0,message:t("ADJ_REQUEST_DUPLICATE_FILES")}):s.size>=Ct?o({type:"error",show:!0,message:t("ADJ_REQUEST_FILE_SIZE_LIMIT")}):n.files>2?o({type:"error",show:!0,message:t("ADJ_REQUEST_MAX_FILES")}):h(i=>({...i,[s.name]:s})):o({type:"error",show:!0,message:t("ADJ_REQUEST_FILE_TYPE_NOT_SUPPORTED")})},re=s=>{let{[s]:i,...m}=r;h(m)},oe=s=>{s.preventDefault();const i=s.dataTransfer?.files;l(i)},Z=s=>{s.preventDefault();const i=s.target?.files;l(i),s.target.value=""},l=s=>{const i=s.length<3-n.files?s.length:3-n.files;for(let m=0;m<i;m++)n.files<3?ae(s[m]):o({type:"error",show:!0,message:t("ADJ_REQUEST_MAX_FILES")})},f=(s,i,m)=>{let N=s||0;const O=r[Object.keys(r)[N]];y({completed:!1,loading:!0});const B=new FileReader;B.readAsDataURL(O),B.onload=async()=>{y({fileName:O.name,show:!0});const Le={name:O.name,type:O.type,body:B.result.split(",")[1]};try{D({id:n?.ticketId||i,file:Le}).then(()=>{if(y({completed:!0,loading:!1}),o({type:"success",title:t("SUCCESS"),message:t("ADJ_REQUEST_FILE_UPLOAD_SUCCESS",{fileName:O.name}),duration:1e4,inline:!1,style:{marginTop:120}}),N<Object.keys(r)?.length-1){const ee=N+1;B.onload=()=>{},f(ee,n?.ticketId||i,n?.ticketNumber||m)}else y({ticketId:"",secondTry:!1}),h({}),J({subject:"",description:"",subType:"",explanationError:"",contactName:u.firstName+" "+u.lastName||"",phone:"",email:u.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}),setTimeout(()=>{o({type:"success",title:t("SUCCESS"),message:e.jsxs(e.Fragment,{children:[t("ADJ_REQUEST_SUBMIT_SUCCESS_MSG1"),e.jsx("br",{}),e.jsx("br",{}),t("ADJ_REQUEST_SUBMIT_SUCCESS_MSG2"),e.jsx("br",{}),e.jsx("br",{}),t("ADJ_REQUEST_TICKET_NUMBER",{ticketNumber:m})]}),duration:1e4,inline:!1,style:{marginTop:120}})},3e3)}).catch(ee=>{y({loading:!1,show:!1}),o({type:"error",title:t("ADJ_REQUEST_UPLOAD_ERROR"),message:e.jsx(e.Fragment,{children:ee.message}),duration:1e4,inline:!1,style:{marginTop:120}})})}catch(ee){console.error(ee.message)}}};return e.jsxs(e.Fragment,{children:[e.jsx(St,{state:n,modify:y,completed:n.completed}),n.showPce&&e.jsx(It,{state:n,modify:y,errors:x,control:g,fieldRequired:w,formState:j,form:I,register:k,onSubmit:H(le)}),e.jsxs("div",{className:d["adjustment-request__page-container"],children:[e.jsx("div",{id:"AdjustmentRequest-Header",children:e.jsx("h2",{className:L(d["adjustment-request__header"],"spotlight_heading-lg"),id:"AdjustmentRequest-Title",children:t("ADJ_REQUEST_TITLE")})}),e.jsxs("div",{className:d["adjustment-request__content-wrapper"],children:[e.jsx("div",{className:d["adjustment-request__form-column"],children:e.jsx(je,{id:"AdjustmentRequest-Form",className:d["adjustment-request__form-container"],children:e.jsx("form",{onSubmit:H(le),children:e.jsxs("div",{className:d["adjustment-request__form-grid"],children:[e.jsx("div",{className:d["adjustment-request__form-intro"],children:e.jsx("p",{className:L("spotlight_body-md text-secondary",d["adjustment-request__form-intro-text"]),children:t("ADJ_REQUEST_INTRO")})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"subject",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(K,{id:"AdjustmentRequest-subject",name:"subject",label:t("ADJ_REQUEST_SUBJECT"),placeholder:t("ADJ_REQUEST_SUBJECT"),value:s,onChange:i,onBlur:m,isInvalid:!!x.subject,errorMessage:x?.subject?.message||" ",isFullWidth:!0,isRequired:!0,className:d["adjustment-request__field"]})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"description",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(de,{id:"AdjustmentRequest-description",name:"description",label:t("ADJ_REQUEST_DESCRIPTION"),placeholder:t("ADJ_REQUEST_DESCRIPTION"),value:s,onChange:i,onBlur:m,isInvalid:!!x.description,errorMessage:x?.description?.message||" ",rows:4,isRequired:!0,className:d["adjustment-request__text-area"]})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"subType",control:g,rules:w,render:({field:{value:s,onBlur:i,onChange:m}})=>e.jsx(Be,{isFullWidth:!0,id:"AdjustmentRequest-subType",label:t("ADJ_REQUEST_SUB_TYPE"),value:s,onChange:m,onBlur:i,isInvalid:!!x.subType,errorMessage:x?.subType?.message||" ",isRequired:!0,className:d["adjustment-request__field"],children:U.map(({label:N,value:O})=>e.jsx(Fe,{value:O,children:N},O))})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"explanationError",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(de,{id:"AdjustmentRequest-explanationError",name:"explanationError",label:t("ADJ_REQUEST_EXPLANATION_OF_ERROR"),placeholder:t("ADJ_REQUEST_EXPLANATION_OF_ERROR"),value:s,onChange:i,onBlur:m,isInvalid:!!x.explanationError,errorMessage:x?.explanationError?.message||" ",rows:4,isRequired:!0})})}),e.jsx("div",{className:L(d["adjustment-request__form-field"],d["adjustment-request__section-title"]),children:e.jsx("h6",{className:"spotlight_heading-xs",children:t("ADJ_REQUEST_CONTACT_INFO")})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"contactName",control:g,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(K,{id:"AdjustmentRequest-contactName",name:"contactName",label:t("ADJ_REQUEST_NAME"),placeholder:t("ADJ_REQUEST_NAME"),value:s,onChange:i,onBlur:m,isDisabled:!0,isFullWidth:!0,isRequired:!0,className:d["adjustment-request__field"]})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"phone",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(Ge,{id:"AdjustmentRequest-phone",label:t("ADJ_REQUEST_PHONE"),placeholder:t("ADJ_REQUEST_PHONE"),value:s,onChange:N=>{i(N.currentTarget.value)},onBlur:m,isInvalid:!!x.phone||s?.replace(/\D/g,"")?.length>0&&s?.replace(/\D/g,"")?.length!==10,errorMessage:x?.phone?.message||s?.replace(/\D/g,"")?.length>0&&s?.replace(/\D/g,"")?.length!==10?t("THIS_FIELD_IS_REQUIRED"):" ",isFullWidth:!0,isRequired:!0,inputProps:{inputMode:"numeric"}})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"email",control:g,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(K,{id:"AdjustmentRequest-email",name:"email",label:t("ADJ_REQUEST_EMAIL"),placeholder:t("ADJ_REQUEST_EMAIL"),value:s,onChange:i,onBlur:m,isDisabled:!0,isFullWidth:!0,isRequired:!0})})}),e.jsx("div",{className:L(d["adjustment-request__form-field"],d["adjustment-request__section-title"]),children:e.jsx("h6",{className:"spotlight_heading-xs",children:t("ADJ_REQUEST_ADDITIONAL_DETAILS")})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"productionCompany",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(K,{id:"AdjustmentRequest-productionCompany",name:"productionCompany",label:t("ADJ_REQUEST_PRODUCTION_COMPANY"),placeholder:t("ADJ_REQUEST_PRODUCTION_COMPANY"),value:s,onChange:i,onBlur:m,isInvalid:!!x.productionCompany,errorMessage:x?.productionCompany?.message||" ",isFullWidth:!0,isRequired:!0,className:d["adjustment-request__field"]})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{name:"project",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(K,{id:"AdjustmentRequest-project",name:"project",label:t("ADJ_REQUEST_PROJECT_NAME"),placeholder:t("ADJ_REQUEST_PROJECT_NAME"),value:s,onChange:i,onBlur:m,isInvalid:!!x.project,errorMessage:x?.project?.message||" ",isFullWidth:!0,isRequired:!0,className:d["adjustment-request__field"]})})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx(C,{render:({field:{value:s,onBlur:i,onChange:m}})=>e.jsx(K,{id:"AdjustmentRequest-payrollCoordinatorEmail",label:t("PAYROLL_COORDINATOR_EMAIL"),placeholder:t("PAYROLL_COORDINATOR_EMAIL"),value:s,onChange:N=>{m(N.currentTarget.value)},onBlur:i,isInvalid:!!x.email||!q(s)&&s?.length>3,errorMessage:x?.email?.message||!q(s)&&s?.length>3?t("THIS_FIELD_IS_REQUIRED"):" ",isFullWidth:!0,isRequired:!0,className:d["adjustment-request__field"]}),name:"payrollCoordinatorEmail",control:g,rules:!n.ticketId&&w})}),e.jsx("div",{className:L(d["adjustment-request__form-field"],d["adjustment-request__check-handling-field"]),children:e.jsx(C,{name:"checkHandling",control:g,rules:w,render:({field:{value:s,onBlur:i,onChange:m}})=>e.jsx(Qe,{label:t("ADJ_REQUEST_CHECK_HANDLING"),value:s,onChange:m,onBlur:i,isRequired:!0,orientation:a?"vertical":"horizontal",optionList:ne})})}),I.checkHandling==="Special handling"&&e.jsx("div",{className:d["adjustment-request__special-handling-section"],children:e.jsx(C,{name:"detailsSpecialHandling",control:g,rules:w,render:({field:{value:s,onChange:i,onBlur:m}})=>e.jsx(de,{id:"AdjustmentRequest-detailsSpecialHandling",name:"detailsSpecialHandling",label:t("ADJ_REQUEST_DETAILS_SPECIAL_HANDLING"),placeholder:t("ADJ_REQUEST_DETAILS_SPECIAL_HANDLING"),value:s,onChange:i,onBlur:m,isInvalid:!!x.detailsSpecialHandling,errorMessage:x?.detailsSpecialHandling?.message||" ",rows:4,isRequired:!0})})}),e.jsx("div",{className:L(d["adjustment-request__form-field"],d["adjustment-request__section-title"]),children:e.jsx("h6",{className:"spotlight_heading-xs",children:t("ADJ_REQUEST_ATTACH_FILES")})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsx("p",{className:L("spotlight_body-sm text-secondary spotlight_input",d["adjustment-request__label"]),children:t("ADJ_REQUEST_FILE_LIMIT")})}),e.jsx("div",{className:d["adjustment-request__form-field"],children:e.jsxs("div",{className:d["adjustment-request__file-upload-wrapper"],children:[e.jsxs("div",{className:d["adjustment-request__upload-button-container"],children:[e.jsx("input",{accept:".pdf",className:d["adjustment-request__hidden"],id:"FileUpload",type:"file",multiple:!0,ref:c,onChange:Z,disabled:Object.keys(r)?.length>2}),e.jsx("label",{htmlFor:"FileUpload",children:e.jsx(At,{id:"UploadButton",tertiary:!0,component:"span",onDragOver:s=>{s.preventDefault()},onDrop:oe,className:d["adjustment-request__upload-button"],disabled:Object.keys(r)?.length>2})})]}),e.jsxs("div",{children:[e.jsx(De,{id:"AdjustmentRequest-Files",isDivided:!1,type:"card",size:"sm",className:L(d["adjustment-request__file-list"],"spotlight_container"),children:Object.keys(r).slice(0,3).map((s,i)=>e.jsx(ke,{labelText:s,className:d["adjustment-request__file-item"],endAdornment:e.jsx(V,{buttonVariant:"ghost",onPress:()=>re(s),startAdornment:"xmark",size:"xs",isDestructive:!0})},`fileButton-${i}`))}),e.jsx("p",{id:"AdjustmentRequest-FilesSelected",className:L(d["adjustment-request__files-selected"],"spotlight_body-xs spotlight_strong spotlight_container"),children:t("ADJ_REQUEST_FILES_SELECTED",{count:Object.keys(r)?.length})})]})]})}),e.jsx("div",{className:d["adjustment-request__form-buttons"],children:e.jsxs("div",{className:d["adjustment-request__button-group"],children:[e.jsx("div",{children:e.jsx(V,{id:"AdjustmentRequest-ResetButton",buttonVariant:"outlined",onPress:()=>{h({}),J({subject:"",description:"",subType:"",explanationError:"",contactName:u.firstName+" "+u.lastName||"",phone:"",email:u.email||"",productionCompany:"",project:"",payrollCoordinatorEmail:"",checkHandling:"",detailsSpecialHandling:""}),y({secondTry:!1}),requestAnimationFrame(()=>{document.querySelector("#Home")?.scrollTo(0,0)})},children:t("ADJ_REQUEST_RESET_FORM")})}),!n.ticketId&&(!j.isValid||!q(I?.payrollCoordinatorEmail)||I?.phone.replace(/\D/g,"").length!==10)?e.jsx(te,{position:"bottom-left",size:"small",content:t("ADJ_REQUEST_FILL_REQUIRED"),children:e.jsx("span",{children:e.jsx(V,{id:"AdjustmentRequest-SubmitButton",type:"submit",isPending:n.loading,className:d["adjustment-request__submit-button"],isDisabled:n.ticketId?!1:!j.isValid||!q(I?.payrollCoordinatorEmail)||I?.phone?.replace(/\D/g,"")?.length!==10,children:t("SUBMIT")})})}):e.jsx(V,{id:"AdjustmentRequest-SubmitButton",type:"submit",className:d["adjustment-request__submit-button"],isPending:n.loading,isDisabled:n.ticketId&&Object.keys(r)?.length===0,children:t("SUBMIT")})]})})]})})})}),e.jsx("div",{className:d["adjustment-request__sidebar-column"],children:e.jsx(Nt,{})})]})]})]})},fs=Se({permissions:"adjustment:create",fallbackRoute:"/client-registration"})(kt);export{fs as AdjustmentRequestReskin,xs as default};
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.