@gusto/embedded-react-sdk 0.55.2 → 0.55.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +63 -54
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +14 -12
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +75 -66
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -4
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataView.js +18 -17
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.js +6 -6
- package/dist/components/Common/Fieldset/Fieldset.js +6 -6
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js +6 -6
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +58 -49
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +14 -10
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +4 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/List.js +11 -8
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +27 -25
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +41 -36
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +9 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +19 -18
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +63 -62
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +69 -65
- package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -4
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +30 -23
- package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +8 -4
- package/dist/components/Company/StateTaxes/shared/RequirementFields.js +13 -12
- package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -1
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.d.ts +29 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.js +24 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.js.map +1 -0
- package/dist/components/Company/StateTaxes/shared/prepareRequirements.test.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +68 -55
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +36 -35
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +116 -116
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +19 -19
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +16 -13
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +4 -0
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +84 -96
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Flow/Flow.js +22 -22
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.js +3 -3
- package/dist/components/InformationRequests/InformationRequests.d.ts +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +68 -53
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +87 -81
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +86 -67
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +4 -0
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +26 -21
- package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +8 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +29 -17
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +21 -18
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +9 -7
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -0
- package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +200 -199
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +3 -2
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +32 -32
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +254 -243
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +83 -76
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +108 -97
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +38 -37
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +8 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +196 -174
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +173 -163
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +0 -15
- package/dist/components/Payroll/helpers.js +13 -18
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/helpers/openPdfInNewTab.d.ts +15 -0
- package/dist/helpers/openPdfInNewTab.js +28 -0
- package/dist/helpers/openPdfInNewTab.js.map +1 -0
- package/dist/i18n/en/Company.DocumentList.json.js +34 -32
- package/dist/i18n/en/Company.DocumentList.json.js.map +1 -1
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Employee.DocumentSigner.json.js +24 -22
- package/dist/i18n/en/Employee.DocumentSigner.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +11 -9
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -27
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +41 -39
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/types.d.ts +331 -1
- package/dist/style.css +1 -1
- package/package.json +21 -21
package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleTaxWithholdingTable.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './OffCycleTaxWithholdingTable.module.scss'\nimport {\n WITHHOLDING_PAY_PERIOD_I18N_KEY,\n type OffCycleTaxWithholdingTableProps,\n type WageTypeCategory,\n} from './OffCycleTaxWithholdingTableTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport type { TableData, TableRow } from '@/components/Common/UI/Table/TableTypes'\n\n/** @internal */\nexport function OffCycleTaxWithholdingTable({\n wageTypeGroups,\n config,\n onEditClick,\n}: OffCycleTaxWithholdingTableProps) {\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Table, Button, Heading, Text } = useComponentContext()\n\n const frequencyText = t(\n WITHHOLDING_PAY_PERIOD_I18N_KEY[config.withholdingPayPeriod],\n ).toLowerCase()\n\n const taxedAsByCategory: Record<WageTypeCategory, string> = {\n regular: t('table.taxedAsRegular', { frequency: frequencyText }),\n supplemental:\n config.withholdingRate === 'supplemental'\n ? t('table.taxedAsSupplemental')\n : t('table.taxedAsRegular', { frequency: frequencyText }),\n reimbursement: t('table.taxedAsNotTaxed'),\n }\n\n const headers: TableData[] = [\n { key: 'wage-types', content: t('table.headers.wageTypes') },\n { key: 'taxed-as', content: t('table.headers.taxedAs') },\n ]\n\n const rows: TableRow[] = wageTypeGroups.map(group => ({\n key: group.category,\n data: [\n {\n key: `${group.category}-type`,\n content: (\n <div className={styles.wageTypeCell}>\n <Text weight=\"semibold\">{group.label}</Text>\n {group.description && <Text variant=\"supporting\">{group.description}</Text>}\n </div>\n ),\n },\n {\n key: `${group.category}-taxed-as`,\n content: taxedAsByCategory[group.category],\n },\n ],\n }))\n\n return (\n <div className={styles.root}>\n <div className={styles.header}>\n <div className={styles.headerContent}>\n <Heading as=\"h3\">{t('title')}</Heading>\n <Text variant=\"supporting\">{t('description')}</Text>\n </div>\n <Button variant=\"secondary\" onClick={onEditClick}>\n {t('editButton')}\n </Button>\n </div>\n <Table aria-label={t('title')} headers={headers} rows={rows} className={styles.table} />\n </div>\n )\n}\n"],"names":["OffCycleTaxWithholdingTable","wageTypeGroups","config","onEditClick","useI18n","t","useTranslation","Table","Button","Heading","Text","useComponentContext","frequencyText","WITHHOLDING_PAY_PERIOD_I18N_KEY","taxedAsByCategory","headers","rows","group","jsxs","styles","jsx"],"mappings":";;;;;;AAYO,SAASA,EAA4B;AAAA,EAC1C,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,GAAqC;AACnC,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA,GAEnCC,IAAgBP;AAAA,IACpBQ,EAAgCX,EAAO,oBAAoB;AAAA,EAAA,EAC3D,YAAA,GAEIY,IAAsD;AAAA,IAC1D,SAAST,EAAE,wBAAwB,EAAE,WAAWO,GAAe;AAAA,IAC/D,cACEV,EAAO,oBAAoB,iBACvBG,EAAE,2BAA2B,IAC7BA,EAAE,wBAAwB,EAAE,WAAWO,EAAA,CAAe;AAAA,IAC5D,eAAeP,EAAE,uBAAuB;AAAA,EAAA,GAGpCU,IAAuB;AAAA,IAC3B,EAAE,KAAK,cAAc,SAASV,EAAE,yBAAyB,EAAA;AAAA,IACzD,EAAE,KAAK,YAAY,SAASA,EAAE,uBAAuB,EAAA;AAAA,EAAE,GAGnDW,IAAmBf,EAAe,IAAI,CAAAgB,OAAU;AAAA,IACpD,KAAKA,EAAM;AAAA,IACX,MAAM;AAAA,MACJ;AAAA,QACE,KAAK,GAAGA,EAAM,QAAQ;AAAA,QACtB,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAA;AAAA,UAAA,gBAAAC,EAACV,GAAA,EAAK,QAAO,YAAY,UAAAO,EAAM,OAAM;AAAA,UACpCA,EAAM,eAAe,gBAAAG,EAACV,KAAK,SAAQ,cAAc,YAAM,YAAA,CAAY;AAAA,QAAA,EAAA,CACtE;AAAA,MAAA;AAAA,MAGJ;AAAA,QACE,KAAK,GAAGO,EAAM,QAAQ;AAAA,QACtB,
|
|
1
|
+
{"version":3,"file":"OffCycleTaxWithholdingTable.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './OffCycleTaxWithholdingTable.module.scss'\nimport {\n WITHHOLDING_PAY_PERIOD_I18N_KEY,\n type OffCycleTaxWithholdingTableProps,\n type WageTypeCategory,\n} from './OffCycleTaxWithholdingTableTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport type { TableData, TableRow } from '@/components/Common/UI/Table/TableTypes'\n\n/** @internal */\nexport function OffCycleTaxWithholdingTable({\n wageTypeGroups,\n config,\n onEditClick,\n}: OffCycleTaxWithholdingTableProps) {\n useI18n('Payroll.OffCycleTaxWithholding')\n const { t } = useTranslation('Payroll.OffCycleTaxWithholding')\n const { Table, Button, Heading, Text } = useComponentContext()\n\n const frequencyText = t(\n WITHHOLDING_PAY_PERIOD_I18N_KEY[config.withholdingPayPeriod],\n ).toLowerCase()\n\n const taxedAsByCategory: Record<WageTypeCategory, string> = {\n regular: t('table.taxedAsRegular', { frequency: frequencyText }),\n supplemental:\n config.withholdingRate === 'supplemental'\n ? t('table.taxedAsSupplemental')\n : t('table.taxedAsRegular', { frequency: frequencyText }),\n reimbursement: t('table.taxedAsNotTaxed'),\n }\n\n const headers: TableData[] = [\n { key: 'wage-types', content: t('table.headers.wageTypes') },\n { key: 'taxed-as', content: t('table.headers.taxedAs') },\n ]\n\n const rows: TableRow[] = wageTypeGroups.map(group => ({\n key: group.category,\n data: [\n {\n key: `${group.category}-type`,\n content: (\n <div className={styles.wageTypeCell}>\n <Text weight=\"semibold\">{group.label}</Text>\n {group.description && <Text variant=\"supporting\">{group.description}</Text>}\n </div>\n ),\n },\n {\n key: `${group.category}-taxed-as`,\n content: (\n <div className={styles.taxedAsCell}>\n <Text>{taxedAsByCategory[group.category]}</Text>\n {group.taxedAsDescription && (\n <Text variant=\"supporting\">{group.taxedAsDescription}</Text>\n )}\n </div>\n ),\n },\n ],\n }))\n\n return (\n <div className={styles.root}>\n <div className={styles.header}>\n <div className={styles.headerContent}>\n <Heading as=\"h3\">{t('title')}</Heading>\n <Text variant=\"supporting\">{t('description')}</Text>\n </div>\n <Button variant=\"secondary\" onClick={onEditClick}>\n {t('editButton')}\n </Button>\n </div>\n <Table aria-label={t('title')} headers={headers} rows={rows} className={styles.table} />\n </div>\n )\n}\n"],"names":["OffCycleTaxWithholdingTable","wageTypeGroups","config","onEditClick","useI18n","t","useTranslation","Table","Button","Heading","Text","useComponentContext","frequencyText","WITHHOLDING_PAY_PERIOD_I18N_KEY","taxedAsByCategory","headers","rows","group","jsxs","styles","jsx"],"mappings":";;;;;;AAYO,SAASA,EAA4B;AAAA,EAC1C,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,GAAqC;AACnC,EAAAC,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,EAAA,IAASC,EAAA,GAEnCC,IAAgBP;AAAA,IACpBQ,EAAgCX,EAAO,oBAAoB;AAAA,EAAA,EAC3D,YAAA,GAEIY,IAAsD;AAAA,IAC1D,SAAST,EAAE,wBAAwB,EAAE,WAAWO,GAAe;AAAA,IAC/D,cACEV,EAAO,oBAAoB,iBACvBG,EAAE,2BAA2B,IAC7BA,EAAE,wBAAwB,EAAE,WAAWO,EAAA,CAAe;AAAA,IAC5D,eAAeP,EAAE,uBAAuB;AAAA,EAAA,GAGpCU,IAAuB;AAAA,IAC3B,EAAE,KAAK,cAAc,SAASV,EAAE,yBAAyB,EAAA;AAAA,IACzD,EAAE,KAAK,YAAY,SAASA,EAAE,uBAAuB,EAAA;AAAA,EAAE,GAGnDW,IAAmBf,EAAe,IAAI,CAAAgB,OAAU;AAAA,IACpD,KAAKA,EAAM;AAAA,IACX,MAAM;AAAA,MACJ;AAAA,QACE,KAAK,GAAGA,EAAM,QAAQ;AAAA,QACtB,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAA;AAAA,UAAA,gBAAAC,EAACV,GAAA,EAAK,QAAO,YAAY,UAAAO,EAAM,OAAM;AAAA,UACpCA,EAAM,eAAe,gBAAAG,EAACV,KAAK,SAAQ,cAAc,YAAM,YAAA,CAAY;AAAA,QAAA,EAAA,CACtE;AAAA,MAAA;AAAA,MAGJ;AAAA,QACE,KAAK,GAAGO,EAAM,QAAQ;AAAA,QACtB,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,aACrB,UAAA;AAAA,UAAA,gBAAAC,EAACV,GAAA,EAAM,UAAAI,EAAkBG,EAAM,QAAQ,GAAE;AAAA,UACxCA,EAAM,sBACL,gBAAAG,EAACV,KAAK,SAAQ,cAAc,YAAM,mBAAA,CAAmB;AAAA,QAAA,EAAA,CAEzD;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF,EACA;AAEF,SACE,gBAAAQ,EAAC,OAAA,EAAI,WAAWC,EAAO,MACrB,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAO,QACrB,UAAA;AAAA,MAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAO,eACrB,UAAA;AAAA,QAAA,gBAAAC,EAACX,GAAA,EAAQ,IAAG,MAAM,UAAAJ,EAAE,OAAO,GAAE;AAAA,0BAC5BK,GAAA,EAAK,SAAQ,cAAc,UAAAL,EAAE,aAAa,EAAA,CAAE;AAAA,MAAA,GAC/C;AAAA,MACA,gBAAAe,EAACZ,KAAO,SAAQ,aAAY,SAASL,GAClC,UAAAE,EAAE,YAAY,EAAA,CACjB;AAAA,IAAA,GACF;AAAA,IACA,gBAAAe,EAACb,GAAA,EAAM,cAAYF,EAAE,OAAO,GAAG,SAAAU,GAAkB,MAAAC,GAAY,WAAWG,EAAO,MAAA,CAAO;AAAA,EAAA,GACxF;AAEJ;"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_root_xmpo5_1", t = "_header_xmpo5_7", o = "_headerContent_xmpo5_14", _ = "_wageTypeCell_xmpo5_20", a = "_taxedAsCell_xmpo5_21", l = "_table_xmpo5_27", n = {
|
|
2
2
|
root: e,
|
|
3
|
-
header:
|
|
4
|
-
headerContent:
|
|
3
|
+
header: t,
|
|
4
|
+
headerContent: o,
|
|
5
5
|
wageTypeCell: _,
|
|
6
|
-
|
|
6
|
+
taxedAsCell: a,
|
|
7
|
+
table: l
|
|
7
8
|
};
|
|
8
9
|
export {
|
|
9
10
|
n as default,
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
t as header,
|
|
12
|
+
o as headerContent,
|
|
12
13
|
e as root,
|
|
13
|
-
|
|
14
|
+
l as table,
|
|
15
|
+
a as taxedAsCell,
|
|
14
16
|
_ as wageTypeCell
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=OffCycleTaxWithholdingTable.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleTaxWithholdingTable.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCycleTaxWithholdingTable.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export interface WageTypeGroup {
|
|
|
22
22
|
label: string;
|
|
23
23
|
/** Optional supporting text shown beneath the label. */
|
|
24
24
|
description?: string;
|
|
25
|
+
/** Optional supporting text shown beneath the derived "taxed as" value, explaining how this wage type category is taxed. */
|
|
26
|
+
taxedAsDescription?: string;
|
|
25
27
|
}
|
|
26
28
|
/** @internal */
|
|
27
29
|
export interface OffCycleTaxWithholdingConfig {
|
package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCycleTaxWithholdingTableTypes.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.ts"],"sourcesContent":["import { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport type { WithholdingType } from '@/components/Payroll/OffCycleReasonSelection'\n\n/** @internal */\nexport const WITHHOLDING_PAY_PERIOD_I18N_KEY = {\n [WithholdingPayPeriod.EveryWeek]: 'payPeriodFrequency.everyWeek',\n [WithholdingPayPeriod.EveryOtherWeek]: 'payPeriodFrequency.everyOtherWeek',\n [WithholdingPayPeriod.TwicePerMonth]: 'payPeriodFrequency.twicePerMonth',\n [WithholdingPayPeriod.Monthly]: 'payPeriodFrequency.monthly',\n [WithholdingPayPeriod.Quarterly]: 'payPeriodFrequency.quarterly',\n [WithholdingPayPeriod.Semiannually]: 'payPeriodFrequency.semiannually',\n [WithholdingPayPeriod.Annually]: 'payPeriodFrequency.annually',\n} as const\n\n/** @internal */\nexport const WAGE_TYPE_CATEGORIES = ['regular', 'supplemental', 'reimbursement'] as const\n/** @internal */\nexport type WageTypeCategory = (typeof WAGE_TYPE_CATEGORIES)[number]\n\n/** @internal */\nexport interface WageTypeGroup {\n /** Wage type grouping this row represents. */\n category: WageTypeCategory\n /** Display label for the wage type group. */\n label: string\n /** Optional supporting text shown beneath the label. */\n description?: string\n}\n\n/** @internal */\nexport interface OffCycleTaxWithholdingConfig {\n /** Pay period frequency used to compute regular withholding. */\n withholdingPayPeriod: WithholdingPayPeriod\n /** Whether supplemental wages are taxed at the regular or supplemental rate. */\n withholdingRate: WithholdingType\n}\n\n/** @internal */\nexport interface OffCycleTaxWithholdingTableProps {\n /** Wage type groups to render as rows in the table. */\n wageTypeGroups: WageTypeGroup[]\n /** Withholding configuration that determines how each row is taxed. */\n config: OffCycleTaxWithholdingConfig\n /** Invoked when the user clicks the edit button in the table header. */\n onEditClick: () => void\n}\n"],"names":["WITHHOLDING_PAY_PERIOD_I18N_KEY","WithholdingPayPeriod","WAGE_TYPE_CATEGORIES"],"mappings":";AAIO,MAAMA,IAAkC;AAAA,EAC7C,CAACC,EAAqB,SAAS,GAAG;AAAA,EAClC,CAACA,EAAqB,cAAc,GAAG;AAAA,EACvC,CAACA,EAAqB,aAAa,GAAG;AAAA,EACtC,CAACA,EAAqB,OAAO,GAAG;AAAA,EAChC,CAACA,EAAqB,SAAS,GAAG;AAAA,EAClC,CAACA,EAAqB,YAAY,GAAG;AAAA,EACrC,CAACA,EAAqB,QAAQ,GAAG;AACnC,GAGaC,IAAuB,CAAC,WAAW,gBAAgB,eAAe;"}
|
|
1
|
+
{"version":3,"file":"OffCycleTaxWithholdingTableTypes.js","sources":["../../../../src/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.ts"],"sourcesContent":["import { WithholdingPayPeriod } from '@gusto/embedded-api/models/operations/postv1companiescompanyidpayrolls'\nimport type { WithholdingType } from '@/components/Payroll/OffCycleReasonSelection'\n\n/** @internal */\nexport const WITHHOLDING_PAY_PERIOD_I18N_KEY = {\n [WithholdingPayPeriod.EveryWeek]: 'payPeriodFrequency.everyWeek',\n [WithholdingPayPeriod.EveryOtherWeek]: 'payPeriodFrequency.everyOtherWeek',\n [WithholdingPayPeriod.TwicePerMonth]: 'payPeriodFrequency.twicePerMonth',\n [WithholdingPayPeriod.Monthly]: 'payPeriodFrequency.monthly',\n [WithholdingPayPeriod.Quarterly]: 'payPeriodFrequency.quarterly',\n [WithholdingPayPeriod.Semiannually]: 'payPeriodFrequency.semiannually',\n [WithholdingPayPeriod.Annually]: 'payPeriodFrequency.annually',\n} as const\n\n/** @internal */\nexport const WAGE_TYPE_CATEGORIES = ['regular', 'supplemental', 'reimbursement'] as const\n/** @internal */\nexport type WageTypeCategory = (typeof WAGE_TYPE_CATEGORIES)[number]\n\n/** @internal */\nexport interface WageTypeGroup {\n /** Wage type grouping this row represents. */\n category: WageTypeCategory\n /** Display label for the wage type group. */\n label: string\n /** Optional supporting text shown beneath the label. */\n description?: string\n /** Optional supporting text shown beneath the derived \"taxed as\" value, explaining how this wage type category is taxed. */\n taxedAsDescription?: string\n}\n\n/** @internal */\nexport interface OffCycleTaxWithholdingConfig {\n /** Pay period frequency used to compute regular withholding. */\n withholdingPayPeriod: WithholdingPayPeriod\n /** Whether supplemental wages are taxed at the regular or supplemental rate. */\n withholdingRate: WithholdingType\n}\n\n/** @internal */\nexport interface OffCycleTaxWithholdingTableProps {\n /** Wage type groups to render as rows in the table. */\n wageTypeGroups: WageTypeGroup[]\n /** Withholding configuration that determines how each row is taxed. */\n config: OffCycleTaxWithholdingConfig\n /** Invoked when the user clicks the edit button in the table header. */\n onEditClick: () => void\n}\n"],"names":["WITHHOLDING_PAY_PERIOD_I18N_KEY","WithholdingPayPeriod","WAGE_TYPE_CATEGORIES"],"mappings":";AAIO,MAAMA,IAAkC;AAAA,EAC7C,CAACC,EAAqB,SAAS,GAAG;AAAA,EAClC,CAACA,EAAqB,cAAc,GAAG;AAAA,EACvC,CAACA,EAAqB,aAAa,GAAG;AAAA,EACtC,CAACA,EAAqB,OAAO,GAAG;AAAA,EAChC,CAACA,EAAqB,SAAS,GAAG;AAAA,EAClC,CAACA,EAAqB,YAAY,GAAG;AAAA,EACrC,CAACA,EAAqB,QAAQ,GAAG;AACnC,GAGaC,IAAuB,CAAC,WAAW,gBAAgB,eAAe;"}
|
|
@@ -1,197 +1,198 @@
|
|
|
1
|
-
import { jsx as C, jsxs as
|
|
2
|
-
import { useState as f, useRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { PayrollConfigurationPresentation as De } from "./PayrollConfigurationPresentation.js";
|
|
16
|
-
import { usePayrollConfigurationData as Oe } from "./usePayrollConfigurationData.js";
|
|
1
|
+
import { jsx as C, jsxs as Pe, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as D, useMemo as q, useEffect as O } from "react";
|
|
3
|
+
import { usePayrollsGetSuspense as ge } from "@gusto/embedded-api/react-query/payrollsGet";
|
|
4
|
+
import { payrollsCalculate as he } from "@gusto/embedded-api/funcs/payrollsCalculate";
|
|
5
|
+
import { useGustoEmbeddedContext as Le } from "@gusto/embedded-api/react-query/_context";
|
|
6
|
+
import { PayrollProcessingRequestStatus as E } from "@gusto/embedded-api/models/components/payrollprocessingrequest";
|
|
7
|
+
import { useTranslation as Se } from "react-i18next";
|
|
8
|
+
import { usePayrollsUpdateMutation as we } from "@gusto/embedded-api/react-query/payrollsUpdate";
|
|
9
|
+
import { usePayrollsCalculateGrossUpMutation as Re } from "@gusto/embedded-api/react-query/payrollsCalculateGrossUp";
|
|
10
|
+
import { usePayrollsGetBlockersSuspense as Ae } from "@gusto/embedded-api/react-query/payrollsGetBlockers";
|
|
11
|
+
import { payrollSubmitHandler as _e } from "../PayrollBlocker/payrollHelpers.js";
|
|
12
|
+
import { PayrollOverview as De } from "../PayrollOverview/PayrollOverview.js";
|
|
13
|
+
import { PayrollConfigurationPresentation as Oe } from "./PayrollConfigurationPresentation.js";
|
|
14
|
+
import { usePayrollConfigurationData as Ee } from "./usePayrollConfigurationData.js";
|
|
17
15
|
import { isGrossUpEligible as Te, getGrossUpTargetCompensationName as xe } from "./grossUpHelpers.js";
|
|
18
16
|
import { BaseComponent as be } from "../../Base/Base.js";
|
|
19
17
|
import { componentEvents as l } from "../../../shared/constants.js";
|
|
20
|
-
import { useComponentDictionary as ke, useI18n as
|
|
21
|
-
import { useBase as
|
|
18
|
+
import { useComponentDictionary as ke, useI18n as Ge } from "../../../i18n/I18n.js";
|
|
19
|
+
import { useBase as Ne } from "../../Base/useBase.js";
|
|
22
20
|
import { useDateFormatter as Ye } from "../../../hooks/useDateFormatter.js";
|
|
23
|
-
import { SDKInternalError as
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return /* @__PURE__ */ C(be, { ...t, children: /* @__PURE__ */ C(je, { ...t, children: t.children }) });
|
|
21
|
+
import { SDKInternalError as W } from "../../../types/sdkError.js";
|
|
22
|
+
import { GrossUpModal as Me } from "../GrossUpModal/GrossUpModal.js";
|
|
23
|
+
const v = (o) => o?.status === E.Calculating, Be = (o, n) => n != null && (o?.status === E.CalculateSuccess || o == null);
|
|
24
|
+
function ut(o) {
|
|
25
|
+
return /* @__PURE__ */ C(be, { ...o, children: /* @__PURE__ */ C(Fe, { ...o, children: o.children }) });
|
|
29
26
|
}
|
|
30
|
-
const
|
|
31
|
-
onEvent:
|
|
32
|
-
companyId:
|
|
27
|
+
const Fe = ({
|
|
28
|
+
onEvent: o,
|
|
29
|
+
companyId: n,
|
|
33
30
|
payrollId: i,
|
|
34
|
-
dictionary:
|
|
35
|
-
alerts:
|
|
31
|
+
dictionary: K,
|
|
32
|
+
alerts: H,
|
|
36
33
|
withReimbursements: T = !0
|
|
37
34
|
}) => {
|
|
38
|
-
ke("Payroll.PayrollConfiguration",
|
|
39
|
-
const { t:
|
|
35
|
+
ke("Payroll.PayrollConfiguration", K), Ge("Payroll.PayrollConfiguration");
|
|
36
|
+
const { t: c } = Se("Payroll.PayrollConfiguration"), { baseSubmitHandler: P } = Ne(), m = Ye(), [u, d] = f(!1), [x, b] = f(!1), g = D(null), p = D(!1), V = Le(), { data: a } = ge(
|
|
40
37
|
{
|
|
41
|
-
companyId:
|
|
38
|
+
companyId: n,
|
|
42
39
|
payrollId: i,
|
|
43
40
|
include: ["taxes", "benefits", "deductions", "payroll_status_meta"]
|
|
44
41
|
},
|
|
45
|
-
{ refetchInterval:
|
|
46
|
-
),
|
|
47
|
-
() =>
|
|
48
|
-
[
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
{ refetchInterval: u ? 5e3 : !1 }
|
|
43
|
+
), I = q(
|
|
44
|
+
() => a.payrollShow?.employeeCompensations?.filter((e) => e.excluded).map((e) => e.employeeUuid).filter(Boolean) ?? [],
|
|
45
|
+
[a.payrollShow?.employeeCompensations]
|
|
46
|
+
);
|
|
47
|
+
v(a.payrollShow?.processingRequest) && (p.current = !0);
|
|
48
|
+
const k = x || u || p.current, {
|
|
49
|
+
employeeDetails: J,
|
|
50
|
+
employeeCompensations: G,
|
|
51
|
+
paySchedule: z,
|
|
52
|
+
payPeriod: Q,
|
|
53
|
+
payrollCategory: h,
|
|
54
|
+
pagination: X,
|
|
55
|
+
isLoading: Z,
|
|
56
|
+
isAlreadyProcessed: L,
|
|
57
|
+
refetch: S
|
|
58
|
+
} = Ee({
|
|
59
|
+
companyId: n,
|
|
61
60
|
payrollId: i,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
// Don't prepare while calculating, or once we've seen it calculate. If the payroll was already
|
|
62
|
+
// calculated when we opened (e.g. clicking Edit), we do prepare so it can be edited.
|
|
63
|
+
disablePrepare: u || x || p.current,
|
|
64
|
+
excludedEmployeeUuids: I
|
|
65
|
+
}), w = q(
|
|
65
66
|
() => ({
|
|
66
67
|
type: "error",
|
|
67
|
-
title:
|
|
68
|
+
title: c("alerts.alreadyProcessed"),
|
|
68
69
|
alertKey: "alreadyProcessed"
|
|
69
70
|
}),
|
|
70
|
-
[
|
|
71
|
-
),
|
|
72
|
-
|
|
73
|
-
if (!
|
|
74
|
-
|
|
71
|
+
[c]
|
|
72
|
+
), R = D(!1);
|
|
73
|
+
O(() => {
|
|
74
|
+
if (!L) {
|
|
75
|
+
R.current = !1;
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
R.current || (R.current = !0, o(l.RUN_PAYROLL_ALREADY_PROCESSED, {
|
|
78
79
|
payrollId: i,
|
|
79
|
-
alert:
|
|
80
|
-
payPeriod:
|
|
80
|
+
alert: w,
|
|
81
|
+
payPeriod: a.payrollShow?.payPeriod
|
|
81
82
|
}));
|
|
82
83
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
L,
|
|
85
|
+
o,
|
|
85
86
|
i,
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
w,
|
|
88
|
+
a.payrollShow?.payPeriod
|
|
88
89
|
]);
|
|
89
|
-
const { mutateAsync:
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
if (!
|
|
93
|
-
let
|
|
90
|
+
const { mutateAsync: N, isPending: $ } = we(), { mutateAsync: ee } = Re(), [y, Y] = f(null), [te, A] = f(!1), M = Te(h), U = xe(h), oe = (e) => {
|
|
91
|
+
Y(e), A(!0), o(l.RUN_PAYROLL_GROSS_UP_SELECTED, { employeeUuid: e });
|
|
92
|
+
}, ae = async (e) => {
|
|
93
|
+
if (!y) return null;
|
|
94
|
+
let t = null;
|
|
94
95
|
return await P(null, async () => {
|
|
95
|
-
|
|
96
|
+
t = (await ee({
|
|
96
97
|
request: {
|
|
97
98
|
payrollUuid: i,
|
|
98
99
|
payrollGrossUpRequest: {
|
|
99
|
-
employeeUuid:
|
|
100
|
+
employeeUuid: y,
|
|
100
101
|
netPay: e.toString()
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
})).payrollGrossUpResponse?.grossUp ?? null,
|
|
104
|
-
grossUp:
|
|
104
|
+
})).payrollGrossUpResponse?.grossUp ?? null, t && o(l.RUN_PAYROLL_GROSS_UP_CALCULATED, {
|
|
105
|
+
grossUp: t,
|
|
105
106
|
netPay: e,
|
|
106
|
-
employeeUuid:
|
|
107
|
+
employeeUuid: y
|
|
107
108
|
});
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
110
|
-
if (!
|
|
111
|
-
throw new
|
|
109
|
+
}), t;
|
|
110
|
+
}, se = async (e) => {
|
|
111
|
+
if (!y || !U)
|
|
112
|
+
throw new W(
|
|
112
113
|
"Unable to apply gross-up: missing employee or target compensation."
|
|
113
114
|
);
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
116
|
-
throw new
|
|
117
|
-
const r =
|
|
118
|
-
(
|
|
119
|
-
),
|
|
120
|
-
name:
|
|
121
|
-
jobUuid:
|
|
122
|
-
amount:
|
|
115
|
+
const t = G.find((s) => s.employeeUuid === y);
|
|
116
|
+
if (!t)
|
|
117
|
+
throw new W("Unable to apply gross-up: employee compensation not found.");
|
|
118
|
+
const r = t.fixedCompensations ?? [], de = r.some(
|
|
119
|
+
(s) => s.name?.toLowerCase() === U.toLowerCase()
|
|
120
|
+
), j = r.map((s) => ({
|
|
121
|
+
name: s.name,
|
|
122
|
+
jobUuid: s.jobUuid,
|
|
123
|
+
amount: s.name?.toLowerCase() === U.toLowerCase() ? e : "0"
|
|
123
124
|
}));
|
|
124
|
-
if (!
|
|
125
|
-
const
|
|
126
|
-
|
|
125
|
+
if (!de) {
|
|
126
|
+
const s = t.hourlyCompensations?.[0]?.jobUuid ?? r[0]?.jobUuid ?? "";
|
|
127
|
+
j.push({
|
|
127
128
|
name: U,
|
|
128
|
-
jobUuid:
|
|
129
|
+
jobUuid: s,
|
|
129
130
|
amount: e
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
|
-
const
|
|
133
|
-
name:
|
|
134
|
-
jobUuid:
|
|
133
|
+
const ye = (t.hourlyCompensations ?? []).map((s) => ({
|
|
134
|
+
name: s.name,
|
|
135
|
+
jobUuid: s.jobUuid,
|
|
135
136
|
hours: "0"
|
|
136
|
-
})),
|
|
137
|
-
name:
|
|
137
|
+
})), fe = (t.paidTimeOff ?? []).map((s) => ({
|
|
138
|
+
name: s.name,
|
|
138
139
|
hours: "0"
|
|
139
|
-
})),
|
|
140
|
-
...
|
|
141
|
-
fixedCompensations:
|
|
142
|
-
hourlyCompensations:
|
|
143
|
-
paidTimeOff:
|
|
140
|
+
})), Ce = F({
|
|
141
|
+
...t,
|
|
142
|
+
fixedCompensations: j,
|
|
143
|
+
hourlyCompensations: ye,
|
|
144
|
+
paidTimeOff: fe
|
|
144
145
|
});
|
|
145
146
|
await P({}, async () => {
|
|
146
|
-
const
|
|
147
|
+
const s = await N({
|
|
147
148
|
request: {
|
|
148
|
-
companyId:
|
|
149
|
+
companyId: n,
|
|
149
150
|
payrollId: i,
|
|
150
151
|
payrollUpdate: {
|
|
151
|
-
employeeCompensations: [{ ...
|
|
152
|
+
employeeCompensations: [{ ...Ce, excluded: !1 }]
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
});
|
|
155
|
-
|
|
156
|
-
payrollPrepared:
|
|
157
|
-
}), await
|
|
158
|
-
}),
|
|
159
|
-
},
|
|
156
|
+
o(l.RUN_PAYROLL_EMPLOYEE_SAVED, {
|
|
157
|
+
payrollPrepared: s.payrollPrepared
|
|
158
|
+
}), await S();
|
|
159
|
+
}), Y(null), A(!1);
|
|
160
|
+
}, re = async (e) => {
|
|
160
161
|
try {
|
|
161
|
-
await
|
|
162
|
+
await se(e);
|
|
162
163
|
} catch {
|
|
163
164
|
}
|
|
164
|
-
}, { data:
|
|
165
|
-
companyUuid:
|
|
166
|
-
}),
|
|
165
|
+
}, { data: le } = Ae({
|
|
166
|
+
companyUuid: n
|
|
167
|
+
}), B = (le.payrollBlockers ?? []).map((e) => ({
|
|
167
168
|
key: e.key,
|
|
168
169
|
message: e.message
|
|
169
|
-
})), [
|
|
170
|
-
|
|
171
|
-
const e = await
|
|
172
|
-
|
|
170
|
+
})), [ie, _] = f(B), ne = async () => {
|
|
171
|
+
_([]), p.current = !0, g.current = a.payrollShow?.calculatedAt?.getTime() ?? null, await P({}, async () => {
|
|
172
|
+
const e = await _e(async () => {
|
|
173
|
+
b(!0);
|
|
173
174
|
try {
|
|
174
|
-
const
|
|
175
|
-
companyId:
|
|
175
|
+
const t = await he(V, {
|
|
176
|
+
companyId: n,
|
|
176
177
|
payrollId: i
|
|
177
178
|
});
|
|
178
|
-
if (!
|
|
179
|
-
throw
|
|
180
|
-
|
|
179
|
+
if (!t.ok)
|
|
180
|
+
throw t.error;
|
|
181
|
+
d(!0);
|
|
181
182
|
} finally {
|
|
182
|
-
|
|
183
|
+
b(!1);
|
|
183
184
|
}
|
|
184
185
|
});
|
|
185
|
-
!e.success && e.blockers.length > 0 &&
|
|
186
|
+
!e.success && e.blockers.length > 0 && _(e.blockers);
|
|
186
187
|
});
|
|
187
|
-
},
|
|
188
|
-
|
|
188
|
+
}, ue = (e) => {
|
|
189
|
+
o(l.RUN_PAYROLL_EMPLOYEE_EDIT, {
|
|
189
190
|
employeeId: e.uuid,
|
|
190
191
|
firstName: e.firstName,
|
|
191
192
|
lastName: e.lastName
|
|
192
193
|
});
|
|
193
|
-
},
|
|
194
|
-
const { paymentMethod:
|
|
194
|
+
}, F = (e) => {
|
|
195
|
+
const { paymentMethod: t } = e;
|
|
195
196
|
return {
|
|
196
197
|
employeeUuid: e.employeeUuid,
|
|
197
198
|
version: e.version,
|
|
@@ -200,133 +201,133 @@ const je = ({
|
|
|
200
201
|
hourlyCompensations: e.hourlyCompensations,
|
|
201
202
|
paidTimeOff: e.paidTimeOff,
|
|
202
203
|
deductions: e.deductions,
|
|
203
|
-
...
|
|
204
|
+
...t && t !== "Historical" ? { paymentMethod: t } : {},
|
|
204
205
|
memo: e.memo || void 0
|
|
205
206
|
};
|
|
206
|
-
},
|
|
207
|
-
|
|
207
|
+
}, ce = async (e) => {
|
|
208
|
+
o(l.RUN_PAYROLL_EMPLOYEE_SKIP, {
|
|
208
209
|
employeeId: e.employeeUuid
|
|
209
210
|
}), await P({}, async () => {
|
|
210
|
-
const
|
|
211
|
+
const t = F(e), r = await N({
|
|
211
212
|
request: {
|
|
212
|
-
companyId:
|
|
213
|
+
companyId: n,
|
|
213
214
|
payrollId: i,
|
|
214
215
|
payrollUpdate: {
|
|
215
216
|
employeeCompensations: [
|
|
216
|
-
{ ...
|
|
217
|
+
{ ...t, excluded: !t.excluded }
|
|
217
218
|
]
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
221
|
});
|
|
221
|
-
|
|
222
|
+
o(l.RUN_PAYROLL_EMPLOYEE_SAVED, {
|
|
222
223
|
payrollPrepared: r.payrollPrepared
|
|
223
|
-
}), await
|
|
224
|
+
}), await S();
|
|
224
225
|
});
|
|
225
226
|
}, pe = () => {
|
|
226
|
-
|
|
227
|
+
o(l.RUN_PAYROLL_BLOCKERS_VIEW_ALL);
|
|
227
228
|
};
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const e =
|
|
231
|
-
|
|
229
|
+
O(() => {
|
|
230
|
+
v(a.payrollShow?.processingRequest) && !u && (g.current = a.payrollShow?.calculatedAt?.getTime() ?? null, d(!0));
|
|
231
|
+
const e = a.payrollShow?.calculatedAt, t = e?.getTime() !== g.current;
|
|
232
|
+
u && t && Be(a.payrollShow?.processingRequest, e) && (o(l.RUN_PAYROLL_CALCULATED, {
|
|
232
233
|
payrollId: i,
|
|
233
234
|
alert: {
|
|
234
235
|
type: "success",
|
|
235
|
-
title:
|
|
236
|
+
title: c("alerts.progressSaved"),
|
|
236
237
|
alertKey: "progressSaved"
|
|
237
238
|
},
|
|
238
|
-
payPeriod:
|
|
239
|
-
}),
|
|
239
|
+
payPeriod: a.payrollShow?.payPeriod
|
|
240
|
+
}), _([]), d(!1)), u && a.payrollShow?.processingRequest?.status === E.ProcessingFailed && (o(l.RUN_PAYROLL_PROCESSING_FAILED), d(!1), p.current = !1);
|
|
240
241
|
}, [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
a.payrollShow?.processingRequest?.status,
|
|
243
|
+
a.payrollShow?.calculatedAt,
|
|
244
|
+
u,
|
|
245
|
+
o,
|
|
246
|
+
c,
|
|
246
247
|
i
|
|
247
|
-
]),
|
|
248
|
-
if (!
|
|
249
|
-
const e = 180 * 1e3,
|
|
250
|
-
|
|
248
|
+
]), O(() => {
|
|
249
|
+
if (!u) return;
|
|
250
|
+
const e = 180 * 1e3, t = setTimeout(() => {
|
|
251
|
+
o(l.RUN_PAYROLL_PROCESSING_FAILED), d(!1), p.current = !1;
|
|
251
252
|
}, e);
|
|
252
253
|
return () => {
|
|
253
|
-
clearTimeout(
|
|
254
|
+
clearTimeout(t);
|
|
254
255
|
};
|
|
255
|
-
}, [
|
|
256
|
-
const
|
|
257
|
-
const e =
|
|
256
|
+
}, [u, o]);
|
|
257
|
+
const me = (() => {
|
|
258
|
+
const e = a.payrollShow?.payrollStatusMeta;
|
|
258
259
|
if (e?.payrollLate && e.initialCheckDate && e.expectedDebitTime && e.expectedCheckDate)
|
|
259
260
|
return {
|
|
260
|
-
label:
|
|
261
|
-
initialCheckDate:
|
|
261
|
+
label: c("alerts.payrollLate", {
|
|
262
|
+
initialCheckDate: m.formatShortWithWeekday(e.initialCheckDate)
|
|
262
263
|
}),
|
|
263
|
-
content:
|
|
264
|
-
...
|
|
265
|
-
newCheckDate:
|
|
264
|
+
content: c("alerts.payrollLateText", {
|
|
265
|
+
...m.formatWithTime(e.expectedDebitTime),
|
|
266
|
+
newCheckDate: m.formatShortWithWeekday(e.expectedCheckDate)
|
|
266
267
|
}),
|
|
267
268
|
variant: "warning"
|
|
268
269
|
};
|
|
269
|
-
const { payrollShow: r } =
|
|
270
|
-
if (r &&
|
|
270
|
+
const { payrollShow: r } = a;
|
|
271
|
+
if (r?.checkDate && r.payrollDeadline)
|
|
271
272
|
return {
|
|
272
|
-
label:
|
|
273
|
-
payDate:
|
|
274
|
-
...
|
|
273
|
+
label: c("alerts.directDepositDeadline", {
|
|
274
|
+
payDate: m.formatShortWithWeekday(r.checkDate),
|
|
275
|
+
...m.formatWithTime(r.payrollDeadline)
|
|
275
276
|
}),
|
|
276
|
-
content:
|
|
277
|
+
content: c("alerts.directDepositDeadlineText"),
|
|
277
278
|
variant: "info"
|
|
278
279
|
};
|
|
279
280
|
})();
|
|
280
|
-
return
|
|
281
|
-
|
|
281
|
+
return L ? /* @__PURE__ */ C(
|
|
282
|
+
De,
|
|
282
283
|
{
|
|
283
|
-
companyId:
|
|
284
|
+
companyId: n,
|
|
284
285
|
payrollId: i,
|
|
285
|
-
onEvent: (
|
|
286
|
-
|
|
286
|
+
onEvent: (t, r) => {
|
|
287
|
+
t === l.RUN_PAYROLL_CANCELLED && S(), o(t, r);
|
|
287
288
|
},
|
|
288
289
|
withReimbursements: T,
|
|
289
|
-
alerts: [
|
|
290
|
+
alerts: [w]
|
|
290
291
|
}
|
|
291
|
-
) : /* @__PURE__ */
|
|
292
|
+
) : /* @__PURE__ */ Pe(Ue, { children: [
|
|
292
293
|
/* @__PURE__ */ C(
|
|
293
|
-
|
|
294
|
+
Oe,
|
|
294
295
|
{
|
|
295
|
-
onCalculatePayroll:
|
|
296
|
-
isCalculateDisabled:
|
|
297
|
-
onEdit:
|
|
298
|
-
onToggleExclude:
|
|
296
|
+
onCalculatePayroll: ne,
|
|
297
|
+
isCalculateDisabled: B.length > 0,
|
|
298
|
+
onEdit: ue,
|
|
299
|
+
onToggleExclude: ce,
|
|
299
300
|
onViewBlockers: pe,
|
|
300
|
-
employeeCompensations:
|
|
301
|
-
employeeDetails:
|
|
302
|
-
payPeriod:
|
|
303
|
-
paySchedule:
|
|
304
|
-
payrollCategory:
|
|
305
|
-
alerts:
|
|
306
|
-
payrollAlert:
|
|
307
|
-
isPending:
|
|
308
|
-
isCalculating:
|
|
309
|
-
payrollBlockers:
|
|
310
|
-
pagination:
|
|
301
|
+
employeeCompensations: G,
|
|
302
|
+
employeeDetails: J,
|
|
303
|
+
payPeriod: Q,
|
|
304
|
+
paySchedule: z,
|
|
305
|
+
payrollCategory: h,
|
|
306
|
+
alerts: H,
|
|
307
|
+
payrollAlert: me,
|
|
308
|
+
isPending: k || Z || $,
|
|
309
|
+
isCalculating: k,
|
|
310
|
+
payrollBlockers: ie,
|
|
311
|
+
pagination: X,
|
|
311
312
|
withReimbursements: T,
|
|
312
|
-
grossUpEnabled:
|
|
313
|
+
grossUpEnabled: M,
|
|
313
314
|
onGrossUpSelect: oe
|
|
314
315
|
}
|
|
315
316
|
),
|
|
316
|
-
|
|
317
|
-
|
|
317
|
+
M && /* @__PURE__ */ C(
|
|
318
|
+
Me,
|
|
318
319
|
{
|
|
319
|
-
isOpen:
|
|
320
|
-
onCalculateGrossUp:
|
|
321
|
-
onApply:
|
|
320
|
+
isOpen: te,
|
|
321
|
+
onCalculateGrossUp: ae,
|
|
322
|
+
onApply: re,
|
|
322
323
|
onCancel: () => {
|
|
323
|
-
|
|
324
|
+
A(!1);
|
|
324
325
|
}
|
|
325
326
|
}
|
|
326
327
|
)
|
|
327
328
|
] });
|
|
328
329
|
};
|
|
329
330
|
export {
|
|
330
|
-
|
|
331
|
+
ut as PayrollConfiguration
|
|
331
332
|
};
|
|
332
333
|
//# sourceMappingURL=PayrollConfiguration.js.map
|