@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,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { toast, ToastContainer } from "@powerhousedao/design-system
|
|
3
|
-
import { TextInput, Select, OIDInput, PHIDInput, ObjectSetTable, buildEnumCellEditor,
|
|
2
|
+
import { Button, toast, ToastContainer } from "@powerhousedao/design-system";
|
|
3
|
+
import { TextInput, Select, OIDInput, PHIDInput, ObjectSetTable, buildEnumCellEditor, } from "@powerhousedao/document-engineering";
|
|
4
4
|
import { actions, } from "../../document-models/workstream/index.js";
|
|
5
5
|
import { actions as rfpActions, } from "../../document-models/request-for-proposals/index.js";
|
|
6
|
-
import { ScopeOfWork } from "
|
|
6
|
+
import { ScopeOfWork } from "./project-management-import.js";
|
|
7
7
|
import { generateId } from "document-model/core";
|
|
8
|
-
import { useDocumentById,
|
|
8
|
+
import { useDocumentById, useSelectedDrive, addDocument, useDocumentsInSelectedDrive, useParentFolderForSelectedNode, setSelectedNode, } from "@powerhousedao/reactor-browser";
|
|
9
9
|
import { useEffect, useMemo, useState, useCallback } from "react";
|
|
10
|
-
import { useSelectedWorkstreamDocument } from "
|
|
11
|
-
import { DocumentToolbar } from "@powerhousedao/design-system
|
|
10
|
+
import { useSelectedWorkstreamDocument } from "../hooks/useWorkstreamDocument.js";
|
|
11
|
+
import { DocumentToolbar } from "@powerhousedao/design-system";
|
|
12
12
|
// Status options for the dropdown
|
|
13
13
|
const statusOptions = [
|
|
14
14
|
{ value: "RFP_DRAFT", label: "RFP Draft (RFP_DRAFT)" },
|
|
@@ -31,107 +31,110 @@ export default function Editor() {
|
|
|
31
31
|
const [doc, dispatch] = useSelectedWorkstreamDocument();
|
|
32
32
|
// Try to get dispatch from context or props
|
|
33
33
|
const [state, setState] = useState(doc.state.global);
|
|
34
|
-
const [clientInputValue, setClientInputValue] = useState(doc.state.global.client?.id || "");
|
|
35
34
|
useEffect(() => {
|
|
36
35
|
setState(doc.state.global);
|
|
37
36
|
}, [doc.state.global]);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, [state.client?.id]);
|
|
41
|
-
const [selectedDrive] = useSelectedDriveSafe();
|
|
37
|
+
const [selectedDrive] = useSelectedDrive();
|
|
38
|
+
const [newNode, setNewNode] = useState(null);
|
|
42
39
|
// Local state to track newly created document IDs
|
|
43
40
|
const [newlyCreatedSowId, setNewlyCreatedSowId] = useState(null);
|
|
44
41
|
const [newlyCreatedPaymentTermsId, setNewlyCreatedPaymentTermsId] = useState(null);
|
|
45
42
|
const [newlyCreatedRfpId, setNewlyCreatedRfpId] = useState(null);
|
|
43
|
+
// Get the parent folder node for the currently selected node
|
|
44
|
+
const parentFolder = useParentFolderForSelectedNode();
|
|
45
|
+
// Set the selected node to the parent folder node (close the editor)
|
|
46
|
+
function handleClose() {
|
|
47
|
+
setSelectedNode(parentFolder?.id);
|
|
48
|
+
}
|
|
46
49
|
// Loading states to prevent double-clicks
|
|
47
50
|
const [isCreatingRfp, setIsCreatingRfp] = useState(false);
|
|
48
51
|
const [isCreatingSow, setIsCreatingSow] = useState(false);
|
|
49
52
|
const [isCreatingPaymentTerms, setIsCreatingPaymentTerms] = useState(false);
|
|
53
|
+
const [document, dispatchAction] = useDocumentById(newNode?.id);
|
|
54
|
+
const updateRFPDocWithDispatch = () => {
|
|
55
|
+
dispatchAction(rfpActions.editRfp({
|
|
56
|
+
title: `RFP-${state.title || ""}`,
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
const updateSOWDocWithDispatch = () => {
|
|
60
|
+
dispatchAction(ScopeOfWork.actions.editScopeOfWork({
|
|
61
|
+
title: `SOW-${state.title || ""}`,
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (newNode) {
|
|
66
|
+
if (newNode.documentType === "powerhouse/rfp") {
|
|
67
|
+
updateRFPDocWithDispatch();
|
|
68
|
+
}
|
|
69
|
+
else if (newNode.documentType === "powerhouse/scopeofwork") {
|
|
70
|
+
updateSOWDocWithDispatch();
|
|
71
|
+
}
|
|
72
|
+
setNewNode(null);
|
|
73
|
+
}
|
|
74
|
+
}, [newNode]);
|
|
50
75
|
const createRfpDocument = useCallback(async () => {
|
|
51
76
|
if (isCreatingRfp)
|
|
52
77
|
return null; // Prevent double-calls
|
|
53
78
|
setIsCreatingRfp(true);
|
|
54
|
-
// Store current document ID to restore selection after document creation
|
|
55
|
-
const currentDocId = doc.header.id;
|
|
56
79
|
try {
|
|
57
80
|
const createdNode = await addDocument(selectedDrive?.header.id || "", `RFP-${state.title || ""}`, "powerhouse/rfp", undefined, undefined, undefined, "request-for-proposals-editor");
|
|
58
81
|
console.log("Created RFP document", createdNode);
|
|
59
82
|
if (createdNode) {
|
|
60
|
-
|
|
61
|
-
title: `RFP-${state.title || ""}`,
|
|
62
|
-
}), createdNode.id);
|
|
83
|
+
setNewNode(createdNode);
|
|
63
84
|
}
|
|
64
|
-
// Restore selection to current workstream document to prevent navigation
|
|
65
|
-
setSelectedNode(currentDocId);
|
|
66
85
|
return createdNode;
|
|
67
86
|
}
|
|
68
87
|
catch (error) {
|
|
69
88
|
console.error("Failed to create RFP document:", error);
|
|
70
|
-
// Restore selection even on error
|
|
71
|
-
setSelectedNode(currentDocId);
|
|
72
89
|
return null;
|
|
73
90
|
}
|
|
74
91
|
finally {
|
|
75
92
|
setIsCreatingRfp(false);
|
|
76
93
|
}
|
|
77
|
-
}, [isCreatingRfp, selectedDrive?.header.id, state.title
|
|
94
|
+
}, [isCreatingRfp, selectedDrive?.header.id, state.title]);
|
|
78
95
|
const createSowDocument = useCallback(async () => {
|
|
79
96
|
if (isCreatingSow)
|
|
80
97
|
return null; // Prevent double-calls
|
|
81
98
|
setIsCreatingSow(true);
|
|
82
|
-
// Store current document ID to restore selection after document creation
|
|
83
|
-
const currentDocId = doc.header.id;
|
|
84
99
|
try {
|
|
85
100
|
const createdNode = await addDocument(selectedDrive?.header.id || "", `SOW-${state.title || ""}`, "powerhouse/scopeofwork", undefined, undefined, undefined, "scope-of-work-editor");
|
|
86
101
|
console.log("Created SOW document", createdNode);
|
|
87
102
|
if (createdNode) {
|
|
88
|
-
|
|
89
|
-
title: `SOW-${state.title || ""}`,
|
|
90
|
-
}), createdNode.id);
|
|
103
|
+
setNewNode(createdNode);
|
|
91
104
|
}
|
|
92
|
-
// Restore selection to current workstream document to prevent navigation
|
|
93
|
-
setSelectedNode(currentDocId);
|
|
94
105
|
return createdNode;
|
|
95
106
|
}
|
|
96
107
|
catch (error) {
|
|
97
108
|
console.error("Failed to create SOW document:", error);
|
|
98
|
-
// Restore selection even on error
|
|
99
|
-
setSelectedNode(currentDocId);
|
|
100
109
|
return null;
|
|
101
110
|
}
|
|
102
111
|
finally {
|
|
103
112
|
setIsCreatingSow(false);
|
|
104
113
|
}
|
|
105
|
-
}, [isCreatingSow, selectedDrive?.header.id, state.title
|
|
114
|
+
}, [isCreatingSow, selectedDrive?.header.id, state.title]);
|
|
106
115
|
const createPaymentTermsDocument = useCallback(async () => {
|
|
107
116
|
if (isCreatingPaymentTerms)
|
|
108
117
|
return null; // Prevent double-calls
|
|
109
118
|
setIsCreatingPaymentTerms(true);
|
|
110
|
-
// Store current document ID to restore selection after document creation
|
|
111
|
-
const currentDocId = doc.header.id;
|
|
112
119
|
try {
|
|
113
120
|
const createdNode = await addDocument(selectedDrive?.header.id || "", `Payment Terms-${state.title || ""}`, "payment-terms", undefined, undefined, undefined, "payment-terms-editor");
|
|
114
121
|
console.log("Created Payment Terms document", createdNode);
|
|
115
122
|
// Note: Payment Terms might not have actions to initialize, so we just create it
|
|
116
|
-
// Restore selection to current workstream document to prevent navigation
|
|
117
|
-
setSelectedNode(currentDocId);
|
|
118
123
|
return createdNode;
|
|
119
124
|
}
|
|
120
125
|
catch (error) {
|
|
121
126
|
console.error("Failed to create Payment Terms document:", error);
|
|
122
|
-
// Restore selection even on error
|
|
123
|
-
setSelectedNode(currentDocId);
|
|
124
127
|
return null;
|
|
125
128
|
}
|
|
126
129
|
finally {
|
|
127
130
|
setIsCreatingPaymentTerms(false);
|
|
128
131
|
}
|
|
129
|
-
}, [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
]);
|
|
132
|
+
}, [isCreatingPaymentTerms, selectedDrive?.header.id, state.title]);
|
|
133
|
+
const getDocumentNameById = useCallback((documentId) => {
|
|
134
|
+
const document = useDocumentById(documentId);
|
|
135
|
+
const [documentData] = document || [];
|
|
136
|
+
return documentData?.header.name || "";
|
|
137
|
+
}, [useDocumentById]);
|
|
135
138
|
// Local state to track manual input values
|
|
136
139
|
const [manualAuthorInput, setManualAuthorInput] = useState("");
|
|
137
140
|
// Effect to clear local state when global state is updated
|
|
@@ -153,11 +156,6 @@ export default function Editor() {
|
|
|
153
156
|
}
|
|
154
157
|
}, [state.rfp?.id, newlyCreatedRfpId]);
|
|
155
158
|
const allDocuments = useDocumentsInSelectedDrive();
|
|
156
|
-
const getDocumentNameById = useCallback((documentId) => {
|
|
157
|
-
// Use allDocuments array instead of hooks to avoid violating Rules of Hooks
|
|
158
|
-
const document = allDocuments?.find((doc) => doc.header.id === documentId);
|
|
159
|
-
return document?.header.name || "";
|
|
160
|
-
}, [allDocuments]);
|
|
161
159
|
let rfpDocumentNode = undefined;
|
|
162
160
|
if (state.rfp?.id) {
|
|
163
161
|
rfpDocumentNode = allDocuments?.find((doc) => {
|
|
@@ -227,17 +225,6 @@ export default function Editor() {
|
|
|
227
225
|
path: "",
|
|
228
226
|
}));
|
|
229
227
|
};
|
|
230
|
-
const searchClientDocuments = (userInput) => {
|
|
231
|
-
const results = allDocuments?.filter((node) => node.header.documentType === "powerhouse/network-profile" &&
|
|
232
|
-
(!userInput ||
|
|
233
|
-
node.header.name.toLowerCase().includes(userInput.toLowerCase()) ||
|
|
234
|
-
node.header.id.toLowerCase().includes(userInput.toLowerCase())));
|
|
235
|
-
return results?.map((doc) => ({
|
|
236
|
-
value: doc.header.id,
|
|
237
|
-
title: doc.header.name,
|
|
238
|
-
path: "",
|
|
239
|
-
}));
|
|
240
|
-
};
|
|
241
228
|
const searchSowDocuments = (userInput) => {
|
|
242
229
|
const results = allDocuments?.filter((node) => node.header.documentType === "powerhouse/scopeofwork" &&
|
|
243
230
|
(!userInput ||
|
|
@@ -356,23 +343,10 @@ export default function Editor() {
|
|
|
356
343
|
return {
|
|
357
344
|
value: doc.header.id,
|
|
358
345
|
title: title || doc.header.name,
|
|
359
|
-
path:
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const getClientOptionById = useCallback((documentId) => {
|
|
364
|
-
if (!documentId)
|
|
365
|
-
return undefined;
|
|
366
|
-
const doc = allDocuments?.find((document) => {
|
|
367
|
-
return (document.header.documentType === "powerhouse/network-profile" &&
|
|
368
|
-
document.header.id === documentId);
|
|
369
|
-
});
|
|
370
|
-
if (!doc)
|
|
371
|
-
return undefined;
|
|
372
|
-
return {
|
|
373
|
-
value: doc.header.id,
|
|
374
|
-
title: doc.header.name,
|
|
375
|
-
path: "",
|
|
346
|
+
path: {
|
|
347
|
+
text: doc.header.name,
|
|
348
|
+
url: doc.header.id,
|
|
349
|
+
},
|
|
376
350
|
description: "",
|
|
377
351
|
};
|
|
378
352
|
}, [allDocuments]);
|
|
@@ -388,11 +362,13 @@ export default function Editor() {
|
|
|
388
362
|
return {
|
|
389
363
|
value: doc.header.id,
|
|
390
364
|
title: doc.header.name,
|
|
391
|
-
path:
|
|
365
|
+
path: {
|
|
366
|
+
text: doc.header.name,
|
|
367
|
+
url: doc.header.id,
|
|
368
|
+
},
|
|
392
369
|
description: "",
|
|
393
370
|
};
|
|
394
371
|
}, [allDocuments]);
|
|
395
|
-
const clientInitialOption = useMemo(() => getClientOptionById(state.client?.id), [getClientOptionById, state.client?.id]);
|
|
396
372
|
const alternativeProposalsColumns = useMemo(() => [
|
|
397
373
|
{
|
|
398
374
|
field: "authorName",
|
|
@@ -428,7 +404,7 @@ export default function Editor() {
|
|
|
428
404
|
if (newValue !== context.row.sow) {
|
|
429
405
|
dispatch(actions.editAlternativeProposal({
|
|
430
406
|
id: context.row.id,
|
|
431
|
-
sowId: newValue
|
|
407
|
+
sowId: newValue,
|
|
432
408
|
}));
|
|
433
409
|
return true;
|
|
434
410
|
}
|
|
@@ -437,56 +413,14 @@ export default function Editor() {
|
|
|
437
413
|
renderCellEditor: (value, onChange, context) => {
|
|
438
414
|
const currentValue = value || "";
|
|
439
415
|
const initialOption = getSowOptionById(currentValue);
|
|
440
|
-
let latestValue = currentValue;
|
|
441
|
-
const handleSave = (valueToSave) => {
|
|
442
|
-
// Use provided value or fallback to latest tracked value
|
|
443
|
-
const valueToUse = valueToSave !== undefined ? valueToSave : latestValue;
|
|
444
|
-
const normalizedValue = valueToUse || null;
|
|
445
|
-
const currentRowValue = context.row.sow || null;
|
|
446
|
-
if (normalizedValue !== currentRowValue) {
|
|
447
|
-
onChange(normalizedValue);
|
|
448
|
-
dispatch(actions.editAlternativeProposal({
|
|
449
|
-
id: context.row.id,
|
|
450
|
-
sowId: normalizedValue || null,
|
|
451
|
-
}));
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
416
|
return (_jsx(PHIDInput, { value: currentValue, onChange: (newValue) => {
|
|
455
|
-
latestValue = newValue || "";
|
|
456
417
|
onChange(newValue);
|
|
457
418
|
}, onBlur: (e) => {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}, onKeyDown: async (e) => {
|
|
464
|
-
if (e.key === "Enter") {
|
|
465
|
-
e.preventDefault();
|
|
466
|
-
e.stopPropagation();
|
|
467
|
-
const inputValue = e.target?.value || latestValue;
|
|
468
|
-
// Fetch the actual document value from search results instead of using raw input
|
|
469
|
-
if (inputValue) {
|
|
470
|
-
const searchResults = searchSowDocuments(inputValue) || [];
|
|
471
|
-
const foundDoc = searchResults.find((doc) => doc.value === inputValue ||
|
|
472
|
-
doc.title
|
|
473
|
-
.toLowerCase()
|
|
474
|
-
.includes(inputValue.toLowerCase())) || searchResults[0];
|
|
475
|
-
if (foundDoc) {
|
|
476
|
-
handleSave(foundDoc.value);
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
// If no match found, clear the value
|
|
480
|
-
handleSave("");
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
else {
|
|
484
|
-
handleSave(""); // Clear if empty
|
|
485
|
-
}
|
|
486
|
-
// Blur the input to exit edit mode
|
|
487
|
-
setTimeout(() => {
|
|
488
|
-
e.target?.blur();
|
|
489
|
-
}, 0);
|
|
419
|
+
if (e.target.value !== context.row.sow) {
|
|
420
|
+
dispatch(actions.editAlternativeProposal({
|
|
421
|
+
id: context.row.id,
|
|
422
|
+
sowId: e.target.value,
|
|
423
|
+
}));
|
|
490
424
|
}
|
|
491
425
|
}, placeholder: "Search for SOW Document", className: "w-full", variant: "withValueTitleAndDescription", initialOptions: initialOption ? [initialOption] : undefined, fetchOptionsCallback: async (userInput) => {
|
|
492
426
|
const results = searchSowDocuments(userInput || "") || [];
|
|
@@ -496,7 +430,10 @@ export default function Editor() {
|
|
|
496
430
|
return results.map((doc) => ({
|
|
497
431
|
value: doc.value,
|
|
498
432
|
title: doc.title,
|
|
499
|
-
path:
|
|
433
|
+
path: {
|
|
434
|
+
text: doc.path,
|
|
435
|
+
url: doc.value,
|
|
436
|
+
},
|
|
500
437
|
description: "",
|
|
501
438
|
}));
|
|
502
439
|
}, fetchSelectedOptionCallback: async (documentId) => {
|
|
@@ -507,7 +444,10 @@ export default function Editor() {
|
|
|
507
444
|
return {
|
|
508
445
|
value: doc.value,
|
|
509
446
|
title: doc.title,
|
|
510
|
-
path:
|
|
447
|
+
path: {
|
|
448
|
+
text: doc.path,
|
|
449
|
+
url: doc.value,
|
|
450
|
+
},
|
|
511
451
|
description: "",
|
|
512
452
|
};
|
|
513
453
|
} }));
|
|
@@ -528,7 +468,7 @@ export default function Editor() {
|
|
|
528
468
|
if (newValue !== context.row.paymentTerms) {
|
|
529
469
|
dispatch(actions.editAlternativeProposal({
|
|
530
470
|
id: context.row.id,
|
|
531
|
-
paymentTermsId: newValue
|
|
471
|
+
paymentTermsId: newValue,
|
|
532
472
|
}));
|
|
533
473
|
return true;
|
|
534
474
|
}
|
|
@@ -537,56 +477,14 @@ export default function Editor() {
|
|
|
537
477
|
renderCellEditor: (value, onChange, context) => {
|
|
538
478
|
const currentValue = value || "";
|
|
539
479
|
const initialOption = getPaymentTermsOptionById(currentValue);
|
|
540
|
-
let latestValue = currentValue;
|
|
541
|
-
const handleSave = (valueToSave) => {
|
|
542
|
-
// Use provided value or fallback to latest tracked value
|
|
543
|
-
const valueToUse = valueToSave !== undefined ? valueToSave : latestValue;
|
|
544
|
-
const normalizedValue = valueToUse || null;
|
|
545
|
-
const currentRowValue = context.row.paymentTerms || null;
|
|
546
|
-
if (normalizedValue !== currentRowValue) {
|
|
547
|
-
onChange(normalizedValue);
|
|
548
|
-
dispatch(actions.editAlternativeProposal({
|
|
549
|
-
id: context.row.id,
|
|
550
|
-
paymentTermsId: normalizedValue || null,
|
|
551
|
-
}));
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
480
|
return (_jsx(PHIDInput, { value: currentValue, onChange: (newValue) => {
|
|
555
|
-
latestValue = newValue || "";
|
|
556
481
|
onChange(newValue);
|
|
557
482
|
}, onBlur: (e) => {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}, onKeyDown: async (e) => {
|
|
564
|
-
if (e.key === "Enter") {
|
|
565
|
-
e.preventDefault();
|
|
566
|
-
e.stopPropagation();
|
|
567
|
-
const inputValue = e.target?.value || latestValue;
|
|
568
|
-
// Fetch the actual document value from search results instead of using raw input
|
|
569
|
-
if (inputValue) {
|
|
570
|
-
const searchResults = searchPaymentTermsDocuments(inputValue) || [];
|
|
571
|
-
const foundDoc = searchResults.find((doc) => doc.value === inputValue ||
|
|
572
|
-
doc.title
|
|
573
|
-
.toLowerCase()
|
|
574
|
-
.includes(inputValue.toLowerCase())) || searchResults[0];
|
|
575
|
-
if (foundDoc) {
|
|
576
|
-
handleSave(foundDoc.value);
|
|
577
|
-
}
|
|
578
|
-
else {
|
|
579
|
-
// If no match found, clear the value
|
|
580
|
-
handleSave("");
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
handleSave(""); // Clear if empty
|
|
585
|
-
}
|
|
586
|
-
// Blur the input to exit edit mode
|
|
587
|
-
setTimeout(() => {
|
|
588
|
-
e.target?.blur();
|
|
589
|
-
}, 0);
|
|
483
|
+
if (e.target.value !== context.row.paymentTerms) {
|
|
484
|
+
dispatch(actions.editAlternativeProposal({
|
|
485
|
+
id: context.row.id,
|
|
486
|
+
paymentTermsId: e.target.value,
|
|
487
|
+
}));
|
|
590
488
|
}
|
|
591
489
|
}, placeholder: "Search for Payment Terms Document", className: "w-full", variant: "withValueTitleAndDescription", initialOptions: initialOption ? [initialOption] : undefined, fetchOptionsCallback: async (userInput) => {
|
|
592
490
|
const results = searchPaymentTermsDocuments(userInput || "") || [];
|
|
@@ -596,7 +494,10 @@ export default function Editor() {
|
|
|
596
494
|
return results.map((doc) => ({
|
|
597
495
|
value: doc.value,
|
|
598
496
|
title: doc.title,
|
|
599
|
-
path:
|
|
497
|
+
path: {
|
|
498
|
+
text: doc.path,
|
|
499
|
+
url: doc.value,
|
|
500
|
+
},
|
|
600
501
|
description: "",
|
|
601
502
|
}));
|
|
602
503
|
}, fetchSelectedOptionCallback: async (documentId) => {
|
|
@@ -607,7 +508,10 @@ export default function Editor() {
|
|
|
607
508
|
return {
|
|
608
509
|
value: doc.value,
|
|
609
510
|
title: doc.title,
|
|
610
|
-
path:
|
|
511
|
+
path: {
|
|
512
|
+
text: doc.path,
|
|
513
|
+
url: doc.value,
|
|
514
|
+
},
|
|
611
515
|
description: "",
|
|
612
516
|
};
|
|
613
517
|
} }));
|
|
@@ -657,12 +561,6 @@ export default function Editor() {
|
|
|
657
561
|
searchPaymentTermsDocuments,
|
|
658
562
|
searchSowDocuments,
|
|
659
563
|
]);
|
|
660
|
-
// Get the parent folder node for the currently selected node
|
|
661
|
-
const parentFolder = useParentFolderForSelectedNode();
|
|
662
|
-
// Set the selected node to the parent folder node (close the editor)
|
|
663
|
-
function handleClose() {
|
|
664
|
-
setSelectedNode(parentFolder?.id);
|
|
665
|
-
}
|
|
666
564
|
return (_jsxs("div", { className: "w-full bg-gray-50", children: [_jsx(DocumentToolbar, { document: doc, onClose: handleClose }), _jsxs("div", { className: "p-6 max-w-4xl mx-auto min-h-screen", children: [_jsx("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: _jsx("h1", { className: "text-3xl font-bold text-gray-900 mb-2", children: "Workstream" }) }), _jsx("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: _jsxs("div", { className: "flex flex-row gap-6", children: [_jsxs("div", { className: "flex-1", children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Code" }), _jsx(TextInput, { className: "w-full", defaultValue: state.code || "", onBlur: (e) => {
|
|
667
565
|
if (e.target.value !== state.code) {
|
|
668
566
|
handleWorkstreamChange("code", e.target.value);
|
|
@@ -671,30 +569,11 @@ export default function Editor() {
|
|
|
671
569
|
if (e.target.value !== state.title) {
|
|
672
570
|
handleWorkstreamChange("title", e.target.value);
|
|
673
571
|
}
|
|
674
|
-
}, placeholder: "Enter workstream title" })] }), _jsx("div", { className: "flex-1", children: _jsx(Select, { label: "Status", options: statusOptions, value: state.status, onChange: (value) => handleStatusChange(value) }) })] }) }), _jsxs("div", { className: "bg-white border border-gray-300 rounded-lg p-6 shadow-sm", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900 mb-4", children: "Client" }), _jsxs("div", { className: "space-y-4
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
680
|
-
}, placeholder: "Search for Client Profile", className: "w-full", variant: "withValueTitleAndDescription", initialOptions: clientInitialOption ? [clientInitialOption] : undefined, fetchOptionsCallback: async (userInput) => {
|
|
681
|
-
const results = searchClientDocuments(userInput || "") || [];
|
|
682
|
-
if (results.length === 0) {
|
|
683
|
-
return Promise.reject(new Error("No client profiles found"));
|
|
684
|
-
}
|
|
685
|
-
return results.map((doc) => ({
|
|
686
|
-
value: doc.value,
|
|
687
|
-
title: doc.title,
|
|
688
|
-
path: "",
|
|
689
|
-
description: "",
|
|
690
|
-
}));
|
|
691
|
-
}, fetchSelectedOptionCallback: async (documentId) => {
|
|
692
|
-
const option = getClientOptionById(documentId);
|
|
693
|
-
if (!option) {
|
|
694
|
-
return Promise.reject(new Error("Client profile not found"));
|
|
695
|
-
}
|
|
696
|
-
return option;
|
|
697
|
-
} })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Name" }), _jsx(TextInput, { className: "w-full", defaultValue: state.client?.name || "", onBlur: (e) => {
|
|
572
|
+
}, placeholder: "Enter workstream title" })] }), _jsx("div", { className: "flex-1", children: _jsx(Select, { label: "Status", options: statusOptions, value: state.status, onChange: (value) => handleStatusChange(value) }) })] }) }), _jsxs("div", { className: "bg-white border border-gray-300 rounded-lg p-6 shadow-sm", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900 mb-4", children: "Client" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Client ID" }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("svg", { className: "w-5 h-5 text-gray-400", fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z", clipRule: "evenodd" }) }) }), _jsx(TextInput, { className: "flex-1", defaultValue: state.client?.id || "", onBlur: (e) => {
|
|
573
|
+
if (e.target.value !== state.client?.id) {
|
|
574
|
+
handleClientIdChange(e.target.value);
|
|
575
|
+
}
|
|
576
|
+
}, placeholder: "Enter client ID" }), _jsx("div", { className: "flex-shrink-0", children: _jsx("svg", { className: "w-5 h-5 text-gray-400", fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }) }) })] })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Name" }), _jsx(TextInput, { className: "w-full", defaultValue: state.client?.name || "", onBlur: (e) => {
|
|
698
577
|
if (e.target.value !== state.client?.name) {
|
|
699
578
|
handleClientChange("name", e.target.value);
|
|
700
579
|
}
|
|
@@ -702,7 +581,7 @@ export default function Editor() {
|
|
|
702
581
|
if (e.target.value !== state.client?.icon) {
|
|
703
582
|
handleClientChange("icon", e.target.value);
|
|
704
583
|
}
|
|
705
|
-
}, placeholder: "Enter client icon URL" }), state.client?.icon ? (_jsx("img", { src: state.client?.icon, alt: "Client Icon", className: "w-10 h-10 object-cover" })) : ("")] })] })] })] })] }), _jsxs("div", { className: "bg-white rounded-lg p-6 mt-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Request for Proposal" }), _jsx("div", { className: "w-full flex flex-row items-center gap-8", children: _jsx("div", { className: "w-[350px]", children: _jsx(OIDInput, { name: "Request for Proposal", label: "RFP Document", placeholder: "Search for RFP Document", variant: "
|
|
584
|
+
}, placeholder: "Enter client icon URL" }), state.client?.icon ? (_jsx("img", { src: state.client?.icon, alt: "Client Icon", className: "w-10 h-10 object-cover" })) : ("")] })] })] })] })] }), _jsxs("div", { className: "bg-white rounded-lg p-6 mt-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Request for Proposal" }), _jsx("div", { className: "w-full flex flex-row items-center gap-8", children: _jsx("div", { className: "w-[350px]", children: _jsx(OIDInput, { name: "Request for Proposal", label: "RFP Document", placeholder: "Search for RFP Document", variant: "withValueTitleAndDescription", value: newlyCreatedRfpId || state.rfp?.id || "", onBlur: (e) => {
|
|
706
585
|
if (e.target.value !== state.rfp?.id) {
|
|
707
586
|
dispatch(actions.setRequestForProposal({
|
|
708
587
|
rfpId: e.target.value,
|
|
@@ -719,7 +598,10 @@ export default function Editor() {
|
|
|
719
598
|
return results?.map((doc) => ({
|
|
720
599
|
value: doc.value, // unique document ID
|
|
721
600
|
title: doc.title, // document title or name
|
|
722
|
-
path:
|
|
601
|
+
path: {
|
|
602
|
+
text: doc.path,
|
|
603
|
+
url: doc.value,
|
|
604
|
+
}, // document path or location
|
|
723
605
|
description: "", // document description or summary
|
|
724
606
|
icon: "File", // document icon
|
|
725
607
|
}));
|
|
@@ -734,7 +616,10 @@ export default function Editor() {
|
|
|
734
616
|
return {
|
|
735
617
|
value: doc.value,
|
|
736
618
|
title: doc.title,
|
|
737
|
-
path:
|
|
619
|
+
path: {
|
|
620
|
+
text: doc.path,
|
|
621
|
+
url: doc.title,
|
|
622
|
+
},
|
|
738
623
|
description: "",
|
|
739
624
|
icon: "File",
|
|
740
625
|
};
|
|
@@ -742,32 +627,25 @@ export default function Editor() {
|
|
|
742
627
|
{
|
|
743
628
|
value: rfpDocument?.header.id || "",
|
|
744
629
|
title: rfpDocument?.document.title || "",
|
|
745
|
-
path:
|
|
630
|
+
path: {
|
|
631
|
+
text: rfpDocument?.document.title || "",
|
|
632
|
+
url: rfpDocument?.header.id || "",
|
|
633
|
+
},
|
|
746
634
|
description: "",
|
|
747
635
|
icon: "File",
|
|
748
636
|
},
|
|
749
|
-
] }) }) }), !rfpDocument ? (_jsx("div", { className: "mt-4", children: _jsx(Button, {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
637
|
+
] }) }) }), !rfpDocument ? (_jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light",
|
|
638
|
+
// size="sm"
|
|
639
|
+
className: "cursor-pointer hover:bg-gray-600 hover:text-white disabled:opacity-50 disabled:cursor-not-allowed", title: "Save Workstream", "aria-description": "Save Workstream", disabled: isCreatingRfp, onClick: async () => {
|
|
640
|
+
const createdNode = await createRfpDocument();
|
|
641
|
+
if (createdNode) {
|
|
642
|
+
// Set local state to immediately show the new RFP ID
|
|
643
|
+
setNewlyCreatedRfpId(createdNode.id);
|
|
644
|
+
dispatch(actions.setRequestForProposal({
|
|
645
|
+
rfpId: createdNode.id,
|
|
646
|
+
title: createdNode.name,
|
|
647
|
+
}));
|
|
753
648
|
}
|
|
754
|
-
(async () => {
|
|
755
|
-
try {
|
|
756
|
-
const createdNode = await createRfpDocument();
|
|
757
|
-
if (createdNode) {
|
|
758
|
-
// Set local state to immediately show the new RFP ID
|
|
759
|
-
setNewlyCreatedRfpId(createdNode.id);
|
|
760
|
-
dispatch(actions.setRequestForProposal({
|
|
761
|
-
rfpId: createdNode.id,
|
|
762
|
-
title: createdNode.name,
|
|
763
|
-
}));
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
catch (error) {
|
|
767
|
-
console.error("Error creating RFP document:", error);
|
|
768
|
-
}
|
|
769
|
-
})();
|
|
770
|
-
return false;
|
|
771
649
|
}, children: isCreatingRfp ? "Creating..." : "Create RFP Document" }) })) : ("")] }), rfpDocument ? (_jsx("div", { children: state.initialProposal ? (_jsxs("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Initial Proposal" }), _jsxs("div", { className: "flex flex-row gap-4 mb-6", children: [_jsx("div", { className: "flex-1", children: _jsx(TextInput, { label: "Author", value: manualAuthorInput ||
|
|
772
650
|
state.initialProposal?.author?.name ||
|
|
773
651
|
"", onChange: (e) => {
|
|
@@ -798,7 +676,7 @@ export default function Editor() {
|
|
|
798
676
|
if (e.target.value !== state.initialProposal?.sow) {
|
|
799
677
|
dispatch(actions.editInitialProposal({
|
|
800
678
|
id: state.initialProposal?.id || "",
|
|
801
|
-
sowId: e.target.value
|
|
679
|
+
sowId: e.target.value,
|
|
802
680
|
}));
|
|
803
681
|
}
|
|
804
682
|
},
|
|
@@ -811,7 +689,10 @@ export default function Editor() {
|
|
|
811
689
|
return results?.map((doc) => ({
|
|
812
690
|
value: doc.value, // unique document ID
|
|
813
691
|
title: doc.title, // document title or name
|
|
814
|
-
path:
|
|
692
|
+
path: {
|
|
693
|
+
text: doc.path,
|
|
694
|
+
url: doc.value,
|
|
695
|
+
}, // document path or location
|
|
815
696
|
description: "", // document description or summary
|
|
816
697
|
icon: "File", // document icon
|
|
817
698
|
}));
|
|
@@ -825,7 +706,10 @@ export default function Editor() {
|
|
|
825
706
|
return {
|
|
826
707
|
value: doc.value,
|
|
827
708
|
title: doc.title,
|
|
828
|
-
path:
|
|
709
|
+
path: {
|
|
710
|
+
text: doc.path,
|
|
711
|
+
url: doc.title,
|
|
712
|
+
},
|
|
829
713
|
description: "",
|
|
830
714
|
icon: "File",
|
|
831
715
|
};
|
|
@@ -835,41 +719,32 @@ export default function Editor() {
|
|
|
835
719
|
value: sowDocumentNode.header.id,
|
|
836
720
|
title: sowDocumentNode.state?.global?.title ||
|
|
837
721
|
sowDocumentNode.header.name,
|
|
838
|
-
path:
|
|
722
|
+
path: {
|
|
723
|
+
text: sowDocumentNode.header.name,
|
|
724
|
+
url: sowDocumentNode.header.id,
|
|
725
|
+
},
|
|
839
726
|
description: "",
|
|
840
727
|
icon: "File",
|
|
841
728
|
},
|
|
842
729
|
]
|
|
843
|
-
: undefined }), _jsx("button", {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
730
|
+
: undefined }), _jsx("button", { className: "text-sm bg-gray-100 rounded-md mt-1 p-1 hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed", disabled: isCreatingSow, onClick: async () => {
|
|
731
|
+
console.log("Creating sow");
|
|
732
|
+
const createdNode = await createSowDocument();
|
|
733
|
+
if (createdNode) {
|
|
734
|
+
// Set local state to immediately show the new SOW ID
|
|
735
|
+
setNewlyCreatedSowId(createdNode.id);
|
|
736
|
+
dispatch(actions.editInitialProposal({
|
|
737
|
+
id: state.initialProposal?.id || "",
|
|
738
|
+
sowId: createdNode.id,
|
|
739
|
+
}));
|
|
847
740
|
}
|
|
848
|
-
(async () => {
|
|
849
|
-
try {
|
|
850
|
-
console.log("Creating sow");
|
|
851
|
-
const createdNode = await createSowDocument();
|
|
852
|
-
if (createdNode) {
|
|
853
|
-
// Set local state to immediately show the new SOW ID
|
|
854
|
-
setNewlyCreatedSowId(createdNode.id);
|
|
855
|
-
dispatch(actions.editInitialProposal({
|
|
856
|
-
id: state.initialProposal?.id || "",
|
|
857
|
-
sowId: createdNode.id,
|
|
858
|
-
}));
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
catch (error) {
|
|
862
|
-
console.error("Error creating SOW document:", error);
|
|
863
|
-
}
|
|
864
|
-
})();
|
|
865
|
-
return false;
|
|
866
741
|
}, children: isCreatingSow ? "Creating..." : "Create sow" })] }), _jsxs("div", { className: "flex-1", children: [_jsx(OIDInput, { name: "Payment Terms", label: "Payment Terms", placeholder: "Search for Payment Terms Document", variant: "withValueTitleAndDescription", value: newlyCreatedPaymentTermsId ||
|
|
867
742
|
state.initialProposal?.paymentTerms ||
|
|
868
743
|
"", onBlur: (e) => {
|
|
869
744
|
if (e.target.value !== state.initialProposal?.paymentTerms) {
|
|
870
745
|
dispatch(actions.editInitialProposal({
|
|
871
746
|
id: state.initialProposal?.id || "",
|
|
872
|
-
paymentTermsId: e.target.value
|
|
747
|
+
paymentTermsId: e.target.value,
|
|
873
748
|
}));
|
|
874
749
|
}
|
|
875
750
|
},
|
|
@@ -882,7 +757,10 @@ export default function Editor() {
|
|
|
882
757
|
return results?.map((doc) => ({
|
|
883
758
|
value: doc.value, // unique document ID
|
|
884
759
|
title: doc.title, // document title or name
|
|
885
|
-
path:
|
|
760
|
+
path: {
|
|
761
|
+
text: doc.path,
|
|
762
|
+
url: doc.value,
|
|
763
|
+
}, // document path or location
|
|
886
764
|
description: "", // document description or summary
|
|
887
765
|
icon: "File", // document icon
|
|
888
766
|
}));
|
|
@@ -896,7 +774,10 @@ export default function Editor() {
|
|
|
896
774
|
return {
|
|
897
775
|
value: doc.value,
|
|
898
776
|
title: doc.title,
|
|
899
|
-
path:
|
|
777
|
+
path: {
|
|
778
|
+
text: doc.path,
|
|
779
|
+
url: doc.title,
|
|
780
|
+
},
|
|
900
781
|
description: "",
|
|
901
782
|
icon: "File",
|
|
902
783
|
};
|
|
@@ -905,42 +786,34 @@ export default function Editor() {
|
|
|
905
786
|
{
|
|
906
787
|
value: paymentTermsDocumentNode.header.id,
|
|
907
788
|
title: paymentTermsDocumentNode.header.name,
|
|
908
|
-
path:
|
|
789
|
+
path: {
|
|
790
|
+
text: paymentTermsDocumentNode.header.name,
|
|
791
|
+
url: paymentTermsDocumentNode.header.id,
|
|
792
|
+
},
|
|
909
793
|
description: "",
|
|
910
794
|
icon: "File",
|
|
911
795
|
},
|
|
912
796
|
]
|
|
913
|
-
: undefined }), _jsx("button", {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
797
|
+
: undefined }), _jsx("button", { className: "text-sm bg-gray-100 rounded-md mt-1 p-1 hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed", disabled: isCreatingPaymentTerms, onClick: async () => {
|
|
798
|
+
console.log("Creating payment terms");
|
|
799
|
+
const createdNode = await createPaymentTermsDocument();
|
|
800
|
+
if (createdNode) {
|
|
801
|
+
// Set local state to immediately show the new Payment Terms ID
|
|
802
|
+
setNewlyCreatedPaymentTermsId(createdNode.id);
|
|
803
|
+
dispatch(actions.editInitialProposal({
|
|
804
|
+
id: state.initialProposal?.id || "",
|
|
805
|
+
paymentTermsId: createdNode.id,
|
|
806
|
+
}));
|
|
917
807
|
}
|
|
918
|
-
(async () => {
|
|
919
|
-
try {
|
|
920
|
-
console.log("Creating payment terms");
|
|
921
|
-
const createdNode = await createPaymentTermsDocument();
|
|
922
|
-
if (createdNode) {
|
|
923
|
-
// Set local state to immediately show the new Payment Terms ID
|
|
924
|
-
setNewlyCreatedPaymentTermsId(createdNode.id);
|
|
925
|
-
dispatch(actions.editInitialProposal({
|
|
926
|
-
id: state.initialProposal?.id || "",
|
|
927
|
-
paymentTermsId: createdNode.id,
|
|
928
|
-
}));
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
catch (error) {
|
|
932
|
-
console.error("Error creating Payment Terms document:", error);
|
|
933
|
-
}
|
|
934
|
-
})();
|
|
935
|
-
return false;
|
|
936
808
|
}, children: isCreatingPaymentTerms
|
|
937
809
|
? "Creating..."
|
|
938
810
|
: "Create Payment Terms" })] })] }), _jsxs("div", { children: [_jsx("h2", { className: "text-lg font-medium text-gray-900 mb-4", children: "Alternative Proposals" }), _jsx(ObjectSetTable, { columns: alternativeProposalsColumns, data: alternativeProposalsData, allowRowSelection: true, onDelete: (data) => {
|
|
939
811
|
if (data.length > 0) {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
812
|
+
data.forEach((d) => {
|
|
813
|
+
dispatch(actions.removeAlternativeProposal({
|
|
814
|
+
id: d.id,
|
|
815
|
+
}));
|
|
816
|
+
});
|
|
944
817
|
}
|
|
945
818
|
}, onAdd: (data) => {
|
|
946
819
|
if (data.authorName) {
|
|
@@ -952,7 +825,9 @@ export default function Editor() {
|
|
|
952
825
|
},
|
|
953
826
|
}));
|
|
954
827
|
}
|
|
955
|
-
} })] })] })) : (_jsxs("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Initial Proposal" }), _jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light",
|
|
828
|
+
} })] })] })) : (_jsxs("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Initial Proposal" }), _jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light",
|
|
829
|
+
// size="small"
|
|
830
|
+
className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Create Initial Proposal", "aria-description": "Create Initial Proposal", onClick: () => {
|
|
956
831
|
console.log("Creating initial proposal");
|
|
957
832
|
dispatch(actions.editInitialProposal({
|
|
958
833
|
id: generateId(),
|