@powerhousedao/network-admin 0.0.37 → 0.0.39
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 +3 -0
- package/dist/document-models/document-models.d.ts.map +1 -0
- package/dist/document-models/document-models.js +10 -0
- package/dist/document-models/index.d.ts +8 -5
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +8 -4
- package/dist/document-models/network-profile/actions.d.ts +23 -0
- package/dist/document-models/network-profile/actions.d.ts.map +1 -0
- package/dist/document-models/network-profile/actions.js +4 -0
- package/dist/document-models/network-profile/gen/creators.d.ts +1 -0
- package/dist/document-models/network-profile/gen/creators.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/creators.js +1 -0
- package/dist/document-models/network-profile/gen/document-model.d.ts +2 -2
- package/dist/document-models/network-profile/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/document-schema.d.ts +332 -0
- package/dist/document-models/network-profile/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/network-profile/gen/document-schema.js +33 -0
- package/dist/document-models/network-profile/gen/document-type.d.ts +2 -0
- package/dist/document-models/network-profile/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/network-profile/gen/document-type.js +1 -0
- package/dist/document-models/network-profile/gen/index.d.ts +7 -3
- package/dist/document-models/network-profile/gen/index.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/index.js +7 -2
- package/dist/document-models/network-profile/gen/network-profile-management/actions.js +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/creators.d.ts +2 -2
- package/dist/document-models/network-profile/gen/network-profile-management/creators.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/network-profile-management/creators.js +13 -13
- package/dist/document-models/network-profile/gen/network-profile-management/operations.js +3 -1
- package/dist/document-models/network-profile/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/network-profile/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/ph-factories.js +1 -4
- package/dist/document-models/network-profile/gen/reducer.d.ts +1 -3
- package/dist/document-models/network-profile/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/reducer.js +26 -29
- package/dist/document-models/network-profile/gen/schema/index.d.ts +1 -1
- package/dist/document-models/network-profile/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/schema/index.js +1 -1
- package/dist/document-models/network-profile/gen/types.d.ts +9 -7
- package/dist/document-models/network-profile/gen/types.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/types.js +1 -1
- package/dist/document-models/network-profile/gen/utils.d.ts +13 -20
- package/dist/document-models/network-profile/gen/utils.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/utils.js +45 -36
- package/dist/document-models/network-profile/hooks.d.ts +11 -0
- package/dist/document-models/network-profile/hooks.d.ts.map +1 -0
- package/dist/document-models/network-profile/hooks.js +26 -0
- package/dist/document-models/network-profile/index.d.ts +5 -30
- package/dist/document-models/network-profile/index.d.ts.map +1 -1
- package/dist/document-models/network-profile/index.js +5 -17
- package/dist/document-models/network-profile/module.d.ts +5 -0
- package/dist/document-models/network-profile/module.d.ts.map +1 -0
- package/dist/document-models/network-profile/module.js +10 -0
- package/dist/document-models/network-profile/src/index.d.ts +2 -0
- package/dist/document-models/network-profile/src/index.d.ts.map +1 -0
- package/dist/document-models/network-profile/src/index.js +1 -0
- package/dist/document-models/network-profile/src/reducers/network-profile-management.d.ts +1 -6
- 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 +24 -29
- package/dist/document-models/network-profile/src/tests/document-model.test.d.ts +4 -0
- 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 +91 -5
- package/dist/document-models/network-profile/src/tests/network-profile-management.test.js +69 -114
- package/dist/document-models/network-profile/utils.d.ts +14 -0
- package/dist/document-models/network-profile/utils.d.ts.map +1 -0
- package/dist/document-models/network-profile/utils.js +7 -0
- package/dist/document-models/payment-terms/actions.d.ts +28 -0
- package/dist/document-models/payment-terms/actions.d.ts.map +1 -0
- package/dist/document-models/payment-terms/actions.js +9 -0
- package/dist/document-models/payment-terms/gen/clauses/actions.js +1 -1
- package/dist/document-models/payment-terms/gen/clauses/creators.d.ts +2 -2
- package/dist/document-models/payment-terms/gen/clauses/creators.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/clauses/creators.js +8 -8
- package/dist/document-models/payment-terms/gen/clauses/operations.js +3 -1
- package/dist/document-models/payment-terms/gen/creators.d.ts +3 -0
- package/dist/document-models/payment-terms/gen/creators.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/creators.js +3 -0
- package/dist/document-models/payment-terms/gen/document-model.d.ts +2 -2
- package/dist/document-models/payment-terms/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/document-model.js +118 -129
- package/dist/document-models/payment-terms/gen/document-schema.d.ts +369 -0
- package/dist/document-models/payment-terms/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/payment-terms/gen/document-schema.js +33 -0
- package/dist/document-models/payment-terms/gen/document-type.d.ts +2 -0
- package/dist/document-models/payment-terms/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/payment-terms/gen/document-type.js +1 -0
- package/dist/document-models/payment-terms/gen/index.d.ts +9 -3
- package/dist/document-models/payment-terms/gen/index.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/index.js +9 -2
- package/dist/document-models/payment-terms/gen/milestones/actions.js +1 -1
- package/dist/document-models/payment-terms/gen/milestones/creators.d.ts +2 -2
- package/dist/document-models/payment-terms/gen/milestones/creators.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/milestones/creators.js +7 -7
- package/dist/document-models/payment-terms/gen/milestones/operations.js +3 -1
- package/dist/document-models/payment-terms/gen/ph-factories.d.ts +6 -10
- 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 -6
- package/dist/document-models/payment-terms/gen/reducer.d.ts +1 -3
- package/dist/document-models/payment-terms/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/reducer.js +39 -46
- package/dist/document-models/payment-terms/gen/schema/index.d.ts +1 -1
- package/dist/document-models/payment-terms/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/schema/index.js +1 -1
- package/dist/document-models/payment-terms/gen/schema/types.d.ts +14 -29
- 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 +4 -6
- package/dist/document-models/payment-terms/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/schema/zod.js +29 -55
- package/dist/document-models/payment-terms/gen/terms/actions.d.ts +5 -9
- package/dist/document-models/payment-terms/gen/terms/actions.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/actions.js +1 -1
- package/dist/document-models/payment-terms/gen/terms/creators.d.ts +3 -4
- package/dist/document-models/payment-terms/gen/terms/creators.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/creators.js +7 -8
- package/dist/document-models/payment-terms/gen/terms/operations.d.ts +2 -3
- package/dist/document-models/payment-terms/gen/terms/operations.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/terms/operations.js +3 -1
- package/dist/document-models/payment-terms/gen/types.d.ts +9 -7
- package/dist/document-models/payment-terms/gen/types.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/types.js +1 -1
- package/dist/document-models/payment-terms/gen/utils.d.ts +13 -20
- package/dist/document-models/payment-terms/gen/utils.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/utils.js +46 -38
- package/dist/document-models/payment-terms/hooks.d.ts +11 -0
- package/dist/document-models/payment-terms/hooks.d.ts.map +1 -0
- package/dist/document-models/payment-terms/hooks.js +26 -0
- package/dist/document-models/payment-terms/index.d.ts +5 -36
- package/dist/document-models/payment-terms/index.d.ts.map +1 -1
- package/dist/document-models/payment-terms/index.js +5 -17
- package/dist/document-models/payment-terms/module.d.ts +5 -0
- package/dist/document-models/payment-terms/module.d.ts.map +1 -0
- package/dist/document-models/payment-terms/module.js +10 -0
- package/dist/document-models/payment-terms/src/index.d.ts +2 -0
- package/dist/document-models/payment-terms/src/index.d.ts.map +1 -0
- package/dist/document-models/payment-terms/src/index.js +1 -0
- package/dist/document-models/payment-terms/src/reducers/clauses.d.ts +2 -2
- package/dist/document-models/payment-terms/src/reducers/clauses.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/clauses.js +7 -7
- package/dist/document-models/payment-terms/src/reducers/milestones.d.ts +2 -2
- package/dist/document-models/payment-terms/src/reducers/milestones.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/milestones.js +6 -6
- package/dist/document-models/payment-terms/src/reducers/terms.d.ts +2 -2
- package/dist/document-models/payment-terms/src/reducers/terms.d.ts.map +1 -1
- package/dist/document-models/payment-terms/src/reducers/terms.js +14 -23
- package/dist/document-models/payment-terms/src/tests/clauses.test.js +26 -21
- package/dist/document-models/payment-terms/src/tests/document-model.test.d.ts +4 -0
- 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 +91 -5
- package/dist/document-models/payment-terms/src/tests/milestones.test.js +22 -19
- package/dist/document-models/payment-terms/src/tests/terms.test.js +24 -29
- package/dist/document-models/payment-terms/utils.d.ts +14 -0
- package/dist/document-models/payment-terms/utils.d.ts.map +1 -0
- package/dist/document-models/payment-terms/utils.js +7 -0
- package/dist/document-models/request-for-proposals/actions.d.ts +18 -0
- package/dist/document-models/request-for-proposals/actions.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/actions.js +9 -0
- package/dist/document-models/request-for-proposals/gen/contex-document/actions.js +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/creators.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/contex-document/creators.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/creators.js +4 -4
- package/dist/document-models/request-for-proposals/gen/contex-document/operations.js +3 -1
- package/dist/document-models/request-for-proposals/gen/creators.d.ts +3 -0
- package/dist/document-models/request-for-proposals/gen/creators.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/creators.js +3 -0
- package/dist/document-models/request-for-proposals/gen/document-model.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/document-model.js +51 -51
- package/dist/document-models/request-for-proposals/gen/document-schema.d.ts +389 -0
- package/dist/document-models/request-for-proposals/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/gen/document-schema.js +33 -0
- package/dist/document-models/request-for-proposals/gen/document-type.d.ts +2 -0
- package/dist/document-models/request-for-proposals/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/gen/document-type.js +1 -0
- package/dist/document-models/request-for-proposals/gen/index.d.ts +9 -3
- package/dist/document-models/request-for-proposals/gen/index.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/index.js +9 -2
- package/dist/document-models/request-for-proposals/gen/ph-factories.d.ts +6 -10
- 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 +2 -5
- package/dist/document-models/request-for-proposals/gen/proposals/actions.js +1 -1
- package/dist/document-models/request-for-proposals/gen/proposals/creators.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/proposals/creators.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/proposals/creators.js +5 -5
- package/dist/document-models/request-for-proposals/gen/proposals/operations.js +3 -1
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts +1 -3
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/reducer.js +18 -21
- package/dist/document-models/request-for-proposals/gen/rfp-state/actions.js +1 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/creators.d.ts +2 -2
- package/dist/document-models/request-for-proposals/gen/rfp-state/creators.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/creators.js +3 -3
- package/dist/document-models/request-for-proposals/gen/rfp-state/operations.js +3 -1
- package/dist/document-models/request-for-proposals/gen/schema/index.d.ts +1 -1
- package/dist/document-models/request-for-proposals/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/schema/index.js +1 -1
- package/dist/document-models/request-for-proposals/gen/types.d.ts +9 -7
- package/dist/document-models/request-for-proposals/gen/types.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/types.js +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.d.ts +13 -20
- package/dist/document-models/request-for-proposals/gen/utils.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.js +46 -37
- package/dist/document-models/request-for-proposals/hooks.d.ts +11 -0
- package/dist/document-models/request-for-proposals/hooks.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/hooks.js +26 -0
- package/dist/document-models/request-for-proposals/index.d.ts +5 -25
- package/dist/document-models/request-for-proposals/index.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/index.js +5 -17
- package/dist/document-models/request-for-proposals/module.d.ts +5 -0
- package/dist/document-models/request-for-proposals/module.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/module.js +10 -0
- package/dist/document-models/request-for-proposals/src/index.d.ts +2 -0
- package/dist/document-models/request-for-proposals/src/index.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/src/index.js +1 -0
- package/dist/document-models/request-for-proposals/src/reducers/contex-document.d.ts +2 -7
- 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 +1 -6
- package/dist/document-models/request-for-proposals/src/reducers/proposals.d.ts +2 -7
- 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 +1 -6
- package/dist/document-models/request-for-proposals/src/reducers/rfp-state.d.ts +2 -7
- 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 +1 -6
- package/dist/document-models/request-for-proposals/src/tests/contex-document.test.d.ts +2 -1
- 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 +24 -180
- package/dist/document-models/request-for-proposals/src/tests/document-model.test.d.ts +4 -0
- 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 +91 -5
- package/dist/document-models/request-for-proposals/src/tests/proposals.test.d.ts +2 -1
- 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 +33 -326
- package/dist/document-models/request-for-proposals/src/tests/rfp-state.test.d.ts +2 -1
- 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 +15 -239
- package/dist/document-models/request-for-proposals/utils.d.ts +14 -0
- package/dist/document-models/request-for-proposals/utils.d.ts.map +1 -0
- package/dist/document-models/request-for-proposals/utils.js +7 -0
- package/dist/document-models/workstream/actions.d.ts +21 -0
- package/dist/document-models/workstream/actions.d.ts.map +1 -0
- package/dist/document-models/workstream/actions.js +8 -0
- package/dist/document-models/workstream/gen/creators.d.ts +2 -0
- package/dist/document-models/workstream/gen/creators.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/creators.js +2 -0
- package/dist/document-models/workstream/gen/document-model.d.ts +2 -2
- package/dist/document-models/workstream/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/document-model.js +66 -66
- package/dist/document-models/workstream/gen/document-schema.d.ts +313 -0
- package/dist/document-models/workstream/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/workstream/gen/document-schema.js +33 -0
- package/dist/document-models/workstream/gen/document-type.d.ts +2 -0
- package/dist/document-models/workstream/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/workstream/gen/document-type.js +1 -0
- package/dist/document-models/workstream/gen/index.d.ts +8 -3
- package/dist/document-models/workstream/gen/index.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/index.js +8 -2
- package/dist/document-models/workstream/gen/ph-factories.d.ts +6 -10
- package/dist/document-models/workstream/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/ph-factories.js +1 -4
- package/dist/document-models/workstream/gen/proposals/actions.js +1 -1
- package/dist/document-models/workstream/gen/proposals/creators.d.ts +2 -2
- package/dist/document-models/workstream/gen/proposals/creators.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/proposals/creators.js +6 -6
- package/dist/document-models/workstream/gen/proposals/operations.js +3 -1
- package/dist/document-models/workstream/gen/reducer.d.ts +1 -3
- package/dist/document-models/workstream/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/reducer.js +23 -26
- package/dist/document-models/workstream/gen/schema/index.d.ts +1 -1
- package/dist/document-models/workstream/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/schema/index.js +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/types.d.ts +9 -7
- package/dist/document-models/workstream/gen/types.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/types.js +1 -1
- package/dist/document-models/workstream/gen/utils.d.ts +13 -20
- package/dist/document-models/workstream/gen/utils.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/utils.js +46 -37
- package/dist/document-models/workstream/gen/workstream/actions.js +1 -1
- package/dist/document-models/workstream/gen/workstream/creators.d.ts +2 -2
- package/dist/document-models/workstream/gen/workstream/creators.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/workstream/creators.js +7 -7
- package/dist/document-models/workstream/gen/workstream/operations.js +3 -1
- package/dist/document-models/workstream/hooks.d.ts +11 -0
- package/dist/document-models/workstream/hooks.d.ts.map +1 -0
- package/dist/document-models/workstream/hooks.js +26 -0
- package/dist/document-models/workstream/index.d.ts +5 -28
- package/dist/document-models/workstream/index.d.ts.map +1 -1
- package/dist/document-models/workstream/index.js +5 -17
- package/dist/document-models/workstream/module.d.ts +5 -0
- package/dist/document-models/workstream/module.d.ts.map +1 -0
- package/dist/document-models/workstream/module.js +10 -0
- package/dist/document-models/workstream/src/index.d.ts +2 -0
- package/dist/document-models/workstream/src/index.d.ts.map +1 -0
- package/dist/document-models/workstream/src/index.js +1 -0
- package/dist/document-models/workstream/src/reducers/proposals.d.ts +2 -7
- package/dist/document-models/workstream/src/reducers/proposals.d.ts.map +1 -1
- package/dist/document-models/workstream/src/reducers/proposals.js +1 -6
- package/dist/document-models/workstream/src/reducers/workstream.d.ts +2 -7
- package/dist/document-models/workstream/src/reducers/workstream.d.ts.map +1 -1
- package/dist/document-models/workstream/src/reducers/workstream.js +1 -6
- package/dist/document-models/workstream/src/tests/document-model.test.d.ts +4 -0
- 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 +88 -2
- package/dist/document-models/workstream/src/tests/proposals.test.js +26 -25
- package/dist/document-models/workstream/src/tests/workstream.test.js +32 -29
- package/dist/document-models/workstream/utils.d.ts +14 -0
- package/dist/document-models/workstream/utils.d.ts.map +1 -0
- package/dist/document-models/workstream/utils.js +7 -0
- package/dist/editors/editors.d.ts +3 -0
- package/dist/editors/editors.d.ts.map +1 -0
- package/dist/editors/editors.js +12 -0
- package/dist/editors/index.d.ts +9 -6
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +9 -5
- package/dist/editors/network-admin/components/DriveExplorer.d.ts +3 -4
- package/dist/editors/network-admin/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/network-admin/components/DriveExplorer.js +17 -31
- package/dist/editors/network-admin/components/icons/PaymentIcon.d.ts +1 -1
- package/dist/editors/network-admin/components/icons/PaymentIcon.d.ts.map +1 -1
- package/dist/editors/network-admin/components/icons/RfpIcon.d.ts +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 +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 +1 -1
- package/dist/editors/network-admin/components/icons/WorkstreamIcon.d.ts.map +1 -1
- package/dist/editors/network-admin/config.d.ts +4 -0
- package/dist/editors/network-admin/config.d.ts.map +1 -0
- package/dist/editors/network-admin/config.js +12 -0
- package/dist/editors/network-admin/editor.d.ts +3 -3
- package/dist/editors/network-admin/editor.d.ts.map +1 -1
- package/dist/editors/network-admin/editor.js +10 -2
- package/dist/editors/network-admin/module.d.ts +3 -0
- package/dist/editors/network-admin/module.d.ts.map +1 -0
- package/dist/editors/network-admin/module.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 +43 -32
- package/dist/editors/network-profile/module.d.ts +4 -0
- package/dist/editors/network-profile/module.d.ts.map +1 -0
- package/dist/editors/network-profile/module.js +10 -0
- package/dist/editors/payment-terms/basic-terms-tab.d.ts +1 -1
- package/dist/editors/payment-terms/basic-terms-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/basic-terms-tab.js +6 -5
- package/dist/editors/payment-terms/clauses-tab.d.ts +2 -2
- package/dist/editors/payment-terms/clauses-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/clauses-tab.js +32 -26
- package/dist/editors/payment-terms/cost-materials-tab.d.ts +1 -1
- package/dist/editors/payment-terms/cost-materials-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/cost-materials-tab.js +20 -19
- package/dist/editors/payment-terms/editor.d.ts.map +1 -1
- package/dist/editors/payment-terms/editor.js +13 -5
- package/dist/editors/payment-terms/escrow-tab.d.ts +1 -1
- package/dist/editors/payment-terms/escrow-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/escrow-tab.js +4 -3
- package/dist/editors/payment-terms/evaluation-tab.d.ts +1 -1
- package/dist/editors/payment-terms/evaluation-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/evaluation-tab.js +5 -4
- package/dist/editors/payment-terms/milestones-tab.d.ts +1 -1
- package/dist/editors/payment-terms/milestones-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/milestones-tab.js +9 -6
- package/dist/editors/payment-terms/module.d.ts +4 -0
- package/dist/editors/payment-terms/module.d.ts.map +1 -0
- package/dist/editors/payment-terms/module.js +10 -0
- package/dist/editors/payment-terms/retainer-tab.d.ts +1 -1
- package/dist/editors/payment-terms/retainer-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/retainer-tab.js +22 -41
- package/dist/editors/request-for-proposals/editor.d.ts.map +1 -1
- package/dist/editors/request-for-proposals/editor.js +61 -51
- package/dist/editors/request-for-proposals/module.d.ts +4 -0
- package/dist/editors/request-for-proposals/module.d.ts.map +1 -0
- package/dist/editors/request-for-proposals/module.js +10 -0
- package/dist/editors/workstream/editor.d.ts.map +1 -1
- package/dist/editors/workstream/editor.js +309 -248
- package/dist/editors/workstream/module.d.ts +4 -0
- package/dist/editors/workstream/module.d.ts.map +1 -0
- package/dist/editors/workstream/module.js +10 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/powerhouse.manifest.json +11 -77
- package/dist/processors/factory.d.ts +1 -1
- package/dist/processors/factory.d.ts.map +1 -1
- package/dist/processors/factory.js +2 -0
- package/dist/processors/index.d.ts +5 -1
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +6 -1
- package/dist/processors/workstreams/factory.d.ts +1 -1
- package/dist/processors/workstreams/factory.d.ts.map +1 -1
- package/dist/processors/workstreams/factory.js +4 -1
- package/dist/processors/workstreams/index.d.ts +2 -2
- package/dist/processors/workstreams/index.d.ts.map +1 -1
- package/dist/processors/workstreams/index.js +6 -2
- package/dist/processors/workstreams/migrations.d.ts +1 -1
- package/dist/processors/workstreams/migrations.d.ts.map +1 -1
- package/dist/processors/workstreams/migrations.js +1 -0
- package/dist/style.css +306 -24593
- package/dist/subgraphs/index.d.ts +0 -5
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +1 -5
- package/dist/subgraphs/network-profile/index.d.ts +2 -2
- package/dist/subgraphs/network-profile/index.d.ts.map +1 -1
- package/dist/subgraphs/network-profile/index.js +2 -2
- package/dist/subgraphs/network-profile/resolvers.d.ts +2 -2
- package/dist/subgraphs/network-profile/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/network-profile/resolvers.js +4 -4
- package/dist/subgraphs/network-profile/schema.d.ts.map +1 -1
- package/dist/subgraphs/network-profile/schema.js +2 -27
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +11 -0
- package/package.json +54 -40
- package/dist/document-models/network-profile/gen/network-profile-management/object.d.ts +0 -17
- package/dist/document-models/network-profile/gen/network-profile-management/object.d.ts.map +0 -1
- package/dist/document-models/network-profile/gen/network-profile-management/object.js +0 -37
- package/dist/document-models/network-profile/gen/object.d.ts +0 -15
- package/dist/document-models/network-profile/gen/object.d.ts.map +0 -1
- package/dist/document-models/network-profile/gen/object.js +0 -25
- package/dist/document-models/network-profile/ph-factories.d.ts +0 -27
- package/dist/document-models/network-profile/ph-factories.d.ts.map +0 -1
- package/dist/document-models/network-profile/ph-factories.js +0 -60
- package/dist/document-models/payment-terms/gen/clauses/object.d.ts +0 -12
- package/dist/document-models/payment-terms/gen/clauses/object.d.ts.map +0 -1
- package/dist/document-models/payment-terms/gen/clauses/object.js +0 -22
- package/dist/document-models/payment-terms/gen/milestones/object.d.ts +0 -11
- package/dist/document-models/payment-terms/gen/milestones/object.d.ts.map +0 -1
- package/dist/document-models/payment-terms/gen/milestones/object.js +0 -19
- package/dist/document-models/payment-terms/gen/object.d.ts +0 -19
- package/dist/document-models/payment-terms/gen/object.d.ts.map +0 -1
- package/dist/document-models/payment-terms/gen/object.js +0 -33
- package/dist/document-models/payment-terms/gen/terms/object.d.ts +0 -12
- package/dist/document-models/payment-terms/gen/terms/object.d.ts.map +0 -1
- package/dist/document-models/payment-terms/gen/terms/object.js +0 -22
- package/dist/document-models/payment-terms/ph-factories.d.ts +0 -27
- package/dist/document-models/payment-terms/ph-factories.d.ts.map +0 -1
- package/dist/document-models/payment-terms/ph-factories.js +0 -62
- package/dist/document-models/request-for-proposals/gen/contex-document/object.d.ts +0 -8
- package/dist/document-models/request-for-proposals/gen/contex-document/object.d.ts.map +0 -1
- package/dist/document-models/request-for-proposals/gen/contex-document/object.js +0 -10
- package/dist/document-models/request-for-proposals/gen/object.d.ts +0 -19
- package/dist/document-models/request-for-proposals/gen/object.d.ts.map +0 -1
- package/dist/document-models/request-for-proposals/gen/object.js +0 -33
- package/dist/document-models/request-for-proposals/gen/proposals/object.d.ts +0 -9
- package/dist/document-models/request-for-proposals/gen/proposals/object.d.ts.map +0 -1
- package/dist/document-models/request-for-proposals/gen/proposals/object.js +0 -13
- package/dist/document-models/request-for-proposals/gen/rfp-state/object.d.ts +0 -7
- package/dist/document-models/request-for-proposals/gen/rfp-state/object.d.ts.map +0 -1
- package/dist/document-models/request-for-proposals/gen/rfp-state/object.js +0 -7
- package/dist/document-models/request-for-proposals/ph-factories.d.ts +0 -27
- package/dist/document-models/request-for-proposals/ph-factories.d.ts.map +0 -1
- package/dist/document-models/request-for-proposals/ph-factories.js +0 -67
- package/dist/document-models/workstream/gen/object.d.ts +0 -17
- package/dist/document-models/workstream/gen/object.d.ts.map +0 -1
- package/dist/document-models/workstream/gen/object.js +0 -27
- package/dist/document-models/workstream/gen/proposals/object.d.ts +0 -10
- package/dist/document-models/workstream/gen/proposals/object.d.ts.map +0 -1
- package/dist/document-models/workstream/gen/proposals/object.js +0 -16
- package/dist/document-models/workstream/gen/workstream/object.d.ts +0 -11
- package/dist/document-models/workstream/gen/workstream/object.d.ts.map +0 -1
- package/dist/document-models/workstream/gen/workstream/object.js +0 -19
- package/dist/document-models/workstream/ph-factories.d.ts +0 -27
- package/dist/document-models/workstream/ph-factories.d.ts.map +0 -1
- package/dist/document-models/workstream/ph-factories.js +0 -59
- package/dist/document-models/workstream/src/tests/proposals-reducers.test.d.ts +0 -5
- package/dist/document-models/workstream/src/tests/proposals-reducers.test.d.ts.map +0 -1
- package/dist/document-models/workstream/src/tests/proposals-reducers.test.js +0 -316
- package/dist/document-models/workstream/src/tests/workstream-reducers.test.d.ts +0 -5
- package/dist/document-models/workstream/src/tests/workstream-reducers.test.d.ts.map +0 -1
- package/dist/document-models/workstream/src/tests/workstream-reducers.test.js +0 -208
- package/dist/editors/hooks/useNetworkProfileDocument.d.ts +0 -4
- package/dist/editors/hooks/useNetworkProfileDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useNetworkProfileDocument.js +0 -8
- package/dist/editors/hooks/usePaymentTermsDocument.d.ts +0 -4
- package/dist/editors/hooks/usePaymentTermsDocument.d.ts.map +0 -1
- package/dist/editors/hooks/usePaymentTermsDocument.js +0 -8
- package/dist/editors/hooks/useRequestForProposalsDocument.d.ts +0 -4
- package/dist/editors/hooks/useRequestForProposalsDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useRequestForProposalsDocument.js +0 -8
- package/dist/editors/hooks/useWorkstreamDocument.d.ts +0 -4
- package/dist/editors/hooks/useWorkstreamDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useWorkstreamDocument.js +0 -8
- package/dist/editors/network-admin/index.d.ts +0 -3
- package/dist/editors/network-admin/index.d.ts.map +0 -1
- package/dist/editors/network-admin/index.js +0 -22
- package/dist/editors/network-admin/utils/withDropZone.d.ts +0 -4
- package/dist/editors/network-admin/utils/withDropZone.d.ts.map +0 -1
- package/dist/editors/network-admin/utils/withDropZone.js +0 -19
- package/dist/editors/network-profile/index.d.ts +0 -4
- package/dist/editors/network-profile/index.d.ts.map +0 -1
- package/dist/editors/network-profile/index.js +0 -12
- package/dist/editors/payment-terms/index.d.ts +0 -4
- package/dist/editors/payment-terms/index.d.ts.map +0 -1
- package/dist/editors/payment-terms/index.js +0 -12
- package/dist/editors/request-for-proposals/index.d.ts +0 -4
- package/dist/editors/request-for-proposals/index.d.ts.map +0 -1
- package/dist/editors/request-for-proposals/index.js +0 -12
- package/dist/editors/workstream/index.d.ts +0 -4
- package/dist/editors/workstream/index.d.ts.map +0 -1
- package/dist/editors/workstream/index.js +0 -12
- package/dist/scripts/sow-mirror/mirror_sow_state.d.ts +0 -3
- package/dist/scripts/sow-mirror/mirror_sow_state.d.ts.map +0 -1
- package/dist/scripts/sow-mirror/mirror_sow_state.js +0 -441
- package/dist/subgraphs/networks/index.d.ts +0 -11
- package/dist/subgraphs/networks/index.d.ts.map +0 -1
- package/dist/subgraphs/networks/index.js +0 -11
- package/dist/subgraphs/networks/resolvers.d.ts +0 -3
- package/dist/subgraphs/networks/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/networks/resolvers.js +0 -41
- package/dist/subgraphs/networks/schema.d.ts +0 -3
- package/dist/subgraphs/networks/schema.d.ts.map +0 -1
- package/dist/subgraphs/networks/schema.js +0 -39
- package/dist/subgraphs/payment-terms/index.d.ts +0 -11
- package/dist/subgraphs/payment-terms/index.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/index.js +0 -11
- package/dist/subgraphs/payment-terms/resolvers.d.ts +0 -3
- package/dist/subgraphs/payment-terms/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/resolvers.js +0 -276
- package/dist/subgraphs/payment-terms/schema.d.ts +0 -3
- package/dist/subgraphs/payment-terms/schema.d.ts.map +0 -1
- package/dist/subgraphs/payment-terms/schema.js +0 -324
- package/dist/subgraphs/request-for-proposals/index.d.ts +0 -11
- package/dist/subgraphs/request-for-proposals/index.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/index.js +0 -11
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts +0 -3
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/resolvers.js +0 -144
- package/dist/subgraphs/request-for-proposals/schema.d.ts +0 -3
- package/dist/subgraphs/request-for-proposals/schema.d.ts.map +0 -1
- package/dist/subgraphs/request-for-proposals/schema.js +0 -232
- package/dist/subgraphs/workstream/index.d.ts +0 -11
- package/dist/subgraphs/workstream/index.d.ts.map +0 -1
- package/dist/subgraphs/workstream/index.js +0 -11
- package/dist/subgraphs/workstream/resolvers.d.ts +0 -3
- package/dist/subgraphs/workstream/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/workstream/resolvers.js +0 -180
- package/dist/subgraphs/workstream/schema.d.ts +0 -3
- package/dist/subgraphs/workstream/schema.d.ts.map +0 -1
- package/dist/subgraphs/workstream/schema.js +0 -206
- package/dist/subgraphs/workstreams/index.d.ts +0 -11
- package/dist/subgraphs/workstreams/index.d.ts.map +0 -1
- package/dist/subgraphs/workstreams/index.js +0 -11
- package/dist/subgraphs/workstreams/resolvers.d.ts +0 -3
- package/dist/subgraphs/workstreams/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/workstreams/resolvers.js +0 -377
- package/dist/subgraphs/workstreams/schema.d.ts +0 -3
- package/dist/subgraphs/workstreams/schema.d.ts.map +0 -1
- package/dist/subgraphs/workstreams/schema.js +0 -326
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { TextInput, Select, OIDInput, PHIDInput, ObjectSetTable, buildEnumCellEditor, } from "@powerhousedao/document-engineering";
|
|
2
|
+
import { toast, ToastContainer } from "@powerhousedao/design-system/connect";
|
|
3
|
+
import { TextInput, Select, OIDInput, PHIDInput, ObjectSetTable, buildEnumCellEditor, Button, } 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
6
|
import { ScopeOfWork } from "@powerhousedao/project-management/document-models";
|
|
7
|
-
import { generateId } from "document-model";
|
|
8
|
-
import { useDocumentById, useSelectedDrive, addDocument,
|
|
7
|
+
import { generateId } from "document-model/core";
|
|
8
|
+
import { useDocumentById, useSelectedDrive, addDocument, useDocumentsInSelectedDrive, useParentFolderForSelectedNode, setSelectedNode, dispatchActions, } from "@powerhousedao/reactor-browser";
|
|
9
9
|
import { useEffect, useMemo, useState, useCallback } from "react";
|
|
10
|
-
import { useSelectedWorkstreamDocument } from "
|
|
10
|
+
import { useSelectedWorkstreamDocument } from "../../document-models/workstream/hooks.js";
|
|
11
|
+
import { DocumentToolbar } from "@powerhousedao/design-system/connect";
|
|
11
12
|
// Status options for the dropdown
|
|
12
13
|
const statusOptions = [
|
|
13
14
|
{ value: "RFP_DRAFT", label: "RFP Draft (RFP_DRAFT)" },
|
|
@@ -50,6 +51,8 @@ export default function Editor() {
|
|
|
50
51
|
if (isCreatingRfp)
|
|
51
52
|
return null; // Prevent double-calls
|
|
52
53
|
setIsCreatingRfp(true);
|
|
54
|
+
// Store current document ID to restore selection after document creation
|
|
55
|
+
const currentDocId = doc.header.id;
|
|
53
56
|
try {
|
|
54
57
|
const createdNode = await addDocument(selectedDrive?.header.id || "", `RFP-${state.title || ""}`, "powerhouse/rfp", undefined, undefined, undefined, "request-for-proposals-editor");
|
|
55
58
|
console.log("Created RFP document", createdNode);
|
|
@@ -58,20 +61,26 @@ export default function Editor() {
|
|
|
58
61
|
title: `RFP-${state.title || ""}`,
|
|
59
62
|
}), createdNode.id);
|
|
60
63
|
}
|
|
64
|
+
// Restore selection to current workstream document to prevent navigation
|
|
65
|
+
setSelectedNode(currentDocId);
|
|
61
66
|
return createdNode;
|
|
62
67
|
}
|
|
63
68
|
catch (error) {
|
|
64
69
|
console.error("Failed to create RFP document:", error);
|
|
70
|
+
// Restore selection even on error
|
|
71
|
+
setSelectedNode(currentDocId);
|
|
65
72
|
return null;
|
|
66
73
|
}
|
|
67
74
|
finally {
|
|
68
75
|
setIsCreatingRfp(false);
|
|
69
76
|
}
|
|
70
|
-
}, [isCreatingRfp, selectedDrive?.header.id, state.title]);
|
|
77
|
+
}, [isCreatingRfp, selectedDrive?.header.id, state.title, doc.header.id]);
|
|
71
78
|
const createSowDocument = useCallback(async () => {
|
|
72
79
|
if (isCreatingSow)
|
|
73
80
|
return null; // Prevent double-calls
|
|
74
81
|
setIsCreatingSow(true);
|
|
82
|
+
// Store current document ID to restore selection after document creation
|
|
83
|
+
const currentDocId = doc.header.id;
|
|
75
84
|
try {
|
|
76
85
|
const createdNode = await addDocument(selectedDrive?.header.id || "", `SOW-${state.title || ""}`, "powerhouse/scopeofwork", undefined, undefined, undefined, "scope-of-work-editor");
|
|
77
86
|
console.log("Created SOW document", createdNode);
|
|
@@ -80,34 +89,44 @@ export default function Editor() {
|
|
|
80
89
|
title: `SOW-${state.title || ""}`,
|
|
81
90
|
}), createdNode.id);
|
|
82
91
|
}
|
|
92
|
+
// Restore selection to current workstream document to prevent navigation
|
|
93
|
+
setSelectedNode(currentDocId);
|
|
83
94
|
return createdNode;
|
|
84
95
|
}
|
|
85
96
|
catch (error) {
|
|
86
97
|
console.error("Failed to create SOW document:", error);
|
|
98
|
+
// Restore selection even on error
|
|
99
|
+
setSelectedNode(currentDocId);
|
|
87
100
|
return null;
|
|
88
101
|
}
|
|
89
102
|
finally {
|
|
90
103
|
setIsCreatingSow(false);
|
|
91
104
|
}
|
|
92
|
-
}, [isCreatingSow, selectedDrive?.header.id, state.title]);
|
|
105
|
+
}, [isCreatingSow, selectedDrive?.header.id, state.title, doc.header.id]);
|
|
93
106
|
const createPaymentTermsDocument = useCallback(async () => {
|
|
94
107
|
if (isCreatingPaymentTerms)
|
|
95
108
|
return null; // Prevent double-calls
|
|
96
109
|
setIsCreatingPaymentTerms(true);
|
|
110
|
+
// Store current document ID to restore selection after document creation
|
|
111
|
+
const currentDocId = doc.header.id;
|
|
97
112
|
try {
|
|
98
113
|
const createdNode = await addDocument(selectedDrive?.header.id || "", `Payment Terms-${state.title || ""}`, "payment-terms", undefined, undefined, undefined, "payment-terms-editor");
|
|
99
114
|
console.log("Created Payment Terms document", createdNode);
|
|
100
115
|
// 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);
|
|
101
118
|
return createdNode;
|
|
102
119
|
}
|
|
103
120
|
catch (error) {
|
|
104
121
|
console.error("Failed to create Payment Terms document:", error);
|
|
122
|
+
// Restore selection even on error
|
|
123
|
+
setSelectedNode(currentDocId);
|
|
105
124
|
return null;
|
|
106
125
|
}
|
|
107
126
|
finally {
|
|
108
127
|
setIsCreatingPaymentTerms(false);
|
|
109
128
|
}
|
|
110
|
-
}, [isCreatingPaymentTerms, selectedDrive?.header.id, state.title]);
|
|
129
|
+
}, [isCreatingPaymentTerms, selectedDrive?.header.id, state.title, doc.header.id]);
|
|
111
130
|
const getDocumentNameById = useCallback((documentId) => {
|
|
112
131
|
const document = useDocumentById(documentId);
|
|
113
132
|
const [documentData] = document || [];
|
|
@@ -133,7 +152,7 @@ export default function Editor() {
|
|
|
133
152
|
setNewlyCreatedRfpId(null);
|
|
134
153
|
}
|
|
135
154
|
}, [state.rfp?.id, newlyCreatedRfpId]);
|
|
136
|
-
const allDocuments =
|
|
155
|
+
const allDocuments = useDocumentsInSelectedDrive();
|
|
137
156
|
let rfpDocumentNode = undefined;
|
|
138
157
|
if (state.rfp?.id) {
|
|
139
158
|
rfpDocumentNode = allDocuments?.find((doc) => {
|
|
@@ -549,264 +568,306 @@ export default function Editor() {
|
|
|
549
568
|
searchPaymentTermsDocuments,
|
|
550
569
|
searchSowDocuments,
|
|
551
570
|
]);
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
setClientInputValue(newValue || "");
|
|
562
|
-
}, onBlur: (e) => {
|
|
563
|
-
if (e.target.value !== (state.client?.id || "")) {
|
|
564
|
-
handleClientIdChange(e.target.value);
|
|
565
|
-
}
|
|
566
|
-
}, placeholder: "Search for Client Profile", className: "w-full", variant: "withValueTitleAndDescription", initialOptions: clientInitialOption ? [clientInitialOption] : undefined, fetchOptionsCallback: async (userInput) => {
|
|
567
|
-
const results = searchClientDocuments(userInput || "") || [];
|
|
568
|
-
if (results.length === 0) {
|
|
569
|
-
return Promise.reject(new Error("No client profiles found"));
|
|
570
|
-
}
|
|
571
|
-
return results.map((doc) => ({
|
|
572
|
-
value: doc.value,
|
|
573
|
-
title: doc.title,
|
|
574
|
-
path: "",
|
|
575
|
-
description: "",
|
|
576
|
-
}));
|
|
577
|
-
}, fetchSelectedOptionCallback: async (documentId) => {
|
|
578
|
-
const option = getClientOptionById(documentId);
|
|
579
|
-
if (!option) {
|
|
580
|
-
return Promise.reject(new Error("Client profile not found"));
|
|
581
|
-
}
|
|
582
|
-
return option;
|
|
583
|
-
} })] }), _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) => {
|
|
584
|
-
if (e.target.value !== state.client?.name) {
|
|
585
|
-
handleClientChange("name", e.target.value);
|
|
586
|
-
}
|
|
587
|
-
}, placeholder: "Enter client name" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Icon" }), _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: "M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z", clipRule: "evenodd" }) }) }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(TextInput, { className: "flex-1", defaultValue: state.client?.icon || "", onBlur: (e) => {
|
|
588
|
-
if (e.target.value !== state.client?.icon) {
|
|
589
|
-
handleClientChange("icon", e.target.value);
|
|
590
|
-
}
|
|
591
|
-
}, 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: "withValueAndTitle", value: newlyCreatedRfpId || state.rfp?.id || "", onBlur: (e) => {
|
|
592
|
-
if (e.target.value !== state.rfp?.id) {
|
|
593
|
-
dispatch(actions.setRequestForProposal({
|
|
594
|
-
rfpId: e.target.value,
|
|
595
|
-
title: rfpDocument?.document.title || "",
|
|
596
|
-
}));
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
// search options as the user types
|
|
600
|
-
fetchOptionsCallback: async (userInput) => {
|
|
601
|
-
const results = searchRfpDocuments(userInput || "") || [];
|
|
602
|
-
if (results?.length === 0) {
|
|
603
|
-
return Promise.reject(new Error("No RFP documents found"));
|
|
604
|
-
}
|
|
605
|
-
return results?.map((doc) => ({
|
|
606
|
-
value: doc.value, // unique document ID
|
|
607
|
-
title: doc.title, // document title or name
|
|
608
|
-
path: "",
|
|
609
|
-
description: "", // document description or summary
|
|
610
|
-
icon: "File", // document icon
|
|
611
|
-
}));
|
|
612
|
-
},
|
|
613
|
-
// get details of a specific option by its ID/value
|
|
614
|
-
fetchSelectedOptionCallback: async (documentId) => {
|
|
615
|
-
console.log("fetching selected option", documentId);
|
|
616
|
-
const doc = searchRfpDocuments(documentId)?.[0];
|
|
617
|
-
if (!doc) {
|
|
618
|
-
return Promise.reject(new Error("RFP document not found"));
|
|
619
|
-
}
|
|
620
|
-
return {
|
|
621
|
-
value: doc.value,
|
|
622
|
-
title: doc.title,
|
|
623
|
-
path: "",
|
|
624
|
-
description: "",
|
|
625
|
-
icon: "File",
|
|
626
|
-
};
|
|
627
|
-
}, initialOptions: [
|
|
628
|
-
{
|
|
629
|
-
value: rfpDocument?.header.id || "",
|
|
630
|
-
title: rfpDocument?.document.title || "",
|
|
631
|
-
path: "",
|
|
632
|
-
description: "",
|
|
633
|
-
icon: "File",
|
|
634
|
-
},
|
|
635
|
-
] }) }) }), !rfpDocument ? (_jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light", size: "small", 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 () => {
|
|
636
|
-
const createdNode = await createRfpDocument();
|
|
637
|
-
if (createdNode) {
|
|
638
|
-
// Set local state to immediately show the new RFP ID
|
|
639
|
-
setNewlyCreatedRfpId(createdNode.id);
|
|
640
|
-
dispatch(actions.setRequestForProposal({
|
|
641
|
-
rfpId: createdNode.id,
|
|
642
|
-
title: createdNode.name,
|
|
643
|
-
}));
|
|
644
|
-
}
|
|
645
|
-
}, 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 ||
|
|
646
|
-
state.initialProposal?.author?.name ||
|
|
647
|
-
"", onChange: (e) => {
|
|
648
|
-
setManualAuthorInput(e.target.value);
|
|
649
|
-
}, onBlur: (e) => {
|
|
650
|
-
if (e.target.value !== state.initialProposal?.author?.name) {
|
|
651
|
-
dispatch(actions.editInitialProposal({
|
|
652
|
-
id: state.initialProposal?.id || "",
|
|
653
|
-
proposalAuthor: {
|
|
654
|
-
id: generateId(),
|
|
655
|
-
name: e.target.value,
|
|
656
|
-
},
|
|
657
|
-
}));
|
|
571
|
+
// Get the parent folder node for the currently selected node
|
|
572
|
+
const parentFolder = useParentFolderForSelectedNode();
|
|
573
|
+
// Set the selected node to the parent folder node (close the editor)
|
|
574
|
+
function handleClose() {
|
|
575
|
+
setSelectedNode(parentFolder?.id);
|
|
576
|
+
}
|
|
577
|
+
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) => {
|
|
578
|
+
if (e.target.value !== state.code) {
|
|
579
|
+
handleWorkstreamChange("code", e.target.value);
|
|
658
580
|
}
|
|
659
|
-
} }) }),
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
{ value: "ACCEPTED", label: "Accepted" },
|
|
663
|
-
{ value: "REJECTED", label: "Rejected" },
|
|
664
|
-
], value: state.initialProposal.status || "DRAFT", onChange: (value) => {
|
|
665
|
-
if (value !== state.initialProposal?.status) {
|
|
666
|
-
dispatch(actions.editInitialProposal({
|
|
667
|
-
id: state.initialProposal?.id || "",
|
|
668
|
-
status: value,
|
|
669
|
-
}));
|
|
581
|
+
}, placeholder: "Enter workstream code" })] }), _jsxs("div", { className: "flex-1", children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Title" }), _jsx(TextInput, { className: "w-full", defaultValue: state.title || "", onBlur: (e) => {
|
|
582
|
+
if (e.target.value !== state.title) {
|
|
583
|
+
handleWorkstreamChange("title", e.target.value);
|
|
670
584
|
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
}));
|
|
585
|
+
}, 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 w-[350px]", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Client" }), _jsx(PHIDInput, { value: clientInputValue, onChange: (newValue) => {
|
|
586
|
+
setClientInputValue(newValue || "");
|
|
587
|
+
}, onBlur: (e) => {
|
|
588
|
+
if (e.target.value !== (state.client?.id || "")) {
|
|
589
|
+
handleClientIdChange(e.target.value);
|
|
677
590
|
}
|
|
678
|
-
},
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
if (results?.length === 0) {
|
|
683
|
-
return Promise.reject(new Error("No SOW documents found"));
|
|
684
|
-
}
|
|
685
|
-
return results?.map((doc) => ({
|
|
686
|
-
value: doc.value, // unique document ID
|
|
687
|
-
title: doc.title, // document title or name
|
|
688
|
-
path: "",
|
|
689
|
-
description: "", // document description or summary
|
|
690
|
-
icon: "File", // document icon
|
|
691
|
-
}));
|
|
692
|
-
},
|
|
693
|
-
// get details of a specific option by its ID/value
|
|
694
|
-
fetchSelectedOptionCallback: async (documentId) => {
|
|
695
|
-
const doc = searchSowDocuments(documentId)?.[0];
|
|
696
|
-
if (!doc) {
|
|
697
|
-
return Promise.reject(new Error("SOW document not found"));
|
|
591
|
+
}, placeholder: "Search for Client Profile", className: "w-full", variant: "withValueTitleAndDescription", initialOptions: clientInitialOption ? [clientInitialOption] : undefined, fetchOptionsCallback: async (userInput) => {
|
|
592
|
+
const results = searchClientDocuments(userInput || "") || [];
|
|
593
|
+
if (results.length === 0) {
|
|
594
|
+
return Promise.reject(new Error("No client profiles found"));
|
|
698
595
|
}
|
|
699
|
-
return {
|
|
596
|
+
return results.map((doc) => ({
|
|
700
597
|
value: doc.value,
|
|
701
598
|
title: doc.title,
|
|
702
599
|
path: "",
|
|
703
600
|
description: "",
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
601
|
+
}));
|
|
602
|
+
}, fetchSelectedOptionCallback: async (documentId) => {
|
|
603
|
+
const option = getClientOptionById(documentId);
|
|
604
|
+
if (!option) {
|
|
605
|
+
return Promise.reject(new Error("Client profile not found"));
|
|
606
|
+
}
|
|
607
|
+
return option;
|
|
608
|
+
} })] }), _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) => {
|
|
609
|
+
if (e.target.value !== state.client?.name) {
|
|
610
|
+
handleClientChange("name", e.target.value);
|
|
611
|
+
}
|
|
612
|
+
}, placeholder: "Enter client name" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Icon" }), _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: "M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z", clipRule: "evenodd" }) }) }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(TextInput, { className: "flex-1", defaultValue: state.client?.icon || "", onBlur: (e) => {
|
|
613
|
+
if (e.target.value !== state.client?.icon) {
|
|
614
|
+
handleClientChange("icon", e.target.value);
|
|
615
|
+
}
|
|
616
|
+
}, 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: "withValueAndTitle", value: newlyCreatedRfpId || state.rfp?.id || "", onBlur: (e) => {
|
|
617
|
+
if (e.target.value !== state.rfp?.id) {
|
|
618
|
+
dispatch(actions.setRequestForProposal({
|
|
619
|
+
rfpId: e.target.value,
|
|
620
|
+
title: rfpDocument?.document.title || "",
|
|
621
|
+
}));
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
// search options as the user types
|
|
625
|
+
fetchOptionsCallback: async (userInput) => {
|
|
626
|
+
const results = searchRfpDocuments(userInput || "") || [];
|
|
627
|
+
if (results?.length === 0) {
|
|
628
|
+
return Promise.reject(new Error("No RFP documents found"));
|
|
629
|
+
}
|
|
630
|
+
return results?.map((doc) => ({
|
|
631
|
+
value: doc.value, // unique document ID
|
|
632
|
+
title: doc.title, // document title or name
|
|
633
|
+
path: "",
|
|
634
|
+
description: "", // document description or summary
|
|
635
|
+
icon: "File", // document icon
|
|
636
|
+
}));
|
|
637
|
+
},
|
|
638
|
+
// get details of a specific option by its ID/value
|
|
639
|
+
fetchSelectedOptionCallback: async (documentId) => {
|
|
640
|
+
console.log("fetching selected option", documentId);
|
|
641
|
+
const doc = searchRfpDocuments(documentId)?.[0];
|
|
642
|
+
if (!doc) {
|
|
643
|
+
return Promise.reject(new Error("RFP document not found"));
|
|
644
|
+
}
|
|
645
|
+
return {
|
|
646
|
+
value: doc.value,
|
|
647
|
+
title: doc.title,
|
|
648
|
+
path: "",
|
|
649
|
+
description: "",
|
|
650
|
+
icon: "File",
|
|
651
|
+
};
|
|
652
|
+
}, initialOptions: [
|
|
653
|
+
{
|
|
654
|
+
value: rfpDocument?.header.id || "",
|
|
655
|
+
title: rfpDocument?.document.title || "",
|
|
656
|
+
path: "",
|
|
657
|
+
description: "",
|
|
658
|
+
icon: "File",
|
|
659
|
+
},
|
|
660
|
+
] }) }) }), !rfpDocument ? (_jsx("div", { className: "mt-4", children: _jsx(Button, { type: "button", color: "light", size: "sm", 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: (e) => {
|
|
661
|
+
if (e) {
|
|
662
|
+
e.preventDefault();
|
|
663
|
+
e.stopPropagation();
|
|
664
|
+
}
|
|
665
|
+
(async () => {
|
|
666
|
+
try {
|
|
667
|
+
const createdNode = await createRfpDocument();
|
|
668
|
+
if (createdNode) {
|
|
669
|
+
// Set local state to immediately show the new RFP ID
|
|
670
|
+
setNewlyCreatedRfpId(createdNode.id);
|
|
671
|
+
dispatch(actions.setRequestForProposal({
|
|
672
|
+
rfpId: createdNode.id,
|
|
673
|
+
title: createdNode.name,
|
|
674
|
+
}));
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
catch (error) {
|
|
678
|
+
console.error("Error creating RFP document:", error);
|
|
679
|
+
}
|
|
680
|
+
})();
|
|
681
|
+
return false;
|
|
682
|
+
}, 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 ||
|
|
683
|
+
state.initialProposal?.author?.name ||
|
|
684
|
+
"", onChange: (e) => {
|
|
685
|
+
setManualAuthorInput(e.target.value);
|
|
686
|
+
}, onBlur: (e) => {
|
|
687
|
+
if (e.target.value !== state.initialProposal?.author?.name) {
|
|
723
688
|
dispatch(actions.editInitialProposal({
|
|
724
689
|
id: state.initialProposal?.id || "",
|
|
725
|
-
|
|
690
|
+
proposalAuthor: {
|
|
691
|
+
id: generateId(),
|
|
692
|
+
name: e.target.value,
|
|
693
|
+
},
|
|
726
694
|
}));
|
|
727
695
|
}
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
"",
|
|
731
|
-
|
|
696
|
+
} }) }), _jsx("div", { className: "flex-1", children: _jsx(Select, { label: "Status", options: [
|
|
697
|
+
{ value: "DRAFT", label: "Draft" },
|
|
698
|
+
{ value: "SUBMITTED", label: "Submitted" },
|
|
699
|
+
{ value: "ACCEPTED", label: "Accepted" },
|
|
700
|
+
{ value: "REJECTED", label: "Rejected" },
|
|
701
|
+
], value: state.initialProposal.status || "DRAFT", onChange: (value) => {
|
|
702
|
+
if (value !== state.initialProposal?.status) {
|
|
732
703
|
dispatch(actions.editInitialProposal({
|
|
733
704
|
id: state.initialProposal?.id || "",
|
|
734
|
-
|
|
705
|
+
status: value,
|
|
735
706
|
}));
|
|
736
707
|
}
|
|
737
|
-
},
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
value: paymentTermsDocumentNode.header.id,
|
|
769
|
-
title: paymentTermsDocumentNode.header.name,
|
|
708
|
+
} }) })] }), _jsxs("div", { className: "flex flex-row gap-4 mb-6", children: [_jsxs("div", { className: "flex-1", children: [_jsx(OIDInput, { name: "Scope of Work", label: "Scope Of Work", placeholder: "Search for SOW Document", variant: "withValueTitleAndDescription", value: newlyCreatedSowId || state.initialProposal?.sow || "", onBlur: (e) => {
|
|
709
|
+
if (e.target.value !== state.initialProposal?.sow) {
|
|
710
|
+
dispatch(actions.editInitialProposal({
|
|
711
|
+
id: state.initialProposal?.id || "",
|
|
712
|
+
sowId: e.target.value,
|
|
713
|
+
}));
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
// search options as the user types
|
|
717
|
+
fetchOptionsCallback: async (userInput) => {
|
|
718
|
+
const results = searchSowDocuments(userInput || "") || [];
|
|
719
|
+
if (results?.length === 0) {
|
|
720
|
+
return Promise.reject(new Error("No SOW documents found"));
|
|
721
|
+
}
|
|
722
|
+
return results?.map((doc) => ({
|
|
723
|
+
value: doc.value, // unique document ID
|
|
724
|
+
title: doc.title, // document title or name
|
|
725
|
+
path: "",
|
|
726
|
+
description: "", // document description or summary
|
|
727
|
+
icon: "File", // document icon
|
|
728
|
+
}));
|
|
729
|
+
},
|
|
730
|
+
// get details of a specific option by its ID/value
|
|
731
|
+
fetchSelectedOptionCallback: async (documentId) => {
|
|
732
|
+
const doc = searchSowDocuments(documentId)?.[0];
|
|
733
|
+
if (!doc) {
|
|
734
|
+
return Promise.reject(new Error("SOW document not found"));
|
|
735
|
+
}
|
|
736
|
+
return {
|
|
737
|
+
value: doc.value,
|
|
738
|
+
title: doc.title,
|
|
770
739
|
path: "",
|
|
771
740
|
description: "",
|
|
772
741
|
icon: "File",
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
742
|
+
};
|
|
743
|
+
}, initialOptions: sowDocumentNode
|
|
744
|
+
? [
|
|
745
|
+
{
|
|
746
|
+
value: sowDocumentNode.header.id,
|
|
747
|
+
title: sowDocumentNode.state?.global?.title ||
|
|
748
|
+
sowDocumentNode.header.name,
|
|
749
|
+
path: "",
|
|
750
|
+
description: "",
|
|
751
|
+
icon: "File",
|
|
752
|
+
},
|
|
753
|
+
]
|
|
754
|
+
: undefined }), _jsx("button", { type: "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: (e) => {
|
|
755
|
+
if (e) {
|
|
756
|
+
e.preventDefault();
|
|
757
|
+
e.stopPropagation();
|
|
758
|
+
}
|
|
759
|
+
(async () => {
|
|
760
|
+
try {
|
|
761
|
+
console.log("Creating sow");
|
|
762
|
+
const createdNode = await createSowDocument();
|
|
763
|
+
if (createdNode) {
|
|
764
|
+
// Set local state to immediately show the new SOW ID
|
|
765
|
+
setNewlyCreatedSowId(createdNode.id);
|
|
766
|
+
dispatch(actions.editInitialProposal({
|
|
767
|
+
id: state.initialProposal?.id || "",
|
|
768
|
+
sowId: createdNode.id,
|
|
769
|
+
}));
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
catch (error) {
|
|
773
|
+
console.error("Error creating SOW document:", error);
|
|
774
|
+
}
|
|
775
|
+
})();
|
|
776
|
+
return false;
|
|
777
|
+
}, 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 ||
|
|
778
|
+
state.initialProposal?.paymentTerms ||
|
|
779
|
+
"", onBlur: (e) => {
|
|
780
|
+
if (e.target.value !== state.initialProposal?.paymentTerms) {
|
|
781
|
+
dispatch(actions.editInitialProposal({
|
|
782
|
+
id: state.initialProposal?.id || "",
|
|
783
|
+
paymentTermsId: e.target.value,
|
|
784
|
+
}));
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
// search options as the user types
|
|
788
|
+
fetchOptionsCallback: async (userInput) => {
|
|
789
|
+
const results = searchPaymentTermsDocuments(userInput || "") || [];
|
|
790
|
+
if (results?.length === 0) {
|
|
791
|
+
return Promise.reject(new Error("No Payment Terms documents found"));
|
|
792
|
+
}
|
|
793
|
+
return results?.map((doc) => ({
|
|
794
|
+
value: doc.value, // unique document ID
|
|
795
|
+
title: doc.title, // document title or name
|
|
796
|
+
path: "",
|
|
797
|
+
description: "", // document description or summary
|
|
798
|
+
icon: "File", // document icon
|
|
784
799
|
}));
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
800
|
+
},
|
|
801
|
+
// get details of a specific option by its ID/value
|
|
802
|
+
fetchSelectedOptionCallback: async (documentId) => {
|
|
803
|
+
const doc = searchPaymentTermsDocuments(documentId)?.[0];
|
|
804
|
+
if (!doc) {
|
|
805
|
+
return Promise.reject(new Error("Payment Terms document not found"));
|
|
806
|
+
}
|
|
807
|
+
return {
|
|
808
|
+
value: doc.value,
|
|
809
|
+
title: doc.title,
|
|
810
|
+
path: "",
|
|
811
|
+
description: "",
|
|
812
|
+
icon: "File",
|
|
813
|
+
};
|
|
814
|
+
}, initialOptions: paymentTermsDocumentNode
|
|
815
|
+
? [
|
|
816
|
+
{
|
|
817
|
+
value: paymentTermsDocumentNode.header.id,
|
|
818
|
+
title: paymentTermsDocumentNode.header.name,
|
|
819
|
+
path: "",
|
|
820
|
+
description: "",
|
|
821
|
+
icon: "File",
|
|
822
|
+
},
|
|
823
|
+
]
|
|
824
|
+
: undefined }), _jsx("button", { type: "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: (e) => {
|
|
825
|
+
if (e) {
|
|
826
|
+
e.preventDefault();
|
|
827
|
+
e.stopPropagation();
|
|
828
|
+
}
|
|
829
|
+
(async () => {
|
|
830
|
+
try {
|
|
831
|
+
console.log("Creating payment terms");
|
|
832
|
+
const createdNode = await createPaymentTermsDocument();
|
|
833
|
+
if (createdNode) {
|
|
834
|
+
// Set local state to immediately show the new Payment Terms ID
|
|
835
|
+
setNewlyCreatedPaymentTermsId(createdNode.id);
|
|
836
|
+
dispatch(actions.editInitialProposal({
|
|
837
|
+
id: state.initialProposal?.id || "",
|
|
838
|
+
paymentTermsId: createdNode.id,
|
|
839
|
+
}));
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
catch (error) {
|
|
843
|
+
console.error("Error creating Payment Terms document:", error);
|
|
844
|
+
}
|
|
845
|
+
})();
|
|
846
|
+
return false;
|
|
847
|
+
}, children: isCreatingPaymentTerms
|
|
848
|
+
? "Creating..."
|
|
849
|
+
: "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) => {
|
|
850
|
+
if (data.length > 0) {
|
|
851
|
+
data.forEach((d) => {
|
|
852
|
+
dispatch(actions.removeAlternativeProposal({
|
|
853
|
+
id: d.id,
|
|
854
|
+
}));
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
}, onAdd: (data) => {
|
|
858
|
+
if (data.authorName) {
|
|
859
|
+
dispatch(actions.addAlternativeProposal({
|
|
801
860
|
id: generateId(),
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
861
|
+
proposalAuthor: {
|
|
862
|
+
id: generateId(),
|
|
863
|
+
name: data.authorName,
|
|
864
|
+
},
|
|
865
|
+
}));
|
|
866
|
+
}
|
|
867
|
+
} })] })] })) : (_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", size: "sm", className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Create Initial Proposal", "aria-description": "Create Initial Proposal", onClick: () => {
|
|
868
|
+
console.log("Creating initial proposal");
|
|
869
|
+
dispatch(actions.editInitialProposal({
|
|
870
|
+
id: generateId(),
|
|
871
|
+
}));
|
|
872
|
+
}, children: "Create Initial Proposal" }) })] })) })) : null, _jsx(ToastContainer, {})] })] }));
|
|
812
873
|
}
|