@powerhousedao/contributor-billing 0.1.22 → 0.1.23
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/dist/document-models/billing-statement/actions.d.ts +18 -0
- package/dist/document-models/billing-statement/actions.d.ts.map +1 -0
- package/dist/document-models/billing-statement/actions.js +9 -0
- package/dist/document-models/billing-statement/gen/creators.d.ts +3 -0
- package/dist/document-models/billing-statement/gen/creators.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/creators.js +3 -0
- package/dist/document-models/billing-statement/gen/document-model.d.ts +2 -2
- package/dist/document-models/billing-statement/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/document-schema.d.ts +294 -0
- package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/billing-statement/gen/document-schema.js +33 -0
- package/dist/document-models/billing-statement/gen/document-type.d.ts +2 -0
- package/dist/document-models/billing-statement/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/billing-statement/gen/document-type.js +1 -0
- package/dist/document-models/billing-statement/gen/general/actions.js +1 -1
- package/dist/document-models/billing-statement/gen/general/creators.d.ts +2 -2
- package/dist/document-models/billing-statement/gen/general/creators.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/general/creators.js +5 -5
- package/dist/document-models/billing-statement/gen/general/operations.js +3 -1
- package/dist/document-models/billing-statement/gen/index.d.ts +9 -3
- package/dist/document-models/billing-statement/gen/index.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/index.js +9 -2
- package/dist/document-models/billing-statement/gen/line-items/actions.js +1 -1
- package/dist/document-models/billing-statement/gen/line-items/creators.d.ts +2 -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 +4 -4
- package/dist/document-models/billing-statement/gen/line-items/operations.js +3 -1
- package/dist/document-models/billing-statement/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/billing-statement/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/ph-factories.js +1 -4
- package/dist/document-models/billing-statement/gen/reducer.d.ts +1 -3
- package/dist/document-models/billing-statement/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/reducer.js +18 -21
- package/dist/document-models/billing-statement/gen/schema/index.d.ts +1 -1
- package/dist/document-models/billing-statement/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/schema/index.js +1 -1
- package/dist/document-models/billing-statement/gen/tags/actions.js +1 -1
- package/dist/document-models/billing-statement/gen/tags/creators.d.ts +2 -2
- package/dist/document-models/billing-statement/gen/tags/creators.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/tags/creators.js +3 -3
- package/dist/document-models/billing-statement/gen/tags/operations.js +3 -1
- package/dist/document-models/billing-statement/gen/types.d.ts +9 -7
- package/dist/document-models/billing-statement/gen/types.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/types.js +1 -1
- package/dist/document-models/billing-statement/gen/utils.d.ts +13 -20
- package/dist/document-models/billing-statement/gen/utils.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/utils.js +45 -36
- package/dist/document-models/billing-statement/hooks.d.ts +11 -0
- package/dist/document-models/billing-statement/hooks.d.ts.map +1 -0
- package/dist/document-models/billing-statement/hooks.js +26 -0
- package/dist/document-models/billing-statement/index.d.ts +5 -25
- package/dist/document-models/billing-statement/index.d.ts.map +1 -1
- package/dist/document-models/billing-statement/index.js +5 -17
- package/dist/document-models/billing-statement/module.d.ts +5 -0
- package/dist/document-models/billing-statement/module.d.ts.map +1 -0
- package/dist/document-models/billing-statement/module.js +10 -0
- package/dist/document-models/billing-statement/src/index.d.ts +2 -0
- package/dist/document-models/billing-statement/src/index.d.ts.map +1 -0
- package/dist/document-models/billing-statement/src/index.js +1 -0
- package/dist/document-models/billing-statement/src/reducers/general.d.ts +2 -7
- package/dist/document-models/billing-statement/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/general.js +2 -7
- package/dist/document-models/billing-statement/src/reducers/line-items.d.ts +2 -7
- 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 +1 -6
- package/dist/document-models/billing-statement/src/reducers/tags.d.ts +2 -7
- 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 -6
- package/dist/document-models/billing-statement/src/tests/document-model.test.js +3 -3
- package/dist/document-models/billing-statement/src/tests/general.test.js +3 -2
- package/dist/document-models/billing-statement/src/tests/line-items.test.js +2 -1
- package/dist/document-models/billing-statement/src/tests/tags.test.js +2 -1
- package/dist/document-models/billing-statement/utils.d.ts +14 -0
- package/dist/document-models/billing-statement/utils.d.ts.map +1 -0
- package/dist/document-models/billing-statement/utils.js +7 -0
- package/dist/document-models/document-models.d.ts +3 -0
- package/dist/document-models/document-models.d.ts.map +1 -0
- package/dist/document-models/document-models.js +10 -0
- package/dist/document-models/expense-report/actions.d.ts +27 -0
- package/dist/document-models/expense-report/actions.d.ts.map +1 -0
- package/dist/document-models/expense-report/actions.js +4 -0
- package/dist/document-models/expense-report/gen/creators.d.ts +1 -0
- package/dist/document-models/expense-report/gen/creators.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/creators.js +1 -0
- package/dist/document-models/expense-report/gen/document-model.d.ts +2 -2
- package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-schema.d.ts +199 -0
- package/dist/document-models/expense-report/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/expense-report/gen/document-schema.js +33 -0
- package/dist/document-models/expense-report/gen/document-type.d.ts +2 -0
- package/dist/document-models/expense-report/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/expense-report/gen/document-type.js +1 -0
- package/dist/document-models/expense-report/gen/expense-report/actions.js +1 -1
- package/dist/document-models/expense-report/gen/expense-report/creators.d.ts +2 -2
- package/dist/document-models/expense-report/gen/expense-report/creators.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/expense-report/creators.js +3 -3
- package/dist/document-models/expense-report/gen/expense-report/operations.js +3 -1
- package/dist/document-models/expense-report/gen/index.d.ts +7 -3
- package/dist/document-models/expense-report/gen/index.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/index.js +7 -2
- package/dist/document-models/expense-report/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/expense-report/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/ph-factories.js +1 -4
- package/dist/document-models/expense-report/gen/reducer.d.ts +1 -3
- package/dist/document-models/expense-report/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/reducer.js +34 -37
- package/dist/document-models/expense-report/gen/schema/index.d.ts +1 -1
- package/dist/document-models/expense-report/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/schema/index.js +1 -1
- package/dist/document-models/expense-report/gen/types.d.ts +9 -7
- package/dist/document-models/expense-report/gen/types.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/types.js +1 -1
- package/dist/document-models/expense-report/gen/utils.d.ts +13 -20
- package/dist/document-models/expense-report/gen/utils.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/utils.js +44 -35
- package/dist/document-models/expense-report/gen/wallet/actions.js +1 -1
- package/dist/document-models/expense-report/gen/wallet/creators.d.ts +2 -2
- package/dist/document-models/expense-report/gen/wallet/creators.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/wallet/creators.js +17 -17
- package/dist/document-models/expense-report/gen/wallet/operations.js +3 -1
- package/dist/document-models/expense-report/hooks.d.ts +11 -0
- package/dist/document-models/expense-report/hooks.d.ts.map +1 -0
- package/dist/document-models/expense-report/hooks.js +26 -0
- package/dist/document-models/expense-report/index.d.ts +5 -34
- package/dist/document-models/expense-report/index.d.ts.map +1 -1
- package/dist/document-models/expense-report/index.js +5 -17
- package/dist/document-models/expense-report/module.d.ts +5 -0
- package/dist/document-models/expense-report/module.d.ts.map +1 -0
- package/dist/document-models/expense-report/module.js +10 -0
- package/dist/document-models/expense-report/src/index.d.ts +2 -0
- package/dist/document-models/expense-report/src/index.d.ts.map +1 -0
- package/dist/document-models/expense-report/src/index.js +1 -0
- package/dist/document-models/expense-report/src/reducers/wallet.d.ts +2 -2
- package/dist/document-models/expense-report/src/reducers/wallet.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/reducers/wallet.js +1 -1
- package/dist/document-models/expense-report/src/tests/document-model.test.js +4 -4
- package/dist/document-models/expense-report/src/tests/expense-report.test.js +3 -3
- package/dist/document-models/expense-report/src/tests/wallet.test.js +3 -3
- package/dist/document-models/expense-report/utils.d.ts +14 -0
- package/dist/document-models/expense-report/utils.d.ts.map +1 -0
- package/dist/document-models/expense-report/utils.js +7 -0
- package/dist/document-models/index.d.ts +8 -4
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +8 -4
- package/dist/document-models/integrations/actions.d.ts +15 -0
- package/dist/document-models/integrations/actions.d.ts.map +1 -0
- package/dist/document-models/integrations/actions.js +4 -0
- package/dist/document-models/integrations/gen/creators.d.ts +1 -0
- package/dist/document-models/integrations/gen/creators.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/creators.js +1 -0
- package/dist/document-models/integrations/gen/document-model.d.ts +2 -2
- package/dist/document-models/integrations/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/document-schema.d.ts +180 -0
- package/dist/document-models/integrations/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/integrations/gen/document-schema.js +33 -0
- package/dist/document-models/integrations/gen/document-type.d.ts +2 -0
- package/dist/document-models/integrations/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/integrations/gen/document-type.js +1 -0
- package/dist/document-models/integrations/gen/index.d.ts +7 -3
- package/dist/document-models/integrations/gen/index.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/index.js +7 -2
- package/dist/document-models/integrations/gen/integrations/actions.js +1 -1
- package/dist/document-models/integrations/gen/integrations/creators.d.ts +2 -2
- package/dist/document-models/integrations/gen/integrations/creators.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/integrations/creators.js +5 -5
- package/dist/document-models/integrations/gen/integrations/operations.js +3 -1
- package/dist/document-models/integrations/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/integrations/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/ph-factories.js +4 -18
- package/dist/document-models/integrations/gen/reducer.d.ts +1 -3
- package/dist/document-models/integrations/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/reducer.js +10 -13
- package/dist/document-models/integrations/gen/schema/index.d.ts +1 -1
- package/dist/document-models/integrations/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/schema/index.js +1 -1
- package/dist/document-models/integrations/gen/types.d.ts +9 -7
- package/dist/document-models/integrations/gen/types.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/types.js +1 -1
- package/dist/document-models/integrations/gen/utils.d.ts +13 -20
- package/dist/document-models/integrations/gen/utils.d.ts.map +1 -1
- package/dist/document-models/integrations/gen/utils.js +47 -49
- package/dist/document-models/integrations/hooks.d.ts +11 -0
- package/dist/document-models/integrations/hooks.d.ts.map +1 -0
- package/dist/document-models/integrations/hooks.js +26 -0
- package/dist/document-models/integrations/index.d.ts +5 -22
- package/dist/document-models/integrations/index.d.ts.map +1 -1
- package/dist/document-models/integrations/index.js +5 -17
- package/dist/document-models/integrations/module.d.ts +5 -0
- package/dist/document-models/integrations/module.d.ts.map +1 -0
- package/dist/document-models/integrations/module.js +10 -0
- package/dist/document-models/integrations/src/index.d.ts +2 -0
- package/dist/document-models/integrations/src/index.d.ts.map +1 -0
- package/dist/document-models/integrations/src/index.js +1 -0
- package/dist/document-models/integrations/src/reducers/integrations.d.ts +2 -7
- package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +1 -1
- package/dist/document-models/integrations/src/reducers/integrations.js +1 -6
- package/dist/document-models/integrations/src/tests/document-model.test.js +4 -4
- package/dist/document-models/integrations/src/tests/integrations.test.js +2 -1
- package/dist/document-models/integrations/utils.d.ts +14 -0
- package/dist/document-models/integrations/utils.d.ts.map +1 -0
- package/dist/document-models/integrations/utils.js +7 -0
- package/dist/document-models/invoice/actions.d.ts +40 -0
- package/dist/document-models/invoice/actions.d.ts.map +1 -0
- package/dist/document-models/invoice/actions.js +10 -0
- package/dist/document-models/invoice/gen/creators.d.ts +4 -0
- package/dist/document-models/invoice/gen/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/creators.js +4 -0
- package/dist/document-models/invoice/gen/document-model.d.ts +2 -2
- package/dist/document-models/invoice/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/document-schema.d.ts +465 -0
- package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/document-schema.js +33 -0
- package/dist/document-models/invoice/gen/document-type.d.ts +2 -0
- package/dist/document-models/invoice/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/invoice/gen/document-type.js +1 -0
- package/dist/document-models/invoice/gen/general/actions.js +1 -1
- package/dist/document-models/invoice/gen/general/creators.d.ts +2 -2
- package/dist/document-models/invoice/gen/general/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/general/creators.js +7 -7
- package/dist/document-models/invoice/gen/general/operations.js +3 -1
- package/dist/document-models/invoice/gen/index.d.ts +10 -3
- package/dist/document-models/invoice/gen/index.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/index.js +10 -2
- package/dist/document-models/invoice/gen/items/actions.js +1 -1
- package/dist/document-models/invoice/gen/items/creators.d.ts +2 -2
- package/dist/document-models/invoice/gen/items/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/items/creators.js +7 -7
- package/dist/document-models/invoice/gen/items/operations.js +3 -1
- package/dist/document-models/invoice/gen/parties/actions.js +1 -1
- package/dist/document-models/invoice/gen/parties/creators.d.ts +2 -2
- package/dist/document-models/invoice/gen/parties/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/parties/creators.js +8 -8
- package/dist/document-models/invoice/gen/parties/operations.js +3 -1
- package/dist/document-models/invoice/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/invoice/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/ph-factories.js +5 -5
- package/dist/document-models/invoice/gen/reducer.d.ts +1 -3
- package/dist/document-models/invoice/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/reducer.js +63 -66
- package/dist/document-models/invoice/gen/schema/index.d.ts +1 -1
- package/dist/document-models/invoice/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/index.js +1 -1
- package/dist/document-models/invoice/gen/schema/types.d.ts +1 -1
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/transitions/actions.js +1 -1
- package/dist/document-models/invoice/gen/transitions/creators.d.ts +2 -2
- package/dist/document-models/invoice/gen/transitions/creators.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/transitions/creators.js +14 -14
- package/dist/document-models/invoice/gen/transitions/operations.js +3 -1
- package/dist/document-models/invoice/gen/types.d.ts +9 -7
- package/dist/document-models/invoice/gen/types.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/types.js +1 -1
- package/dist/document-models/invoice/gen/utils.d.ts +13 -20
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/utils.js +48 -36
- package/dist/document-models/invoice/hooks.d.ts +11 -0
- package/dist/document-models/invoice/hooks.d.ts.map +1 -0
- package/dist/document-models/invoice/hooks.js +26 -0
- package/dist/document-models/invoice/index.d.ts +5 -47
- package/dist/document-models/invoice/index.d.ts.map +1 -1
- package/dist/document-models/invoice/index.js +5 -17
- package/dist/document-models/invoice/module.d.ts +5 -0
- package/dist/document-models/invoice/module.d.ts.map +1 -0
- package/dist/document-models/invoice/module.js +10 -0
- package/dist/document-models/invoice/src/index.d.ts +2 -0
- package/dist/document-models/invoice/src/index.d.ts.map +1 -0
- package/dist/document-models/invoice/src/index.js +1 -0
- package/dist/document-models/invoice/src/reducers/general.d.ts +2 -7
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +1 -6
- package/dist/document-models/invoice/src/reducers/items.d.ts +2 -7
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/items.js +1 -6
- package/dist/document-models/invoice/src/reducers/parties.d.ts +2 -7
- package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/parties.js +1 -6
- package/dist/document-models/invoice/src/reducers/transitions.d.ts +2 -2
- package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/transitions.js +1 -1
- package/dist/document-models/invoice/src/tests/document-model.test.js +3 -3
- package/dist/document-models/invoice/src/tests/general.test.js +4 -4
- package/dist/document-models/invoice/src/tests/items.test.js +5 -5
- package/dist/document-models/invoice/src/tests/parties.test.js +8 -8
- package/dist/document-models/invoice/src/tests/transitions.test.js +2 -1
- package/dist/document-models/invoice/utils.d.ts +14 -0
- package/dist/document-models/invoice/utils.d.ts.map +1 -0
- package/dist/document-models/invoice/utils.js +7 -0
- package/dist/editors/billing-statement/components/objectSetTable.js +3 -1
- package/dist/editors/billing-statement/config.d.ts +3 -0
- package/dist/editors/billing-statement/config.d.ts.map +1 -0
- package/dist/editors/billing-statement/config.js +3 -0
- package/dist/editors/billing-statement/editor.d.ts.map +1 -1
- package/dist/editors/billing-statement/editor.js +18 -10
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts +2 -2
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.js +2 -2
- package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts +2 -2
- package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts.map +1 -1
- package/dist/editors/billing-statement/lineItemTags/tagMapping.js +2 -0
- package/dist/editors/billing-statement/module.d.ts +3 -0
- package/dist/editors/billing-statement/module.d.ts.map +1 -0
- package/dist/editors/billing-statement/module.js +9 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +2 -9
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +13 -20
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +8 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +90 -5
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.js +3 -3
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +4 -4
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +7 -6
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.js +3 -8
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts +3 -3
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.js +1 -1
- package/dist/editors/contributor-billing/config.d.ts +3 -0
- package/dist/editors/contributor-billing/config.d.ts.map +1 -0
- package/dist/editors/contributor-billing/config.js +7 -0
- package/dist/editors/contributor-billing/editor.d.ts +2 -1
- package/dist/editors/contributor-billing/editor.d.ts.map +1 -1
- package/dist/editors/contributor-billing/editor.js +7 -2
- package/dist/editors/contributor-billing/module.d.ts +3 -0
- package/dist/editors/contributor-billing/module.d.ts.map +1 -0
- package/dist/editors/contributor-billing/module.js +9 -0
- package/dist/editors/editors.d.ts +3 -0
- package/dist/editors/editors.d.ts.map +1 -0
- package/dist/editors/editors.js +12 -0
- package/dist/editors/expense-report/components/AddBillingStatementModal.js +2 -2
- package/dist/editors/expense-report/components/WalletsTable.d.ts.map +1 -1
- package/dist/editors/expense-report/components/WalletsTable.js +15 -8
- package/dist/editors/expense-report/config.d.ts +3 -0
- package/dist/editors/expense-report/config.d.ts.map +1 -0
- package/dist/editors/expense-report/config.js +3 -0
- package/dist/editors/expense-report/editor.d.ts +1 -1
- package/dist/editors/expense-report/editor.d.ts.map +1 -1
- package/dist/editors/expense-report/editor.js +12 -3
- package/dist/editors/expense-report/hooks/useSyncWallet.js +2 -2
- package/dist/editors/expense-report/hooks/useWalletSync.js +2 -2
- package/dist/editors/expense-report/module.d.ts +3 -0
- package/dist/editors/expense-report/module.d.ts.map +1 -0
- package/dist/editors/expense-report/module.js +9 -0
- package/dist/editors/hooks/useExpenseReportDocument.d.ts +2 -2
- package/dist/editors/hooks/useExpenseReportDocument.d.ts.map +1 -1
- package/dist/editors/hooks/useIntegrationsDocument.d.ts +2 -2
- package/dist/editors/hooks/useIntegrationsDocument.d.ts.map +1 -1
- package/dist/editors/index.d.ts +5 -5
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +5 -5
- package/dist/editors/integrations/config.d.ts +3 -0
- package/dist/editors/integrations/config.d.ts.map +1 -0
- package/dist/editors/integrations/config.js +3 -0
- package/dist/editors/integrations/editor.d.ts.map +1 -1
- package/dist/editors/integrations/editor.js +74 -52
- package/dist/editors/integrations/module.d.ts +3 -0
- package/dist/editors/integrations/module.d.ts.map +1 -0
- package/dist/editors/integrations/module.js +9 -0
- package/dist/editors/invoice/InvoicePDF.d.ts +1 -1
- package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -1
- package/dist/editors/invoice/components/confirmationModal.js +1 -0
- package/dist/editors/invoice/components/countryForm.d.ts +1 -1
- package/dist/editors/invoice/components/countryForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/countryForm.js +1 -0
- package/dist/editors/invoice/components/currencyForm.d.ts +1 -1
- package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/currencyForm.js +1 -0
- package/dist/editors/invoice/components/datePicker.js +1 -0
- package/dist/editors/invoice/components/inputField.d.ts +1 -1
- package/dist/editors/invoice/components/inputField.d.ts.map +1 -1
- package/dist/editors/invoice/components/inputField.js +1 -0
- package/dist/editors/invoice/components/selectField.d.ts.map +1 -1
- package/dist/editors/invoice/components/selectField.js +0 -12
- package/dist/editors/invoice/components/statusModalComponents.js +4 -4
- package/dist/editors/invoice/config.d.ts +3 -0
- package/dist/editors/invoice/config.d.ts.map +1 -0
- package/dist/editors/invoice/config.js +3 -0
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +103 -95
- package/dist/editors/invoice/exportUBL.d.ts +1 -1
- package/dist/editors/invoice/exportUBL.d.ts.map +1 -1
- package/dist/editors/invoice/ingestPDF.d.ts +1 -1
- package/dist/editors/invoice/ingestPDF.d.ts.map +1 -1
- package/dist/editors/invoice/ingestPDF.js +34 -18
- package/dist/editors/invoice/ingestUBL.d.ts +1 -1
- package/dist/editors/invoice/ingestUBL.d.ts.map +1 -1
- package/dist/editors/invoice/invoiceToGnosis.js +2 -2
- package/dist/editors/invoice/legalEntity/bankSection.d.ts +3 -3
- package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/common.d.ts +1 -1
- package/dist/editors/invoice/legalEntity/common.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts +3 -3
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/legalEntity.js +1 -0
- package/dist/editors/invoice/legalEntity/walletSection.d.ts +3 -3
- package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/walletSection.js +5 -6
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts +2 -2
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +2 -2
- package/dist/editors/invoice/lineItemTags/tagMapping.d.ts +1 -1
- package/dist/editors/invoice/lineItemTags/tagMapping.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts +2 -2
- package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/tagMobileModal.js +2 -2
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/lineItems.js +3 -1
- package/dist/editors/invoice/module.d.ts +3 -0
- package/dist/editors/invoice/module.d.ts.map +1 -0
- package/dist/editors/invoice/module.js +9 -0
- package/dist/editors/invoice/requestFinance.js +3 -3
- package/dist/editors/invoice/uploadPdfChunked.js +1 -1
- package/dist/editors/invoice/utils/utils.d.ts +25 -0
- package/dist/editors/invoice/utils/utils.d.ts.map +1 -1
- package/dist/editors/invoice/utils/utils.js +66 -0
- package/dist/editors/invoice/validation/validationHandler.d.ts +1 -1
- package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationHandler.js +1 -1
- package/dist/editors/invoice/validation/validationManager.d.ts +1 -1
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.js +1 -0
- package/dist/editors/invoice/validation/validationRules.d.ts +1 -1
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/processors/index.d.ts +1 -1
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/line-item-processor/index.d.ts +2 -2
- package/dist/processors/line-item-processor/index.d.ts.map +1 -1
- package/dist/processors/line-item-processor/index.js +2 -1
- package/dist/scripts/invoice/autoTagging.d.ts +32 -0
- package/dist/scripts/invoice/autoTagging.d.ts.map +1 -0
- package/dist/scripts/invoice/autoTagging.js +341 -0
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -1
- package/dist/scripts/invoice/gnosisTransactionBuilder.js +4 -9
- package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
- package/dist/scripts/invoice/pdfToClaudeAI.js +8 -4
- package/dist/style.css +276 -4773
- package/dist/subgraphs/billing-statement/index.d.ts +2 -2
- package/dist/subgraphs/billing-statement/index.d.ts.map +1 -1
- package/dist/subgraphs/billing-statement/index.js +2 -2
- package/dist/subgraphs/billing-statement/resolvers.d.ts +2 -2
- package/dist/subgraphs/billing-statement/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/billing-statement/resolvers.js +1 -0
- package/dist/subgraphs/expense-report/index.d.ts +2 -2
- package/dist/subgraphs/expense-report/index.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/index.js +2 -2
- package/dist/subgraphs/expense-report/resolvers.d.ts +2 -2
- package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/resolvers.js +1 -0
- package/dist/subgraphs/integrations/index.d.ts +2 -2
- package/dist/subgraphs/integrations/index.d.ts.map +1 -1
- package/dist/subgraphs/integrations/index.js +2 -2
- package/dist/subgraphs/integrations/resolvers.d.ts +2 -2
- package/dist/subgraphs/integrations/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/integrations/resolvers.js +1 -0
- package/dist/subgraphs/invoice/index.d.ts +2 -2
- package/dist/subgraphs/invoice/index.d.ts.map +1 -1
- package/dist/subgraphs/invoice/index.js +2 -2
- package/dist/subgraphs/invoice/resolvers.d.ts +2 -2
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/invoice/resolvers.js +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +13 -0
- package/package.json +66 -49
- package/dist/document-models/billing-statement/gen/general/object.d.ts +0 -9
- package/dist/document-models/billing-statement/gen/general/object.d.ts.map +0 -1
- package/dist/document-models/billing-statement/gen/general/object.js +0 -13
- package/dist/document-models/billing-statement/gen/line-items/object.d.ts +0 -8
- package/dist/document-models/billing-statement/gen/line-items/object.d.ts.map +0 -1
- package/dist/document-models/billing-statement/gen/line-items/object.js +0 -10
- package/dist/document-models/billing-statement/gen/object.d.ts +0 -19
- package/dist/document-models/billing-statement/gen/object.d.ts.map +0 -1
- package/dist/document-models/billing-statement/gen/object.js +0 -33
- package/dist/document-models/billing-statement/gen/tags/object.d.ts +0 -7
- package/dist/document-models/billing-statement/gen/tags/object.d.ts.map +0 -1
- package/dist/document-models/billing-statement/gen/tags/object.js +0 -7
- package/dist/document-models/expense-report/gen/expense-report/object.d.ts +0 -7
- package/dist/document-models/expense-report/gen/expense-report/object.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/object.js +0 -7
- package/dist/document-models/expense-report/gen/object.d.ts +0 -15
- package/dist/document-models/expense-report/gen/object.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/object.js +0 -25
- package/dist/document-models/expense-report/gen/wallet/object.d.ts +0 -21
- package/dist/document-models/expense-report/gen/wallet/object.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/wallet/object.js +0 -49
- package/dist/document-models/integrations/gen/integrations/object.d.ts +0 -9
- package/dist/document-models/integrations/gen/integrations/object.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/object.js +0 -13
- package/dist/document-models/integrations/gen/object.d.ts +0 -15
- package/dist/document-models/integrations/gen/object.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/object.js +0 -25
- package/dist/document-models/invoice/gen/general/object.d.ts +0 -11
- package/dist/document-models/invoice/gen/general/object.d.ts.map +0 -1
- package/dist/document-models/invoice/gen/general/object.js +0 -19
- package/dist/document-models/invoice/gen/items/object.d.ts +0 -11
- package/dist/document-models/invoice/gen/items/object.d.ts.map +0 -1
- package/dist/document-models/invoice/gen/items/object.js +0 -19
- package/dist/document-models/invoice/gen/object.d.ts +0 -21
- package/dist/document-models/invoice/gen/object.d.ts.map +0 -1
- package/dist/document-models/invoice/gen/object.js +0 -36
- package/dist/document-models/invoice/gen/parties/object.d.ts +0 -12
- package/dist/document-models/invoice/gen/parties/object.d.ts.map +0 -1
- package/dist/document-models/invoice/gen/parties/object.js +0 -22
- package/dist/document-models/invoice/gen/transitions/object.d.ts +0 -18
- package/dist/document-models/invoice/gen/transitions/object.d.ts.map +0 -1
- package/dist/document-models/invoice/gen/transitions/object.js +0 -40
- package/dist/editors/billing-statement/index.d.ts +0 -4
- package/dist/editors/billing-statement/index.d.ts.map +0 -1
- package/dist/editors/billing-statement/index.js +0 -12
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts +0 -6
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/CreateDocument.js +0 -23
- package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts +0 -12
- package/dist/editors/contributor-billing/components/DocumentDispatch.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/DocumentDispatch.js +0 -20
- package/dist/editors/contributor-billing/components/EditorContainer.d.ts +0 -10
- package/dist/editors/contributor-billing/components/EditorContainer.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/EditorContainer.js +0 -56
- package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts +0 -12
- package/dist/editors/contributor-billing/components/FileItemsGrid.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/FileItemsGrid.js +0 -7
- package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts +0 -17
- package/dist/editors/contributor-billing/components/FolderItemsGrid.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/FolderItemsGrid.js +0 -14
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +0 -13
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/FolderTree.js +0 -38
- package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts +0 -9
- package/dist/editors/contributor-billing/hooks/useDispatchMap.d.ts.map +0 -1
- package/dist/editors/contributor-billing/hooks/useDispatchMap.js +0 -21
- package/dist/editors/contributor-billing/hooks/useDrop.d.ts +0 -22
- package/dist/editors/contributor-billing/hooks/useDrop.d.ts.map +0 -1
- package/dist/editors/contributor-billing/hooks/useDrop.js +0 -57
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts +0 -8
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.d.ts.map +0 -1
- package/dist/editors/contributor-billing/hooks/useSelectedFolderChildren.js +0 -19
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts +0 -3
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.d.ts.map +0 -1
- package/dist/editors/contributor-billing/hooks/useTransformedNodes.js +0 -32
- package/dist/editors/contributor-billing/index.d.ts +0 -4
- package/dist/editors/contributor-billing/index.d.ts.map +0 -1
- package/dist/editors/contributor-billing/index.js +0 -19
- package/dist/editors/contributor-billing/utils/withDropZone.d.ts +0 -4
- package/dist/editors/contributor-billing/utils/withDropZone.d.ts.map +0 -1
- package/dist/editors/contributor-billing/utils/withDropZone.js +0 -19
- package/dist/editors/expense-report/index.d.ts +0 -3
- package/dist/editors/expense-report/index.d.ts.map +0 -1
- package/dist/editors/expense-report/index.js +0 -11
- package/dist/editors/integrations/index.d.ts +0 -4
- package/dist/editors/integrations/index.d.ts.map +0 -1
- package/dist/editors/integrations/index.js +0 -12
- package/dist/editors/invoice/assets/custom.d.ts +0 -4
- package/dist/editors/invoice/assets/powerhouseLogo.png +0 -0
- package/dist/editors/invoice/index.d.ts +0 -4
- package/dist/editors/invoice/index.d.ts.map +0 -1
- package/dist/editors/invoice/index.js +0 -12
- package/dist/migrate-zip.d.ts +0 -2
- package/dist/migrate-zip.d.ts.map +0 -1
- package/dist/migrate-zip.js +0 -56
- package/dist/reducers/general.d.ts +0 -8
- package/dist/reducers/general.d.ts.map +0 -1
- package/dist/reducers/general.js +0 -73
- package/dist/reducers/items.d.ts +0 -8
- package/dist/reducers/items.d.ts.map +0 -1
- package/dist/reducers/items.js +0 -195
- package/dist/reducers/parties.d.ts +0 -8
- package/dist/reducers/parties.d.ts.map +0 -1
- package/dist/reducers/parties.js +0 -266
- package/dist/reducers/transitions.d.ts +0 -8
- package/dist/reducers/transitions.d.ts.map +0 -1
- package/dist/reducers/transitions.js +0 -162
- package/dist/scripts/invoice/pdfToDocumentAi.d.ts +0 -5
- package/dist/scripts/invoice/pdfToDocumentAi.d.ts.map +0 -1
- package/dist/scripts/invoice/pdfToDocumentAi.js +0 -659
- package/dist/tailwind.config.d.ts +0 -13
- package/dist/tailwind.config.d.ts.map +0 -1
- package/dist/tailwind.config.js +0 -16
|
@@ -8,8 +8,8 @@ import { loadUBLFile } from "./ingestUBL.js";
|
|
|
8
8
|
import PDFUploader from "./ingestPDF.js";
|
|
9
9
|
import RequestFinance from "./requestFinance.js";
|
|
10
10
|
import InvoiceToGnosis from "./invoiceToGnosis.js";
|
|
11
|
-
import { toast, ToastContainer } from "@powerhousedao/design-system";
|
|
12
|
-
import { PDFDownloadLink } from "@react-pdf/renderer";
|
|
11
|
+
import { toast, ToastContainer } from "@powerhousedao/design-system/connect";
|
|
12
|
+
import { PDFDownloadLink, PDFViewer } from "@react-pdf/renderer";
|
|
13
13
|
import { InvoicePDF } from "./InvoicePDF.js";
|
|
14
14
|
import { createRoot } from "react-dom/client";
|
|
15
15
|
import { downloadUBL } from "./exportUBL.js";
|
|
@@ -24,6 +24,8 @@ import { ClosePaymentModalContent, ConfirmPaymentModalContent, FinalRejectionMod
|
|
|
24
24
|
import { InvoiceStateSchema } from "../../document-models/invoice/gen/schema/zod.js";
|
|
25
25
|
import validateStatusBeforeContinue from "./validation/validationHandler.js";
|
|
26
26
|
import { useSelectedInvoiceDocument } from "../hooks/useInvoiceDocument.js";
|
|
27
|
+
import { DocumentToolbar } from "@powerhousedao/design-system/connect";
|
|
28
|
+
import { setSelectedNode, useParentFolderForSelectedNode, } from "@powerhousedao/reactor-browser";
|
|
27
29
|
function isFiatCurrency(currency) {
|
|
28
30
|
return currencyList.find((c) => c.ticker === currency)?.crypto === false;
|
|
29
31
|
}
|
|
@@ -86,7 +88,6 @@ export default function Editor(props) {
|
|
|
86
88
|
const [paymentIssue, setPaymentIssue] = useState("");
|
|
87
89
|
const [paymentAmount, setPaymentAmount] = useState("");
|
|
88
90
|
const [editingItemValues, setEditingItemValues] = useState(null);
|
|
89
|
-
const prevStatus = useRef(state.status);
|
|
90
91
|
useEffect(() => {
|
|
91
92
|
setFiatMode(isFiatCurrency(state.currency));
|
|
92
93
|
}, [state.currency, state]);
|
|
@@ -366,107 +367,114 @@ export default function Editor(props) {
|
|
|
366
367
|
reportPaymentIssue: "Confirm",
|
|
367
368
|
// Add more labels as needed
|
|
368
369
|
};
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
setUploadDropdownOpen(false);
|
|
377
|
-
}, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsx("button", { onClick: () => {
|
|
378
|
-
handleExportUBL();
|
|
379
|
-
setExportDropdownOpen(false);
|
|
380
|
-
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
|
|
381
|
-
handleExportPDF();
|
|
382
|
-
setExportDropdownOpen(false);
|
|
383
|
-
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] }), _jsxs("div", { className: "flex flex-row items-center gap-4", children: [_jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
|
|
384
|
-
handleCurrencyChange(e.target.value);
|
|
385
|
-
}, validation: currencyValidation }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] })] }), _jsxs("div", { className: "md:hidden", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Invoice" }), _jsx("button", { onClick: () => setMobileHeaderOpen(!mobileHeaderOpen), className: "inline-flex items-center justify-center w-10 h-10 rounded-lg bg-gray-100 hover:bg-gray-200 transition-colors cursor-pointer", "aria-label": "Toggle invoice settings", children: mobileHeaderOpen ? (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })) : (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })) })] }), !mobileHeaderOpen && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-600 mb-2", children: [_jsx("span", { className: "font-medium", children: state.invoiceNo || "No invoice #" }), _jsx("span", { children: "\u2022" }), _jsx("span", { children: state.currency }), _jsx("span", { children: "\u2022" }), _jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800", children: state.status })] })), mobileHeaderOpen && (_jsxs("div", { className: "bg-white border border-gray-200 rounded-lg p-4 space-y-4 shadow-sm", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Invoice Number" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
|
|
370
|
+
// Get the parent folder node for the currently selected node
|
|
371
|
+
const parentFolder = useParentFolderForSelectedNode();
|
|
372
|
+
// Set the selected node to the parent folder node (close the editor)
|
|
373
|
+
function handleClose() {
|
|
374
|
+
setSelectedNode(parentFolder?.id);
|
|
375
|
+
}
|
|
376
|
+
return (_jsxs("div", { children: [_jsx(DocumentToolbar, { document: doc, onClose: handleClose }), _jsxs("div", { className: "editor-container", children: [_jsx(ToastContainer, { position: "bottom-right", autoClose: 5000, hideProgressBar: false, newestOnTop: false, closeOnClick: false, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true, theme: "light" }), _jsxs("div", { className: "mb-6", children: [_jsxs("div", { className: "hidden md:flex flex-row items-center justify-between gap-4", children: [_jsxs("div", { className: "flex flex-row items-center gap-4 flex-wrap", children: [_jsx("h1", { className: "text-3xl font-bold whitespace-nowrap", children: "Invoice" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
|
|
386
377
|
const newValue = e.target.value;
|
|
387
378
|
if (newValue !== state.invoiceNo) {
|
|
388
379
|
dispatch(actions.editInvoice({ invoiceNo: newValue }));
|
|
389
380
|
}
|
|
390
|
-
}, input: invoiceNoInput, validation: invoiceValidation })] }), _jsxs("div", { children: [
|
|
391
|
-
handleCurrencyChange(e.target.value);
|
|
392
|
-
}, validation: currencyValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Status" }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] }), _jsxs("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: [_jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
|
|
381
|
+
}, input: invoiceNoInput, validation: invoiceValidation }), _jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
|
|
393
382
|
handleFileUpload(e);
|
|
394
383
|
setUploadDropdownOpen(false);
|
|
395
|
-
}, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "
|
|
384
|
+
}, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "inline-flex items-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors whitespace-nowrap cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", "aria-orientation": "vertical", children: [_jsx("button", { onClick: () => {
|
|
396
385
|
handleExportUBL();
|
|
397
386
|
setExportDropdownOpen(false);
|
|
398
387
|
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
|
|
399
388
|
handleExportPDF();
|
|
400
389
|
setExportDropdownOpen(false);
|
|
401
|
-
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] })
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
390
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] }), _jsxs("div", { className: "flex flex-row items-center gap-4", children: [_jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
|
|
391
|
+
handleCurrencyChange(e.target.value);
|
|
392
|
+
}, validation: currencyValidation }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] })] }), _jsxs("div", { className: "md:hidden", children: [_jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Invoice" }), _jsx("button", { onClick: () => setMobileHeaderOpen(!mobileHeaderOpen), className: "inline-flex items-center justify-center w-10 h-10 rounded-lg bg-gray-100 hover:bg-gray-200 transition-colors cursor-pointer", "aria-label": "Toggle invoice settings", children: mobileHeaderOpen ? (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })) : (_jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" }) })) })] }), !mobileHeaderOpen && (_jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-600 mb-2", children: [_jsx("span", { className: "font-medium", children: state.invoiceNo || "No invoice #" }), _jsx("span", { children: "\u2022" }), _jsx("span", { children: state.currency }), _jsx("span", { children: "\u2022" }), _jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800", children: state.status })] })), mobileHeaderOpen && (_jsxs("div", { className: "bg-white border border-gray-200 rounded-lg p-4 space-y-4 shadow-sm", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Invoice Number" }), _jsx(InputField, { placeholder: "Add invoice number", value: invoiceNoInput, handleInputChange: (e) => setInvoiceNoInput(e.target.value), onBlur: (e) => {
|
|
393
|
+
const newValue = e.target.value;
|
|
394
|
+
if (newValue !== state.invoiceNo) {
|
|
395
|
+
dispatch(actions.editInvoice({ invoiceNo: newValue }));
|
|
396
|
+
}
|
|
397
|
+
}, input: invoiceNoInput, validation: invoiceValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Currency" }), _jsx(CurrencyForm, { currency: state.currency, handleInputChange: (e) => {
|
|
398
|
+
handleCurrencyChange(e.target.value);
|
|
399
|
+
}, validation: currencyValidation })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Status" }), _jsx(SelectField, { options: STATUS_OPTIONS, value: state.status, onChange: (value) => handleStatusChange(value) })] }), _jsxs("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: [_jsxs("div", { className: "relative", ref: uploadDropdownRef, children: [_jsxs("button", { onClick: () => setUploadDropdownOpen(!uploadDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-blue-500 hover:bg-blue-600 text-white font-medium transition-colors cursor-pointer", disabled: isPdfLoading, children: [isPdfLoading ? "Processing..." : "Upload File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), uploadDropdownOpen && !isPdfLoading && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsxs("label", { className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: ["Upload UBL", _jsx("input", { accept: ".xml", className: "hidden", onChange: (e) => {
|
|
400
|
+
handleFileUpload(e);
|
|
401
|
+
setUploadDropdownOpen(false);
|
|
402
|
+
}, type: "file" })] }), _jsx(PDFUploader, { dispatch: dispatch, changeDropdownOpen: setUploadDropdownOpen })] }) }))] }), _jsxs("div", { className: "relative", ref: exportDropdownRef, children: [_jsxs("button", { onClick: () => setExportDropdownOpen(!exportDropdownOpen), className: "w-full inline-flex items-center justify-center h-10 px-4 rounded bg-black hover:bg-gray-800 text-white font-medium transition-colors cursor-pointer", children: ["Export File", _jsx("svg", { className: "w-4 h-4 ml-2", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })] }), exportDropdownOpen && (_jsx("div", { className: "absolute z-10 mt-1 w-full rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5", children: _jsxs("div", { className: "py-1", role: "menu", children: [_jsx("button", { onClick: () => {
|
|
403
|
+
handleExportUBL();
|
|
404
|
+
setExportDropdownOpen(false);
|
|
405
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export UBL" }), _jsx("button", { onClick: () => {
|
|
406
|
+
handleExportPDF();
|
|
407
|
+
setExportDropdownOpen(false);
|
|
408
|
+
}, className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer", children: "Export PDF" })] }) }))] })] })] }))] })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-0 lg:gap-4", children: [_jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Issuer" }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "mb-2", 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) => {
|
|
409
|
+
const newDate = e.target.value.split("T")[0];
|
|
410
|
+
dispatch(actions.editInvoice({
|
|
411
|
+
dateIssued: newDate,
|
|
412
|
+
}));
|
|
413
|
+
}, value: state.dateIssued })] }), _jsxs("div", { className: "mb-2", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Delivery Date:" }), _jsx(DatePicker, { name: "deliveryDate", className: String.raw `w-full p-0 bg-white`, onChange: (e) => {
|
|
414
|
+
const newValue = e.target.value.split("T")[0];
|
|
415
|
+
if (newValue !== state.dateDelivered) {
|
|
416
|
+
dispatch(actions.editInvoice({ dateDelivered: newValue }));
|
|
417
|
+
}
|
|
418
|
+
}, value: state.dateDelivered || "" })] })] }), _jsx(LegalEntityForm, { legalEntity: state.issuer, onChangeInfo: (input) => dispatch(actions.editIssuer(input)), onChangeBank: (input) => dispatch(actions.editIssuerBank(input)), onChangeWallet: (input) => dispatch(actions.editIssuerWallet(input)), basicInfoDisabled: false, bankDisabled: !fiatMode, walletDisabled: fiatMode, currency: state.currency, status: state.status, walletvalidation: walletValidation, mainCountryValidation: mainCountryValidation, bankCountryValidation: bankCountryValidation, ibanvalidation: ibanValidation, bicvalidation: bicValidation, banknamevalidation: bankNameValidation, streetaddressvalidation: streetAddressValidation, cityvalidation: cityValidation, postalcodevalidation: postalCodeValidation, payeremailvalidation: payerEmailValidation, routingNumbervalidation: routingNumberValidation, accountNumbervalidation: accountNumberValidation })] }), _jsxs("div", { className: "border-0 lg:border lg:border-gray-200 lg:rounded-lg p-0 lg:p-4", children: [_jsx("h3", { className: "text-lg font-semibold mb-4", children: "Payer" }), _jsxs("div", { className: "mb-2 w-64", children: [_jsx("label", { className: "block mb-1 text-sm", children: "Due Date:" }), _jsx(DatePicker, { name: "dateDue", className: String.raw `w-full p-0 bg-white`, onChange: (e) => dispatch(actions.editInvoice({
|
|
419
|
+
dateDue: e.target.value.split("T")[0],
|
|
420
|
+
})), value: state.dateDue })] }), _jsx(LegalEntityForm, { bankDisabled: true, legalEntity: state.payer, onChangeInfo: (input) => dispatch(actions.editPayer(input)), currency: state.currency, status: state.status, payeremailvalidation: payerEmailValidation })] })] }), _jsx("div", { className: "mb-8", children: _jsx(LineItemsTable, { currency: state.currency, lineItems: state.lineItems.map((item) => ({
|
|
421
|
+
...item,
|
|
422
|
+
lineItemTag: item.lineItemTag ?? [],
|
|
423
|
+
})), onAddItem: (item) => dispatch(actions.addLineItem(item)), onDeleteItem: (input) => dispatch(actions.deleteLineItem(input)), onUpdateCurrency: (input) => {
|
|
424
|
+
setFiatMode(input.currency !== "USDS");
|
|
425
|
+
dispatch(actions.editInvoice(input));
|
|
426
|
+
}, onUpdateItem: (item) => dispatch(actions.editLineItem(item)), onEditingItemChange: setEditingItemValues, dispatch: dispatch, paymentAccounts: state.invoiceTags || [] }) }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsx("div", { className: "col-span-1", children: _jsx("div", { className: "", children: _jsx(Textarea, { label: "Notes", placeholder: "Add notes", autoExpand: true, rows: 4, multiline: true, value: notes, onBlur: (e) => {
|
|
427
|
+
const newValue = e.target.value;
|
|
428
|
+
if (newValue !== state.notes) {
|
|
429
|
+
dispatch(actions.editInvoice({ notes: newValue }));
|
|
430
|
+
}
|
|
431
|
+
}, onChange: (e) => {
|
|
432
|
+
setNotes(e.target.value);
|
|
433
|
+
}, className: "p-2 mb-4" }) }) }), _jsx("div", { className: "col-span-1", children: _jsx("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-6 shadow-sm h-32", children: _jsxs("div", { className: "", children: [_jsxs("div", { className: "flex justify-between text-gray-700", children: [_jsx("span", { className: "font-medium", children: "Subtotal (excl. tax):" }), _jsxs("span", { children: [formatNumber(itemsTotalTaxExcl), " ", state.currency] })] }), _jsxs("div", { className: "flex justify-between border-t border-gray-200 pt-6 text-lg font-bold text-gray-900", children: [_jsx("span", { children: "Total (incl. tax):" }), _jsxs("span", { children: [formatNumber(itemsTotalTaxIncl), " ", state.currency] })] })] }) }) })] }), activeModal && (_jsx(ConfirmationModal, { open: !!activeModal, header: modalHeaders[activeModal], onCancel: () => setActiveModal(null), onContinue: () => {
|
|
434
|
+
if (activeModal === "issueInvoice") {
|
|
435
|
+
dispatch(actions.issue({
|
|
436
|
+
invoiceNo: invoiceNoInput,
|
|
437
|
+
dateIssued: state.dateIssued,
|
|
438
|
+
}));
|
|
439
|
+
}
|
|
440
|
+
if (activeModal === "rejectInvoice") {
|
|
441
|
+
dispatch(actions.reject({
|
|
442
|
+
final: finalReason,
|
|
443
|
+
id: generateId(),
|
|
444
|
+
reason: rejectReason,
|
|
445
|
+
}));
|
|
446
|
+
}
|
|
447
|
+
if (activeModal === "schedulePayment") {
|
|
448
|
+
dispatch(actions.schedulePayment({
|
|
449
|
+
id: generateId(),
|
|
450
|
+
processorRef: paymentRef,
|
|
451
|
+
}));
|
|
452
|
+
}
|
|
453
|
+
if (activeModal === "closePayment") {
|
|
454
|
+
dispatch(actions.closePayment({
|
|
455
|
+
closureReason: closureReason,
|
|
456
|
+
}));
|
|
457
|
+
}
|
|
458
|
+
if (activeModal === "registerPayment") {
|
|
459
|
+
dispatch(actions.registerPaymentTx({
|
|
460
|
+
id: state.payments[state.payments.length - 1].id,
|
|
461
|
+
timestamp: paymentDate,
|
|
462
|
+
txRef: txnRef,
|
|
463
|
+
}));
|
|
464
|
+
}
|
|
465
|
+
if (activeModal === "reportPaymentIssue") {
|
|
466
|
+
dispatch(actions.reportPaymentIssue({
|
|
467
|
+
id: state.payments[state.payments.length - 1].id,
|
|
468
|
+
issue: paymentIssue,
|
|
469
|
+
}));
|
|
470
|
+
}
|
|
471
|
+
if (activeModal === "confirmPayment") {
|
|
472
|
+
dispatch(actions.confirmPayment({
|
|
473
|
+
id: state.payments[state.payments.length - 1].id,
|
|
474
|
+
amount: parseFloat(paymentAmount) || 0,
|
|
475
|
+
}));
|
|
476
|
+
}
|
|
477
|
+
setActiveModal(null);
|
|
478
|
+
}, continueLabel: modalContinueLabels[activeModal], continueDisabled: modalWarning, children: modalContentMap[activeModal] })), (state.status === "ACCEPTED" ||
|
|
479
|
+
state.status === "PAYMENTSCHEDULED") && (_jsx("div", { className: "mt-8", children: !isFiatCurrency(state.currency) ? (_jsx(InvoiceToGnosis, { docState: state, dispatch: dispatch })) : (_jsx(RequestFinance, { docState: state, dispatch: dispatch })) }))] })] }));
|
|
472
480
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportUBL.d.ts","sourceRoot":"","sources":["../../../editors/invoice/exportUBL.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"exportUBL.d.ts","sourceRoot":"","sources":["../../../editors/invoice/exportUBL.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAKb,MAAM,wCAAwC,CAAC;AAEhD,UAAU,gBAAgB;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAqBD,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,OAAO,CAAC,CAAO;gBAEX,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,IAAI;IAKjD;;;OAGG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC;IAkC5C;;;;OAIG;IACG,YAAY,CAAC,EACjB,QAAwB,GACzB,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C;;OAEG;IACG,WAAW,CAAC,QAAQ,SAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAa1D;;OAEG;IACH,OAAO,CAAC,UAAU;IAalB;;OAEG;IACH,OAAO,CAAC,SAAS;IASjB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAsC7B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAyB7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAuB5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAuE1B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IA2BlC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA+B5B;;OAEG;YACW,qBAAqB;IAuBnC;;OAEG;IACH,OAAO,CAAC,YAAY;CAarB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,QAAwB,EACxB,OAAO,GACR,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlC;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,QAAwB,EACxB,OAAO,GACR,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestPDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestPDF.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAW,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"ingestPDF.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestPDF.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,wCAAwC,CAAC;AAYrF,wBAAsB,WAAW,CAAC,EAChC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C,iBAUA;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AA0BD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,kBAAkB,GACnB,EAAE,gBAAgB,2CAqSlB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
3
|
import { actions } from "../../document-models/invoice/index.js";
|
|
4
|
-
import { toast } from "@powerhousedao/design-system";
|
|
4
|
+
import { toast } from "@powerhousedao/design-system/connect";
|
|
5
5
|
import { uploadPdfChunked } from "./uploadPdfChunked.js";
|
|
6
|
-
import { getCountryCodeFromName } from "./utils/utils.js";
|
|
6
|
+
import { getCountryCodeFromName, mapChainNameToConfig } from "./utils/utils.js";
|
|
7
7
|
import { LoaderCircle } from "lucide-react";
|
|
8
8
|
let GRAPHQL_URL = "http://localhost:4001/graphql/invoice";
|
|
9
9
|
if (!window.document.baseURI.includes("localhost")) {
|
|
10
|
-
GRAPHQL_URL = "https://
|
|
10
|
+
GRAPHQL_URL = "https://switchboard-dev.powerhouse.xyz/graphql/invoice";
|
|
11
11
|
}
|
|
12
12
|
export async function loadPDFFile({ file, dispatch, }) {
|
|
13
13
|
if (!file)
|
|
@@ -77,6 +77,7 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
|
|
|
77
77
|
// If we have line items, dispatch them
|
|
78
78
|
if (invoiceData.lineItems && invoiceData.lineItems.length > 0) {
|
|
79
79
|
invoiceData.lineItems.forEach((item) => {
|
|
80
|
+
// Add the line item first
|
|
80
81
|
dispatch(actions.addLineItem({
|
|
81
82
|
id: item.id,
|
|
82
83
|
description: item.description,
|
|
@@ -88,6 +89,17 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
|
|
|
88
89
|
totalPriceTaxExcl: item.totalPriceTaxExcl,
|
|
89
90
|
totalPriceTaxIncl: item.totalPriceTaxIncl,
|
|
90
91
|
}));
|
|
92
|
+
// If auto-tagging assigned tags, add them
|
|
93
|
+
if (item.lineItemTag && Array.isArray(item.lineItemTag)) {
|
|
94
|
+
item.lineItemTag.forEach((tag) => {
|
|
95
|
+
dispatch(actions.setLineItemTag({
|
|
96
|
+
lineItemId: item.id,
|
|
97
|
+
dimension: tag.dimension,
|
|
98
|
+
value: tag.value,
|
|
99
|
+
label: tag.label,
|
|
100
|
+
}));
|
|
101
|
+
});
|
|
102
|
+
}
|
|
91
103
|
});
|
|
92
104
|
}
|
|
93
105
|
// If we have issuer data, dispatch it
|
|
@@ -127,11 +139,12 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
|
|
|
127
139
|
}
|
|
128
140
|
// Add crypto wallet information dispatch
|
|
129
141
|
if (invoiceData.issuer.paymentRouting?.wallet) {
|
|
142
|
+
const chainConfig = mapChainNameToConfig(invoiceData.issuer.paymentRouting.wallet.chainName);
|
|
130
143
|
dispatch(actions.editIssuerWallet({
|
|
131
144
|
address: invoiceData.issuer.paymentRouting.wallet.address || "",
|
|
132
|
-
chainId: invoiceData.issuer.paymentRouting.wallet.chainId ||
|
|
133
|
-
chainName: invoiceData.issuer.paymentRouting.wallet.chainName ||
|
|
134
|
-
rpc: invoiceData.issuer.paymentRouting.wallet.rpc ||
|
|
145
|
+
chainId: invoiceData.issuer.paymentRouting.wallet.chainId || chainConfig.chainId,
|
|
146
|
+
chainName: invoiceData.issuer.paymentRouting.wallet.chainName || chainConfig.chainName,
|
|
147
|
+
rpc: invoiceData.issuer.paymentRouting.wallet.rpc || chainConfig.rpc,
|
|
135
148
|
}));
|
|
136
149
|
}
|
|
137
150
|
}
|
|
@@ -165,11 +178,12 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
|
|
|
165
178
|
}
|
|
166
179
|
// Add payer crypto wallet information if present
|
|
167
180
|
if (invoiceData.payer.paymentRouting?.wallet) {
|
|
181
|
+
const payerChainConfig = mapChainNameToConfig(invoiceData.payer.paymentRouting.wallet.chainName);
|
|
168
182
|
dispatch(actions.editPayerWallet({
|
|
169
183
|
address: invoiceData.payer.paymentRouting.wallet.address || "",
|
|
170
|
-
chainId: invoiceData.payer.paymentRouting.wallet.chainId ||
|
|
171
|
-
chainName: invoiceData.payer.paymentRouting.wallet.chainName ||
|
|
172
|
-
rpc: invoiceData.payer.paymentRouting.wallet.rpc ||
|
|
184
|
+
chainId: invoiceData.payer.paymentRouting.wallet.chainId || payerChainConfig.chainId,
|
|
185
|
+
chainName: invoiceData.payer.paymentRouting.wallet.chainName || payerChainConfig.chainName,
|
|
186
|
+
rpc: invoiceData.payer.paymentRouting.wallet.rpc || payerChainConfig.rpc,
|
|
173
187
|
}));
|
|
174
188
|
}
|
|
175
189
|
}
|
|
@@ -177,15 +191,17 @@ export default function PDFUploader({ dispatch, changeDropdownOpen, }) {
|
|
|
177
191
|
toast("Invoice uploaded successfully", {
|
|
178
192
|
type: "success",
|
|
179
193
|
});
|
|
180
|
-
// Add debug logging here
|
|
181
|
-
console.log("Final document state:", JSON.stringify({
|
|
182
|
-
issuer: invoiceData.issuer,
|
|
183
|
-
payer: invoiceData.payer,
|
|
184
|
-
lineItems: invoiceData.lineItems,
|
|
185
|
-
paymentRouting: invoiceData.issuer?.paymentRouting,
|
|
186
|
-
bankDetails: invoiceData.issuer?.paymentRouting?.bank,
|
|
187
|
-
}, null, 2));
|
|
188
194
|
changeDropdownOpen(false);
|
|
195
|
+
// Debug log after all dispatch actions are completed
|
|
196
|
+
setTimeout(() => {
|
|
197
|
+
console.log("Final document state after all dispatches:", JSON.stringify({
|
|
198
|
+
issuer: invoiceData.issuer,
|
|
199
|
+
payer: invoiceData.payer,
|
|
200
|
+
lineItems: invoiceData.lineItems,
|
|
201
|
+
paymentRouting: invoiceData.issuer?.paymentRouting,
|
|
202
|
+
bankDetails: invoiceData.issuer?.paymentRouting?.bank,
|
|
203
|
+
}, null, 2));
|
|
204
|
+
}, 100);
|
|
189
205
|
}
|
|
190
206
|
else {
|
|
191
207
|
const errorMsg = extractErrorMessage(result.error || "Failed to process PDF");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestUBL.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestUBL.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"ingestUBL.d.ts","sourceRoot":"","sources":["../../../editors/invoice/ingestUBL.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,wCAAwC,CAAC;AAEhD,UAAU,gBAAgB;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAkC;gBAEtC,MAAM,EAAE,kBAAkB;IAItC,mBAAmB,CAAC,MAAM,EAAE,MAAM;IAqBlC,cAAc,CACZ,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI;IAUhB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,cAAc;IA8NtB,OAAO,CAAC,gBAAgB;CA4DzB;AAED,wBAAsB,WAAW,CAAC,EAChC,IAAI,EACJ,QAAQ,GACT,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBlC"}
|
|
@@ -3,8 +3,8 @@ import React, { useState, useEffect } from "react";
|
|
|
3
3
|
import { actions } from "../../document-models/invoice/index.js";
|
|
4
4
|
import { generateId } from "document-model";
|
|
5
5
|
let GRAPHQL_URL = "http://localhost:4001/graphql/invoice";
|
|
6
|
-
if (!window.document.baseURI.includes(
|
|
7
|
-
GRAPHQL_URL =
|
|
6
|
+
if (!window.document.baseURI.includes('localhost')) {
|
|
7
|
+
GRAPHQL_URL = 'https://switchboard-dev.powerhouse.xyz/graphql/invoice';
|
|
8
8
|
}
|
|
9
9
|
const InvoiceToGnosis = ({ docState, dispatch, }) => {
|
|
10
10
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentPropsWithRef } from "react";
|
|
2
|
-
import { EditLegalEntityBankInput } from "./legalEntity.js";
|
|
3
|
-
import { ValidationResult } from "../validation/validationManager.js";
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { EditLegalEntityBankInput } from "./legalEntity.js";
|
|
3
|
+
import type { ValidationResult } from "../validation/validationManager.js";
|
|
4
4
|
export type LegalEntityBankSectionProps = Omit<ComponentPropsWithRef<"div">, "children"> & {
|
|
5
5
|
readonly value: EditLegalEntityBankInput;
|
|
6
6
|
readonly onChange: (value: EditLegalEntityBankInput) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bankSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/bankSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"bankSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/bankSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAO3B,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAM3E,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,CACX,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrD,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAmCF,eAAO,MAAM,sBAAsB,qIAoiBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/common.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/common.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,eAAO,MAAM,UAAU,GAAI,eAExB;IACD,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,4CAEA,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,CAAC,OAAO,CAAC,4CAWvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, LegalEntity } from "../../../document-models/invoice/index.js";
|
|
2
|
-
import { ComponentPropsWithRef } from "react";
|
|
3
|
-
import { ValidationResult } from "../validation/validationManager.js";
|
|
1
|
+
import type { EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, LegalEntity } from "../../../document-models/invoice/index.js";
|
|
2
|
+
import { type ComponentPropsWithRef } from "react";
|
|
3
|
+
import type { ValidationResult } from "../validation/validationManager.js";
|
|
4
4
|
export type EditLegalEntityWalletInput = EditIssuerWalletInput | EditPayerWalletInput;
|
|
5
5
|
export type EditLegalEntityBankInput = EditIssuerBankInput | EditPayerBankInput;
|
|
6
6
|
export type EditLegalEntityInput = EditIssuerInput | EditPayerInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legalEntity.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/legalEntity.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"legalEntity.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/legalEntity.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,WAAW,EACZ,MAAM,2CAA2C,CAAC;AACnD,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAK1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,MAAM,MAAM,0BAA0B,GAClC,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAChF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,cAAc,CAAC;AAMpE,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,CACX,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,2BAA2B,4CA2KxE,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACpD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,uBAAuB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5D,CAAC;AA+BF,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,EAAE,oBAAoB,2CA4CtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
import { EditLegalEntityWalletInput } from "./legalEntity.js";
|
|
3
|
-
import { ValidationResult } from "../validation/validationManager.js";
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import type { EditLegalEntityWalletInput } from "./legalEntity.js";
|
|
3
|
+
import type { ValidationResult } from "../validation/validationManager.js";
|
|
4
4
|
export type LegalEntityWalletSectionProps = Omit<ComponentProps<"div">, "children" | "onChange"> & {
|
|
5
5
|
readonly value: EditLegalEntityWalletInput;
|
|
6
6
|
readonly onChange: (value: EditLegalEntityWalletInput) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/walletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"walletSection.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/legalEntity/walletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAI3E,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,UAAU,CACxB,GAAG;IACF,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,OAAO,6BAA6B,4CA0GrC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { useEffect, useState } from "react";
|
|
|
3
3
|
import { twMerge } from "tailwind-merge";
|
|
4
4
|
import { InputField } from "../components/inputField.js";
|
|
5
5
|
import { Select } from "@powerhousedao/document-engineering";
|
|
6
|
+
import { getAllChainConfigs } from "../utils/utils.js";
|
|
6
7
|
export const LegalEntityWalletSection = (props) => {
|
|
7
8
|
const { value, onChange, disabled, currency, status, walletvalidation, ...divProps } = props;
|
|
8
9
|
const [localState, setLocalState] = useState(value);
|
|
@@ -22,12 +23,10 @@ export const LegalEntityWalletSection = (props) => {
|
|
|
22
23
|
[field]: newValue,
|
|
23
24
|
});
|
|
24
25
|
};
|
|
25
|
-
const CHAIN_PRESETS =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// { chainName: "Gnosis", chainId: "100" },
|
|
30
|
-
];
|
|
26
|
+
const CHAIN_PRESETS = getAllChainConfigs().map(config => ({
|
|
27
|
+
chainName: config.chainName,
|
|
28
|
+
chainId: config.chainId,
|
|
29
|
+
}));
|
|
31
30
|
// Map CHAIN_PRESETS to Select options
|
|
32
31
|
const chainOptions = CHAIN_PRESETS.map((preset) => ({
|
|
33
32
|
label: preset.chainName,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dispatch } from "react";
|
|
2
|
-
import { InvoiceTag } from "../../../document-models/invoice/index.js";
|
|
1
|
+
import { type Dispatch } from "react";
|
|
2
|
+
import { type InvoiceTag } from "../../../document-models/invoice/index.js";
|
|
3
3
|
interface TagAssignmentRow {
|
|
4
4
|
id: string;
|
|
5
5
|
item: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineItemTags.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/lineItemTags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"lineItemTags.d.ts","sourceRoot":"","sources":["../../../../editors/invoice/lineItemTags/lineItemTags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,OAAO,CAAC;AAKhD,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAKrF,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACxB,eAAe,EAAE,UAAU,EAAE,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,OAAO,EACP,QAAQ,EACR,eAAe,GAChB,EAAE,sBAAsB,2CAkQxB"}
|