1import{lY as Ft,u as zt,e as Bt,cZ as Ot,cd as kt,ac as Gt,o as g,c as Nt,br as Yt,bt as qt,k as o,G as xt,D as tt,n as Jt,aY as Rt,T as $t,C as Wt}from"./assets/index-TAEEou5_.js";import{c as Qt}from"./compiler-runtime-DXgPzoQA__cache.js";import{s as vt,u as Ut,a as Ht,S as Kt,A as u,G as Zt}from"./serializeGeneralLedgerFilters-CJyOhDj6__cache.js";import{t as Vt}from"./toDownloadURL-EuoZI8vs__cache.js";import{u as Xt,A as te}from"./AccountIntegrationSetup.routes-CHyMHfoN__cache.js";import{F as ee}from"./FileSaveAsDialog-rm1plF44__cache.js";import{P as oe}from"./PageHeading-CyISXA7A__cache.js";import{P as ie}from"./PageContent-DV8ExMzO__cache.js";import{c as Et}from"./convertToDate-JDe_5jCX__cache.js";import{C as re}from"./ConfirmationDialog-Ckqjuxl9__cache.js";import{u as ne}from"./useAccountingPlatformName-8ISd9JMp__cache.js";import"./GenericSuccessResponse-DDhvWAV3__cache.js";import"./CheckboxInput-DJmX46cb__cache.js";import"./FormControlLabel-Dm-PJTHB__cache.js";import"./Select-OAKOVxeI__cache.js";import"./DateInput-Cpni_467__cache.js";import"./useDesktopPicker-CVPK9DVA__cache.js";import"./index-IVJeqIz0__cache.js";import"./index-Chjiymov__cache.js";import"./PickersLayout-DWPWx232__cache.js";import"./index-DK6Eoh6s__cache.js";import"./InputAdornment-BLicvagw__cache.js";import"./visuallyHidden-Dan1xhjv__cache.js";import"./DateTextFieldWrapper-CttP054E__cache.js";import"./TextField-Bfcav35j__cache.js";import"./ArrowRight1Icon-CR4avEcv__cache.js";import"./Calendar3Icon-DBFqDVqq__cache.js";import"./DesktopDatePicker-D_KAkpxx__cache.js";import"./shared-A-5ZObEf__cache.js";import"./dateViewRenderers-irJ-jy-I__cache.js";import"./TextField-DaKI2RKy__cache.js";import"./FilterSummariesContainer-DPY8-DHo__cache.js";import"./SearchInput-DuWtuQO3__cache.js";import"./Pagination-Cat5LP64__cache.js";import"./Select-CHiDFGiJ__cache.js";import"./CustomFieldDataType-BM80aWpu__cache.js";import"./CustomFieldDefinitionPayload-CAujoKBo__cache.js";import"./CustomFieldDefinitionListItemPayload-DLP0cM2B__cache.js";import"./CustomFieldTranslationPayload-D4V5SMJG__cache.js";import"./CustomTranslationText-DtqOCpFg__cache.js";import"./CustomFieldDefinitionStatus-Dp_8jZOK__cache.js";import"./AccountingCostCenterType-CK6O0cbc__cache.js";import"./PaymentMethod-DMrX5lmB__cache.js";import"./EmployeeGroupStructureIdNamePayload-DrYsdV1x__cache.js";import"./mapResponseArrayDataOnlyGenerator-DC4F1Bb6__cache.js";import"./Departments-CbW51EBz__cache.js";import"./commonPaginationForAllRows-Cxm1f5j4__cache.js";import"./mapResponseArrayGenerator-BqO8H1OT__cache.js";import"./Offices-9F0Iu7in__cache.js";import"./OfficeResponsePayload-CRsfzd1f__cache.js";import"./CustomFields-Bi8oa8rN__cache.js";import"./CustomFieldValuesResponsePayload-BVwnMNe9__cache.js";import"./CompanyBankDetails-CaqyU7kd__cache.js";import"./PayrollCompanyDocumentResponsePayload-BkrWSd_x__cache.js";import"./VatCertificateMetadata-CPAWgFer__cache.js";import"./PayrollCompanyDocumentCategory-6QYeZ7ih__cache.js";import"./HorizontalStepper-DYOGNiDm__cache.js";import"./Check1Icon-BbJcXkK___cache.js";import"./MegaphoneIcon-Bq_R33As__cache.js";import"./useGetAccountingConfigurationsStructureRelation_Query-D8wUbjbx__cache.js";import"./accounting-DMzn3KVf__cache.js";import"./Autocomplete.form-4jMZtlyx__cache.js";import"./Autocomplete-ePCaP7Vv__cache.js";import"./Autocomplete-CSV2yZvB__cache.js";import"./Close-Yrak5WVP__cache.js";import"./useAutocomplete-BOxNfgBx__cache.js";import"./Box-XWGUXYnp__cache.js";import"./SectionAccordion-KWpM8_-S__cache.js";import"./useFormatMessageAsRequired-BliEzCSO__cache.js";import"./AccountIntegration.abilities-DgJfBSeh__cache.js";import"./RadioGroupInput.form-CN-5_oQe__cache.js";import"./RadioGroupInput-B6kJ_Y8s__cache.js";import"./FormGroup-CqUKweqq__cache.js";import"./Select.form-B8fBvLpY__cache.js";import"./TextField.form-s_zY7Jop__cache.js";import"./getCustomFieldTranslation-Dv60wF1v__cache.js";import"./useGetGroupListByStructureId_Query-65zbSBdV__cache.js";
1import"./employeeGroup-DMzn3KVf__cache.js";import"./GroupsWithEmployeesList-CkgkwG1u__cache.js";import"./useListEmployeeGroupStructureGroups_Query-dkQmT8ID__cache.js";import"./CustomDataDialog-ybp8mG89__cache.js";import"./CustomFieldDataType-Da82FLTi__cache.js";import"./useCompanyPreferredLanguage-CCEGxM2a__cache.js";import"./AdvancedModal-8BKYjsGL__cache.js";import"./useLocaleBasedIconRotation-DB0HIlI0__cache.js";import"./Modal-HWKgfAZq__cache.js";import"./ArrowLeftIcon-DubhyZPp__cache.js";import"./NavigationMenuVerticalIcon-CN-ADwPz__cache.js";import"./CheckboxInput.form-B336wSIL__cache.js";import"./StandaloneInput.form-CZqFoYhL__cache.js";import"./final-form-arrays.es-MayWMsWt__cache.js";import"./DeleteListItemButton-ZDt-R251__cache.js";import"./ButtonWithTooltip-DeRdK-Wy__cache.js";import"./ButtonRefreshArrowIcon-C5LOcLry__cache.js";import"./createUseValidatorWithExternalProps-BMLFJ5sl__cache.js";import"./maxLength-CLBHie0G__cache.js";import"./maxLengthGenerator-u6pYHk3T__cache.js";import"./minLength-DLO15EJJ__cache.js";import"./minLengthGenerator-CKN16z_a__cache.js";import"./react-final-form-arrays.es-0PgXVKwK__cache.js";import"./gtGenerator-Bv9bQjhR__cache.js";import"./lteGenerator-C1afLhBM__cache.js";
1import"./SwitchInput.form-pQ5S7OCr__cache.js";import"./SwitchInput-fx-gUAqB__cache.js";import"./Switch-BxZR4GU8__cache.js";import"./AccountIntegrationPlatfromName-BAX7Spj6__cache.js";import"./AssetSelectionIllustration-DAZJkuyQ__cache.js";import"./PaymentMethod-CUW7vfIR__cache.js";import"./ChecklistIllustration-CN5g4II-__cache.js";import"./BottomActionBar-B2jm11xU__cache.js";import"./final-form-calculate.es-NVdM27eo__cache.js";import"./useCustomFields_CustomQuery-CQEOLFL3__cache.js";import"./SetupIllustration-39NZlBsy__cache.js";import"./fetchBlob-D0jNY4Ap__cache.js";import"./CommonFileTextIcon-CymT2OTY__cache.js";import"./Breadcrumbs-HBGNZVk-__cache.js";import"./Breadcrumbs-DSOgWM5K__cache.js";import"./PageBody-CKI5mHlm__cache.js";import"./index-C2i2FgOK__cache.js";import"./AccountingApiType-BNfAEwcN__cache.js";import"./AccountingApiStatus-Bf7sX0zN__cache.js";const ae=({companyId:t,synchronizationId:i},e)=>{const s=Ft(e);return Vt(`/companies/${t}/accounting/synchronizations/${i}/confirmation/report`,{queryParams:s})},r=Jt({transactions:{id:"hr.app.menu.transactions",defaultMessage:"Transactions"},syncDetails:{id:"hr.payroll.account-integration.sync-details.title",defaultMessage:"{month} Sync details"},donwloadSyncReport:{id:"hr.payroll.account-integration.sync-details.donwload-sync-report",defaultMessage:"Download sync report"},retrySync:{id:"hr.payroll.account-integration.sync-details.retry-sync",defaultMessage:"Retry sync"},failed:{id:"hr.payroll.account-integration.sync-details.failed",defaultMessage:"Failed"},success:{id:"hr.payroll.account-integration.sync-details.success",defaultMessage:"Success"},inProgress:{id:"hr.payroll.account-integration.sync-details.in-progress",defaultMessage:"In progress"},pushing:{id:"hr.payroll.account-integration.sync-details.pushing",defaultMessage:"Pushing"},retrySyncSuccess:{id:"hr.payroll.account-integration.sync-details.retry-sync-success",defaultMessage:"Retry sync operation has completed successfully."},confirmDialogTitle:{id:"hr.payroll.account-integration.sync-details.retry-sync-confirmation-dialog.title",defaultMessage:"Retry sync"},confirmDialogWarning:{id:"hr.payroll.account-integration.sync-details.retry-sync-confirmation-dialog.warning",defaultMessage:"You are attempting to retry a journal entry synchronization."},confirmDialogSubtitle:{id:"hr.payroll.account-integration.sync-details.retry-sync-confirmation-dialog.subtitle",defaultMessage:"Please type <strong> CONFIRM </strong> below before removing the connection."},confirmDialogButton:{id:"hr.payroll.account-integration.sync-details.retry-sync-confirmation-dialog.button-label",defaultMessage:"Retry sync"},continueToRetry:{id:"hr.payroll.account-integration.sync-details.continue-to-retry",defaultMessage:"Continue to retry"}}),se={limit:64,offset:0},vi=()=>{const t=Qt.c(107),i=zt(),e=Bt(),s=Ot(),p=Xt(),{handleRequestExceptionAlert:et}=kt(),ot=Gt(),[it,rt]=g.useState(!1),{synchronizationId:Pt}=Nt(),c=Pt===void 0?"":Pt,{isMsDynamicsIntegration:nt}=ne(),l=Yt().state,[at,bt]=g.useState(3e3),[st,At]=g.useState(!1),[lt,F]=g.useState(!1);let z;t[0]===Symbol.for("react.memo_cache_sentinel")?(z={},t[0]=z):z=t[0];const[m,jt]=g.useState(z),[a,wt]=g.useState(se);let B;t[1]!==i||t[2]!==c?(B={companyId:i,synchronizationId:c},t[1]=i,t[2]=c,t[3]=B):B=t[3];let d;t[4]!==m?(d=vt(m),t[4]=m,t[5]=d):d=t[5];let y;t[6]!==a.limit||t[7]!==a.offset?(y={limit:a.limit,offset:a.offset},t[6]=a.limit,t[7]=a.offset,t[8]=y):y=t[8];let O;t[9]!==d||t[10]!==y?(O={filters:d,pagination:y},t[9]=d,t[10]=y,t[11]=O):O=t[11];let k;t[12]!==at?(k={refetchInterval:at},t[12]=at,t[13]=k):k=t[13];const{data:n,isPending:h,refetch:ct,isSuccess:G}=Ut(B,O,k);let N,Y;t[14]!==n||t[15]!==G?(N=()=>{G&&n.generalLedgerEntries.content.every(me)&&bt(0)},Y=[n,G],t[14]=n,t[15]=G,t[16]=N,t[17]=Y):(N=t[16],Y=t[17]),g.useEffect(N,Y);const{mutateAsync:mt}=Ht();let q;t[18]!==i||t[19]!==et||t[20]!==e||t[21]!==ot||t[22]!==ct||t[23]!==mt||t[24]!==c?(q=async f=>{const It=f===void 0?void 0:f;try{await mt({urlParams:{companyId:i,synchronizationId:c},data:It}),ot.success({message:e.formatMessage(r.retrySyncSuccess)}),rt(!1),ct(),bt(3e3)}catch(_t){et(_t)}},t[18]=i,t[19]=et,t[20]=e,t[21]=ot,t[22]=ct,t[23]=mt,t[24]=c,t[25]=q):q=t[25];const S=q;let J;t[26]!==p?(J=()=>{p({event:"download-sync-report-button-click",action:te.DOWNLOAD_SYNC_REPORT}),At(!0)},t[26]=p,t[27]=J):J=t[27];const pt=J;let $;t[28]===Symbol.for("react.memo_cache_sentinel")?($=()=>{F(!0)},t[28]=$):$=t[28];const Lt=$;let W;t[29]!==S||t[30]!==nt?(W=async()=>{nt?(rt(!0),F(!1)):(await S(),F(!1))},t[29]=S,t[30]=nt,t[31]=W):W=t[31];
1const ft=W;let Q;t[32]!==n?.generalLedgerEntries.content||t[33]!==pt||t[34]!==e?(Q=le(e,pt,Lt,n?.generalLedgerEntries.content.map(pe)),t[32]=n?.generalLedgerEntries.content,t[33]=pt,t[34]=e,t[35]=Q):Q=t[35];const ut=Q,gt=n?.confirmationStatus;let U;t[36]!==e||t[37]!==gt?(U=ce(e,gt),t[36]=e,t[37]=gt,t[38]=U):U=t[38];const dt=U;let H;t[39]!==a?(H=f=>{wt({...a,offset:f*a.limit})},t[39]=a,t[40]=H):H=t[40];const yt=H;let K;t[41]===Symbol.for("react.memo_cache_sentinel")?(K=f=>{wt({offset:0,limit:f})},t[41]=K):K=t[41];const Tt=K,ht=l?.payRunCycleId?`/transactions/${l.payRunCycleId}`:"/transactions";let C;t[42]!==e?(C=e.formatMessage(r.transactions),t[42]=e,t[43]=C):C=t[43];let D;t[44]!==ht||t[45]!==C?(D={to:ht,app:qt.APP_PAYROLL,title:C},t[44]=ht,t[45]=C,t[46]=D):D=t[46];let M;t[47]!==s||t[48]!==e||t[49]!==l?(M=e.formatMessage(r.syncDetails,{month:l?.lastCycleDate?s({date:Et(l.lastCycleDate),dateFormat:"no-day"}):""}),t[47]=s,t[48]=e,t[49]=l,t[50]=M):M=t[50];let x;t[51]!==M?(x={title:M},t[51]=M,t[52]=x):x=t[52];let R;t[53]!==D||t[54]!==x?(R={paths:[D,x]},t[53]=D,t[54]=x,t[55]=R):R=t[55];let P;t[56]!==s||t[57]!==e||t[58]!==l?(P=e.formatMessage(r.syncDetails,{month:l?.lastCycleDate?s({date:Et(l.lastCycleDate),dateFormat:"no-day"}):""}),t[56]=s,t[57]=e,t[58]=l,t[59]=P):P=t[59];let b;t[60]!==P?(b=o.jsx(Rt,{children:o.jsx($t,{variant:"h2",textAlign:"center",mr:1,children:P})}),t[60]=P,t[61]=b):b=t[61];let A;t[62]!==h||t[63]!==dt?(A=h?o.jsx(Wt,{color:"primary"}):dt,t[62]=h,t[63]=dt,t[64]=A):A=t[64];let j;t[65]!==A?(j=o.jsx(Rt,{children:A}),t[65]=A,t[66]=j):j=t[66];let w;t[67]!==b||t[68]!==j?(w=o.jsxs(Rt,{container:!0,spacing:1,children:[b,j]}),t[67]=b,t[68]=j,t[69]=w):w=t[69];let v;t[70]!==ut||t[71]!==R||t[72]!==w?(v=o.jsx(oe,{breadcrumbs:R,title:w,buttons:ut}),t[70]=ut,t[71]=R,t[72]=w,t[73]=v):v=t[73];let E;t[74]!==n?.generalLedgerEntries.content?(E=n?.generalLedgerEntries.content??[],t[74]=n?.generalLedgerEntries.content,t[75]=E):E=t[75];const St=n?.totalCredit??0,Ct=n?.totalDebit??0,Dt=n?.totalsByCurrency;let Z,V;t[76]===Symbol.for("react.memo_cache_sentinel")?(Z=f=>jt(f),V=()=>jt({}),t[76]=Z,t[77]=V):(Z=t[76],V=t[77]);const Mt=n?.totalElements;let L;t[78]!==m||t[79]!==yt||t[80]!==h||t[81]!==a||t[82]!==E||t[83]!==St||t[84]!==Ct||t[85]!==Dt||t[86]!==Mt?(L=o.jsx(Zt,{reportType:"post-sync",generalLedgerEntries:E,totalCredit:St,totalDebit:Ct,totalsByCurrency:Dt,showStatusColumn:!0,filters:m,isTableLoading:h,onFilterSubmit:Z,onClearFilters:V,pagination:a,totalElements:Mt,onChangePage:yt,onRowsPerPageChange:Tt}),t[78]=m,t[79]=yt,t[80]=h,t[81]=a,t[82]=E,t[83]=St,t[84]=Ct,t[85]=Dt,t[86]=Mt,t[87]=L):L=t[87];let T;t[88]!==i||t[89]!==m||t[90]!==st||t[91]!==c?(T=st&&o.jsx(ee,{open:!0,url:ae({companyId:i,synchronizationId:c},{filters:vt(m)}),onClose:()=>At(!1)}),t[88]=i,t[89]=m,t[90]=st,t[91]=c,t[92]=T):T=t[92];let I;t[93]!==ft||t[94]!==e||t[95]!==lt?(I=lt&&o.jsx(re,{confirmationButtonColor:"primary",title:e.formatMessage(r.confirmDialogTitle),warningMessage:e.formatMessage(r.confirmDialogWarning),subtitle:e.formatMessage(r.confirmDialogSubtitle,{strong:fe}),confirmButtonText:e.formatMessage(r.confirmDialogButton),onConfirm:ft,onCancel:()=>F(!1)}),t[93]=ft,t[94]=e,t[95]=lt,t[96]=I):I=t[96];let _;t[97]!==S||t[98]!==e||t[99]!==it?(_=it&&o.jsx(Kt,{confirmButtonText:e.formatMessage(r.continueToRetry),onConfirm:S,onCancel:()=>{rt(!1)}}),t[97]=S,t[98]=e,t[99]=it,t[100]=_):_=t[100];let X;return t[101]!==v||t[102]!==L||t[103]!==T||t[104]!==I||t[105]!==_?(X=o.jsxs(ie,{"data-external-id":"account-integration-setup",header:v,children:[L,T,I,_]}),t[101]=v,t[102]=L,t[103]=T,t[104]=I,t[105]=_,t[106]=X):X=t[106],X},le=(t,i,e,s)=>{if(s)return s.every(p=>p===u.Success)?[o.jsx(xt,{variant:"contained",onClick:i,children:t.formatMessage(r.donwloadSyncReport)},0)]:s.some(p=>p===u.Pending||p===u.Pushing)?void 0:[o.jsx(xt,{variant:"outlined",onClick:i,children:t.formatMessage(r.donwloadSyncReport)},0),o.jsx(xt,{variant:"contained",onClick:e,children:t.formatMessage(r.retrySync)},1)]},ce=(t,i)=>i===u.Success?o.jsx(tt,{label:t.formatMessage(r.success),variant:"success"}):i===u.Failed?o.jsx(tt,{label:t.formatMessage(r.failed),variant:"critical"}):i===u.Pushing?o.jsx(tt,{label:t.formatMessage(r.pushing)}):o.jsx(tt,{label:t.formatMessage(r.inProgress)});function me(t){return t.confirmationStatus===u.Success||t.confirmationStatus===u.Failed}function pe(t){return t.confirmationStatus}function fe(t){return o.jsx("strong",{children:t})}export{vi 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.