@powerhousedao/network-admin 0.0.64 → 1.0.0-dev.2
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/document-models.d.ts.map +1 -1
- package/dist/document-models/document-models.js +0 -2
- package/dist/document-models/index.d.ts +0 -1
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +0 -1
- package/dist/document-models/network-profile/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/document-model.js +84 -84
- package/dist/document-models/network-profile/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/ph-factories.js +0 -2
- package/dist/document-models/network-profile/gen/reducer.d.ts +0 -1
- package/dist/document-models/network-profile/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/schema/types.d.ts +2 -6
- package/dist/document-models/network-profile/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/schema/zod.d.ts +2 -8
- package/dist/document-models/network-profile/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/schema/zod.js +2 -6
- package/dist/document-models/network-profile/gen/utils.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/utils.js +1 -3
- package/dist/document-models/network-profile/hooks.d.ts +2 -2
- package/dist/document-models/network-profile/hooks.d.ts.map +1 -1
- package/dist/document-models/network-profile/module.d.ts +1 -1
- package/dist/document-models/network-profile/module.d.ts.map +1 -1
- package/dist/document-models/network-profile/module.js +1 -1
- package/dist/document-models/network-profile/src/reducers/network-profile-management.d.ts +1 -0
- package/dist/document-models/network-profile/src/reducers/network-profile-management.d.ts.map +1 -1
- package/dist/document-models/network-profile/src/reducers/network-profile-management.js +18 -27
- package/dist/document-models/network-profile/src/tests/document-model.test.d.ts +0 -4
- package/dist/document-models/network-profile/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/network-profile/src/tests/document-model.test.js +6 -92
- package/dist/document-models/network-profile/src/tests/network-profile-management.test.js +115 -69
- package/dist/document-models/payment-terms/actions.d.ts +2 -1
- package/dist/document-models/payment-terms/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/error.d.ts +40 -1
- package/dist/document-models/payment-terms/gen/clauses/error.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/error.js +32 -1
- package/dist/document-models/payment-terms/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/document-model.js +180 -89
- package/dist/document-models/payment-terms/gen/milestones/error.d.ts +26 -1
- package/dist/document-models/payment-terms/gen/milestones/error.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/milestones/error.js +18 -1
- package/dist/document-models/payment-terms/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/ph-factories.js +2 -1
- package/dist/document-models/payment-terms/gen/reducer.d.ts +0 -1
- package/dist/document-models/payment-terms/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/reducer.js +9 -4
- package/dist/document-models/payment-terms/gen/schema/types.d.ts +29 -14
- package/dist/document-models/payment-terms/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/schema/zod.d.ts +12 -36
- package/dist/document-models/payment-terms/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/schema/zod.js +55 -29
- package/dist/document-models/payment-terms/gen/terms/actions.d.ts +9 -5
- package/dist/document-models/payment-terms/gen/terms/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/creators.d.ts +4 -3
- package/dist/document-models/payment-terms/gen/terms/creators.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/creators.js +3 -2
- package/dist/document-models/payment-terms/gen/terms/operations.d.ts +3 -2
- package/dist/document-models/payment-terms/gen/terms/operations.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/utils.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/utils.js +3 -2
- package/dist/document-models/payment-terms/hooks.d.ts +2 -2
- package/dist/document-models/payment-terms/hooks.d.ts.map +1 -1
- package/dist/document-models/payment-terms/module.d.ts +1 -1
- package/dist/document-models/payment-terms/module.d.ts.map +1 -1
- package/dist/document-models/payment-terms/module.js +1 -1
- package/dist/document-models/payment-terms/src/reducers/clauses.d.ts +1 -0
- package/dist/document-models/payment-terms/src/reducers/clauses.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/clauses.js +15 -13
- package/dist/document-models/payment-terms/src/reducers/milestones.d.ts +1 -0
- package/dist/document-models/payment-terms/src/reducers/milestones.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/milestones.js +12 -10
- package/dist/document-models/payment-terms/src/reducers/terms.d.ts +1 -0
- package/dist/document-models/payment-terms/src/reducers/terms.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/terms.js +24 -14
- package/dist/document-models/payment-terms/src/tests/clauses.test.js +21 -26
- package/dist/document-models/payment-terms/src/tests/document-model.test.d.ts +0 -4
- package/dist/document-models/payment-terms/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/tests/document-model.test.js +6 -92
- package/dist/document-models/payment-terms/src/tests/milestones.test.js +19 -22
- package/dist/document-models/payment-terms/src/tests/terms.test.js +29 -24
- package/dist/document-models/payment-terms/tests/terms.test.js +15 -5
- package/dist/document-models/request-for-proposals/gen/document-model.js +4 -4
- package/dist/document-models/request-for-proposals/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/ph-factories.js +4 -6
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts +0 -1
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/schema/zod.d.ts +9 -64
- package/dist/document-models/request-for-proposals/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.js +5 -7
- package/dist/document-models/request-for-proposals/hooks.d.ts +2 -2
- package/dist/document-models/request-for-proposals/hooks.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/module.d.ts +1 -1
- package/dist/document-models/request-for-proposals/module.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/module.js +1 -1
- package/dist/document-models/request-for-proposals/src/reducers/contex-document.d.ts +1 -0
- package/dist/document-models/request-for-proposals/src/reducers/contex-document.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/reducers/contex-document.js +4 -3
- package/dist/document-models/request-for-proposals/src/reducers/proposals.d.ts +1 -0
- package/dist/document-models/request-for-proposals/src/reducers/proposals.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/reducers/proposals.js +5 -4
- package/dist/document-models/request-for-proposals/src/reducers/rfp-state.d.ts +1 -0
- package/dist/document-models/request-for-proposals/src/reducers/rfp-state.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/reducers/rfp-state.js +3 -2
- package/dist/document-models/request-for-proposals/src/tests/contex-document.test.d.ts +1 -2
- package/dist/document-models/request-for-proposals/src/tests/contex-document.test.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/tests/contex-document.test.js +181 -24
- package/dist/document-models/request-for-proposals/src/tests/document-model.test.d.ts +0 -4
- package/dist/document-models/request-for-proposals/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/tests/document-model.test.js +6 -92
- package/dist/document-models/request-for-proposals/src/tests/proposals.test.d.ts +1 -2
- package/dist/document-models/request-for-proposals/src/tests/proposals.test.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/tests/proposals.test.js +327 -33
- package/dist/document-models/request-for-proposals/src/tests/rfp-state.test.d.ts +1 -2
- package/dist/document-models/request-for-proposals/src/tests/rfp-state.test.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/src/tests/rfp-state.test.js +240 -15
- package/dist/document-models/workstream/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/document-model.js +16 -16
- package/dist/document-models/workstream/gen/reducer.d.ts +0 -1
- package/dist/document-models/workstream/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/schema/types.d.ts +1 -1
- package/dist/document-models/workstream/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/schema/zod.d.ts +5 -35
- package/dist/document-models/workstream/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/utils.js +1 -1
- package/dist/document-models/workstream/hooks.d.ts +2 -2
- package/dist/document-models/workstream/hooks.d.ts.map +1 -1
- package/dist/document-models/workstream/module.d.ts +1 -1
- package/dist/document-models/workstream/module.d.ts.map +1 -1
- package/dist/document-models/workstream/module.js +1 -1
- package/dist/document-models/workstream/src/reducers/proposals.d.ts +1 -0
- package/dist/document-models/workstream/src/reducers/proposals.d.ts.map +1 -1
- package/dist/document-models/workstream/src/reducers/proposals.js +6 -83
- package/dist/document-models/workstream/src/reducers/workstream.d.ts +1 -0
- package/dist/document-models/workstream/src/reducers/workstream.d.ts.map +1 -1
- package/dist/document-models/workstream/src/reducers/workstream.js +7 -6
- package/dist/document-models/workstream/src/tests/document-model.test.d.ts +0 -4
- package/dist/document-models/workstream/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/workstream/src/tests/document-model.test.js +3 -89
- package/dist/document-models/workstream/src/tests/proposals-reducers.test.d.ts +5 -0
- package/dist/document-models/workstream/src/tests/proposals-reducers.test.d.ts.map +1 -0
- package/dist/document-models/workstream/src/tests/proposals-reducers.test.js +318 -0
- package/dist/document-models/workstream/src/tests/proposals.test.js +25 -26
- package/dist/document-models/workstream/src/tests/workstream-reducers.test.d.ts +5 -0
- package/dist/document-models/workstream/src/tests/workstream-reducers.test.d.ts.map +1 -0
- package/dist/document-models/workstream/src/tests/workstream-reducers.test.js +210 -0
- package/dist/document-models/workstream/src/tests/workstream.test.js +29 -34
- package/dist/editors/hooks/useNetworkProfileDocument.d.ts +4 -0
- package/dist/editors/hooks/useNetworkProfileDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useNetworkProfileDocument.js +8 -0
- package/dist/editors/hooks/usePaymentTermsDocument.d.ts +4 -0
- package/dist/editors/hooks/usePaymentTermsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/usePaymentTermsDocument.js +8 -0
- package/dist/editors/hooks/useRequestForProposalsDocument.d.ts +4 -0
- package/dist/editors/hooks/useRequestForProposalsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useRequestForProposalsDocument.js +8 -0
- package/dist/editors/hooks/useWorkstreamDocument.d.ts +4 -0
- package/dist/editors/hooks/useWorkstreamDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useWorkstreamDocument.js +8 -0
- package/dist/editors/index.d.ts +6 -6
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +6 -6
- package/dist/editors/network-admin/components/CreateDocument.d.ts.map +1 -1
- package/dist/editors/network-admin/components/CreateDocument.js +12 -8
- package/dist/editors/network-admin/components/DriveExplorer.d.ts +1 -1
- package/dist/editors/network-admin/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/network-admin/components/DriveExplorer.js +230 -53
- package/dist/editors/network-admin/components/FolderTree.d.ts +1 -9
- package/dist/editors/network-admin/components/FolderTree.d.ts.map +1 -1
- package/dist/editors/network-admin/components/FolderTree.js +55 -216
- package/dist/editors/network-admin/components/icons/PaymentIcon.d.ts.map +1 -1
- package/dist/editors/network-admin/components/icons/RfpIcon.d.ts.map +1 -1
- package/dist/editors/network-admin/components/icons/SowIcon.d.ts.map +1 -1
- package/dist/editors/network-admin/components/icons/WorkstreamIcon.d.ts.map +1 -1
- package/dist/editors/network-admin/config.d.ts +0 -1
- package/dist/editors/network-admin/config.d.ts.map +1 -1
- package/dist/editors/network-admin/config.js +1 -1
- package/dist/editors/network-admin/editor.d.ts +1 -2
- package/dist/editors/network-admin/editor.d.ts.map +1 -1
- package/dist/editors/network-admin/editor.js +1 -4
- package/dist/editors/network-admin/index.d.ts +3 -0
- package/dist/editors/network-admin/index.d.ts.map +1 -0
- package/dist/editors/network-admin/index.js +10 -0
- package/dist/editors/network-profile/editor.d.ts +1 -1
- package/dist/editors/network-profile/editor.d.ts.map +1 -1
- package/dist/editors/network-profile/editor.js +13 -45
- package/dist/editors/network-profile/index.d.ts +4 -0
- package/dist/editors/network-profile/index.d.ts.map +1 -0
- package/dist/editors/network-profile/index.js +10 -0
- package/dist/editors/payment-terms/basic-terms-tab.d.ts +10 -0
- package/dist/editors/payment-terms/basic-terms-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/basic-terms-tab.js +89 -0
- package/dist/editors/payment-terms/clauses-tab.d.ts +12 -0
- package/dist/editors/payment-terms/clauses-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/clauses-tab.js +213 -0
- package/dist/editors/payment-terms/cost-materials-tab.d.ts +10 -0
- package/dist/editors/payment-terms/cost-materials-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/cost-materials-tab.js +63 -0
- package/dist/editors/payment-terms/editor.d.ts +2 -0
- package/dist/editors/payment-terms/editor.d.ts.map +1 -1
- package/dist/editors/payment-terms/editor.js +55 -39
- package/dist/editors/payment-terms/escrow-tab.d.ts +10 -0
- package/dist/editors/payment-terms/escrow-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/escrow-tab.js +57 -0
- package/dist/editors/payment-terms/evaluation-tab.d.ts +10 -0
- package/dist/editors/payment-terms/evaluation-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/evaluation-tab.js +63 -0
- package/dist/editors/payment-terms/index.d.ts +4 -0
- package/dist/editors/payment-terms/index.d.ts.map +1 -0
- package/dist/editors/payment-terms/index.js +10 -0
- package/dist/editors/payment-terms/milestones-tab.d.ts +10 -0
- package/dist/editors/payment-terms/milestones-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/milestones-tab.js +205 -0
- package/dist/editors/payment-terms/retainer-tab.d.ts +10 -0
- package/dist/editors/payment-terms/retainer-tab.d.ts.map +1 -0
- package/dist/editors/payment-terms/retainer-tab.js +91 -0
- package/dist/editors/request-for-proposals/editor.d.ts.map +1 -1
- package/dist/editors/request-for-proposals/editor.js +4 -4
- package/dist/editors/request-for-proposals/index.d.ts +4 -0
- package/dist/editors/request-for-proposals/index.d.ts.map +1 -0
- package/dist/editors/request-for-proposals/index.js +10 -0
- package/dist/editors/request-for-proposals/markdown-editor.d.ts.map +1 -1
- package/dist/editors/request-for-proposals/markdown-editor.js +3 -3
- package/dist/editors/workstream/editor.d.ts.map +1 -1
- package/dist/editors/workstream/editor.js +165 -290
- package/dist/editors/workstream/index.d.ts +4 -0
- package/dist/editors/workstream/index.d.ts.map +1 -0
- package/dist/editors/workstream/index.js +10 -0
- package/dist/editors/workstream/project-management-import.d.ts +3 -0
- package/dist/editors/workstream/project-management-import.d.ts.map +1 -0
- package/dist/editors/workstream/project-management-import.js +5 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/powerhouse.manifest.json +6 -27
- package/dist/processors/factory.d.ts +1 -1
- package/dist/processors/factory.d.ts.map +1 -1
- package/dist/processors/factory.js +1 -1
- package/dist/processors/index.d.ts +1 -1
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/workstreams/factory.d.ts.map +1 -1
- package/dist/processors/workstreams/factory.js +1 -4
- package/dist/processors/workstreams/index.d.ts +2 -4
- package/dist/processors/workstreams/index.d.ts.map +1 -1
- package/dist/processors/workstreams/index.js +43 -102
- package/dist/processors/workstreams/migrations.d.ts.map +1 -1
- package/dist/processors/workstreams/migrations.js +15 -12
- package/dist/scripts/sow-mirror/mirror_sow_state.js +114 -119
- package/dist/style.css +6885 -6085
- package/dist/subgraphs/index.d.ts +5 -1
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +5 -1
- package/dist/subgraphs/network-profile/index.d.ts +11 -0
- package/dist/subgraphs/network-profile/index.d.ts.map +1 -0
- package/dist/subgraphs/network-profile/index.js +11 -0
- package/dist/subgraphs/network-profile/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/network-profile/resolvers.js +205 -0
- package/dist/subgraphs/network-profile/schema.d.ts.map +1 -0
- package/dist/subgraphs/network-profile/schema.js +139 -0
- package/dist/subgraphs/networks/resolvers.d.ts +2 -2
- package/dist/subgraphs/networks/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/networks/resolvers.js +8 -138
- package/dist/subgraphs/networks/schema.d.ts.map +1 -1
- package/dist/subgraphs/networks/schema.js +1 -66
- package/dist/subgraphs/{builders-addon → payment-terms}/index.d.ts +1 -1
- package/dist/subgraphs/payment-terms/index.d.ts.map +1 -0
- package/dist/subgraphs/{builders-addon → payment-terms}/index.js +2 -2
- package/dist/subgraphs/payment-terms/resolvers.d.ts +3 -0
- package/dist/subgraphs/payment-terms/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/payment-terms/resolvers.js +277 -0
- package/dist/subgraphs/payment-terms/schema.d.ts +3 -0
- package/dist/subgraphs/payment-terms/schema.d.ts.map +1 -0
- package/dist/subgraphs/payment-terms/schema.js +324 -0
- package/dist/subgraphs/request-for-proposals/index.d.ts +11 -0
- package/dist/subgraphs/request-for-proposals/index.d.ts.map +1 -0
- package/dist/subgraphs/request-for-proposals/index.js +11 -0
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts +3 -0
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/request-for-proposals/resolvers.js +145 -0
- package/dist/subgraphs/request-for-proposals/schema.d.ts +3 -0
- package/dist/subgraphs/request-for-proposals/schema.d.ts.map +1 -0
- package/dist/subgraphs/request-for-proposals/schema.js +232 -0
- package/dist/subgraphs/workstream/index.d.ts +11 -0
- package/dist/subgraphs/workstream/index.d.ts.map +1 -0
- package/dist/subgraphs/workstream/index.js +11 -0
- package/dist/subgraphs/workstream/resolvers.d.ts +3 -0
- package/dist/subgraphs/workstream/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/workstream/resolvers.js +181 -0
- package/dist/subgraphs/workstream/schema.d.ts +3 -0
- package/dist/subgraphs/workstream/schema.d.ts.map +1 -0
- package/dist/subgraphs/workstream/schema.js +206 -0
- package/dist/subgraphs/workstreams/index.d.ts +1 -4
- package/dist/subgraphs/workstreams/index.d.ts.map +1 -1
- package/dist/subgraphs/workstreams/index.js +0 -6
- package/dist/subgraphs/workstreams/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/workstreams/resolvers.js +30 -495
- package/dist/subgraphs/workstreams/schema.d.ts.map +1 -1
- package/dist/subgraphs/workstreams/schema.js +35 -228
- package/dist/vite.config.d.ts.map +1 -1
- package/dist/vite.config.js +1 -6
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +8 -0
- package/package.json +90 -56
- package/dist/document-models/builders/actions.d.ts +0 -14
- package/dist/document-models/builders/actions.d.ts.map +0 -1
- package/dist/document-models/builders/actions.js +0 -4
- package/dist/document-models/builders/gen/actions.d.ts +0 -4
- package/dist/document-models/builders/gen/actions.d.ts.map +0 -1
- package/dist/document-models/builders/gen/actions.js +0 -1
- package/dist/document-models/builders/gen/builders/actions.d.ts +0 -12
- package/dist/document-models/builders/gen/builders/actions.d.ts.map +0 -1
- package/dist/document-models/builders/gen/builders/actions.js +0 -1
- package/dist/document-models/builders/gen/builders/creators.d.ts +0 -5
- package/dist/document-models/builders/gen/builders/creators.d.ts.map +0 -1
- package/dist/document-models/builders/gen/builders/creators.js +0 -4
- package/dist/document-models/builders/gen/builders/error.d.ts +0 -2
- package/dist/document-models/builders/gen/builders/error.d.ts.map +0 -1
- package/dist/document-models/builders/gen/builders/error.js +0 -1
- package/dist/document-models/builders/gen/builders/operations.d.ts +0 -8
- package/dist/document-models/builders/gen/builders/operations.d.ts.map +0 -1
- package/dist/document-models/builders/gen/builders/operations.js +0 -1
- package/dist/document-models/builders/gen/creators.d.ts +0 -3
- package/dist/document-models/builders/gen/creators.d.ts.map +0 -1
- package/dist/document-models/builders/gen/creators.js +0 -2
- package/dist/document-models/builders/gen/document-model.d.ts +0 -3
- package/dist/document-models/builders/gen/document-model.d.ts.map +0 -1
- package/dist/document-models/builders/gen/document-model.js +0 -59
- package/dist/document-models/builders/gen/document-schema.d.ts +0 -44
- package/dist/document-models/builders/gen/document-schema.d.ts.map +0 -1
- package/dist/document-models/builders/gen/document-schema.js +0 -33
- package/dist/document-models/builders/gen/document-type.d.ts +0 -2
- package/dist/document-models/builders/gen/document-type.d.ts.map +0 -1
- package/dist/document-models/builders/gen/document-type.js +0 -1
- package/dist/document-models/builders/gen/index.d.ts +0 -12
- package/dist/document-models/builders/gen/index.d.ts.map +0 -1
- package/dist/document-models/builders/gen/index.js +0 -11
- package/dist/document-models/builders/gen/ph-factories.d.ts +0 -23
- package/dist/document-models/builders/gen/ph-factories.d.ts.map +0 -1
- package/dist/document-models/builders/gen/ph-factories.js +0 -47
- package/dist/document-models/builders/gen/reducer.d.ts +0 -3
- package/dist/document-models/builders/gen/reducer.d.ts.map +0 -1
- package/dist/document-models/builders/gen/reducer.js +0 -23
- package/dist/document-models/builders/gen/schema/index.d.ts +0 -3
- package/dist/document-models/builders/gen/schema/index.d.ts.map +0 -1
- package/dist/document-models/builders/gen/schema/index.js +0 -2
- package/dist/document-models/builders/gen/schema/types.d.ts +0 -158
- package/dist/document-models/builders/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/builders/gen/schema/types.js +0 -1
- package/dist/document-models/builders/gen/schema/zod.d.ts +0 -13
- package/dist/document-models/builders/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/builders/gen/schema/zod.js +0 -21
- package/dist/document-models/builders/gen/types.d.ts +0 -12
- package/dist/document-models/builders/gen/types.d.ts.map +0 -1
- package/dist/document-models/builders/gen/types.js +0 -1
- package/dist/document-models/builders/gen/utils.d.ts +0 -15
- package/dist/document-models/builders/gen/utils.d.ts.map +0 -1
- package/dist/document-models/builders/gen/utils.js +0 -51
- package/dist/document-models/builders/hooks.d.ts +0 -14
- package/dist/document-models/builders/hooks.d.ts.map +0 -1
- package/dist/document-models/builders/hooks.js +0 -25
- package/dist/document-models/builders/index.d.ts +0 -6
- package/dist/document-models/builders/index.d.ts.map +0 -1
- package/dist/document-models/builders/index.js +0 -5
- package/dist/document-models/builders/module.d.ts +0 -5
- package/dist/document-models/builders/module.d.ts.map +0 -1
- package/dist/document-models/builders/module.js +0 -11
- package/dist/document-models/builders/src/index.d.ts +0 -2
- package/dist/document-models/builders/src/index.d.ts.map +0 -1
- package/dist/document-models/builders/src/index.js +0 -1
- package/dist/document-models/builders/src/reducers/builders.d.ts +0 -3
- package/dist/document-models/builders/src/reducers/builders.d.ts.map +0 -1
- package/dist/document-models/builders/src/reducers/builders.js +0 -8
- package/dist/document-models/builders/src/tests/builders.test.d.ts +0 -6
- package/dist/document-models/builders/src/tests/builders.test.d.ts.map +0 -1
- package/dist/document-models/builders/src/tests/builders.test.js +0 -29
- package/dist/document-models/builders/src/tests/document-model.test.d.ts +0 -10
- package/dist/document-models/builders/src/tests/document-model.test.d.ts.map +0 -1
- package/dist/document-models/builders/src/tests/document-model.test.js +0 -104
- package/dist/document-models/builders/src/utils.d.ts +0 -2
- package/dist/document-models/builders/src/utils.d.ts.map +0 -1
- package/dist/document-models/builders/src/utils.js +0 -1
- package/dist/document-models/builders/tests/builders.test.d.ts +0 -2
- package/dist/document-models/builders/tests/builders.test.d.ts.map +0 -1
- package/dist/document-models/builders/tests/builders.test.js +0 -25
- package/dist/document-models/builders/tests/document-model.test.d.ts +0 -10
- package/dist/document-models/builders/tests/document-model.test.d.ts.map +0 -1
- package/dist/document-models/builders/tests/document-model.test.js +0 -104
- package/dist/document-models/builders/utils.d.ts +0 -14
- package/dist/document-models/builders/utils.d.ts.map +0 -1
- package/dist/document-models/builders/utils.js +0 -7
- package/dist/document-models/network-profile/gen/document-schema.d.ts +0 -80
- package/dist/document-models/network-profile/gen/document-schema.d.ts.map +0 -1
- package/dist/document-models/payment-terms/gen/document-schema.d.ts +0 -95
- package/dist/document-models/payment-terms/gen/document-schema.d.ts.map +0 -1
- package/dist/document-models/request-for-proposals/gen/document-schema.d.ts +0 -83
- package/dist/document-models/request-for-proposals/gen/document-schema.d.ts.map +0 -1
- package/dist/document-models/workstream/gen/document-schema.d.ts +0 -71
- package/dist/document-models/workstream/gen/document-schema.d.ts.map +0 -1
- package/dist/editors/builders/editor.d.ts +0 -3
- package/dist/editors/builders/editor.d.ts.map +0 -1
- package/dist/editors/builders/editor.js +0 -285
- package/dist/editors/builders/hooks/useRemoteBuilderProfiles.d.ts +0 -20
- package/dist/editors/builders/hooks/useRemoteBuilderProfiles.d.ts.map +0 -1
- package/dist/editors/builders/hooks/useRemoteBuilderProfiles.js +0 -57
- package/dist/editors/builders/module.d.ts +0 -4
- package/dist/editors/builders/module.d.ts.map +0 -1
- package/dist/editors/builders/module.js +0 -10
- package/dist/editors/builders/utils/graphql-client.d.ts +0 -41
- package/dist/editors/builders/utils/graphql-client.d.ts.map +0 -1
- package/dist/editors/builders/utils/graphql-client.js +0 -189
- package/dist/editors/editors.d.ts +0 -3
- package/dist/editors/editors.d.ts.map +0 -1
- package/dist/editors/editors.js +0 -14
- package/dist/editors/network-admin/components/DriveContents.d.ts +0 -3
- package/dist/editors/network-admin/components/DriveContents.d.ts.map +0 -1
- package/dist/editors/network-admin/components/DriveContents.js +0 -10
- package/dist/editors/network-admin/components/EmptyState.d.ts +0 -3
- package/dist/editors/network-admin/components/EmptyState.d.ts.map +0 -1
- package/dist/editors/network-admin/components/EmptyState.js +0 -10
- package/dist/editors/network-admin/components/Files.d.ts +0 -3
- package/dist/editors/network-admin/components/Files.d.ts.map +0 -1
- package/dist/editors/network-admin/components/Files.js +0 -12
- package/dist/editors/network-admin/components/Folders.d.ts +0 -3
- package/dist/editors/network-admin/components/Folders.d.ts.map +0 -1
- package/dist/editors/network-admin/components/Folders.js +0 -12
- package/dist/editors/network-admin/components/NavigationBreadcrumbs.d.ts +0 -3
- package/dist/editors/network-admin/components/NavigationBreadcrumbs.d.ts.map +0 -1
- package/dist/editors/network-admin/components/NavigationBreadcrumbs.js +0 -6
- package/dist/editors/network-admin/module.d.ts +0 -4
- package/dist/editors/network-admin/module.d.ts.map +0 -1
- package/dist/editors/network-admin/module.js +0 -10
- package/dist/editors/network-profile/components/EditName.d.ts +0 -3
- package/dist/editors/network-profile/components/EditName.d.ts.map +0 -1
- package/dist/editors/network-profile/components/EditName.js +0 -31
- package/dist/editors/network-profile/module.d.ts +0 -4
- package/dist/editors/network-profile/module.d.ts.map +0 -1
- package/dist/editors/network-profile/module.js +0 -10
- package/dist/editors/payment-terms/components/clauses-section.d.ts +0 -12
- package/dist/editors/payment-terms/components/clauses-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/clauses-section.js +0 -269
- package/dist/editors/payment-terms/components/escrow-section.d.ts +0 -13
- package/dist/editors/payment-terms/components/escrow-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/escrow-section.js +0 -72
- package/dist/editors/payment-terms/components/evaluation-section.d.ts +0 -13
- package/dist/editors/payment-terms/components/evaluation-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/evaluation-section.js +0 -94
- package/dist/editors/payment-terms/components/header-section.d.ts +0 -16
- package/dist/editors/payment-terms/components/header-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/header-section.js +0 -67
- package/dist/editors/payment-terms/components/milestones-section.d.ts +0 -11
- package/dist/editors/payment-terms/components/milestones-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/milestones-section.js +0 -236
- package/dist/editors/payment-terms/components/parties-section.d.ts +0 -11
- package/dist/editors/payment-terms/components/parties-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/parties-section.js +0 -36
- package/dist/editors/payment-terms/components/payment-config-section.d.ts +0 -11
- package/dist/editors/payment-terms/components/payment-config-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/payment-config-section.js +0 -68
- package/dist/editors/payment-terms/components/time-materials-section.d.ts +0 -11
- package/dist/editors/payment-terms/components/time-materials-section.d.ts.map +0 -1
- package/dist/editors/payment-terms/components/time-materials-section.js +0 -68
- package/dist/editors/payment-terms/module.d.ts +0 -4
- package/dist/editors/payment-terms/module.d.ts.map +0 -1
- package/dist/editors/payment-terms/module.js +0 -10
- package/dist/editors/request-for-proposals/components/EditName.d.ts +0 -3
- package/dist/editors/request-for-proposals/components/EditName.d.ts.map +0 -1
- package/dist/editors/request-for-proposals/components/EditName.js +0 -31
- package/dist/editors/request-for-proposals/module.d.ts +0 -4
- package/dist/editors/request-for-proposals/module.d.ts.map +0 -1
- package/dist/editors/request-for-proposals/module.js +0 -10
- package/dist/editors/workstream/module.d.ts +0 -4
- package/dist/editors/workstream/module.d.ts.map +0 -1
- package/dist/editors/workstream/module.js +0 -10
- package/dist/subgraphs/builders-addon/index.d.ts.map +0 -1
- package/dist/subgraphs/builders-addon/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/builders-addon/resolvers.js +0 -376
- package/dist/subgraphs/builders-addon/schema.d.ts.map +0 -1
- package/dist/subgraphs/builders-addon/schema.js +0 -209
- /package/dist/subgraphs/{builders-addon → network-profile}/resolvers.d.ts +0 -0
- /package/dist/subgraphs/{builders-addon → network-profile}/schema.d.ts +0 -0
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useMemo } from "react";
|
|
3
|
-
import { Scale, TrendingUp, TrendingDown, Plus } from "lucide-react";
|
|
4
|
-
import { ObjectSetTable, } from "@powerhousedao/document-engineering";
|
|
5
|
-
import { toast } from "@powerhousedao/design-system/connect";
|
|
6
|
-
import { generateId } from "document-model/core";
|
|
7
|
-
import {} from "../../../document-models/payment-terms/index.js";
|
|
8
|
-
export function ClausesSection({ bonusClauses, penaltyClauses, dispatch, actions, currency, }) {
|
|
9
|
-
const [activeTab, setActiveTab] = useState("bonus");
|
|
10
|
-
const bonusColumns = useMemo(() => [
|
|
11
|
-
{
|
|
12
|
-
field: "condition",
|
|
13
|
-
title: "Condition",
|
|
14
|
-
type: "string",
|
|
15
|
-
editable: true,
|
|
16
|
-
align: "left",
|
|
17
|
-
width: 350,
|
|
18
|
-
onSave: (newValue, context) => {
|
|
19
|
-
if (newValue && newValue !== context.row.condition) {
|
|
20
|
-
dispatch(actions.updateBonusClause({
|
|
21
|
-
id: context.row.id,
|
|
22
|
-
condition: newValue,
|
|
23
|
-
}));
|
|
24
|
-
toast("Condition updated", { type: "success" });
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
},
|
|
29
|
-
renderCell: (value, context) => {
|
|
30
|
-
// Use context.row to get the latest state value
|
|
31
|
-
const condition = context.row.condition;
|
|
32
|
-
if (!condition) {
|
|
33
|
-
return (_jsx("span", { className: "text-slate-400 italic", children: "+ Double-click to add bonus clause" }));
|
|
34
|
-
}
|
|
35
|
-
return _jsx("span", { children: condition });
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
field: "bonusAmount",
|
|
40
|
-
title: `Amount (${currency})`,
|
|
41
|
-
type: "number",
|
|
42
|
-
editable: true,
|
|
43
|
-
align: "right",
|
|
44
|
-
width: 120,
|
|
45
|
-
renderCell: (value, context) => {
|
|
46
|
-
// Hide for empty/new rows
|
|
47
|
-
if (!context.row.condition) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
// Use context.row to get the latest state value
|
|
51
|
-
const numValue = context.row.bonusAmount?.value;
|
|
52
|
-
if (numValue === undefined || numValue === null) {
|
|
53
|
-
return _jsx("span", { className: "text-slate-400", children: "\u2014" });
|
|
54
|
-
}
|
|
55
|
-
return (_jsxs("span", { className: "font-mono text-sm text-emerald-600", children: [_jsxs("span", { className: "font-semibold", children: ["+", numValue.toLocaleString()] }), _jsx("span", { className: "text-emerald-500 ml-1", children: context.row.bonusAmount?.unit || currency })] }));
|
|
56
|
-
},
|
|
57
|
-
renderCellEditor: (value, onChange, context) => {
|
|
58
|
-
// Extract numeric value from Amount object
|
|
59
|
-
const amountValue = context.row.bonusAmount?.value;
|
|
60
|
-
return (_jsx("input", { className: "w-full bg-white border border-gray-300 rounded-md p-2", name: `bonusAmount-${context.row.id}`, defaultValue: amountValue, step: "0.01", type: "number", onBlur: (e) => {
|
|
61
|
-
if (e.target.value !== undefined &&
|
|
62
|
-
e.target.value !== String(context.row.bonusAmount?.value)) {
|
|
63
|
-
const amount = parseFloat(e.target.value);
|
|
64
|
-
if (!isNaN(amount)) {
|
|
65
|
-
dispatch(actions.updateBonusClause({
|
|
66
|
-
id: context.row.id,
|
|
67
|
-
bonusAmount: {
|
|
68
|
-
value: amount,
|
|
69
|
-
unit: currency,
|
|
70
|
-
},
|
|
71
|
-
}));
|
|
72
|
-
toast("Amount updated", { type: "success" });
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
} }));
|
|
76
|
-
},
|
|
77
|
-
onSave: () => {
|
|
78
|
-
return true;
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
field: "comment",
|
|
83
|
-
title: "Comment",
|
|
84
|
-
type: "string",
|
|
85
|
-
editable: true,
|
|
86
|
-
align: "left",
|
|
87
|
-
width: 180,
|
|
88
|
-
renderCell: (value, context) => {
|
|
89
|
-
// Hide for empty/new rows
|
|
90
|
-
if (!context.row.condition) {
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
// Use context.row to get the latest state value
|
|
94
|
-
const comment = context.row.comment;
|
|
95
|
-
return comment || _jsx("span", { className: "text-slate-400", children: "\u2014" });
|
|
96
|
-
},
|
|
97
|
-
onSave: (newValue, context) => {
|
|
98
|
-
dispatch(actions.updateBonusClause({
|
|
99
|
-
id: context.row.id,
|
|
100
|
-
comment: newValue || undefined,
|
|
101
|
-
}));
|
|
102
|
-
toast("Comment updated", { type: "success" });
|
|
103
|
-
return true;
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
], [actions, currency, dispatch]);
|
|
107
|
-
const penaltyColumns = useMemo(() => [
|
|
108
|
-
{
|
|
109
|
-
field: "condition",
|
|
110
|
-
title: "Condition",
|
|
111
|
-
type: "string",
|
|
112
|
-
editable: true,
|
|
113
|
-
align: "left",
|
|
114
|
-
width: 350,
|
|
115
|
-
onSave: (newValue, context) => {
|
|
116
|
-
if (newValue && newValue !== context.row.condition) {
|
|
117
|
-
dispatch(actions.updatePenaltyClause({
|
|
118
|
-
id: context.row.id,
|
|
119
|
-
condition: newValue,
|
|
120
|
-
}));
|
|
121
|
-
toast("Condition updated", { type: "success" });
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
return false;
|
|
125
|
-
},
|
|
126
|
-
renderCell: (value, context) => {
|
|
127
|
-
// Use context.row to get the latest state value
|
|
128
|
-
const condition = context.row.condition;
|
|
129
|
-
if (!condition) {
|
|
130
|
-
return (_jsx("span", { className: "text-slate-400 italic", children: "+ Double-click to add penalty clause" }));
|
|
131
|
-
}
|
|
132
|
-
return _jsx("span", { children: condition });
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
field: "deductionAmount",
|
|
137
|
-
title: `Deduction (${currency})`,
|
|
138
|
-
type: "number",
|
|
139
|
-
editable: true,
|
|
140
|
-
align: "right",
|
|
141
|
-
width: 120,
|
|
142
|
-
renderCell: (value, context) => {
|
|
143
|
-
// Hide for empty/new rows
|
|
144
|
-
if (!context.row.condition) {
|
|
145
|
-
return null;
|
|
146
|
-
}
|
|
147
|
-
// Use context.row to get the latest state value
|
|
148
|
-
const numValue = context.row.deductionAmount?.value;
|
|
149
|
-
if (numValue === undefined || numValue === null) {
|
|
150
|
-
return _jsx("span", { className: "text-slate-400", children: "\u2014" });
|
|
151
|
-
}
|
|
152
|
-
return (_jsxs("span", { className: "font-mono text-sm text-rose-600", children: [_jsxs("span", { className: "font-semibold", children: ["-", numValue.toLocaleString()] }), _jsx("span", { className: "text-rose-500 ml-1", children: context.row.deductionAmount?.unit || currency })] }));
|
|
153
|
-
},
|
|
154
|
-
renderCellEditor: (value, onChange, context) => {
|
|
155
|
-
// Extract numeric value from Amount object
|
|
156
|
-
const amountValue = context.row.deductionAmount?.value;
|
|
157
|
-
return (_jsx("input", { className: "w-full bg-white border border-gray-300 rounded-md p-2", name: `deductionAmount-${context.row.id}`, defaultValue: amountValue, step: "0.01", type: "number", onBlur: (e) => {
|
|
158
|
-
if (e.target.value !== undefined &&
|
|
159
|
-
e.target.value !== String(context.row.deductionAmount?.value)) {
|
|
160
|
-
const amount = parseFloat(e.target.value);
|
|
161
|
-
if (!isNaN(amount)) {
|
|
162
|
-
dispatch(actions.updatePenaltyClause({
|
|
163
|
-
id: context.row.id,
|
|
164
|
-
deductionAmount: {
|
|
165
|
-
value: amount,
|
|
166
|
-
unit: currency,
|
|
167
|
-
},
|
|
168
|
-
}));
|
|
169
|
-
toast("Amount updated", { type: "success" });
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
} }));
|
|
173
|
-
},
|
|
174
|
-
onSave: () => {
|
|
175
|
-
return true;
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
field: "comment",
|
|
180
|
-
title: "Comment",
|
|
181
|
-
type: "string",
|
|
182
|
-
editable: true,
|
|
183
|
-
align: "left",
|
|
184
|
-
width: 180,
|
|
185
|
-
renderCell: (value, context) => {
|
|
186
|
-
// Hide for empty/new rows
|
|
187
|
-
if (!context.row.condition) {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
// Use context.row to get the latest state value
|
|
191
|
-
const comment = context.row.comment;
|
|
192
|
-
return comment || _jsx("span", { className: "text-slate-400", children: "\u2014" });
|
|
193
|
-
},
|
|
194
|
-
onSave: (newValue, context) => {
|
|
195
|
-
dispatch(actions.updatePenaltyClause({
|
|
196
|
-
id: context.row.id,
|
|
197
|
-
comment: newValue || undefined,
|
|
198
|
-
}));
|
|
199
|
-
toast("Comment updated", { type: "success" });
|
|
200
|
-
return true;
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
], [actions, currency, dispatch]);
|
|
204
|
-
const currentClauses = activeTab === "bonus" ? bonusClauses : penaltyClauses;
|
|
205
|
-
return (_jsxs("div", { className: "bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden transition-shadow hover:shadow-md", children: [_jsx("div", { className: "flex items-center justify-between px-5 py-4 border-b border-gray-200 bg-stone-50", children: _jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "flex items-center justify-center w-9 h-9 rounded-lg bg-white text-slate-500", children: _jsx(Scale, { size: 18 }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-[15px] font-semibold text-slate-800", children: "Bonus & Penalty Clauses" }), _jsxs("p", { className: "text-[13px] text-slate-400 mt-0.5", children: [_jsxs("span", { className: "text-emerald-600", children: [bonusClauses.length, " bonus"] }), " • ", _jsxs("span", { className: "text-rose-600", children: [penaltyClauses.length, " penalty"] })] })] })] }) }), _jsxs("div", { className: "p-5", children: [_jsxs("div", { className: "flex gap-1 border-b border-gray-200 mb-4", children: [_jsxs("button", { type: "button", className: `px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${activeTab === "bonus"
|
|
206
|
-
? "text-emerald-600 border-emerald-600"
|
|
207
|
-
: "text-slate-400 border-transparent hover:text-slate-800"}`, onClick: () => setActiveTab("bonus"), children: [_jsx(TrendingUp, { size: 14, className: "inline align-middle mr-1.5" }), "Bonus (", bonusClauses.length, ")"] }), _jsxs("button", { type: "button", className: `px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${activeTab === "penalty"
|
|
208
|
-
? "text-rose-600 border-rose-600"
|
|
209
|
-
: "text-slate-400 border-transparent hover:text-slate-800"}`, onClick: () => setActiveTab("penalty"), children: [_jsx(TrendingDown, { size: 14, className: "inline align-middle mr-1.5" }), "Penalty (", penaltyClauses.length, ")"] })] }), currentClauses.length > 0 ? (activeTab === "bonus" ? (_jsx(ObjectSetTable, { data: bonusClauses, columns: bonusColumns, onAdd: (data) => {
|
|
210
|
-
const condition = data.condition || "";
|
|
211
|
-
if (condition.trim()) {
|
|
212
|
-
dispatch(actions.addBonusClause({
|
|
213
|
-
id: generateId(),
|
|
214
|
-
condition: condition.trim(),
|
|
215
|
-
bonusAmount: { value: 0, unit: currency },
|
|
216
|
-
comment: undefined,
|
|
217
|
-
}));
|
|
218
|
-
toast("Bonus clause added", { type: "success" });
|
|
219
|
-
}
|
|
220
|
-
}, onDelete: (rows) => {
|
|
221
|
-
if (rows.length > 0) {
|
|
222
|
-
rows.forEach((row) => {
|
|
223
|
-
dispatch(actions.deleteBonusClause({ id: row.id }));
|
|
224
|
-
});
|
|
225
|
-
toast(`${rows.length} bonus clause${rows.length > 1 ? "s" : ""} deleted`, { type: "success" });
|
|
226
|
-
}
|
|
227
|
-
}, allowRowSelection: true })) : (_jsx(ObjectSetTable, { data: penaltyClauses, columns: penaltyColumns, onAdd: (data) => {
|
|
228
|
-
const condition = data.condition || "";
|
|
229
|
-
if (condition.trim()) {
|
|
230
|
-
dispatch(actions.addPenaltyClause({
|
|
231
|
-
id: generateId(),
|
|
232
|
-
condition: condition.trim(),
|
|
233
|
-
deductionAmount: { value: 0, unit: currency },
|
|
234
|
-
comment: undefined,
|
|
235
|
-
}));
|
|
236
|
-
toast("Penalty clause added", { type: "success" });
|
|
237
|
-
}
|
|
238
|
-
}, onDelete: (rows) => {
|
|
239
|
-
if (rows.length > 0) {
|
|
240
|
-
rows.forEach((row) => {
|
|
241
|
-
dispatch(actions.deletePenaltyClause({ id: row.id }));
|
|
242
|
-
});
|
|
243
|
-
toast(`${rows.length} penalty clause${rows.length > 1 ? "s" : ""} deleted`, { type: "success" });
|
|
244
|
-
}
|
|
245
|
-
}, allowRowSelection: true }))) : (_jsxs("div", { className: "flex flex-col items-center justify-center py-10 text-center border-2 border-dashed border-gray-200 rounded-lg bg-stone-50", children: [activeTab === "bonus" ? (_jsx(TrendingUp, { size: 48, className: "text-slate-400 mb-4" })) : (_jsx(TrendingDown, { size: 48, className: "text-slate-400 mb-4" })), _jsxs("p", { className: "text-[15px] font-semibold text-slate-800 mb-1", children: ["No ", activeTab, " clauses yet"] }), _jsx("p", { className: "text-sm text-slate-400 mb-4", children: activeTab === "bonus"
|
|
246
|
-
? "Add bonus incentives for exceptional performance"
|
|
247
|
-
: "Add penalty deductions for contract violations" }), _jsxs("button", { type: "button", className: `inline-flex items-center gap-2 px-4 py-2 text-[13px] font-medium text-white border-none rounded-md cursor-pointer transition-colors ${activeTab === "bonus"
|
|
248
|
-
? "bg-emerald-600 hover:bg-emerald-700"
|
|
249
|
-
: "bg-rose-600 hover:bg-rose-700"}`, onClick: () => {
|
|
250
|
-
if (activeTab === "bonus") {
|
|
251
|
-
dispatch(actions.addBonusClause({
|
|
252
|
-
id: generateId(),
|
|
253
|
-
condition: "New bonus condition",
|
|
254
|
-
bonusAmount: { value: 0, unit: currency },
|
|
255
|
-
comment: undefined,
|
|
256
|
-
}));
|
|
257
|
-
toast("Bonus clause added", { type: "success" });
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
dispatch(actions.addPenaltyClause({
|
|
261
|
-
id: generateId(),
|
|
262
|
-
condition: "New penalty condition",
|
|
263
|
-
deductionAmount: { value: 0, unit: currency },
|
|
264
|
-
comment: undefined,
|
|
265
|
-
}));
|
|
266
|
-
toast("Penalty clause added", { type: "success" });
|
|
267
|
-
}
|
|
268
|
-
}, children: [_jsx(Plus, { size: 16 }), "Add First ", activeTab === "bonus" ? "Bonus" : "Penalty"] })] }))] })] }));
|
|
269
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PaymentTermsState } from "../../../document-models/payment-terms/gen/types.js";
|
|
2
|
-
import type { PaymentTermsAction } from "../../../document-models/payment-terms/gen/actions.js";
|
|
3
|
-
import { type actions as paymentTermsActions } from "../../../document-models/payment-terms/index.js";
|
|
4
|
-
interface EscrowSectionProps {
|
|
5
|
-
state: PaymentTermsState;
|
|
6
|
-
dispatch: (action: PaymentTermsAction) => void;
|
|
7
|
-
actions: typeof paymentTermsActions;
|
|
8
|
-
isExpanded: boolean;
|
|
9
|
-
onToggleExpand: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function EscrowSection({ state, dispatch, actions, isExpanded, onToggleExpand, }: EscrowSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=escrow-section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"escrow-section.d.ts","sourceRoot":"","sources":["../../../../editors/payment-terms/components/escrow-section.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,KAAK,OAAO,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtG,UAAU,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAU,EACV,cAAc,GACf,EAAE,kBAAkB,2CA4SpB"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useCallback } from "react";
|
|
3
|
-
import { Shield, Lock, FileCheck, Building, Pencil, Check, X, ChevronDown, ChevronUp, } from "lucide-react";
|
|
4
|
-
import { TextInput, Textarea } from "@powerhousedao/document-engineering";
|
|
5
|
-
import { toast } from "@powerhousedao/design-system/connect";
|
|
6
|
-
import {} from "../../../document-models/payment-terms/index.js";
|
|
7
|
-
export function EscrowSection({ state, dispatch, actions, isExpanded, onToggleExpand, }) {
|
|
8
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
9
|
-
const [formData, setFormData] = useState({
|
|
10
|
-
amountHeld: state.escrowDetails?.amountHeld?.value?.toString() || "",
|
|
11
|
-
proofOfFundsDocumentId: state.escrowDetails?.proofOfFundsDocumentId || "",
|
|
12
|
-
releaseConditions: state.escrowDetails?.releaseConditions || "",
|
|
13
|
-
escrowProvider: state.escrowDetails?.escrowProvider || "",
|
|
14
|
-
});
|
|
15
|
-
const hasEscrow = !!(state.escrowDetails && state.escrowDetails.releaseConditions);
|
|
16
|
-
const handleSave = useCallback(() => {
|
|
17
|
-
if (!formData.amountHeld || isNaN(parseFloat(formData.amountHeld))) {
|
|
18
|
-
toast("Please enter a valid escrow amount", { type: "error" });
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (!formData.releaseConditions.trim()) {
|
|
22
|
-
toast("Release conditions are required", { type: "error" });
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
dispatch(actions.setEscrowDetails({
|
|
26
|
-
amountHeld: {
|
|
27
|
-
value: parseFloat(formData.amountHeld),
|
|
28
|
-
unit: state.currency,
|
|
29
|
-
},
|
|
30
|
-
proofOfFundsDocumentId: formData.proofOfFundsDocumentId || undefined,
|
|
31
|
-
releaseConditions: formData.releaseConditions,
|
|
32
|
-
escrowProvider: formData.escrowProvider || undefined,
|
|
33
|
-
}));
|
|
34
|
-
toast("Escrow configuration saved", { type: "success" });
|
|
35
|
-
setIsEditing(false);
|
|
36
|
-
}, [formData, state.currency, dispatch, actions]);
|
|
37
|
-
const handleCancel = useCallback(() => {
|
|
38
|
-
setFormData({
|
|
39
|
-
amountHeld: state.escrowDetails?.amountHeld?.value?.toString() || "",
|
|
40
|
-
proofOfFundsDocumentId: state.escrowDetails?.proofOfFundsDocumentId || "",
|
|
41
|
-
releaseConditions: state.escrowDetails?.releaseConditions || "",
|
|
42
|
-
escrowProvider: state.escrowDetails?.escrowProvider || "",
|
|
43
|
-
});
|
|
44
|
-
setIsEditing(false);
|
|
45
|
-
}, [state.escrowDetails]);
|
|
46
|
-
const handleRemoveEscrow = useCallback(() => {
|
|
47
|
-
dispatch(actions.setEscrowDetails({
|
|
48
|
-
amountHeld: { value: 0, unit: state.currency },
|
|
49
|
-
releaseConditions: "",
|
|
50
|
-
escrowProvider: "",
|
|
51
|
-
proofOfFundsDocumentId: "",
|
|
52
|
-
}));
|
|
53
|
-
toast("Escrow removed", { type: "success" });
|
|
54
|
-
}, [dispatch, actions, state.currency]);
|
|
55
|
-
const formatCurrency = (value) => {
|
|
56
|
-
if (!value)
|
|
57
|
-
return null;
|
|
58
|
-
return new Intl.NumberFormat("en-US", {
|
|
59
|
-
style: "currency",
|
|
60
|
-
currency: state.currency,
|
|
61
|
-
minimumFractionDigits: 0,
|
|
62
|
-
maximumFractionDigits: 2,
|
|
63
|
-
}).format(value);
|
|
64
|
-
};
|
|
65
|
-
return (_jsxs("div", { className: "bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden transition-shadow hover:shadow-md self-start", children: [_jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-gray-200 bg-stone-50 cursor-pointer", onClick: onToggleExpand, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: `flex items-center justify-center w-9 h-9 rounded-lg ${hasEscrow ? "bg-emerald-100" : "bg-white"}`, children: _jsx(Shield, { size: 18, className: hasEscrow ? "text-emerald-600" : "text-slate-500" }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-[15px] font-semibold text-slate-800", children: "Escrow Protection" }), _jsx("p", { className: "text-[13px] text-slate-400 mt-0.5", children: hasEscrow ? (_jsxs("span", { className: "text-emerald-600", children: [formatCurrency(state.escrowDetails?.amountHeld?.value), " held"] })) : ("Optional security deposit") })] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [hasEscrow && (_jsxs("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full bg-emerald-100 text-emerald-600", children: [_jsx(Lock, { size: 12 }), "Active"] })), isExpanded ? (_jsx(ChevronUp, { size: 20, className: "text-slate-400" })) : (_jsx(ChevronDown, { size: 20, className: "text-slate-400" }))] })] }), isExpanded && (_jsx("div", { className: "p-5", children: isEditing ? (_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500 after:content-['_*'] after:text-rose-500", children: ["Amount Held (", state.currency, ")"] }), _jsx(TextInput, { type: "number", value: formData.amountHeld, onChange: (e) => setFormData({ ...formData, amountHeld: e.target.value }), placeholder: "0.00", step: "0.01" })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(Building, { size: 14, className: "inline align-middle mr-1.5" }), "Escrow Provider"] }), _jsx(TextInput, { value: formData.escrowProvider, onChange: (e) => setFormData({ ...formData, escrowProvider: e.target.value }), placeholder: "e.g., Escrow.com" })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(FileCheck, { size: 14, className: "inline align-middle mr-1.5" }), "Proof of Funds Document ID"] }), _jsx(TextInput, { value: formData.proofOfFundsDocumentId, onChange: (e) => setFormData({
|
|
66
|
-
...formData,
|
|
67
|
-
proofOfFundsDocumentId: e.target.value,
|
|
68
|
-
}), placeholder: "Document reference", className: "font-mono" })] }), _jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500 after:content-['_*'] after:text-rose-500", children: "Release Conditions" }), _jsx(Textarea, { value: formData.releaseConditions, onChange: (e) => setFormData({
|
|
69
|
-
...formData,
|
|
70
|
-
releaseConditions: e.target.value,
|
|
71
|
-
}), placeholder: "Describe the conditions under which escrow funds will be released...", rows: 3 })] }), _jsxs("div", { className: "col-span-2 flex justify-between items-center pt-3 border-t border-gray-200", children: [_jsxs("div", { className: "flex gap-2", children: [_jsxs("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-white bg-slate-800 border-none rounded-md cursor-pointer transition-colors hover:bg-slate-700", onClick: handleSave, children: [_jsx(Check, { size: 14 }), "Save"] }), _jsxs("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-slate-500 bg-stone-100 border border-gray-200 rounded-md cursor-pointer transition-colors hover:bg-stone-200", onClick: handleCancel, children: [_jsx(X, { size: 14 }), "Cancel"] })] }), hasEscrow && (_jsx("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-rose-600 bg-transparent border-none rounded-md cursor-pointer transition-colors hover:bg-rose-50", onClick: handleRemoveEscrow, children: "Remove Escrow" }))] })] })) : hasEscrow ? (_jsxs("div", { children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500", children: "Amount Held" }), _jsx("p", { className: "text-[15px] font-mono font-semibold text-emerald-600 py-2.5", children: formatCurrency(state.escrowDetails?.amountHeld?.value) })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(Building, { size: 14, className: "inline align-middle mr-1.5" }), "Provider"] }), _jsx("p", { className: `text-[15px] py-2.5 ${!state.escrowDetails?.escrowProvider ? "text-slate-400 italic" : "text-slate-800"}`, children: state.escrowDetails?.escrowProvider || "Not specified" })] }), state.escrowDetails?.proofOfFundsDocumentId && (_jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(FileCheck, { size: 14, className: "inline align-middle mr-1.5" }), "Proof of Funds"] }), _jsx("p", { className: "text-[13px] font-mono py-2.5 text-slate-800", children: state.escrowDetails.proofOfFundsDocumentId })] })), _jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500", children: "Release Conditions" }), _jsx("div", { className: "p-3 bg-stone-50 rounded-md text-sm leading-relaxed text-slate-800", children: state.escrowDetails?.releaseConditions })] })] }), _jsx("div", { className: "flex justify-end mt-4 pt-4 border-t border-gray-200", children: _jsxs("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-slate-500 bg-transparent border-none rounded-md cursor-pointer transition-colors hover:bg-stone-100 hover:text-slate-800", onClick: () => setIsEditing(true), children: [_jsx(Pencil, { size: 14 }), "Edit Escrow"] }) })] })) : (_jsxs("div", { className: "flex flex-col items-center justify-center py-6 text-center border-2 border-dashed border-gray-200 rounded-lg bg-stone-50", children: [_jsx(Shield, { size: 32, className: "text-slate-400 mb-3" }), _jsx("p", { className: "text-[15px] font-semibold text-slate-800 mb-1", children: "No escrow configured" }), _jsx("p", { className: "text-sm text-slate-400 mb-4", children: "Add escrow protection for secure payments" }), _jsx("button", { type: "button", className: "inline-flex items-center gap-2 px-4 py-2 text-[13px] font-medium text-white bg-slate-800 border-none rounded-md cursor-pointer transition-colors hover:bg-slate-700", onClick: () => setIsEditing(true), children: "Set Up Escrow" })] })) }))] }));
|
|
72
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PaymentTermsState } from "../../../document-models/payment-terms/gen/types.js";
|
|
2
|
-
import type { PaymentTermsAction } from "../../../document-models/payment-terms/gen/actions.js";
|
|
3
|
-
import { type actions as paymentTermsActions } from "../../../document-models/payment-terms/index.js";
|
|
4
|
-
interface EvaluationSectionProps {
|
|
5
|
-
state: PaymentTermsState;
|
|
6
|
-
dispatch: (action: PaymentTermsAction) => void;
|
|
7
|
-
actions: typeof paymentTermsActions;
|
|
8
|
-
isExpanded: boolean;
|
|
9
|
-
onToggleExpand: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function EvaluationSection({ state, dispatch, actions, isExpanded, onToggleExpand, }: EvaluationSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=evaluation-section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluation-section.d.ts","sourceRoot":"","sources":["../../../../editors/payment-terms/components/evaluation-section.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,KAAK,OAAO,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtG,UAAU,sBAAsB;IAC9B,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAQD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,UAAU,EACV,cAAc,GACf,EAAE,sBAAsB,2CAwZxB"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useCallback } from "react";
|
|
3
|
-
import { ClipboardCheck, Calendar, Users, TrendingUp, Star, Eye, Pencil, Check, X, ChevronDown, ChevronUp, Plus, Trash2, } from "lucide-react";
|
|
4
|
-
import { TextInput, Select } from "@powerhousedao/document-engineering";
|
|
5
|
-
import { toast } from "@powerhousedao/design-system/connect";
|
|
6
|
-
import {} from "../../../document-models/payment-terms/index.js";
|
|
7
|
-
const FREQUENCY_OPTIONS = [
|
|
8
|
-
{ value: "WEEKLY", label: "Weekly" },
|
|
9
|
-
{ value: "MONTHLY", label: "Monthly" },
|
|
10
|
-
{ value: "PER_MILESTONE", label: "Per Milestone" },
|
|
11
|
-
];
|
|
12
|
-
export function EvaluationSection({ state, dispatch, actions, isExpanded, onToggleExpand, }) {
|
|
13
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
14
|
-
const [formData, setFormData] = useState({
|
|
15
|
-
evaluationFrequency: state.evaluation?.evaluationFrequency || "MONTHLY",
|
|
16
|
-
evaluatorTeam: state.evaluation?.evaluatorTeam || "",
|
|
17
|
-
criteria: state.evaluation?.criteria || [],
|
|
18
|
-
impactsPayout: state.evaluation?.impactsPayout ?? false,
|
|
19
|
-
impactsReputation: state.evaluation?.impactsReputation ?? false,
|
|
20
|
-
commentsVisibleToClient: state.evaluation?.commentsVisibleToClient ?? true,
|
|
21
|
-
});
|
|
22
|
-
const [newCriterion, setNewCriterion] = useState("");
|
|
23
|
-
const hasEvaluation = !!state.evaluation;
|
|
24
|
-
const handleAddCriterion = useCallback(() => {
|
|
25
|
-
if (newCriterion.trim()) {
|
|
26
|
-
setFormData({
|
|
27
|
-
...formData,
|
|
28
|
-
criteria: [...formData.criteria, newCriterion.trim()],
|
|
29
|
-
});
|
|
30
|
-
setNewCriterion("");
|
|
31
|
-
}
|
|
32
|
-
}, [newCriterion, formData]);
|
|
33
|
-
const handleRemoveCriterion = useCallback((index) => {
|
|
34
|
-
setFormData({
|
|
35
|
-
...formData,
|
|
36
|
-
criteria: formData.criteria.filter((_, i) => i !== index),
|
|
37
|
-
});
|
|
38
|
-
}, [formData]);
|
|
39
|
-
const handleSave = useCallback(() => {
|
|
40
|
-
if (!formData.evaluatorTeam.trim()) {
|
|
41
|
-
toast("Evaluator team is required", { type: "error" });
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (formData.criteria.length === 0) {
|
|
45
|
-
toast("At least one evaluation criterion is required", { type: "error" });
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
dispatch(actions.setEvaluationTerms({
|
|
49
|
-
evaluationFrequency: formData.evaluationFrequency,
|
|
50
|
-
evaluatorTeam: formData.evaluatorTeam,
|
|
51
|
-
criteria: formData.criteria,
|
|
52
|
-
impactsPayout: formData.impactsPayout,
|
|
53
|
-
impactsReputation: formData.impactsReputation,
|
|
54
|
-
commentsVisibleToClient: formData.commentsVisibleToClient,
|
|
55
|
-
}));
|
|
56
|
-
toast("Evaluation terms saved", { type: "success" });
|
|
57
|
-
setIsEditing(false);
|
|
58
|
-
}, [formData, dispatch, actions]);
|
|
59
|
-
const handleCancel = useCallback(() => {
|
|
60
|
-
setFormData({
|
|
61
|
-
evaluationFrequency: state.evaluation?.evaluationFrequency || "MONTHLY",
|
|
62
|
-
evaluatorTeam: state.evaluation?.evaluatorTeam || "",
|
|
63
|
-
criteria: state.evaluation?.criteria || [],
|
|
64
|
-
impactsPayout: state.evaluation?.impactsPayout ?? false,
|
|
65
|
-
impactsReputation: state.evaluation?.impactsReputation ?? false,
|
|
66
|
-
commentsVisibleToClient: state.evaluation?.commentsVisibleToClient ?? true,
|
|
67
|
-
});
|
|
68
|
-
setNewCriterion("");
|
|
69
|
-
setIsEditing(false);
|
|
70
|
-
}, [state.evaluation]);
|
|
71
|
-
const frequencyLabel = FREQUENCY_OPTIONS.find((o) => o.value === state.evaluation?.evaluationFrequency)?.label || "Monthly";
|
|
72
|
-
return (_jsxs("div", { className: "bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden transition-shadow hover:shadow-md self-start", children: [_jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-gray-200 bg-stone-50 cursor-pointer", onClick: onToggleExpand, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: `flex items-center justify-center w-9 h-9 rounded-lg ${hasEvaluation ? "bg-blue-100" : "bg-white"}`, children: _jsx(ClipboardCheck, { size: 18, className: hasEvaluation ? "text-blue-600" : "text-slate-500" }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-[15px] font-semibold text-slate-800", children: "Evaluation" }), _jsx("p", { className: "text-[13px] text-slate-400 mt-0.5", children: hasEvaluation
|
|
73
|
-
? `${frequencyLabel} reviews`
|
|
74
|
-
: "Performance tracking" })] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [hasEvaluation && (_jsxs("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-600", children: [state.evaluation?.criteria.length, " criteria"] })), isExpanded ? (_jsx(ChevronUp, { size: 20, className: "text-slate-400" })) : (_jsx(ChevronDown, { size: 20, className: "text-slate-400" }))] })] }), isExpanded && (_jsx("div", { className: "p-5", children: isEditing ? (_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(Calendar, { size: 14, className: "inline align-middle mr-1.5" }), "Evaluation Frequency"] }), _jsx(Select, { value: formData.evaluationFrequency, onChange: (value) => setFormData({
|
|
75
|
-
...formData,
|
|
76
|
-
evaluationFrequency: value,
|
|
77
|
-
}), options: FREQUENCY_OPTIONS })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500 after:content-['_*'] after:text-rose-500", children: [_jsx(Users, { size: 14, className: "inline align-middle mr-1.5" }), "Evaluator Team"] }), _jsx(TextInput, { value: formData.evaluatorTeam, onChange: (e) => setFormData({ ...formData, evaluatorTeam: e.target.value }), placeholder: "e.g., Product Team" })] }), _jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500 after:content-['_*'] after:text-rose-500", children: "Evaluation Criteria" }), _jsxs("div", { className: "flex gap-2 mb-3", children: [_jsx(TextInput, { value: newCriterion, onChange: (e) => setNewCriterion(e.target.value), placeholder: "Add a criterion...", onKeyDown: (e) => {
|
|
78
|
-
if (e.key === "Enter") {
|
|
79
|
-
e.preventDefault();
|
|
80
|
-
handleAddCriterion();
|
|
81
|
-
}
|
|
82
|
-
}, className: "flex-1" }), _jsx("button", { type: "button", className: "inline-flex items-center justify-center w-9 h-9 text-slate-500 bg-stone-100 border border-gray-200 rounded-md cursor-pointer transition-colors hover:bg-stone-200 disabled:opacity-50 disabled:cursor-not-allowed", onClick: handleAddCriterion, disabled: !newCriterion.trim(), children: _jsx(Plus, { size: 16 }) })] }), formData.criteria.length > 0 ? (_jsx("div", { className: "flex flex-col gap-2", children: formData.criteria.map((criterion, index) => (_jsxs("div", { className: "flex items-center gap-2 px-3 py-2 bg-stone-50 rounded-md", children: [_jsx("span", { className: "flex-1 text-sm", children: criterion }), _jsx("button", { type: "button", className: "inline-flex items-center justify-center w-6 h-6 text-slate-400 bg-transparent border-none rounded cursor-pointer transition-colors hover:bg-rose-100 hover:text-rose-600", onClick: () => handleRemoveCriterion(index), children: _jsx(Trash2, { size: 14 }) })] }, index))) })) : (_jsx("p", { className: "text-sm text-slate-400 text-center py-3", children: "No criteria added yet" }))] }), _jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500 mb-3", children: "Impact Settings" }), _jsxs("div", { className: "flex flex-col gap-2.5", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("input", { type: "checkbox", id: "impactsPayout", className: "w-4.5 h-4.5 border-2 border-gray-200 rounded cursor-pointer accent-blue-600", checked: formData.impactsPayout, onChange: (e) => setFormData({
|
|
83
|
-
...formData,
|
|
84
|
-
impactsPayout: e.target.checked,
|
|
85
|
-
}) }), _jsxs("label", { htmlFor: "impactsPayout", className: "text-sm text-slate-800 cursor-pointer", children: [_jsx(TrendingUp, { size: 14, className: "inline align-middle mr-1.5" }), "Evaluations impact payout amounts"] })] }), _jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("input", { type: "checkbox", id: "impactsReputation", className: "w-4.5 h-4.5 border-2 border-gray-200 rounded cursor-pointer accent-blue-600", checked: formData.impactsReputation, onChange: (e) => setFormData({
|
|
86
|
-
...formData,
|
|
87
|
-
impactsReputation: e.target.checked,
|
|
88
|
-
}) }), _jsxs("label", { htmlFor: "impactsReputation", className: "text-sm text-slate-800 cursor-pointer", children: [_jsx(Star, { size: 14, className: "inline align-middle mr-1.5" }), "Evaluations impact reputation score"] })] }), _jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("input", { type: "checkbox", id: "commentsVisible", className: "w-4.5 h-4.5 border-2 border-gray-200 rounded cursor-pointer accent-blue-600", checked: formData.commentsVisibleToClient, onChange: (e) => setFormData({
|
|
89
|
-
...formData,
|
|
90
|
-
commentsVisibleToClient: e.target.checked,
|
|
91
|
-
}) }), _jsxs("label", { htmlFor: "commentsVisible", className: "text-sm text-slate-800 cursor-pointer", children: [_jsx(Eye, { size: 14, className: "inline align-middle mr-1.5" }), "Evaluation comments visible to client"] })] })] })] }), _jsxs("div", { className: "col-span-2 flex gap-2 pt-3 border-t border-gray-200", children: [_jsxs("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-white bg-slate-800 border-none rounded-md cursor-pointer transition-colors hover:bg-slate-700", onClick: handleSave, children: [_jsx(Check, { size: 14 }), "Save"] }), _jsxs("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-slate-500 bg-stone-100 border border-gray-200 rounded-md cursor-pointer transition-colors hover:bg-stone-200", onClick: handleCancel, children: [_jsx(X, { size: 14 }), "Cancel"] })] })] })) : hasEvaluation ? (_jsxs("div", { children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(Calendar, { size: 14, className: "inline align-middle mr-1.5" }), "Frequency"] }), _jsx("p", { className: "text-[15px] py-2.5", children: _jsx("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-600", children: frequencyLabel }) })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("label", { className: "text-[13px] font-medium text-slate-500", children: [_jsx(Users, { size: 14, className: "inline align-middle mr-1.5" }), "Evaluator Team"] }), _jsx("p", { className: "text-[15px] py-2.5 text-slate-800", children: state.evaluation?.evaluatorTeam })] }), _jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500", children: "Criteria" }), _jsx("div", { className: "flex flex-wrap gap-2 mt-1", children: state.evaluation?.criteria.map((criterion, index) => (_jsx("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full bg-stone-100 text-slate-500", children: criterion }, index))) })] }), _jsxs("div", { className: "col-span-2 flex flex-col gap-1.5", children: [_jsx("label", { className: "text-[13px] font-medium text-slate-500", children: "Impact Settings" }), _jsxs("div", { className: "flex flex-wrap gap-3 mt-1", children: [_jsxs("span", { className: `inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full ${state.evaluation?.impactsPayout ? "bg-amber-100 text-amber-600" : "bg-stone-100 text-slate-500"}`, children: [_jsx(TrendingUp, { size: 12 }), "Payout: ", state.evaluation?.impactsPayout ? "Yes" : "No"] }), _jsxs("span", { className: `inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full ${state.evaluation?.impactsReputation ? "bg-amber-100 text-amber-600" : "bg-stone-100 text-slate-500"}`, children: [_jsx(Star, { size: 12 }), "Reputation:", " ", state.evaluation?.impactsReputation ? "Yes" : "No"] }), _jsxs("span", { className: `inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-full ${state.evaluation?.commentsVisibleToClient ? "bg-blue-100 text-blue-600" : "bg-stone-100 text-slate-500"}`, children: [_jsx(Eye, { size: 12 }), "Comments:", " ", state.evaluation?.commentsVisibleToClient
|
|
92
|
-
? "Visible"
|
|
93
|
-
: "Hidden"] })] })] })] }), _jsx("div", { className: "flex justify-end mt-4 pt-4 border-t border-gray-200", children: _jsxs("button", { type: "button", className: "inline-flex items-center gap-2 px-3 py-1.5 text-[13px] font-medium text-slate-500 bg-transparent border-none rounded-md cursor-pointer transition-colors hover:bg-stone-100 hover:text-slate-800", onClick: () => setIsEditing(true), children: [_jsx(Pencil, { size: 14 }), "Edit"] }) })] })) : (_jsxs("div", { className: "flex flex-col items-center justify-center py-6 text-center border-2 border-dashed border-gray-200 rounded-lg bg-stone-50", children: [_jsx(ClipboardCheck, { size: 32, className: "text-slate-400 mb-3" }), _jsx("p", { className: "text-[15px] font-semibold text-slate-800 mb-1", children: "No evaluation terms" }), _jsx("p", { className: "text-sm text-slate-400 mb-4", children: "Set up performance evaluation criteria" }), _jsx("button", { type: "button", className: "inline-flex items-center gap-2 px-4 py-2 text-[13px] font-medium text-white bg-slate-800 border-none rounded-md cursor-pointer transition-colors hover:bg-slate-700", onClick: () => setIsEditing(true), children: "Configure Evaluation" })] })) }))] }));
|
|
94
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PaymentTermsState } from "../../../document-models/payment-terms/gen/types.js";
|
|
2
|
-
import type { PaymentTermsAction } from "../../../document-models/payment-terms/gen/actions.js";
|
|
3
|
-
import { type actions as paymentTermsActions } from "../../../document-models/payment-terms/index.js";
|
|
4
|
-
interface HeaderSectionProps {
|
|
5
|
-
state: PaymentTermsState;
|
|
6
|
-
dispatch: (action: PaymentTermsAction) => void;
|
|
7
|
-
actions: typeof paymentTermsActions;
|
|
8
|
-
progressPercentage: number;
|
|
9
|
-
completedMilestones: number;
|
|
10
|
-
totalMilestones: number;
|
|
11
|
-
totalValue: number;
|
|
12
|
-
paidValue: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function HeaderSection({ state, dispatch, actions, progressPercentage, completedMilestones, totalMilestones, totalValue, paidValue, }: HeaderSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=header-section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header-section.d.ts","sourceRoot":"","sources":["../../../../editors/payment-terms/components/header-section.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,KAAK,OAAO,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtG,UAAU,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAgCD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,GACV,EAAE,kBAAkB,2CAmLpB"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef, useEffect } from "react";
|
|
3
|
-
import { FileText, ChevronDown, Clock, Send, CheckCircle, XCircle, DollarSign, Target, TrendingUp, Wallet, } from "lucide-react";
|
|
4
|
-
import { toast } from "@powerhousedao/design-system/connect";
|
|
5
|
-
import {} from "../../../document-models/payment-terms/index.js";
|
|
6
|
-
const STATUS_CONFIG = {
|
|
7
|
-
DRAFT: {
|
|
8
|
-
label: "Draft",
|
|
9
|
-
icon: Clock,
|
|
10
|
-
badgeClass: "bg-slate-100 text-slate-600",
|
|
11
|
-
},
|
|
12
|
-
SUBMITTED: {
|
|
13
|
-
label: "Submitted",
|
|
14
|
-
icon: Send,
|
|
15
|
-
badgeClass: "bg-blue-100 text-blue-600",
|
|
16
|
-
},
|
|
17
|
-
ACCEPTED: {
|
|
18
|
-
label: "Accepted",
|
|
19
|
-
icon: CheckCircle,
|
|
20
|
-
badgeClass: "bg-emerald-100 text-emerald-600",
|
|
21
|
-
},
|
|
22
|
-
CANCELLED: {
|
|
23
|
-
label: "Cancelled",
|
|
24
|
-
icon: XCircle,
|
|
25
|
-
badgeClass: "bg-rose-100 text-rose-600",
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export function HeaderSection({ state, dispatch, actions, progressPercentage, completedMilestones, totalMilestones, totalValue, paidValue, }) {
|
|
29
|
-
const [isStatusDropdownOpen, setIsStatusDropdownOpen] = useState(false);
|
|
30
|
-
const dropdownRef = useRef(null);
|
|
31
|
-
const statusConfig = STATUS_CONFIG[state.status];
|
|
32
|
-
const StatusIcon = statusConfig.icon;
|
|
33
|
-
// Close dropdown when clicking outside
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
function handleClickOutside(event) {
|
|
36
|
-
if (dropdownRef.current &&
|
|
37
|
-
!dropdownRef.current.contains(event.target)) {
|
|
38
|
-
setIsStatusDropdownOpen(false);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
42
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
43
|
-
}, []);
|
|
44
|
-
const handleStatusChange = (newStatus) => {
|
|
45
|
-
if (newStatus !== state.status) {
|
|
46
|
-
dispatch(actions.updateStatus({ status: newStatus }));
|
|
47
|
-
toast(`Status updated to ${STATUS_CONFIG[newStatus].label}`, {
|
|
48
|
-
type: "success",
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
setIsStatusDropdownOpen(false);
|
|
52
|
-
};
|
|
53
|
-
const formatCurrency = (value) => {
|
|
54
|
-
return new Intl.NumberFormat("en-US", {
|
|
55
|
-
style: "decimal",
|
|
56
|
-
minimumFractionDigits: 0,
|
|
57
|
-
maximumFractionDigits: 2,
|
|
58
|
-
}).format(value);
|
|
59
|
-
};
|
|
60
|
-
const remainingValue = totalValue - paidValue;
|
|
61
|
-
return (_jsxs("div", { className: "bg-white border border-gray-200 rounded-xl shadow-sm relative", children: [_jsxs("div", { className: "flex items-start justify-between p-6 gap-6", children: [_jsx("div", { className: "flex-1", children: _jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "w-12 h-12 rounded-xl bg-gradient-to-br from-blue-600 to-blue-500 flex items-center justify-center text-white", children: _jsx(FileText, { size: 24 }) }), _jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold text-slate-800 tracking-tight", children: "Payment Terms" }), _jsxs("p", { className: "text-sm text-slate-500", children: [state.paymentModel === "MILESTONE"
|
|
62
|
-
? "Milestone-based payment schedule"
|
|
63
|
-
: "Time & Materials billing", " • ", state.currency] })] })] }) }), _jsx("div", { className: "flex items-center gap-3", children: _jsxs("div", { className: "relative", ref: dropdownRef, children: [_jsxs("button", { className: `inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full text-sm font-semibold uppercase tracking-wide transition-all cursor-pointer border-none hover:-translate-y-0.5 hover:shadow-md ${statusConfig.badgeClass}`, onClick: () => setIsStatusDropdownOpen(!isStatusDropdownOpen), type: "button", children: [_jsx(StatusIcon, { size: 14 }), statusConfig.label, _jsx(ChevronDown, { size: 14, className: `transition-transform duration-200 ${isStatusDropdownOpen ? "rotate-180" : ""}` })] }), isStatusDropdownOpen && (_jsx("div", { className: "absolute top-full right-0 mt-2 min-w-[200px] bg-white border border-gray-200 rounded-lg shadow-xl z-[9999] overflow-hidden animate-in fade-in slide-in-from-top-2 duration-150", children: Object.entries(STATUS_CONFIG).map(([statusKey, config]) => {
|
|
64
|
-
const Icon = config.icon;
|
|
65
|
-
return (_jsxs("button", { type: "button", className: `flex items-center gap-2.5 px-4 py-3 text-sm text-slate-800 bg-transparent border-none w-full text-left cursor-pointer transition-colors hover:bg-stone-100 ${state.status === statusKey ? "bg-stone-50" : ""}`, onClick: () => handleStatusChange(statusKey), children: [_jsx(Icon, { size: 16 }), config.label] }, statusKey));
|
|
66
|
-
}) }))] }) })] }), _jsxs("div", { className: "grid grid-cols-4 gap-px bg-gray-200 border-t border-gray-200", children: [_jsxs("div", { className: "flex flex-col items-center justify-center p-4 bg-white text-center", children: [_jsxs("div", { className: "text-xl font-bold text-slate-800", children: [_jsx(DollarSign, { size: 16, className: "inline align-middle mr-0.5 opacity-50" }), formatCurrency(totalValue)] }), _jsx("div", { className: "text-xs text-slate-400 mt-1 uppercase tracking-wider", children: "Total Value" })] }), _jsxs("div", { className: "flex flex-col items-center justify-center p-4 bg-white text-center", children: [_jsxs("div", { className: "text-xl font-bold text-emerald-600", children: [_jsx(Wallet, { size: 16, className: "inline align-middle mr-1 opacity-70" }), formatCurrency(paidValue)] }), _jsx("div", { className: "text-xs text-slate-400 mt-1 uppercase tracking-wider", children: "Paid Out" })] }), _jsxs("div", { className: "flex flex-col items-center justify-center p-4 bg-white text-center", children: [_jsxs("div", { className: "text-xl font-bold text-amber-600", children: [_jsx(TrendingUp, { size: 16, className: "inline align-middle mr-1 opacity-70" }), formatCurrency(remainingValue)] }), _jsx("div", { className: "text-xs text-slate-400 mt-1 uppercase tracking-wider", children: "Remaining" })] }), _jsxs("div", { className: "flex flex-col items-center justify-center p-4 bg-white text-center", children: [_jsxs("div", { className: "text-xl font-bold text-slate-800", children: [_jsx(Target, { size: 16, className: "inline align-middle mr-1 opacity-50" }), completedMilestones, " / ", totalMilestones] }), _jsx("div", { className: "text-xs text-slate-400 mt-1 uppercase tracking-wider", children: "Milestones" })] })] }), state.paymentModel === "MILESTONE" && totalMilestones > 0 && (_jsxs("div", { className: "p-4 px-6 bg-stone-50 border-t border-gray-200 rounded-b-xl", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsx("span", { className: "text-sm font-medium text-slate-500", children: "Payment Progress" }), _jsxs("span", { className: "text-sm font-semibold text-slate-800", children: [progressPercentage, "%"] })] }), _jsx("div", { className: "h-1.5 bg-gray-200 rounded-full overflow-hidden", children: _jsx("div", { className: "h-full bg-gradient-to-r from-emerald-600 to-emerald-400 rounded-full transition-all duration-500", style: { width: `${progressPercentage}%` } }) })] }))] }));
|
|
67
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Milestone, PaymentTermsAction } from "../../../document-models/payment-terms/gen/types.js";
|
|
2
|
-
import { type actions as paymentTermsActions } from "../../../document-models/payment-terms/index.js";
|
|
3
|
-
interface MilestonesSectionProps {
|
|
4
|
-
milestones: Milestone[];
|
|
5
|
-
dispatch: (action: PaymentTermsAction) => void;
|
|
6
|
-
actions: typeof paymentTermsActions;
|
|
7
|
-
currency: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function MilestonesSection({ milestones, dispatch, actions, currency, }: MilestonesSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=milestones-section.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"milestones-section.d.ts","sourceRoot":"","sources":["../../../../editors/payment-terms/components/milestones-section.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,SAAS,EAET,kBAAkB,EACnB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,KAAK,OAAO,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtG,UAAU,sBAAsB;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,OAAO,mBAAmB,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE,sBAAsB,2CA8WxB"}
|