@powerhousedao/contributor-billing 0.1.29 → 0.1.30
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/README.md +165 -8
- package/dist/document-models/billing-statement/actions.d.ts +1 -0
- package/dist/document-models/billing-statement/actions.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/document-model.js +58 -47
- package/dist/document-models/billing-statement/gen/document-schema.d.ts +38 -38
- package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/line-items/actions.d.ts +6 -2
- package/dist/document-models/billing-statement/gen/line-items/actions.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/line-items/creators.d.ts +3 -2
- package/dist/document-models/billing-statement/gen/line-items/creators.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/line-items/creators.js +2 -1
- package/dist/document-models/billing-statement/gen/line-items/operations.d.ts +2 -1
- package/dist/document-models/billing-statement/gen/line-items/operations.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/ph-factories.js +1 -1
- package/dist/document-models/billing-statement/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/reducer.js +5 -1
- package/dist/document-models/billing-statement/gen/schema/types.d.ts +3 -0
- package/dist/document-models/billing-statement/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/schema/zod.d.ts +2 -1
- package/dist/document-models/billing-statement/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/schema/zod.js +5 -0
- package/dist/document-models/billing-statement/gen/utils.js +2 -2
- package/dist/document-models/billing-statement/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/general.js +5 -4
- package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.js +7 -2
- package/dist/document-models/billing-statement/src/reducers/tags.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/tags.js +1 -1
- package/dist/document-models/billing-statement/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/billing-statement/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/tests/document-model.test.js +94 -7
- package/dist/document-models/billing-statement/src/tests/general.test.d.ts +2 -1
- package/dist/document-models/billing-statement/src/tests/general.test.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/tests/general.test.js +33 -88
- package/dist/document-models/billing-statement/src/tests/line-items.test.js +22 -125
- package/dist/document-models/billing-statement/src/tests/tags.test.js +13 -47
- package/dist/document-models/document-models.js +2 -2
- package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-model.js +48 -48
- package/dist/document-models/expense-report/gen/document-schema.d.ts +6 -6
- package/dist/document-models/expense-report/gen/utils.js +1 -1
- package/dist/document-models/expense-report/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/expense-report/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/tests/document-model.test.js +94 -8
- package/dist/document-models/expense-report/src/tests/wallet.test.js +145 -10
- package/dist/document-models/index.d.ts +2 -6
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +2 -6
- package/dist/document-models/integrations/gen/document-model.js +33 -33
- package/dist/document-models/integrations/gen/document-schema.d.ts +6 -6
- package/dist/document-models/integrations/gen/utils.js +1 -1
- package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +1 -1
- package/dist/document-models/integrations/src/reducers/integrations.js +9 -32
- package/dist/document-models/integrations/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/integrations/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/integrations/src/tests/document-model.test.js +91 -5
- package/dist/document-models/integrations/src/tests/integrations.test.js +21 -46
- package/dist/document-models/invoice/gen/document-model.js +147 -147
- package/dist/document-models/invoice/gen/document-schema.d.ts +127 -127
- package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/ph-factories.js +16 -122
- package/dist/document-models/invoice/gen/schema/types.d.ts +4 -4
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.js +4 -4
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/utils.js +17 -123
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +34 -10
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/items.js +7 -7
- package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/parties.js +96 -50
- package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/transitions.js +69 -53
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/invoice/src/tests/document-model.test.js +91 -4
- package/dist/document-models/invoice/src/tests/general.test.js +24 -26
- package/dist/document-models/invoice/src/tests/items.test.js +37 -17
- package/dist/document-models/invoice/src/tests/parties.test.js +32 -26
- package/dist/document-models/invoice/src/tests/transitions.test.js +52 -500
- package/dist/document-models/invoice/utils/statusTransitions.d.ts.map +1 -1
- package/dist/document-models/invoice/utils/statusTransitions.js +10 -10
- package/dist/editors/billing-statement/components/lineItemsTable.d.ts.map +1 -1
- package/dist/editors/billing-statement/components/lineItemsTable.js +32 -23
- package/dist/editors/billing-statement/components/objectSetTable.d.ts.map +1 -1
- package/dist/editors/billing-statement/components/objectSetTable.js +1 -2
- package/dist/editors/billing-statement/editor.d.ts +4 -0
- package/dist/editors/billing-statement/editor.d.ts.map +1 -1
- package/dist/editors/billing-statement/editor.js +34 -16
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.js +36 -37
- package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts.map +1 -1
- package/dist/editors/billing-statement/lineItemTags/tagMapping.js +28 -10
- package/dist/editors/clean-new-editor/components/CreateDocument.d.ts +6 -0
- package/dist/editors/clean-new-editor/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/CreateDocument.js +18 -0
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/DriveContents.js +10 -0
- package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts +7 -0
- package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/DriveExplorer.js +16 -0
- package/dist/editors/clean-new-editor/components/EmptyState.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/EmptyState.js +10 -0
- package/dist/editors/clean-new-editor/components/Files.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/Files.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/Files.js +12 -0
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts +6 -0
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/FolderTree.js +65 -0
- package/dist/editors/clean-new-editor/components/Folders.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/Folders.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/Folders.js +12 -0
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.js +6 -0
- package/dist/editors/clean-new-editor/config.d.ts +4 -0
- package/dist/editors/clean-new-editor/config.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/config.js +5 -0
- package/dist/editors/clean-new-editor/editor.d.ts +4 -0
- package/dist/editors/clean-new-editor/editor.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/editor.js +11 -0
- package/dist/editors/clean-new-editor/module.d.ts +3 -0
- package/dist/editors/clean-new-editor/module.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/module.js +10 -0
- package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts +14 -0
- package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/ConfirmationModal.js +6 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts +6 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/CreateDocument.js +18 -0
- package/dist/editors/contributor-billing/components/DriveContents.d.ts +3 -0
- package/dist/editors/contributor-billing/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/DriveContents.js +10 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +3 -3
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +13 -180
- package/dist/editors/contributor-billing/components/EmptyState.d.ts +3 -0
- package/dist/editors/contributor-billing/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/EmptyState.js +10 -0
- package/dist/editors/contributor-billing/components/Files.d.ts +3 -0
- package/dist/editors/contributor-billing/components/Files.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/Files.js +12 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +6 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FolderTree.js +65 -0
- package/dist/editors/contributor-billing/components/Folders.d.ts +3 -0
- package/dist/editors/contributor-billing/components/Folders.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/Folders.js +12 -0
- package/dist/editors/contributor-billing/components/HeaderControls.d.ts +38 -0
- package/dist/editors/contributor-billing/components/HeaderControls.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/HeaderControls.js +124 -0
- package/dist/editors/contributor-billing/components/HeaderStats.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/{InvoiceTable/HeaderStats.js → HeaderStats.js} +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable.d.ts +22 -0
- package/dist/editors/contributor-billing/components/InvoiceTable.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable.js +399 -0
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts +6 -0
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.js +111 -0
- package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts +32 -0
- package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTableRow.js +55 -0
- package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts +13 -0
- package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTableSection.js +16 -0
- package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.d.ts +3 -0
- package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.js +6 -0
- package/dist/editors/contributor-billing/config.d.ts +1 -0
- package/dist/editors/contributor-billing/config.d.ts.map +1 -1
- package/dist/editors/contributor-billing/config.js +4 -1
- package/dist/editors/contributor-billing/editor.d.ts +1 -0
- package/dist/editors/contributor-billing/editor.d.ts.map +1 -1
- package/dist/editors/contributor-billing/editor.js +4 -1
- package/dist/editors/contributor-billing/module.d.ts +1 -1
- package/dist/editors/contributor-billing/module.d.ts.map +1 -1
- package/dist/editors/contributor-billing/module.js +3 -2
- package/dist/editors/contributor-billing/utils/exchangeRate.d.ts +15 -0
- package/dist/editors/contributor-billing/utils/exchangeRate.d.ts.map +1 -0
- package/dist/editors/contributor-billing/utils/exchangeRate.js +122 -0
- package/dist/editors/editors.js +2 -2
- package/dist/editors/expense-report/components/AddBillingStatementModal.d.ts.map +1 -1
- package/dist/editors/expense-report/editor.js +8 -8
- package/dist/editors/index.d.ts +2 -2
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +2 -2
- package/dist/editors/integrations/components/EditName.d.ts +3 -0
- package/dist/editors/integrations/components/EditName.d.ts.map +1 -0
- package/dist/editors/integrations/components/EditName.js +31 -0
- package/dist/editors/integrations/editor.d.ts +2 -4
- package/dist/editors/integrations/editor.d.ts.map +1 -1
- package/dist/editors/integrations/editor.js +5 -132
- package/dist/editors/integrations/module.d.ts +1 -0
- package/dist/editors/integrations/module.d.ts.map +1 -1
- package/dist/editors/integrations/module.js +3 -2
- package/dist/editors/invoice/components/confirmationModal.js +1 -1
- package/dist/editors/invoice/components/countryForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/countryForm.js +1 -1
- package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/currencyForm.js +1 -1
- package/dist/editors/invoice/components/datePicker.d.ts +1 -1
- package/dist/editors/invoice/components/datePicker.d.ts.map +1 -1
- package/dist/editors/invoice/components/datePicker.js +1 -1
- package/dist/editors/invoice/components/inputField.d.ts.map +1 -1
- package/dist/editors/invoice/components/inputField.js +3 -2
- package/dist/editors/invoice/components/lineItemMobileModal.d.ts.map +1 -1
- package/dist/editors/invoice/components/lineItemMobileModal.js +1 -1
- package/dist/editors/invoice/components/numberForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/selectField.js +7 -7
- package/dist/editors/invoice/components/statusModalComponents.d.ts.map +1 -1
- package/dist/editors/invoice/components/statusModalComponents.js +27 -3
- package/dist/editors/invoice/editor.d.ts +1 -4
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +102 -40
- package/dist/editors/invoice/exportUBL.d.ts.map +1 -1
- package/dist/editors/invoice/exportUBL.js +35 -18
- package/dist/editors/invoice/ingestPDF.d.ts.map +1 -1
- package/dist/editors/invoice/ingestPDF.js +15 -9
- package/dist/editors/invoice/invoiceToGnosis.js +3 -3
- package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/walletSection.js +3 -3
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +1 -1
- package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/tagMobileModal.js +4 -3
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/module.d.ts +1 -0
- package/dist/editors/invoice/module.d.ts.map +1 -1
- package/dist/editors/invoice/module.js +2 -1
- package/dist/editors/invoice/requestFinance.js +4 -4
- package/dist/editors/invoice/uploadPdfChunked.d.ts.map +1 -1
- package/dist/editors/invoice/uploadPdfChunked.js +5 -4
- package/dist/editors/invoice/utils/utils.d.ts.map +1 -1
- package/dist/editors/invoice/utils/utils.js +5 -4
- package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationHandler.js +11 -5
- package/dist/editors/invoice/validation/validationManager.d.ts +2 -2
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.js +5 -5
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationRules.js +178 -178
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts +7 -0
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/DriveExplorer.js +184 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts +2 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.js +73 -0
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
- package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableSection.js +1 -1
- package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/RowActionMenu.d.ts +1 -1
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.js +2 -0
- package/dist/old-contributor-billing/config.d.ts +3 -0
- package/dist/old-contributor-billing/config.d.ts.map +1 -0
- package/dist/old-contributor-billing/config.js +4 -0
- package/dist/old-contributor-billing/editor.d.ts +3 -0
- package/dist/old-contributor-billing/editor.d.ts.map +1 -0
- package/dist/old-contributor-billing/editor.js +8 -0
- package/dist/old-contributor-billing/module.d.ts +3 -0
- package/dist/old-contributor-billing/module.d.ts.map +1 -0
- package/dist/old-contributor-billing/module.js +9 -0
- package/dist/old-contributor-billing/util.d.ts.map +1 -0
- package/dist/{editors/contributor-billing → old-contributor-billing}/util.js +11 -9
- package/dist/powerhouse.manifest.json +6 -41
- package/dist/processors/index.d.ts +1 -6
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -18
- package/dist/scripts/contributor-billing/createExpenseReportCsv.d.ts.map +1 -1
- package/dist/scripts/contributor-billing/createExpenseReportCsv.js +24 -24
- package/dist/scripts/contributor-billing/createXeroCsv.d.ts.map +1 -1
- package/dist/scripts/contributor-billing/createXeroCsv.js +52 -46
- package/dist/scripts/invoice/autoTagging.d.ts +1 -1
- package/dist/scripts/invoice/autoTagging.d.ts.map +1 -1
- package/dist/scripts/invoice/autoTagging.js +168 -138
- package/dist/scripts/invoice/exampleBatchTxn.js +16 -16
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -1
- package/dist/scripts/invoice/gnosisTransactionBuilder.js +32 -25
- package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
- package/dist/scripts/invoice/pdfToClaudeAI.js +36 -30
- package/dist/scripts/invoice/requestFinance.d.ts.map +1 -1
- package/dist/scripts/invoice/requestFinance.js +13 -13
- package/dist/style.css +407 -13659
- package/dist/subgraphs/billing-statement/resolvers.d.ts +1 -1
- package/dist/subgraphs/billing-statement/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/billing-statement/resolvers.js +16 -5
- package/dist/subgraphs/billing-statement/schema.d.ts.map +1 -1
- package/dist/subgraphs/billing-statement/schema.js +12 -67
- package/dist/subgraphs/expense-report/resolvers.d.ts +1 -1
- package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/resolvers.js +4 -5
- package/dist/subgraphs/expense-report/schema.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/schema.js +5 -48
- package/dist/subgraphs/index.d.ts +1 -0
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/integrations/resolvers.d.ts +1 -1
- package/dist/subgraphs/integrations/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/integrations/resolvers.js +4 -5
- package/dist/subgraphs/integrations/schema.d.ts.map +1 -1
- package/dist/subgraphs/integrations/schema.js +3 -43
- package/dist/subgraphs/invoice/index.d.ts.map +1 -1
- package/dist/subgraphs/invoice/index.js +1 -20
- package/dist/subgraphs/invoice/resolvers.d.ts +1 -1
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/invoice/resolvers.js +4 -9
- package/dist/subgraphs/invoice/schema.d.ts.map +1 -1
- package/dist/subgraphs/invoice/schema.js +14 -232
- package/dist/subgraphs/{invoice → invoice-addon}/customResolvers.d.ts +1 -1
- package/dist/subgraphs/invoice-addon/customResolvers.d.ts.map +1 -0
- package/dist/subgraphs/{invoice → invoice-addon}/customResolvers.js +38 -34
- package/dist/subgraphs/invoice-addon/index.d.ts +11 -0
- package/dist/subgraphs/invoice-addon/index.d.ts.map +1 -0
- package/dist/subgraphs/invoice-addon/index.js +11 -0
- package/dist/subgraphs/invoice-addon/resolvers.d.ts +3 -0
- package/dist/subgraphs/invoice-addon/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/invoice-addon/resolvers.js +12 -0
- package/dist/subgraphs/invoice-addon/schema.d.ts +3 -0
- package/dist/subgraphs/invoice-addon/schema.d.ts.map +1 -0
- package/dist/subgraphs/invoice-addon/schema.js +52 -0
- package/package.json +9 -20
- package/dist/document-models/expense-report/gen/expense-report/actions.d.ts +0 -8
- package/dist/document-models/expense-report/gen/expense-report/actions.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/actions.js +0 -1
- package/dist/document-models/expense-report/gen/expense-report/creators.d.ts +0 -4
- package/dist/document-models/expense-report/gen/expense-report/creators.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/creators.js +0 -3
- package/dist/document-models/expense-report/gen/expense-report/error.d.ts +0 -2
- package/dist/document-models/expense-report/gen/expense-report/error.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/error.js +0 -1
- package/dist/document-models/expense-report/gen/expense-report/operations.d.ts +0 -7
- package/dist/document-models/expense-report/gen/expense-report/operations.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/operations.js +0 -3
- package/dist/document-models/expense-report/src/tests/expense-report.test.d.ts +0 -6
- package/dist/document-models/expense-report/src/tests/expense-report.test.d.ts.map +0 -1
- package/dist/document-models/expense-report/src/tests/expense-report.test.js +0 -24
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.js +0 -2
- package/dist/editors/contributor-billing/util.d.ts.map +0 -1
- package/dist/editors/hooks/useBillingStatementDocument.d.ts +0 -4
- package/dist/editors/hooks/useBillingStatementDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useBillingStatementDocument.js +0 -8
- package/dist/editors/hooks/useExpenseReportDocument.d.ts +0 -4
- package/dist/editors/hooks/useExpenseReportDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useExpenseReportDocument.js +0 -8
- package/dist/editors/hooks/useIntegrationsDocument.d.ts +0 -4
- package/dist/editors/hooks/useIntegrationsDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useIntegrationsDocument.js +0 -8
- package/dist/editors/hooks/useInvoiceDocument.d.ts +0 -4
- package/dist/editors/hooks/useInvoiceDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useInvoiceDocument.js +0 -8
- package/dist/editors/integrations/config.d.ts +0 -3
- package/dist/editors/integrations/config.d.ts.map +0 -1
- package/dist/editors/integrations/config.js +0 -3
- package/dist/editors/invoice/exportSAFTPT.d.ts +0 -184
- package/dist/editors/invoice/exportSAFTPT.d.ts.map +0 -1
- package/dist/editors/invoice/exportSAFTPT.js +0 -548
- package/dist/processors/line-item-processor/index.d.ts +0 -11
- package/dist/processors/line-item-processor/index.d.ts.map +0 -1
- package/dist/processors/line-item-processor/index.js +0 -36
- package/dist/subgraphs/invoice/customResolvers.d.ts.map +0 -1
- package/editors/invoice/assets/custom.d.ts +0 -4
- package/editors/invoice/assets/powerhouseLogo.png +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTable/HeaderStats.d.ts → HeaderStats.d.ts} +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/HeaderControls.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/HeaderControls.js +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTable.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTable.js +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableRow.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableRow.js +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableSection.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/util.d.ts +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export default function Editor(
|
|
3
|
-
documentId?: string;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
/** Implement your editor behavior here */
|
|
2
|
+
export default function Editor(): import("react/jsx-runtime").JSX.Element;
|
|
5
3
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/integrations/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/integrations/editor.tsx"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,CAAC,OAAO,UAAU,MAAM,4CAM7B"}
|
|
@@ -1,133 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { DocumentToolbar } from "@powerhousedao/design-system/connect";
|
|
7
|
-
import { setSelectedNode, useParentFolderForSelectedNode, } from "@powerhousedao/reactor-browser";
|
|
8
|
-
const TABS = [
|
|
9
|
-
{ key: "requestFinance", label: "Request Finance" },
|
|
10
|
-
{ key: "gnosisSafe", label: "Gnosis Safe" },
|
|
11
|
-
{ key: "googleCloud", label: "Google Cloud" },
|
|
12
|
-
];
|
|
13
|
-
export default function Editor(props) {
|
|
14
|
-
const [doc, dispatch] = useSelectedIntegrationsDocument();
|
|
15
|
-
const state = doc?.state.global;
|
|
16
|
-
if (!state) {
|
|
17
|
-
console.log("Document state not found from document id", props.documentId);
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const [activeTab, setActiveTab] = useState("requestFinance");
|
|
21
|
-
// State for each form
|
|
22
|
-
const [requestFinance, setRequestFinance] = useState(() => ({
|
|
23
|
-
apiKey: state.requestFinance?.apiKey || "",
|
|
24
|
-
email: state.requestFinance?.email || "",
|
|
25
|
-
}));
|
|
26
|
-
const [gnosisSafe, setGnosisSafe] = useState(() => ({
|
|
27
|
-
safeAddress: state.gnosisSafe?.safeAddress || "",
|
|
28
|
-
signerPrivateKey: state.gnosisSafe?.signerPrivateKey || "",
|
|
29
|
-
}));
|
|
30
|
-
const [googleCloud, setGoogleCloud] = useState(() => ({
|
|
31
|
-
projectId: state.googleCloud?.projectId || "",
|
|
32
|
-
location: state.googleCloud?.location || "",
|
|
33
|
-
processorId: state.googleCloud?.processorId || "",
|
|
34
|
-
keyFile: {
|
|
35
|
-
type: state.googleCloud?.keyFile?.type || "",
|
|
36
|
-
project_id: state.googleCloud?.keyFile?.project_id || "",
|
|
37
|
-
private_key_id: state.googleCloud?.keyFile?.private_key_id || "",
|
|
38
|
-
private_key: state.googleCloud?.keyFile?.private_key || "",
|
|
39
|
-
client_email: state.googleCloud?.keyFile?.client_email || "",
|
|
40
|
-
client_id: state.googleCloud?.keyFile?.client_id || "",
|
|
41
|
-
auth_uri: state.googleCloud?.keyFile?.auth_uri || "",
|
|
42
|
-
token_uri: state.googleCloud?.keyFile?.token_uri || "",
|
|
43
|
-
auth_provider_x509_cert_url: state.googleCloud?.keyFile?.auth_provider_x509_cert_url || "",
|
|
44
|
-
client_x509_cert_url: state.googleCloud?.keyFile?.client_x509_cert_url || "",
|
|
45
|
-
universe_domain: state.googleCloud?.keyFile?.universe_domain || "",
|
|
46
|
-
},
|
|
47
|
-
}));
|
|
48
|
-
// Handlers
|
|
49
|
-
const handleRequestFinanceSave = () => {
|
|
50
|
-
dispatch(actions.setRequestFinance(requestFinance));
|
|
51
|
-
};
|
|
52
|
-
const handleGnosisSafeSave = () => {
|
|
53
|
-
dispatch(actions.setGnosisSafe(gnosisSafe));
|
|
54
|
-
};
|
|
55
|
-
const handleGoogleCloudSave = () => {
|
|
56
|
-
dispatch(actions.setGoogleCloud({
|
|
57
|
-
...googleCloud,
|
|
58
|
-
keyFile: { ...googleCloud.keyFile },
|
|
59
|
-
}));
|
|
60
|
-
};
|
|
61
|
-
// Get the parent folder node for the currently selected node
|
|
62
|
-
const parentFolder = useParentFolderForSelectedNode();
|
|
63
|
-
// Set the selected node to the parent folder node (close the editor)
|
|
64
|
-
function handleClose() {
|
|
65
|
-
setSelectedNode(parentFolder?.id);
|
|
66
|
-
}
|
|
67
|
-
return (_jsxs("div", { children: [_jsx(DocumentToolbar, { document: doc, onClose: handleClose }), _jsx("div", { className: "editor-container min-h-screen bg-gray-50 flex flex-col items-center p-2 sm:p-4", children: _jsxs("div", { className: "w-full max-w-xl", children: [_jsx("div", { className: "flex mb-4 border-b border-gray-200", children: TABS.map((tab) => (_jsx("button", { className: `flex-1 py-2 text-sm sm:text-base font-medium transition-colors duration-200 border-b-2 focus:outline-none ${activeTab === tab.key
|
|
68
|
-
? "border-blue-500 text-blue-600 bg-white"
|
|
69
|
-
: "border-transparent text-gray-500 bg-gray-100 hover:text-blue-500"}`, onClick: () => setActiveTab(tab.key), type: "button", children: tab.label }, tab.key))) }), _jsxs("div", { className: "bg-white rounded-xl shadow p-4 sm:p-6", children: [activeTab === "requestFinance" && (_jsxs("form", { className: "flex flex-col gap-4", onSubmit: (e) => {
|
|
70
|
-
e.preventDefault();
|
|
71
|
-
handleRequestFinanceSave();
|
|
72
|
-
}, children: [_jsx("h2", { className: "text-lg font-semibold mb-2", children: "Request Finance API" }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "API Key" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: requestFinance.apiKey, onChange: (e) => setRequestFinance((v) => ({
|
|
73
|
-
...v,
|
|
74
|
-
apiKey: e.target.value,
|
|
75
|
-
})), placeholder: "Enter API Key" })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Email" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "email", value: requestFinance.email, onChange: (e) => setRequestFinance((v) => ({
|
|
76
|
-
...v,
|
|
77
|
-
email: e.target.value,
|
|
78
|
-
})), placeholder: "Enter Email" })] }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.requestFinance?.apiKey === requestFinance.apiKey &&
|
|
79
|
-
state.requestFinance?.email === requestFinance.email, children: "Save" }) })] })), activeTab === "gnosisSafe" && (_jsxs("form", { className: "flex flex-col gap-4", onSubmit: (e) => {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
handleGnosisSafeSave();
|
|
82
|
-
}, children: [_jsx("h2", { className: "text-lg font-semibold mb-2", children: "Gnosis Safe" }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Safe Address" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: gnosisSafe.safeAddress, onChange: (e) => setGnosisSafe((v) => ({
|
|
83
|
-
...v,
|
|
84
|
-
safeAddress: e.target.value,
|
|
85
|
-
})), placeholder: "0x..." })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Signer Private Key" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: gnosisSafe.signerPrivateKey, onChange: (e) => setGnosisSafe((v) => ({
|
|
86
|
-
...v,
|
|
87
|
-
signerPrivateKey: e.target.value,
|
|
88
|
-
})), placeholder: "Private Key" })] }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.gnosisSafe?.safeAddress ===
|
|
89
|
-
gnosisSafe.safeAddress &&
|
|
90
|
-
state.gnosisSafe?.signerPrivateKey ===
|
|
91
|
-
gnosisSafe.signerPrivateKey, children: "Save" }) })] })), activeTab === "googleCloud" && (_jsxs("form", { className: "flex flex-col gap-4", onSubmit: (e) => {
|
|
92
|
-
e.preventDefault();
|
|
93
|
-
handleGoogleCloudSave();
|
|
94
|
-
}, children: [_jsx("h2", { className: "text-lg font-semibold mb-2", children: "Google Cloud" }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Project ID" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: googleCloud.projectId, onChange: (e) => setGoogleCloud((v) => ({
|
|
95
|
-
...v,
|
|
96
|
-
projectId: e.target.value,
|
|
97
|
-
})), placeholder: "Project ID" })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Location" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: googleCloud.location, onChange: (e) => setGoogleCloud((v) => ({
|
|
98
|
-
...v,
|
|
99
|
-
location: e.target.value,
|
|
100
|
-
})), placeholder: "Location" })] }), _jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: "Processor ID" }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: googleCloud.processorId, onChange: (e) => setGoogleCloud((v) => ({
|
|
101
|
-
...v,
|
|
102
|
-
processorId: e.target.value,
|
|
103
|
-
})), placeholder: "Processor ID" })] }), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: Object.entries(googleCloud.keyFile).map(([key, value]) => (_jsxs("label", { className: "flex flex-col gap-1", children: [_jsx("span", { className: "text-sm font-medium", children: key.replace(/_/g, " ") }), _jsx("input", { className: "input input-bordered rounded px-3 py-2 border border-gray-300 focus:border-blue-400 focus:ring focus:ring-blue-100 text-sm", type: "text", value: value, onChange: (e) => setGoogleCloud((v) => ({
|
|
104
|
-
...v,
|
|
105
|
-
keyFile: { ...v.keyFile, [key]: e.target.value },
|
|
106
|
-
})), placeholder: key.replace(/_/g, " ") })] }, key))) }), _jsx("div", { className: "flex justify-end mt-2", children: _jsx(Button, { size: "sm", variant: "outline", color: "black", type: "submit", className: "hover:bg-gray-200", disabled: state.googleCloud?.projectId === googleCloud.projectId &&
|
|
107
|
-
state.googleCloud?.location === googleCloud.location &&
|
|
108
|
-
state.googleCloud?.processorId ===
|
|
109
|
-
googleCloud.processorId &&
|
|
110
|
-
state.googleCloud?.keyFile?.type ===
|
|
111
|
-
googleCloud.keyFile.type &&
|
|
112
|
-
state.googleCloud?.keyFile?.project_id ===
|
|
113
|
-
googleCloud.keyFile.project_id &&
|
|
114
|
-
state.googleCloud?.keyFile?.private_key_id ===
|
|
115
|
-
googleCloud.keyFile.private_key_id &&
|
|
116
|
-
state.googleCloud?.keyFile?.private_key ===
|
|
117
|
-
googleCloud.keyFile.private_key &&
|
|
118
|
-
state.googleCloud?.keyFile?.client_email ===
|
|
119
|
-
googleCloud.keyFile.client_email &&
|
|
120
|
-
state.googleCloud?.keyFile?.client_id ===
|
|
121
|
-
googleCloud.keyFile.client_id &&
|
|
122
|
-
state.googleCloud?.keyFile?.auth_uri ===
|
|
123
|
-
googleCloud.keyFile.auth_uri &&
|
|
124
|
-
state.googleCloud?.keyFile?.token_uri ===
|
|
125
|
-
googleCloud.keyFile.token_uri &&
|
|
126
|
-
state.googleCloud?.keyFile
|
|
127
|
-
?.auth_provider_x509_cert_url ===
|
|
128
|
-
googleCloud.keyFile.auth_provider_x509_cert_url &&
|
|
129
|
-
state.googleCloud?.keyFile?.client_x509_cert_url ===
|
|
130
|
-
googleCloud.keyFile.client_x509_cert_url &&
|
|
131
|
-
state.googleCloud?.keyFile?.universe_domain ===
|
|
132
|
-
googleCloud.keyFile.universe_domain, children: "Save" }) })] }))] })] }) })] }));
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EditIntegrationsName } from "./components/EditName.js";
|
|
3
|
+
/** Implement your editor behavior here */
|
|
4
|
+
export default function Editor() {
|
|
5
|
+
return (_jsx("div", { className: "py-4 px-8", children: _jsx(EditIntegrationsName, {}) }));
|
|
133
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../editors/integrations/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,eAAO,MAAM,YAAY,EAAE,YAO1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../editors/integrations/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,6DAA6D;AAC7D,eAAO,MAAM,YAAY,EAAE,YAO1B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { lazy } from "react";
|
|
2
|
+
/** Document editor module for the Todo List document type */
|
|
2
3
|
export const Integrations = {
|
|
3
4
|
Component: lazy(() => import("./editor.js")),
|
|
4
5
|
documentTypes: ["powerhouse/integrations"],
|
|
5
6
|
config: {
|
|
6
|
-
id: "integrations
|
|
7
|
-
name: "
|
|
7
|
+
id: "integrations",
|
|
8
|
+
name: "integrations",
|
|
8
9
|
},
|
|
9
10
|
};
|
|
@@ -3,6 +3,6 @@ import React from "react";
|
|
|
3
3
|
const ConfirmationModal = ({ open, header, onCancel, onContinue, cancelLabel = "Cancel", continueLabel = "Continue", children, continueDisabled = false, }) => {
|
|
4
4
|
if (!open)
|
|
5
5
|
return null;
|
|
6
|
-
return (_jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/10 backdrop-blur-sm", children: _jsxs("div", { className: "bg-white rounded-3xl shadow-xl w-full max-w-md p-6", children: [_jsx("div", { className: "border-b border-slate-100 pb-2 text-2xl font-bold text-gray-800", children: header }), _jsx("div", { className: "my-6 rounded-md bg-slate-50 p-4 text-center flex flex-col items-center justify-center min-h-[64px]", children: children }), _jsxs("div", { className: "mt-8 flex justify-between gap-3", children: [_jsx("button", { onClick: onCancel, className: "flex-1 min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all bg-slate-50 text-slate-800", children: cancelLabel }), _jsx("button", { onClick: onContinue, disabled: continueDisabled, className: `flex-1 min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all bg-gray-800 text-gray-50 ${continueDisabled ?
|
|
6
|
+
return (_jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/10 backdrop-blur-sm", children: _jsxs("div", { className: "bg-white rounded-3xl shadow-xl w-full max-w-md p-6", children: [_jsx("div", { className: "border-b border-slate-100 pb-2 text-2xl font-bold text-gray-800", children: header }), _jsx("div", { className: "my-6 rounded-md bg-slate-50 p-4 text-center flex flex-col items-center justify-center min-h-[64px]", children: children }), _jsxs("div", { className: "mt-8 flex justify-between gap-3", children: [_jsx("button", { onClick: onCancel, className: "flex-1 min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all bg-slate-50 text-slate-800", children: cancelLabel }), _jsx("button", { onClick: onContinue, disabled: continueDisabled, className: `flex-1 min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all bg-gray-800 text-gray-50 ${continueDisabled ? "opacity-50 cursor-not-allowed" : ""}`, children: continueLabel })] })] }) }));
|
|
7
7
|
};
|
|
8
8
|
export default ConfirmationModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countryForm.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/countryForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"countryForm.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/countryForm.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACpE,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,WAAW,GAAI,2EAOzB,gBAAgB,4CA0ClB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Form, CountryCodeField } from "@powerhousedao/document-engineering/scalars";
|
|
2
|
+
import { Form, CountryCodeField, } from "@powerhousedao/document-engineering/scalars";
|
|
3
3
|
import { getCountryCodeFromName } from "../utils/utils.js";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
5
|
import {} from "../validation/validationManager.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currencyForm.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/currencyForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"currencyForm.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/currencyForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACpE,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,YAAY;;;GAWxB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,8CAI1B,iBAAiB,4CA4BnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Form, CurrencyCodeField } from "@powerhousedao/document-engineering/scalars";
|
|
2
|
+
import { Form, CurrencyCodeField, } from "@powerhousedao/document-engineering/scalars";
|
|
3
3
|
import {} from "../validation/validationManager.js";
|
|
4
4
|
export const currencyList = [
|
|
5
5
|
{ ticker: "USDS", crypto: true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datePicker.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/datePicker.tsx"],"names":[],"mappings":"AAMA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"datePicker.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/datePicker.tsx"],"names":[],"mappings":"AAMA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAqBhD,CAAC"}
|
|
@@ -5,5 +5,5 @@ import { twMerge } from "tailwind-merge";
|
|
|
5
5
|
export const DatePicker = (props) => {
|
|
6
6
|
return (_jsx(Form, { defaultValues: {
|
|
7
7
|
input: props.value,
|
|
8
|
-
}, onSubmit: () => { }, resetOnSuccessfulSubmit: false, children: _jsx(DatePickerField, { name: props.name, value: props.value, label: props.label, placeholder: props.placeholder, onChange: props.onChange, dateFormat: "YYYY-MM-DD", className: twMerge(props.className) }) }, props.value));
|
|
8
|
+
}, onSubmit: () => { }, resetOnSuccessfulSubmit: false, children: _jsx(DatePickerField, { name: props.name, value: props.value || "", label: props.label, placeholder: props.placeholder, onChange: props.onChange, dateFormat: "YYYY-MM-DD", className: twMerge(props.className) }) }, props.value));
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputField.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/inputField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC3D,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACvE,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"inputField.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/inputField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC3D,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACvE,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAwDhD,CAAC"}
|
|
@@ -10,13 +10,14 @@ export const InputField = (props) => {
|
|
|
10
10
|
}, onSubmit: () => { }, resetOnSuccessfulSubmit: true, children: _jsx(StringField, { label: label, placeholder: placeholder, name: "input", value: value, onBlur: onBlur, onChange: (e) => {
|
|
11
11
|
handleInputChange(e);
|
|
12
12
|
}, onKeyDown: (e) => {
|
|
13
|
-
if (e.key ===
|
|
13
|
+
if (e.key === "Enter") {
|
|
14
14
|
e.preventDefault();
|
|
15
15
|
e.currentTarget.blur();
|
|
16
16
|
// Find and focus the next focusable element
|
|
17
17
|
const focusableElements = document.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
18
18
|
const currentIndex = Array.from(focusableElements).indexOf(e.currentTarget);
|
|
19
|
-
if (currentIndex > -1 &&
|
|
19
|
+
if (currentIndex > -1 &&
|
|
20
|
+
currentIndex < focusableElements.length - 1) {
|
|
20
21
|
focusableElements[currentIndex + 1].focus();
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineItemMobileModal.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/lineItemMobileModal.tsx"],"names":[],"mappings":"AAMA,KAAK,QAAQ,GAAG;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,KAAa,GACd,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"lineItemMobileModal.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/lineItemMobileModal.tsx"],"names":[],"mappings":"AAMA,KAAK,QAAQ,GAAG;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,KAAa,GACd,EAAE,wBAAwB,2CAgN1B"}
|
|
@@ -38,7 +38,7 @@ export function LineItemMobileModal({ item, currency, onSave, onCancel, isNew =
|
|
|
38
38
|
}, [quantity, unitPriceTaxExcl, taxPercent]);
|
|
39
39
|
const handleSave = () => {
|
|
40
40
|
// For edit: use existing ID (if valid), For new or empty ID: generate ID
|
|
41
|
-
const needsNewId = isNew || !item?.id || item.id ===
|
|
41
|
+
const needsNewId = isNew || !item?.id || item.id === "";
|
|
42
42
|
const lineItem = {
|
|
43
43
|
id: needsNewId ? generateId() : item.id,
|
|
44
44
|
currency,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberForm.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/numberForm.tsx"],"names":[],"mappings":"AAGA,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,sFASxB,eAAe,
|
|
1
|
+
{"version":3,"file":"numberForm.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/numberForm.tsx"],"names":[],"mappings":"AAGA,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,sFASxB,eAAe,4CAqBjB,CAAC"}
|
|
@@ -263,17 +263,17 @@ export const SelectField = (props) => {
|
|
|
263
263
|
else if (value === "ACCEPT_INVOICE")
|
|
264
264
|
onChange("ACCEPTED");
|
|
265
265
|
}
|
|
266
|
-
else if (status ===
|
|
266
|
+
else if (status === "REJECTED") {
|
|
267
267
|
if (value === "RE_INSTATE_INVOICE")
|
|
268
268
|
onChange("ISSUED");
|
|
269
269
|
}
|
|
270
|
-
else if (status ===
|
|
270
|
+
else if (status === "ACCEPTED") {
|
|
271
271
|
if (value === "SCHEDULE_PAYMENT")
|
|
272
272
|
onChange("PAYMENTSCHEDULED");
|
|
273
273
|
else if (value === "CLOSE_PAYMENT")
|
|
274
274
|
onChange("PAYMENTCLOSED");
|
|
275
275
|
}
|
|
276
|
-
else if (status ===
|
|
276
|
+
else if (status === "PAYMENTSCHEDULED") {
|
|
277
277
|
if (value === "REGISTER_PAYMENT")
|
|
278
278
|
onChange("PAYMENTSENT");
|
|
279
279
|
else if (value === "REPORT_PAYMENT_ISSUE")
|
|
@@ -281,23 +281,23 @@ export const SelectField = (props) => {
|
|
|
281
281
|
else if (value === "CLOSE_PAYMENT")
|
|
282
282
|
onChange("PAYMENTCLOSED");
|
|
283
283
|
}
|
|
284
|
-
else if (status ===
|
|
284
|
+
else if (status === "PAYMENTSENT") {
|
|
285
285
|
if (value === "REPORT_PAYMENT_ISSUE")
|
|
286
286
|
onChange("PAYMENTISSUE");
|
|
287
287
|
else if (value === "CONFIRM_PAYMENT")
|
|
288
288
|
onChange("PAYMENTRECEIVED");
|
|
289
289
|
}
|
|
290
|
-
else if (status ===
|
|
290
|
+
else if (status === "PAYMENTISSUE") {
|
|
291
291
|
if (value === "RE_APPROVE_PAYMENT")
|
|
292
292
|
onChange("ACCEPTED");
|
|
293
293
|
else if (value === "CLOSE_PAYMENT")
|
|
294
294
|
onChange("PAYMENTCLOSED");
|
|
295
295
|
}
|
|
296
|
-
else if (status ===
|
|
296
|
+
else if (status === "PAYMENTRECEIVED") {
|
|
297
297
|
if (value === "REPORT_PAYMENT_ISSUE")
|
|
298
298
|
onChange("PAYMENTISSUE");
|
|
299
299
|
}
|
|
300
|
-
else if (status ===
|
|
300
|
+
else if (status === "PAYMENTCLOSED") {
|
|
301
301
|
if (value === "RE_APPROVE_PAYMENT")
|
|
302
302
|
onChange("ACCEPTED");
|
|
303
303
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusModalComponents.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/statusModalComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,OAAO,EAEb,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"statusModalComponents.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/components/statusModalComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,OAAO,EAEb,MAAM,2CAA2C,CAAC;AAkCnD,UAAU,6BAA6B;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1C,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C;AACD,wBAAgB,wBAAwB,CAAC,EACvC,cAAc,EACd,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,UAAU,GACX,EAAE,6BAA6B,2CAsD/B;AAED,UAAU,8BAA8B;IACtC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC1C,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AACD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,UAAU,EACV,eAAe,EACf,cAAc,EACd,WAAW,EACX,YAAY,GACb,EAAE,8BAA8B,2CAyBhC;AAED,wBAAgB,0BAA0B,CAAC,EACzC,YAAY,GACb,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;CACtB,2CAIA;AAED,UAAU,gCAAgC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,UAAU,EACV,aAAa,GACd,EAAE,gCAAgC,2CAgBlC;AAED,UAAU,6BAA6B;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,wBAAwB,CAAC,EACvC,aAAa,EACb,gBAAgB,GACjB,EAAE,6BAA6B,2CA4B/B;AAED,UAAU,kCAAkC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,WAAW,EACX,cAAc,EACd,MAAM,EACN,SAAS,GACV,EAAE,kCAAkC,2CA2BpC;AAED,UAAU,mCAAmC;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,YAAY,EACZ,eAAe,GAChB,EAAE,mCAAmC,2CAgBrC;AAED,UAAU,+BAA+B;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,aAAa,EACb,gBAAgB,EAChB,QAAQ,GACT,EAAE,+BAA+B,2CAuCjC"}
|
|
@@ -4,6 +4,29 @@ import { InputField } from "../components/inputField.js";
|
|
|
4
4
|
import { DatePicker } from "../components/datePicker.js";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
6
|
import { Textarea, Checkbox, Select, NumberInput, } from "@powerhousedao/document-engineering";
|
|
7
|
+
/**
|
|
8
|
+
* Converts a date-only string (YYYY-MM-DD) to ISO datetime string (YYYY-MM-DDTHH:mm:ss.sssZ)
|
|
9
|
+
* Used when dispatching date values to match the Zod schema requirements
|
|
10
|
+
*/
|
|
11
|
+
function dateToDatetime(dateStr) {
|
|
12
|
+
if (!dateStr || dateStr.trim() === "")
|
|
13
|
+
return null;
|
|
14
|
+
// If it's already a datetime string, return as is
|
|
15
|
+
if (dateStr.includes("T"))
|
|
16
|
+
return dateStr;
|
|
17
|
+
// Convert date-only to datetime at midnight UTC
|
|
18
|
+
return `${dateStr}T00:00:00.000Z`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Converts an ISO datetime string to date-only string (YYYY-MM-DD) for DatePicker
|
|
22
|
+
* Used when displaying date values from state
|
|
23
|
+
*/
|
|
24
|
+
function datetimeToDate(datetimeStr) {
|
|
25
|
+
if (!datetimeStr || datetimeStr.trim() === "")
|
|
26
|
+
return "";
|
|
27
|
+
// Extract date part from datetime string
|
|
28
|
+
return datetimeStr.split("T")[0];
|
|
29
|
+
}
|
|
7
30
|
export function IssueInvoiceModalContent({ invoiceNoInput, setInvoiceNoInput, state, dispatch, setWarning, }) {
|
|
8
31
|
useEffect(() => {
|
|
9
32
|
if (invoiceNoInput === "" || state.dateIssued === "") {
|
|
@@ -20,11 +43,12 @@ export function IssueInvoiceModalContent({ invoiceNoInput, setInvoiceNoInput, st
|
|
|
20
43
|
dispatch(actions.editInvoice({ invoiceNo: newValue }));
|
|
21
44
|
}
|
|
22
45
|
}, input: invoiceNoInput })] }), _jsxs("div", { className: "mt-4", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Issue Date:" }), _jsx(DatePicker, { name: "issueDate", className: String.raw `w-full p-0 bg-white`, onChange: (e) => {
|
|
23
|
-
const
|
|
46
|
+
const dateOnly = e.target.value.split("T")[0];
|
|
47
|
+
const datetime = dateToDatetime(dateOnly);
|
|
24
48
|
dispatch(actions.editInvoice({
|
|
25
|
-
dateIssued:
|
|
49
|
+
dateIssued: datetime,
|
|
26
50
|
}));
|
|
27
|
-
}, value: state.dateIssued })] })] }));
|
|
51
|
+
}, value: datetimeToDate(state.dateIssued) })] })] }));
|
|
28
52
|
}
|
|
29
53
|
export function RejectInvoiceModalContent({ state, dispatch, setWarning, setRejectReason, setFinalReason, finalReason, rejectReason, }) {
|
|
30
54
|
return (_jsxs("div", { className: "w-full", children: [_jsxs("div", { children: [_jsx("label", { className: "block mb-1 text-sm", children: "Reason:" }), _jsx(Textarea, { autoExpand: true, placeholder: "Add reason", value: rejectReason, onChange: (e) => {
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export default function Editor(props: Partial<EditorProps> & {
|
|
3
|
-
documentId?: string;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
export default function Editor(): import("react/jsx-runtime").JSX.Element;
|
|
5
2
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/invoice/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/invoice/editor.tsx"],"names":[],"mappings":"AAwEA,MAAM,CAAC,OAAO,UAAU,MAAM,4CAiuC7B"}
|