PageSourceSearch

https://app.payroller.com.au/_next/static/chunks/5802-d97ad322110c7a20.js

js payroller.com.au collected 2026-10-01 16:05:03 UTC 27,389 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d74e699c-fd3a-46c6-b71a-7f42855253bb",e._sentryDebugIdIdentifier="sentry-dbid-d74e699c-fd3a-46c6-b71a-7f42855253bb")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5802],{7043:(e,t,a)=>{a.d(t,{h:()=>s});var l=a(21367),n=a(70412),o=a.n(n);let s=(0,l.vt)(e=>({AIAssignShiftsStatusModalOpen:!1,isCustomDate:!1,sortValue:"asc",searchValue:"",loading:!1,openUnavailabilityModal:!1,openAvailabilityModal:!1,openTemplateModal:!1,openDownloadModal:!1,downloadAppModalTab:"employee",openDownloadAppPreviewModal:!1,kioskAppPreviewModalDismissed:!1,openInsertTemplateModal:!1,openDeleteAllShiftsModal:!1,openPublishRosterModal:!1,showConflictDrawer:!1,calendarView:"weekly_view",calendarWeeklyContentView:"roles",currentDate:o()().toDate(),startDate:null,endDate:null,showPersonalizeAIModal:!1,rosterConfigInitialized:!1,aiAssignShiftsStatuses:{rostersFetched:"loading",employeesFetched:"loading",shiftsAssigned:"loading"},aiAssignShiftsContent:{content:void 0,hasError:!1},setSortValue:t=>e({sortValue:t}),setSearchValue:t=>e({searchValue:t}),setLoading:t=>e({loading:t}),setOpenUnavailabilityModal:t=>e({openUnavailabilityModal:t}),setOpenAvailabilityModal:(t,a)=>e({openAvailabilityModal:t,availabilityModalConfig:a}),setOpenTemplateModal:t=>e({openTemplateModal:t}),setOpenDownloadModal:function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"employee";return e(t?{openDownloadModal:t,downloadAppModalTab:a}:{openDownloadModal:t})},setOpenDownloadAppPreviewModal:t=>e({openDownloadAppPreviewModal:t}),setKioskAppPreviewModalDismissed:t=>e({kioskAppPreviewModalDismissed:t}),setOpenInsertTemplateModal:t=>e({openInsertTemplateModal:t}),setOpenDeleteAllShiftsModal:t=>e({openDeleteAllShiftsModal:t}),setOpenPublishRosterModal:t=>e({openPublishRosterModal:t}),setShowConflictDrawer:t=>e({showConflictDrawer:t}),setCalendarView:t=>e({calendarView:t}),setCalendarWeeklyContentView:t=>e({calendarWeeklyContentView:t}),setCurrentDate:t=>e({currentDate:t}),setStartDate:t=>e({startDate:t}),setEndDate:t=>e({endDate:t}),setSchedDate:t=>{let{startDate:a,endDate:l}=t;return e({startDate:a,endDate:l})},setAIAssignShiftsStatusModal:t=>e({AIAssignShiftsStatusModalOpen:t}),setAIAssignShiftsStatuses:t=>{e(e=>({...e,aiAssignShiftsStatuses:{...e.aiAssignShiftsStatuses,...t}}))},setAIAssignShiftsContent:t=>{e(e=>({...e,aiAssignShiftsContent:{...e.aiAssignShiftsContent,...t}}))},setConfigState:t=>e(e=>({...e,...t})),setShowPersonalizeAIModal:t=>e({showPersonalizeAIModal:t}),resetRosterConfigInitialized:()=>e({rosterConfigInitialized:!1})}))},11483:(e,t,a)=>{a.d(t,{g:()=>o,l:()=>n});var l=a(7620);let n=(0,l.createContext)(null),o=()=>{let e=(0,l.useContext)(n);if(!e)throw Error("No context was found");return e}},13657:(e,t,a)=>{a.d(t,{Ay:()=>u,Tt:()=>i,U0:()=>s,s:()=>r,ue:()=>d});var l=a(70412),n=a.n(l);let o="rosterEN",s={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n().defineLocale(o,{parentLocale:"en",...e}),n()};function r(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return n()(...t).locale(o)}function d(e,t,a){let l=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return n().tz(e,t,l,a).locale(o)}let u=n()},34592:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(7620);let n=0,o=(e,t,a)=>{var o;let s=(0,l.useRef)(t),i=(0,l.useRef)(null==(o=null==a?void 0:a.canClose)||o),r=(0,l.useRef)(0);(0,l.useEffect)(()=>{s.current=t},[t]),(0,l.useEffect)(()=>{var e;i.current=null==(e=null==a?void 0:a.canClose)||e},[null==a?void 0:a.canClose]),(0,l.useEffect)(()=>{if(!e)return;r.current=n+=1;let t="modal-".concat(n),a={...history.state||{},modal:t};history.pushState(a,"",window.location.href);let l=()=>{if(r.current===n){if(!i.current)return void history.pushState(history.state,"",window.location.href);s.current()}},o=e=>{"Escape"===e.key&&r.current===n&&history.back()};return window.addEventListener("popstate",l),window.addEventListener("keydown",o),()=>{n=Math.max(0,n-1),window.removeEventListener("popstate",l),window.removeEventListener("keydown",o)}},[e])}},35344:(e,t,a)=>{a.d(t,{A:()=>u});var l=a(54568),n=a(90123),o=a(52481),s=a(60782),i=a(54923),r=a(87420),d=a(29473);let u=e=>{let{isOpen:t,onClose:a,onSuccess:u}=e,c=(0,s.A)(e=>e.showAlert),{mutate:m,isLoading:v}=(0,d.useMutation)({mutationFn:()=>(0,r.bE)(i.H.GOOGLE_CALENDAR.DISCONNECT)});return(0,l.jsx)(n.aF,{isOpen:t,hasOverlay:!0,shouldControlV1Overlay:!1,onClose:a,children:(0,l.jsx)(o.a,{modalFooterProps:{primaryButtonProps:{color:"red",disabled:v,onClick:()=>{m(void 0,{onSuccess:()=>{c({status:"success",title:"Disconnected from Google Calendar"}),u(),a()},onError:()=>{c({status:"danger",title:"Failed to disconnect from Google Calendar"})}})},children:v?"Disconnecting...":"Disconnect"},secondaryButtonProps:{disabled:v,onClick:a,children:"Cancel"}},children:(0,l.jsxs)("div",{className:"p-9 flex flex-col gap-4",children:[(0,l.jsx)("h1",{className:"text-2xl text-center text-gray-900",children:"Disconnect Google Calendar"}),(0,l.jsx)("p",{className:"text-gray-700 text-center",children:"This will remove calendar reminders and disconnect your Google account. You can reconnect at any time."}),(0,l.jsx)("p",{className:"text-gray-900 text-center",children:"Are you sure you want to disconnect?"})]})})})}},39994:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(54923),n=a(87420),o=a(29473);let s=()=>(0,o.useMutation)({mutationFn:e=>(e=>
1{let t=e?"".concat(l.H.GOOGLE_CALENDAR.AUTH,"?redirectPath=").concat(encodeURIComponent(e)):l.H.GOOGLE_CALENDAR.AUTH;return(0,n.Jt)(t)})(e),onSuccess:e=>{window.location.href=e.authUrl}})},41618:(e,t,a)=>{a.d(t,{A:()=>i,f:()=>s});var l=a(87420),n=a(29473),o=a(96006);let s=async(e,t)=>(0,l.yJ)("/v2/tsr-company",e,{token:t}),i=e=>{let{onSuccess:t,onError:a,config:l}=e,i=(0,o.useSession)();return(0,n.useMutation)({mutationFn:e=>{var t;return s(e,null==(t=i.data)?void 0:t.payrollerToken)},onSuccess:e=>{t(e)},onError:a})}},47329:(e,t,a)=>{a.d(t,{X:()=>l});let l=e=>{var t,a,l,n,o,s,i;return{timezone:null!=(l=null==e?void 0:e.tz)?l:"Australia/Sydney",timeFormat:null!=(n=null==e?void 0:e.timeFormat)?n:"h:mmA",workingHours:(null==e?void 0:e.wh)?Number(null==e?void 0:e.wh):7.6,dateFormat:"ddd, DD MMM",currency:null!=(o=null==e?void 0:e.currency)?o:"AUD",timesheetGrouping:null!=(s=null==e||null==(t=e.timesheetSettings)?void 0:t.defaultGrouping)?s:"employee",autogenerateTimesheet:null==(i=null==e||null==(a=e.timesheetSettings)?void 0:a.autoGenerateTimesheet)||i,scheduleOffset:(null==e?void 0:e.scheduleOffset)||"monday"}}},56104:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(21367).vt)(e=>({selectedEditRoster:void 0,setSelectedEditRoster:t=>e({selectedEditRoster:t}),editSource:null,setEditSource:t=>e({editSource:t}),selectedEditUnavailability:void 0,setSelectedEditUnavailability:t=>e({selectedEditUnavailability:t}),isAssigningShifts:!1,setIsAssigningShifts:t=>e({isAssigningShifts:t}),openShiftModal:!1,shiftModalData:null,setOpenShiftModal:(t,a)=>e({openShiftModal:t,shiftModalData:a||null}),openLeaveModal:!1,leaveModalData:null,setOpenLeaveModal:(t,a)=>e({openLeaveModal:t,leaveModalData:a||null}),showProactiveSchedulingBanner:!1,setShowProactiveSchedulingBanner:t=>e({showProactiveSchedulingBanner:t}),openRolesModal:!1,selectedRole:null,setOpenRolesModal:(t,a)=>e({openRolesModal:t,selectedRole:a}),pendingShiftModalData:null,setPendingShiftModalData:t=>e({pendingShiftModalData:t}),pendingEditRoster:null,pendingEditSource:null,setPendingEditRoster:t=>e(e=>({pendingEditRoster:t,pendingEditSource:e.editSource})),restorePendingModal:()=>e(e=>e.pendingEditRoster?{selectedEditRoster:e.pendingEditRoster,editSource:e.pendingEditSource,pendingEditRoster:null,pendingEditSource:null}:e.pendingShiftModalData?{openShiftModal:!0,shiftModalData:e.pendingShiftModalData,pendingShiftModalData:null}:e),addPopoverAnchorEl:null,addPopoverData:null,openAddPopover:(t,a)=>e({addPopoverAnchorEl:t,addPopoverData:a}),closeAddPopover:()=>e({addPopoverAnchorEl:null,addPopoverData:null})}))},57020:(e,t,a)=>{a.d(t,{BJ:()=>o,bq:()=>l,yC:()=>n});let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=" ",l=t.length;for(let n=0;n<e;n++)a+=t.charAt(Math.floor(Math.random()*l));return a},n=e=>e?e.split(" ").map(e=>e.charAt(0)).join(""):"",o=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")},60441:(e,t,a)=>{a.d(t,{Yf:()=>v,c0:()=>y,Ay:()=>b,Sc:()=>g.S});var l=a(54568),n=a(83631),o=a(68268),s=a(136),i=a(33624),r=a(42349),d=a(96666),u=a(81551),c=a(84703);let m=e=>{let{control:t,watch:a,isGoogleConnected:s,companyTimezone:i,companyLocations:r,timeOpts:u,onConnectGoogle:m,isOAuthDenied:v,isConnecting:h}=e,p=a("calendarReminderEnabled"),y=r.length>1;return(0,l.jsxs)("div",{className:"space-y-4",children:[v&&(0,l.jsxs)("div",{className:"flex flex-row gap-x-3 rounded-lg bg-red-50 p-4 font-inter",children:[(0,l.jsx)(c.g,{className:"h-5 w-5 text-red-500 shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium text-red-700",children:"We could not connect to Google Calendar because access was denied."})]}),(0,l.jsx)(n.xI,{name:"calendarReminderEnabled",control:t,render:e=>{let{field:t}=e;return(0,l.jsxs)("div",{className:"flex flex-row items-start justify-between gap-2 w-full",children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-y-0.5",children:[(0,l.jsx)("span",{className:"text-base font-medium leading-normal ".concat(s?"text-gray-900":"text-gray-400"),children:"Add reminder to Google Calendar"}),(0,l.jsx)("span",{className:"text-base font-normal leading-normal ".concat(s?"text-gray-500":"text-gray-400"),children:"Set reminders to review the roster so you don't forget."})]}),(0,l.jsx)(o.l,{checked:!!t.value,onChange:t.onChange,disabled:!s,"data-testid":"calendarReminderEnabled"})]})}}),!s&&(0,l.jsxs)("div",{className:"flex flex-row items-start gap-x-2 rounded-lg bg-gray-100 p-3",children:[(0,l.jsx)("div",{className:"h-2 w-2 rounded-full bg-gray-400 mt-1.5 shrink-0"}),(0,l.jsxs)("span",{className:"text-sm text-gray-700",children:["Please connect to your Google Calendar to enable reminders."," ",(0,l.jsx)("button",{type:"button",onClick:m,disabled:h,className:"text-sm font-medium text-brand-600 hover:text-brand-700",children:h?"Connecting...":"Connect now"})]})]}),s&&p&&(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)(n.xI,{control:t,name:"calendarReminderTime",render:e=>
1{let{field:{onChange:t,value:a}}=e;return(0,l.jsx)(d.A,{"data-testid":"calendarReminderTime",placeholder:"Reminder time",id:"calendarReminderTime",value:a,selected:[a],defaultValue:a,onChangeInput:t,items:u,showLabel:!0,labelText:"Reminder time"})}}),(0,l.jsxs)("span",{className:"block text-sm text-gray-500",children:["Times are in ",i]}),y&&(0,l.jsx)("div",{className:"flex flex-row gap-x-3 rounded-lg bg-gray-100 p-3",children:(0,l.jsx)("span",{className:"text-sm text-gray-700",children:"Calendar reminders will be created for each of your locations"})})]})]})},v=e=>{let{control:t,watch:a,hasPublishedRoster:c,timeOpts:v,enableAvailability:h,requirePublishedRoster:p=!0,showEnabledToggle:y=!0,isGoogleConnected:g,companyTimezone:f,companyLocations:x,onConnectGoogle:b,isOAuthDenied:w,isConnecting:S}=e,A=p&&!c,E=A||!a("enabled"),C=a("enabled"),j=h?"availability":"unavailability";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"space-y-4 pt-1",children:[A&&(0,l.jsxs)("div",{className:"flex flex-row gap-x-3 rounded-lg bg-gray-100 p-4 font-inter",children:[(0,l.jsx)("h1",{className:"flex flex-row items-center gap-x-3 text-gray-700",children:(0,l.jsx)("div",{className:"py-1",children:(0,l.jsx)(i.V,{className:"h-5 w-5"})})}),(0,l.jsx)("div",{className:"flex text-sm font-medium",children:"You need to publish your first roster before enabling this feature"})]}),y&&(0,l.jsx)(n.xI,{name:"enabled",control:t,render:e=>{let{field:t}=e;return(0,l.jsxs)("div",{className:"flex flex-row items-start justify-between gap-2 w-full",children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-y-0.5",children:[(0,l.jsx)("span",{className:"text-base font-medium leading-normal ".concat(A?"text-gray-400":"text-gray-900"),children:"Auto-generate weekly roster"}),(0,l.jsx)("span",{className:"text-base font-normal leading-normal ".concat(A?"text-gray-400":"text-gray-500"),children:"The AI will auto create a roster for you every ".concat((0,r.upperCaseFirst)(a("day")))})]}),(0,l.jsx)(o.l,{checked:t.value,onChange:t.onChange,disabled:A,"data-testid":"enabled"})]})}}),(0,l.jsx)(n.xI,{name:"frequency",control:t,render:e=>{let{field:t}=e;return(0,l.jsx)(s.l,{labelText:"Roster frequency",disabled:E,items:u.Cj,selected:[u.Cj.find(e=>e.value===t.value)],defaultValue:t.value,onSelect:t.onChange,"data-testid":"frequency"})}}),(0,l.jsx)(n.xI,{name:"day",control:t,render:e=>{let{field:t}=e;return(0,l.jsx)(s.l,{labelText:"Roster day",items:u.g4,selected:[u.g4.find(e=>e.value===t.value)],defaultValue:t.value,onSelect:t.onChange,disabled:E,"data-testid":"day"})}}),(0,l.jsx)(n.xI,{control:t,name:"startTime",render:e=>{let{field:{onChange:t,value:a}}=e;return(0,l.jsx)(d.A,{"data-testid":"startTime",placeholder:"Start time",id:"startTime",value:a,selected:[a],defaultValue:a,onChangeInput:t,items:v,showLabel:!0,labelText:"Start time",disabled:E})}})]}),(0,l.jsx)("hr",{className:"my-8 border-b border-gray-200"}),(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)(n.xI,{name:"autoRequestEmployeeUnavailabilityEnabled",control:t,render:e=>{let{field:t}=e;return(0,l.jsxs)("div",{className:"flex flex-row items-start justify-between gap-2 w-full",children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-y-0.5",children:[(0,l.jsxs)("span",{className:"text-base font-medium leading-normal ".concat(A?"text-gray-400":"text-gray-900"),children:["Auto-request employee ",j]}),(0,l.jsxs)("span",{className:"text-base font-normal leading-normal ".concat(A?"text-gray-400":"text-gray-500"),children:["System will auto-request employee ",j,"."]})]}),(0,l.jsx)(o.l,{checked:t.value,onChange:t.onChange,disabled:A,"data-testid":"autoRequestEmployeeUnavailabilityEnabled"})]})}}),(0,l.jsx)(n.xI,{name:"autoRequestEmployeeUnavailabilityDay",control:t,render:e=>{let{field:t}=e;return(0,l.jsx)(s.l,{showLabel:!1,items:u.g4,selected:[u.g4.find(e=>e.value===t.value)],defaultValue:t.value,onSelect:t.onChange,disabled:A,"data-testid":"autoRequestEmployeeUnavailabilityDay"})}})]}),(0,l.jsx)("hr",{className:"my-8 border-b border-gray-200"}),(0,l.jsx)(m,{control:t,watch:a,isGoogleConnected:g,companyTimezone:f,companyLocations:x,timeOpts:v,onConnectGoogle:b,isOAuthDenied:w,isConnecting:S}),!C&&g&&a("calendarReminderEnabled")&&(0,l.jsx)("div",{className:"flex flex-row gap-x-3 rounded-lg bg-yellow-50 p-3 mt-4",children:(0,l.jsx)("span",{className:"text-sm text-yellow-800",children:"Calendar reminders will also be turned off when proactive roster is disabled."})})]})};var h=a(62504),p=a(75087);let y=e=>{let{onCancel:t,onSave:a,submitLabel:n,footerClassName:o,footerVariant:s="sidebar",hasPublishedRoster:i,isDirty:r,isLoading:d}=e;return"modal"===s?(0,l.jsx)(h.j,{secondaryButtonProps:{onClick:t,children:"Cancel",disabled:d},primaryButtonProps:{type:"button",children:n,disabled:!i||!r||d,loading:d,onClick:a,"data-testid":"save"}}):(0,l.jsxs)("div",{className:o,style:{boxShadow:"0px 0px 4px -2px #1018280F, 0px 0px 8px -2px #1018281A"},children:[(0,l.jsx)(p.$,{color:"primary",size:"m",className:"w-full",disabled:!i||!r||d,loading:d,type:"button",onClick:a,"data-testid":"save",children:n}),(0,l.jsx)(p.$,{color:"alternative",outline:!0,size:"m",className:"w-full",onClick:t,disabled:d,type:"button",children:"Cancel"})]})};var g=a(84650),f=a(11483),x=a(35344);let b=e=>{let{onCancel:t,onSubmitSettled:a,submitLabel:n="Save",className:o,footerClassName:s,footerVariant:i="sidebar",contentHeader:r}=e,{enableAvailability:d}=(0,f.g)(),{control:u,watch:c,timeOpts:m,hasPublishedRoster:h,isDirty:p,isLoading:b,handleCancel:w,handleSave:S,isGoogleConnected:A,companyTimezone:E,companyLocations:C,onConnectGoogle:j,closeDisconnectMod
1al:R,onDisconnectSuccess:T,isOAuthDenied:M,isConnecting:N,showDisconnectModal:D}=(0,g.S)({onCancel:t,onSubmitSettled:a});return(0,l.jsxs)("form",{className:o,children:[(0,l.jsxs)("div",{className:"flex-1 min-h-0 overflow-auto p-6",children:[r,(0,l.jsx)(v,{control:u,watch:c,hasPublishedRoster:h,timeOpts:m,enableAvailability:d,isGoogleConnected:A,companyTimezone:E,companyLocations:C,onConnectGoogle:j,isOAuthDenied:M,isConnecting:N})]}),(0,l.jsx)(y,{onCancel:w,onSave:S,submitLabel:n,footerClassName:s,footerVariant:i,hasPublishedRoster:h,isDirty:p,isLoading:b}),(0,l.jsx)(x.A,{isOpen:D,onClose:R,onSuccess:T})]})}},60782:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(21367),n=a(57020);let o={error:"danger"},s=(0,l.vt)(e=>({id:"",title:"",message:"",status:"",showAlert:t=>{let{names:a="GlobalAlert",message:l,title:s,status:i="success",showButton:r,showSecondaryButton:d,showCloseIcon:u,buttonProps:c,secondaryButtonProps:m,className:v,showHeadingIcon:h=!0,headingIcon:p,dataTestId:y}=t;i=o[i]||i,e({id:"".concat(a,"-").concat((0,n.bq)()),message:l,title:s,status:i,buttonProps:c,secondaryButtonProps:m,showButton:r,showSecondaryButton:d,showCloseIcon:u,className:v,showHeadingIcon:h,headingIcon:p,dataTestId:y})},hideBanner:()=>e({id:"",showButton:!1,showCloseIcon:!0,showSecondaryButton:!1,secondaryButtonProps:{},buttonProps:{},showHeadingIcon:!0,headingIcon:void 0,className:""}),showButton:!1,showCloseIcon:!0,showSecondaryButton:!1,buttonProps:{},secondaryButtonProps:{},showHeadingIcon:!0,headingIcon:void 0,className:""}))},60879:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(54923),n=a(87420),o=a(29473);let s=()=>(0,o.useMutation)({mutationFn:e=>(0,n.bE)(l.H.PROACTIVE_SCHEDULING.UPDATE,e)})},68469:(e,t,a)=>{a.d(t,{D:()=>d});var l=a(96006),n=a(95747),o=a(27541),s=a(87420),i=a(72724);let r=async()=>(0,s.Jt)("/v2/rosters/has-published"),d=()=>{let e=(0,l.useSession)(),t=(0,o.useSearchParams)(),a=null==t?void 0:t.get("clientId");return(0,n.useQuery)({queryKey:i.e.fetchHasPublishedRoster(null!=a?a:void 0),queryFn:r,enabled:"authenticated"===e.status,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,staleTime:36e5})}},81551:(e,t,a)=>{a.d(t,{Cj:()=>r,I:()=>u,NI:()=>C,OF:()=>v,Oi:()=>f,Or:()=>R,Oz:()=>s,PY:()=>w,QU:()=>l,Qz:()=>h,TU:()=>n,af:()=>S,b7:()=>g,d1:()=>x,dF:()=>p,g4:()=>d,gi:()=>m,jT:()=>E,kK:()=>A,qY:()=>c,rn:()=>j,s2:()=>y,wl:()=>b,x8:()=>i,xV:()=>o});let l={ID:"open-shifts",TITLE:"Open to all",NAME:"Open shifts"},n={VALUE:"any-role",TITLE:"Any role"},o={_id:"no-roles",name:n.TITLE,isDeleted:!1,count:0},s={SAVE_TEMPLATE:"save_template",LOAD_TEMPLATE:"load_template",DELETE_ALL_SHIFTS:"delete_all_shifts",EXPORT_TO_PDF:"export_to_pdf",BUDGET:"budget",REQUEST_AVAILABILITY:"request_availability",SYNC:"sync",PRINT:"print",ROSTER_SETTINGS:"roster_settings",SHIFT_STATUS:"shift_status",DOWNLOAD_APP:"download_app",DEBUG:"debug"},i={BREAK:"Control Paid/Unpaid Breaks with a toggle button",CUSTOM_RECURRENCE:"Customize recurring shifts to repeat events according to your business needs. Can be tailored to fit your business",EMPLOYEE:'Click the "Employee" option and select as many employees as you need to schedule',UNASSIGNED:"Unassigned shift means that the shift is open and not assigned to any employees."},r=[{title:"Weekly",value:"weekly"},{title:"2 Weeks",value:"fortnightly"}],d=[{title:"Monday",value:"monday"},{title:"Tuesday",value:"tuesday"},{title:"Wednesday",value:"wednesday"},{title:"Thursday",value:"thursday"},{title:"Friday",value:"friday"},{title:"Saturday",value:"saturday"},{title:"Sunday",value:"sunday"}],u={MONTHLY:"monthly_view",DAILY:"daily_view",WEEKLY:"weekly_view",TWO_WEEK:"two_week"},c=[{title:"Day",value:u.DAILY},{title:"Week",value:u.WEEKLY},{title:"2 Weeks",value:u.TWO_WEEK},{title:"Month",value:u.MONTHLY}],m=[{title:"Annual Leave",value:"a"},{title:"Sick/Carer's Leave",value:"s"},{title:"Unpaid Leave",value:"unpaid"}],v={add:"Leaved added",error:"Sorry. there was a problem. Please try again"},h=72,p=64,y={v1:"p-1 xl:!p-2",v2:"p-1 xl:!p-[6px]"},g={v1:"min-h-[114px] xl:!min-h-[126px]",v2WithLocation:"!min-h-[104px] xl:!min-h-[111px]",v2WithoutLocation:"!min-h-[84px] xl:!min-h-[93px]"},f={v1:80,v2WithLocation:68,v2WithoutLocation:48},x=954,b=135,w=7,S=3,A=4,E=1280,C=1.1,j=1,R=15},84650:(e,t,a)=>{a.d(t,{S:()=>R});
1var l=a(72935),n=a(42349),o=a(7620),s=a(83631),i=a(70412),r=a.n(i),d=a(78167),u=a(68469),c=a(60507),m=a(17590),v=a(47329),h=a(60879),p=a(39994),y=a(41618),g=a(4988),f=a(64941),x=a(56104),b=a(13657),w=a(30996);let S=w.z.enum(["weekly","fortnightly"]),A=w.z.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),E=w.z.object({enabled:w.z.boolean(),frequency:S,day:A,startTime:w.z.string().optional(),autoRequestEmployeeUnavailabilityEnabled:w.z.boolean(),autoRequestEmployeeUnavailabilityDay:A,calendarReminderEnabled:w.z.boolean().optional().default(!1),calendarReminderTime:w.z.string().optional()}),C=(e,t,a)=>{var l,n,o,s,i,r,d,u,c,m,v,h,p,y,g,f;let x=(null==t||null==(l=t.proactiveScheduling)?void 0:l.startTime)?(0,b.s)(t.proactiveScheduling.startTime).tz(null==t?void 0:t.tz).format(null==t?void 0:t.timeFormat):e,w=(null==a||null==(n=a.calendarReminder)?void 0:n.reminderTime)&&(null==t?void 0:t.tz)&&(null==t?void 0:t.timeFormat)?(0,b.s)(a.calendarReminder.reminderTime).tz(t.tz).format(t.timeFormat):e;return{enabled:null!=(m=null==t||null==(o=t.proactiveScheduling)?void 0:o.enabled)&&m,frequency:null!=(v=null==t||null==(s=t.proactiveScheduling)?void 0:s.frequency)?v:"weekly",day:null!=(h=null==t||null==(i=t.proactiveScheduling)?void 0:i.day)?h:"friday",startTime:x,autoRequestEmployeeUnavailabilityDay:null!=(y=null!=(p=null==t||null==(r=t.autoRequestEmployeeUnavailability)?void 0:r.day)?p:null==t||null==(d=t.proactiveScheduling)?void 0:d.day)?y:"friday",autoRequestEmployeeUnavailabilityEnabled:null!=(g=null==t||null==(u=t.autoRequestEmployeeUnavailability)?void 0:u.enabled)&&g,calendarReminderEnabled:null!=(f=null==a||null==(c=a.calendarReminder)?void 0:c.enabled)&&f,calendarReminderTime:w}};var j=a(27541);let R=e=>{var t,a;let{onCancel:i,onSubmitSettled:w}=e,{data:S}=(0,d.bK)(),{updateCompanyInCache:A}=(0,d._M)(),{updateInitialDataInCache:R}=(0,c.J)(),{data:T}=(0,u.D)(),{logEvent:M}=(0,g.A)(),{toast:N}=(0,f.Tm)(),D=(0,x.A)(e=>e.showProactiveSchedulingBanner),I=(0,x.A)(e=>e.setShowProactiveSchedulingBanner),O=(0,o.useMemo)(()=>null==S?void 0:S.company,[null==S?void 0:S.company]),P=(0,o.useMemo)(()=>!!(null==T?void 0:T.hasPublishedRoster),[null==T?void 0:T.hasPublishedRoster]),{timeFormat:L,timezone:k}=(0,v.X)(O),{mutate:_,isLoading:U}=(0,h.A)(),z=(0,o.useMemo)(()=>(0,m.jH)({startTime:(0,b.s)().startOf("day"),endTime:(0,b.s)().startOf("day").add(1,"day"),valueFormat:L,interval:15}),[L]),F=(0,j.useSearchParams)(),{updateCompanyInInitialData:G}=(0,c.J)(),q=(0,o.useMemo)(()=>null==O?void 0:O.tsrCompany,[null==O?void 0:O.tsrCompany]),B=(null==q||null==(t=q.googleCalendar)?void 0:t.connected)===!0,W=(null==F?void 0:F.get("google-calendar"))==="denied",{mutate:V,isLoading:H}=(0,p.A)(),[Y,K]=(0,o.useState)(!1),{mutate:J}=(0,y.A)({onSuccess:e=>{A({tsrCompany:e}),G({tsrCompany:e})}}),Q=(0,o.useMemo)(()=>C(z[24].value,O,q),[O,q,z]),{control:X,handleSubmit:$,watch:Z,formState:{isDirty:ee},reset:et}=(0,s.mN)({resolver:(0,l.u)(E),defaultValues:Q});(0,o.useEffect)(()=>{et(Q)},[Q,et]);let ea=(0,o.useCallback)(()=>{V("/business/roster?modal=personalize-ai")},[V]),el=(0,o.useCallback)(()=>{K(!0)},[]),en=(0,o.useCallback)(()=>{K(!1)},[]),eo=(0,o.useCallback)(()=>{K(!1);let e={...q,googleCalendar:void 0,calendarReminder:void 0};A({tsrCompany:e}),G({tsrCompany:e})},[q,A,G]),es=async e=>{let{calendarReminderEnabled:t,calendarReminderTime:a,...l}=e;_({...l,startTime:l.startTime?r().tz(l.startTime,L,k).utc().toISOString():void 0,calendarReminder:{enabled:null!=t&&t,reminderTime:a?r().tz(a,L,k).utc().toISOString():void 0}},{onSuccess:l=>{var o,s,i,d;if(B&&q){let e=a?r().tz(a,L,k).utc().toISOString():void 0,{googleCalendar:l,...n}=q;J({...n,calendarReminder:{enabled:null!=t&&t,reminderTime:e,eventIds:null==(i=q.calendarReminder)?void 0:i.eventIds}})}(null==O||null==(o=O.proactiveScheduling)?void 0:o.enabled)&&!e.enabled&&M(n.eventNames.AIRosterOptOutClicked),N({text:"AI Roster settings saved",type:"confirmation"}),A(l.company),R({company:l.company}),et(C(z[24].value,l.company));let u=null!=(d=null==O||null==(s=O.autoRequestEmployeeUnavailability)?void 0:s.enabled)&&d,c=e.autoRequestEmployeeUnavailabilityEnabled;u!==c&&M(c?n.eventNames.ProactiveRoster.AutoAvailabilityOn:n.eventNames.ProactiveRoster.AutoAvailabilityOff,{user_activity:P?n.UserActivity.Engagement:n.UserActivity.Activation})},onError:()=>{N({text:"Failed to save AI Roster settings",type:"fail/danger"})},onSettled:()=>{D&&I(!1),null==w||w()}})};return{control:X,watch:Z,timeOpts:z,hasPublishedRoster:P,isDirty:ee,isLoading:U,handleCancel:()=>{et(Q),i()},handleSave:()=>{M(n.eventNames.ProactiveRoster.SetupCompleted,{user_activity:P?n.UserActivity.Engagement:n.UserActivity.Activation}),$(e=>es(e))()},isGoogleConnected:B,companyTimezone:k,companyLocations:null!=(a=null==O?void 0:O.locations)?a:[],onConnectGoogle:ea,onDisconnectGoogle:el,closeDisconnectMod
1al:en,onDisconnectSuccess:eo,isOAuthDenied:W,isConnecting:H,showDisconnectModal:Y}}},96666:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(54568),n=a(7620),o=a(41133),s=a(73782),i=a(51164),r=a(54070),d=a(38253),u=a(3291);let c=e=>{let{id:t="inputDropdown",filterOnInput:a=!0,items:c=[],formatType:m="none",value:v,onChangeInput:h,classNames:p,...y}=e,[g,f]=(0,n.useState)(!1),[x,b]=(0,n.useState)(""),[w,S]=(0,n.useState)(v),A=(0,n.useRef)(null),E=(0,n.useRef)(),C=(0,o.W)(()=>f(!1),null,[],[E]),j=(0,n.useCallback)(e=>"minutes"===m?(0,d.formatMinutes)(!isNaN(parseInt(e))?parseInt(e):0).toString():e,[m]),[R,T]=(0,n.useState)(j(v));(0,n.useEffect)(()=>{S(v),T(j(v))},[v,m,j]);let M=(0,n.useMemo)(()=>x&&a?c.filter(e=>{var t,a;if("boolean"==typeof(null==e?void 0:e.value))return(null==e?void 0:e.value)===!!v;let l=String(w);return(null==e||null==(t=e.title)?void 0:t.includes(l))||(null==(a=String(null==e?void 0:e.value))?void 0:a.includes(l))}):c,[x,a,c,w,v]),N=(0,n.useMemo)(()=>!!g&&M.length>0,[g,M]),D=(0,n.useMemo)(()=>{var e;return null!=(e=c.filter(e=>(null==e?void 0:e.value)==v))?e:[]},[c,v]);return(0,l.jsxs)("div",{ref:C,className:p,children:[(0,l.jsx)(s.pd,{id:t,ref:A,showRightIcon:!0,rightIcon:u.c,value:R,onFocus:()=>{T(w),f(!0)},onBlur:e=>{T(j(e.target.value)),h(w)},onChange:e=>{let t=e.target.value;b(t),S(t),T(t),a&&!g&&M.length&&f(!0)},onClickRightIcon:()=>f(!0),...y}),N&&(0,l.jsx)("div",{className:"bk-relative !z-popover",children:(0,l.jsx)(i.G,{ref:E,targetRef:A,alignWidth:!0,direction:"bottom",offset:8,children:(0,l.jsx)(r.r,{id:"".concat(t,"-dropdownMenu"),"data-testid":"".concat(t,"-dropdownMenu"),maxHeight:"s",items:M,selected:D,onItemClick:e=>{h(null==e?void 0:e.value),T(j(null==e?void 0:e.value)),S(null==e?void 0:e.value),f(!1),b("")}})})})]})}}}]);

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.