@powerhousedao/network-admin 0.0.36 → 0.0.38
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 -5
- 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-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 -1
- package/dist/document-models/network-profile/gen/index.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/index.js +7 -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 +12 -13
- 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 +25 -25
- 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 +1 -2
- package/dist/document-models/network-profile/gen/types.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/types.js +0 -1
- package/dist/document-models/network-profile/gen/utils.d.ts +5 -2
- package/dist/document-models/network-profile/gen/utils.d.ts.map +1 -1
- package/dist/document-models/network-profile/gen/utils.js +20 -3
- 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 -36
- package/dist/document-models/network-profile/index.d.ts.map +1 -1
- package/dist/document-models/network-profile/index.js +5 -18
- 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 +19 -24
- 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 +92 -6
- package/dist/document-models/network-profile/src/tests/network-profile-management.test.js +69 -115
- 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/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 +7 -8
- 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.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 -1
- package/dist/document-models/payment-terms/gen/index.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/index.js +9 -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 +6 -7
- package/dist/document-models/payment-terms/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/ph-factories.js +1 -2
- package/dist/document-models/payment-terms/gen/reducer.d.ts +0 -2
- package/dist/document-models/payment-terms/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/reducer.js +38 -42
- 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/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 +6 -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/types.d.ts +1 -2
- package/dist/document-models/payment-terms/gen/types.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/types.js +0 -1
- package/dist/document-models/payment-terms/gen/utils.d.ts +5 -2
- package/dist/document-models/payment-terms/gen/utils.d.ts.map +1 -1
- package/dist/document-models/payment-terms/gen/utils.js +21 -5
- 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 -42
- package/dist/document-models/payment-terms/index.d.ts.map +1 -1
- package/dist/document-models/payment-terms/index.js +5 -18
- 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 +92 -6
- 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/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 +3 -4
- 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.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 -1
- 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 -1
- package/dist/document-models/request-for-proposals/gen/ph-factories.js +4 -4
- 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 +4 -5
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts +0 -2
- package/dist/document-models/request-for-proposals/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/reducer.js +17 -17
- 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 +2 -3
- 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 +1 -2
- package/dist/document-models/request-for-proposals/gen/types.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/types.js +0 -1
- package/dist/document-models/request-for-proposals/gen/utils.d.ts +5 -2
- package/dist/document-models/request-for-proposals/gen/utils.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/gen/utils.js +25 -8
- 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 -31
- package/dist/document-models/request-for-proposals/index.d.ts.map +1 -1
- package/dist/document-models/request-for-proposals/index.js +5 -18
- 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 -181
- 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 +92 -6
- 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 -327
- 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 -240
- 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.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 -1
- package/dist/document-models/workstream/gen/index.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/index.js +8 -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 +5 -6
- package/dist/document-models/workstream/gen/reducer.d.ts +0 -2
- package/dist/document-models/workstream/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/reducer.js +22 -22
- 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 +1 -2
- package/dist/document-models/workstream/gen/types.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/types.js +0 -1
- package/dist/document-models/workstream/gen/utils.d.ts +5 -2
- package/dist/document-models/workstream/gen/utils.d.ts.map +1 -1
- package/dist/document-models/workstream/gen/utils.js +21 -4
- 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 +6 -7
- 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 -34
- package/dist/document-models/workstream/index.d.ts.map +1 -1
- package/dist/document-models/workstream/index.js +5 -18
- 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 +89 -3
- 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 -6
- 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 +21 -26
- package/dist/editors/network-admin/config.d.ts +1 -0
- package/dist/editors/network-admin/config.d.ts.map +1 -1
- package/dist/editors/network-admin/config.js +1 -0
- package/dist/editors/network-admin/editor.d.ts +2 -1
- package/dist/editors/network-admin/editor.d.ts.map +1 -1
- package/dist/editors/network-admin/editor.js +4 -1
- 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 +7 -4
- 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.js +1 -1
- package/dist/editors/payment-terms/clauses-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/clauses-tab.js +2 -1
- package/dist/editors/payment-terms/cost-materials-tab.js +17 -17
- package/dist/editors/payment-terms/editor.d.ts.map +1 -1
- package/dist/editors/payment-terms/editor.js +5 -5
- package/dist/editors/payment-terms/escrow-tab.js +1 -1
- package/dist/editors/payment-terms/evaluation-tab.js +1 -1
- package/dist/editors/payment-terms/milestones-tab.d.ts.map +1 -1
- package/dist/editors/payment-terms/milestones-tab.js +2 -1
- 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.map +1 -1
- package/dist/editors/payment-terms/retainer-tab.js +21 -41
- 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/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 +178 -141
- 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 +1 -1
- package/dist/processors/index.d.ts +5 -1
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +5 -1
- package/dist/processors/workstreams/factory.js +1 -1
- package/dist/style.css +142 -8292
- package/dist/subgraphs/network-profile/index.d.ts.map +1 -1
- 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 -5
- package/dist/subgraphs/network-profile/schema.d.ts.map +1 -1
- package/dist/subgraphs/network-profile/schema.js +2 -27
- package/dist/subgraphs/payment-terms/index.d.ts.map +1 -1
- package/dist/subgraphs/payment-terms/resolvers.d.ts +2 -2
- package/dist/subgraphs/payment-terms/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/payment-terms/resolvers.js +7 -20
- package/dist/subgraphs/payment-terms/schema.d.ts.map +1 -1
- package/dist/subgraphs/payment-terms/schema.js +11 -136
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts +2 -2
- package/dist/subgraphs/request-for-proposals/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/request-for-proposals/resolvers.js +4 -5
- package/dist/subgraphs/request-for-proposals/schema.d.ts.map +1 -1
- package/dist/subgraphs/request-for-proposals/schema.js +10 -101
- package/dist/subgraphs/workstream/resolvers.d.ts +2 -2
- package/dist/subgraphs/workstream/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/workstream/resolvers.js +4 -5
- package/dist/subgraphs/workstream/schema.d.ts.map +1 -1
- package/dist/subgraphs/workstream/schema.js +12 -72
- package/package.json +17 -22
- 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 -318
- 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 -210
- 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/components/CreateDocument.d.ts +0 -6
- package/dist/editors/network-admin/components/CreateDocument.d.ts.map +0 -1
- package/dist/editors/network-admin/components/CreateDocument.js +0 -22
- package/dist/editors/network-admin/components/FolderTree.d.ts +0 -6
- package/dist/editors/network-admin/components/FolderTree.d.ts.map +0 -1
- package/dist/editors/network-admin/components/FolderTree.js +0 -65
- 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 -10
- 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 -10
- 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 -10
- 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 -10
- 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 -10
- package/dist/editors/workstream/project-management-import.d.ts +0 -3
- package/dist/editors/workstream/project-management-import.d.ts.map +0 -1
- package/dist/editors/workstream/project-management-import.js +0 -5
|
@@ -1,67 +1,7 @@
|
|
|
1
1
|
import { gql } from "graphql-tag";
|
|
2
2
|
export const schema = gql `
|
|
3
3
|
"""
|
|
4
|
-
|
|
5
|
-
"""
|
|
6
|
-
type WorkstreamState {
|
|
7
|
-
code: String
|
|
8
|
-
title: String
|
|
9
|
-
status: WorkstreamStatus!
|
|
10
|
-
client: ClientInfo # eventually tie it to the AID?
|
|
11
|
-
rfp: RFP
|
|
12
|
-
initialProposal: Proposal
|
|
13
|
-
alternativeProposals: [Proposal!]!
|
|
14
|
-
sow: PHID
|
|
15
|
-
paymentTerms: PHID
|
|
16
|
-
paymentRequests: [PHID!]!
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
enum WorkstreamStatus {
|
|
20
|
-
RFP_DRAFT
|
|
21
|
-
PREWORK_RFC # RFP status change to RFC
|
|
22
|
-
RFP_CANCELLED
|
|
23
|
-
OPEN_FOR_PROPOSALS
|
|
24
|
-
PROPOSAL_SUBMITTED
|
|
25
|
-
NOT_AWARDED
|
|
26
|
-
AWARDED
|
|
27
|
-
IN_PROGRESS
|
|
28
|
-
FINISHED
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
type Proposal {
|
|
32
|
-
id: OID!
|
|
33
|
-
sow: PHID! # a link with a fixed label (i.e, sow)
|
|
34
|
-
paymentTerms: PHID! # a link with a fixed label (i.e., payment terms)
|
|
35
|
-
status: ProposalStatus!
|
|
36
|
-
author: ProposalAuthor! # eventually an AID
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
enum ProposalStatus {
|
|
40
|
-
DRAFT
|
|
41
|
-
SUBMITTED
|
|
42
|
-
ACCEPTED
|
|
43
|
-
REJECTED
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
type ClientInfo {
|
|
47
|
-
id: PHID!
|
|
48
|
-
name: String
|
|
49
|
-
icon: URL
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
type RFP {
|
|
53
|
-
id: PHID!
|
|
54
|
-
title: String!
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
type ProposalAuthor {
|
|
58
|
-
id: PHID!
|
|
59
|
-
name: String
|
|
60
|
-
icon: URL
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
"""
|
|
64
|
-
Queries: Workstream
|
|
4
|
+
Queries: Workstream Document
|
|
65
5
|
"""
|
|
66
6
|
type WorkstreamQueries {
|
|
67
7
|
getDocument(docId: PHID!, driveId: PHID): Workstream
|
|
@@ -131,14 +71,14 @@ export const schema = gql `
|
|
|
131
71
|
input Workstream_EditWorkstreamInput {
|
|
132
72
|
code: String
|
|
133
73
|
title: String
|
|
134
|
-
status:
|
|
74
|
+
status: Workstream_WorkstreamStatusInput
|
|
135
75
|
sowId: PHID
|
|
136
76
|
paymentTerms: PHID
|
|
137
77
|
}
|
|
138
78
|
|
|
139
|
-
enum
|
|
79
|
+
enum Workstream_WorkstreamStatusInput {
|
|
140
80
|
RFP_DRAFT
|
|
141
|
-
PREWORK_RFC #
|
|
81
|
+
PREWORK_RFC # Workstream_RFP status change to RFC
|
|
142
82
|
RFP_CANCELLED
|
|
143
83
|
OPEN_FOR_PROPOSALS
|
|
144
84
|
PROPOSAL_SUBMITTED
|
|
@@ -170,18 +110,18 @@ export const schema = gql `
|
|
|
170
110
|
id: ID!
|
|
171
111
|
sowId: PHID
|
|
172
112
|
paymentTermsId: PHID
|
|
173
|
-
status:
|
|
174
|
-
proposalAuthor:
|
|
113
|
+
status: Workstream_ProposalStatusInput
|
|
114
|
+
proposalAuthor: Workstream_ProposalAuthorInput
|
|
175
115
|
}
|
|
176
116
|
|
|
177
|
-
enum
|
|
117
|
+
enum Workstream_ProposalStatusInput {
|
|
178
118
|
DRAFT
|
|
179
119
|
SUBMITTED
|
|
180
120
|
ACCEPTED
|
|
181
121
|
REJECTED
|
|
182
122
|
}
|
|
183
123
|
|
|
184
|
-
input
|
|
124
|
+
input Workstream_ProposalAuthorInput {
|
|
185
125
|
id: PHID!
|
|
186
126
|
name: String
|
|
187
127
|
icon: URL
|
|
@@ -190,15 +130,15 @@ export const schema = gql `
|
|
|
190
130
|
id: ID!
|
|
191
131
|
sowId: PHID
|
|
192
132
|
paymentTermsId: PHID
|
|
193
|
-
status:
|
|
194
|
-
proposalAuthor:
|
|
133
|
+
status: Workstream_ProposalStatusInput
|
|
134
|
+
proposalAuthor: Workstream_ProposalAuthorInput
|
|
195
135
|
}
|
|
196
136
|
input Workstream_EditAlternativeProposalInput {
|
|
197
137
|
id: ID!
|
|
198
138
|
sowId: PHID
|
|
199
139
|
paymentTermsId: PHID
|
|
200
|
-
status:
|
|
201
|
-
proposalAuthor:
|
|
140
|
+
status: Workstream_ProposalStatusInput
|
|
141
|
+
proposalAuthor: Workstream_ProposalAuthorInput
|
|
202
142
|
}
|
|
203
143
|
input Workstream_RemoveAlternativeProposalInput {
|
|
204
144
|
id: ID!
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/network-admin",
|
|
3
3
|
"description": "Network Admin package for Powerhouse",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.38",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"/dist"
|
|
9
9
|
],
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
10
|
"exports": {
|
|
14
11
|
".": {
|
|
15
12
|
"development": "./index.ts",
|
|
@@ -54,7 +51,6 @@
|
|
|
54
51
|
"test:watch": "vitest",
|
|
55
52
|
"typecheck": "tsc --noEmit",
|
|
56
53
|
"prepublishOnly": "npm run build",
|
|
57
|
-
"postinstall": "node scripts/fix-project-management.js",
|
|
58
54
|
"generate": "ph-cli generate",
|
|
59
55
|
"connect": "ph-cli connect",
|
|
60
56
|
"reactor": "ph-cli reactor",
|
|
@@ -63,22 +59,21 @@
|
|
|
63
59
|
"service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"
|
|
64
60
|
},
|
|
65
61
|
"dependencies": {
|
|
66
|
-
"@powerhousedao/builder-tools": "^5.0.1-staging.
|
|
67
|
-
"@powerhousedao/common": "^5.0.1-staging.
|
|
68
|
-
"@powerhousedao/design-system": "^5.0.1-staging.
|
|
62
|
+
"@powerhousedao/builder-tools": "^5.0.1-staging.11",
|
|
63
|
+
"@powerhousedao/common": "^5.0.1-staging.11",
|
|
64
|
+
"@powerhousedao/design-system": "^5.0.1-staging.11",
|
|
69
65
|
"@powerhousedao/document-engineering": "^1.39.0",
|
|
70
|
-
"@powerhousedao/project-management": "0.0.
|
|
71
|
-
"@sentry/vite-plugin": "^4.6.0",
|
|
66
|
+
"@powerhousedao/project-management": "0.0.55",
|
|
72
67
|
"@uiw/react-md-editor": "^4.0.8",
|
|
73
|
-
"document-model": "^5.0.1-staging.
|
|
68
|
+
"document-model": "^5.0.1-staging.11",
|
|
74
69
|
"error": "^10.4.0",
|
|
75
70
|
"graphql": "^16.10.0",
|
|
76
71
|
"graphql-tag": "^2.12.6",
|
|
77
72
|
"lucide-react": "^0.546.0",
|
|
73
|
+
"luxon": "^3.7.2",
|
|
78
74
|
"rehype-slug": "^6.0.0",
|
|
79
75
|
"remark-gfm": "^4.0.1",
|
|
80
|
-
"
|
|
81
|
-
"vite-plugin-svgr": "^4.5.0",
|
|
76
|
+
"uuid": "^11.1.0",
|
|
82
77
|
"zod": "^3.24.2"
|
|
83
78
|
},
|
|
84
79
|
"devDependencies": {
|
|
@@ -86,21 +81,21 @@
|
|
|
86
81
|
"@electric-sql/pglite": "^0.2.17",
|
|
87
82
|
"@eslint/js": "^9.37.0",
|
|
88
83
|
"@powerhousedao/analytics-engine-core": "^0.5.0",
|
|
89
|
-
"@powerhousedao/codegen": "^5.0.1-staging.
|
|
90
|
-
"@powerhousedao/config": "^5.0.1-staging.
|
|
91
|
-
"@powerhousedao/connect": "^5.0.1-staging.
|
|
92
|
-
"@powerhousedao/ph-cli": "^5.0.1-staging.
|
|
93
|
-
"@powerhousedao/reactor-api": "^5.0.1-staging.
|
|
94
|
-
"@powerhousedao/reactor-browser": "^5.0.1-staging.
|
|
95
|
-
"@powerhousedao/reactor-local": "^5.0.1-staging.
|
|
84
|
+
"@powerhousedao/codegen": "^5.0.1-staging.11",
|
|
85
|
+
"@powerhousedao/config": "^5.0.1-staging.11",
|
|
86
|
+
"@powerhousedao/connect": "^5.0.1-staging.11",
|
|
87
|
+
"@powerhousedao/ph-cli": "^5.0.1-staging.11",
|
|
88
|
+
"@powerhousedao/reactor-api": "^5.0.1-staging.11",
|
|
89
|
+
"@powerhousedao/reactor-browser": "^5.0.1-staging.11",
|
|
90
|
+
"@powerhousedao/reactor-local": "^5.0.1-staging.11",
|
|
96
91
|
"@powerhousedao/scalars": "2.0.1",
|
|
97
|
-
"@powerhousedao/switchboard": "^5.0.1-staging.
|
|
92
|
+
"@powerhousedao/switchboard": "^5.0.1-staging.11",
|
|
98
93
|
"@tailwindcss/cli": "^4.1.14",
|
|
99
94
|
"@types/node": "^22.13.11",
|
|
100
95
|
"@types/react": "^19.2.2",
|
|
101
96
|
"@types/react-dom": "^19.2.2",
|
|
102
97
|
"@vitejs/plugin-react": "^5.0.4",
|
|
103
|
-
"document-drive": "^5.0.1-staging.
|
|
98
|
+
"document-drive": "^5.0.1-staging.11",
|
|
104
99
|
"eslint": "^9.37.0",
|
|
105
100
|
"eslint-plugin-react": "^7.37.5",
|
|
106
101
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proposals-reducers.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/workstream/src/tests/proposals-reducers.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Comprehensive tests for Proposals reducers
|
|
3
|
-
*/
|
|
4
|
-
import { describe, it, expect, beforeEach } from "vitest";
|
|
5
|
-
import { generateMock } from "@powerhousedao/codegen";
|
|
6
|
-
import utils from "../../gen/utils.js";
|
|
7
|
-
import { z, } from "../../gen/schema/index.js";
|
|
8
|
-
import { reducer } from "../../gen/reducer.js";
|
|
9
|
-
import * as creators from "../../gen/proposals/creators.js";
|
|
10
|
-
describe("Proposals Reducers - State Changes", () => {
|
|
11
|
-
let document;
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
document = utils.createDocument();
|
|
14
|
-
});
|
|
15
|
-
describe("editInitialProposal", () => {
|
|
16
|
-
it("should create initial proposal when it doesn't exist", () => {
|
|
17
|
-
const author = {
|
|
18
|
-
id: "author-123",
|
|
19
|
-
name: "John Doe",
|
|
20
|
-
icon: "https://example.com/avatar.jpg",
|
|
21
|
-
};
|
|
22
|
-
const input = {
|
|
23
|
-
id: "proposal-123",
|
|
24
|
-
sowId: "sow-456",
|
|
25
|
-
paymentTermsId: "terms-789",
|
|
26
|
-
status: "SUBMITTED",
|
|
27
|
-
proposalAuthor: author,
|
|
28
|
-
};
|
|
29
|
-
const updatedDocument = reducer(document, creators.editInitialProposal(input));
|
|
30
|
-
const proposal = updatedDocument.state.global.initialProposal;
|
|
31
|
-
expect(proposal).toBeDefined();
|
|
32
|
-
expect(proposal.id).toBe("proposal-123");
|
|
33
|
-
expect(proposal.sow).toBe("sow-456");
|
|
34
|
-
expect(proposal.paymentTerms).toBe("terms-789");
|
|
35
|
-
expect(proposal.status).toBe("SUBMITTED");
|
|
36
|
-
expect(proposal.author.id).toBe("author-123");
|
|
37
|
-
expect(proposal.author.name).toBe("John Doe");
|
|
38
|
-
expect(proposal.author.icon).toBe("https://example.com/avatar.jpg");
|
|
39
|
-
});
|
|
40
|
-
it("should update existing initial proposal", () => {
|
|
41
|
-
// First create initial proposal
|
|
42
|
-
const firstUpdate = reducer(document, creators.editInitialProposal({
|
|
43
|
-
id: "proposal-123",
|
|
44
|
-
status: "DRAFT",
|
|
45
|
-
}));
|
|
46
|
-
// Then update it
|
|
47
|
-
const input = {
|
|
48
|
-
id: "proposal-456",
|
|
49
|
-
sowId: "sow-789",
|
|
50
|
-
status: "SUBMITTED",
|
|
51
|
-
proposalAuthor: {
|
|
52
|
-
id: "author-999",
|
|
53
|
-
name: "Jane Smith",
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
const finalDocument = reducer(firstUpdate, creators.editInitialProposal(input));
|
|
57
|
-
const proposal = finalDocument.state.global.initialProposal;
|
|
58
|
-
expect(proposal.id).toBe("proposal-456");
|
|
59
|
-
expect(proposal.sow).toBe("sow-789");
|
|
60
|
-
expect(proposal.status).toBe("SUBMITTED");
|
|
61
|
-
expect(proposal.author.id).toBe("author-999");
|
|
62
|
-
expect(proposal.author.name).toBe("Jane Smith");
|
|
63
|
-
});
|
|
64
|
-
it("should handle optional fields correctly", () => {
|
|
65
|
-
const input = {
|
|
66
|
-
id: "proposal-123",
|
|
67
|
-
sowId: undefined,
|
|
68
|
-
paymentTermsId: null,
|
|
69
|
-
status: undefined,
|
|
70
|
-
proposalAuthor: undefined,
|
|
71
|
-
};
|
|
72
|
-
const updatedDocument = reducer(document, creators.editInitialProposal(input));
|
|
73
|
-
const proposal = updatedDocument.state.global.initialProposal;
|
|
74
|
-
expect(proposal.id).toBe("proposal-123");
|
|
75
|
-
expect(proposal.sow).toBe(""); // Empty when undefined
|
|
76
|
-
expect(proposal.paymentTerms).toBe(""); // Empty when null
|
|
77
|
-
expect(proposal.status).toBe("DRAFT"); // Default when undefined
|
|
78
|
-
});
|
|
79
|
-
it("should handle empty string values", () => {
|
|
80
|
-
const input = {
|
|
81
|
-
id: "proposal-123",
|
|
82
|
-
sowId: "",
|
|
83
|
-
paymentTermsId: "",
|
|
84
|
-
};
|
|
85
|
-
const updatedDocument = reducer(document, creators.editInitialProposal(input));
|
|
86
|
-
const proposal = updatedDocument.state.global.initialProposal;
|
|
87
|
-
expect(proposal.sow).toBe("");
|
|
88
|
-
expect(proposal.paymentTerms).toBe("");
|
|
89
|
-
});
|
|
90
|
-
it("should handle author with null/undefined optional fields", () => {
|
|
91
|
-
const input = {
|
|
92
|
-
id: "proposal-123",
|
|
93
|
-
proposalAuthor: {
|
|
94
|
-
id: "author-123",
|
|
95
|
-
name: null,
|
|
96
|
-
icon: undefined,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
const updatedDocument = reducer(document, creators.editInitialProposal(input));
|
|
100
|
-
const proposal = updatedDocument.state.global.initialProposal;
|
|
101
|
-
expect(proposal.author.id).toBe("author-123");
|
|
102
|
-
expect(proposal.author.name).toBe(null);
|
|
103
|
-
expect(proposal.author.icon).toBe(null);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
describe("addAlternativeProposal", () => {
|
|
107
|
-
it("should add new alternative proposal", () => {
|
|
108
|
-
const author = {
|
|
109
|
-
id: "author-123",
|
|
110
|
-
name: "Alternative Author",
|
|
111
|
-
icon: "https://example.com/alt-avatar.jpg",
|
|
112
|
-
};
|
|
113
|
-
const input = {
|
|
114
|
-
id: "alt-proposal-123",
|
|
115
|
-
sowId: "sow-456",
|
|
116
|
-
paymentTermsId: "terms-789",
|
|
117
|
-
status: "DRAFT",
|
|
118
|
-
proposalAuthor: author,
|
|
119
|
-
};
|
|
120
|
-
const updatedDocument = reducer(document, creators.addAlternativeProposal(input));
|
|
121
|
-
expect(updatedDocument.state.global.alternativeProposals).toHaveLength(1);
|
|
122
|
-
const proposal = updatedDocument.state.global.alternativeProposals[0];
|
|
123
|
-
expect(proposal.id).toBe("alt-proposal-123");
|
|
124
|
-
expect(proposal.sow).toBe("sow-456");
|
|
125
|
-
expect(proposal.paymentTerms).toBe("terms-789");
|
|
126
|
-
expect(proposal.status).toBe("DRAFT");
|
|
127
|
-
expect(proposal.author.id).toBe("author-123");
|
|
128
|
-
expect(proposal.author.name).toBe("Alternative Author");
|
|
129
|
-
expect(proposal.author.icon).toBe("https://example.com/alt-avatar.jpg");
|
|
130
|
-
});
|
|
131
|
-
it("should add multiple alternative proposals", () => {
|
|
132
|
-
let currentDocument = document;
|
|
133
|
-
// Add first proposal
|
|
134
|
-
currentDocument = reducer(currentDocument, creators.addAlternativeProposal({
|
|
135
|
-
id: "alt-proposal-1",
|
|
136
|
-
status: "DRAFT",
|
|
137
|
-
}));
|
|
138
|
-
// Add second proposal
|
|
139
|
-
currentDocument = reducer(currentDocument, creators.addAlternativeProposal({
|
|
140
|
-
id: "alt-proposal-2",
|
|
141
|
-
status: "SUBMITTED",
|
|
142
|
-
}));
|
|
143
|
-
expect(currentDocument.state.global.alternativeProposals).toHaveLength(2);
|
|
144
|
-
expect(currentDocument.state.global.alternativeProposals[0].id).toBe("alt-proposal-1");
|
|
145
|
-
expect(currentDocument.state.global.alternativeProposals[1].id).toBe("alt-proposal-2");
|
|
146
|
-
});
|
|
147
|
-
it("should not add proposal if ID already exists", () => {
|
|
148
|
-
let currentDocument = document;
|
|
149
|
-
// Add proposal
|
|
150
|
-
currentDocument = reducer(currentDocument, creators.addAlternativeProposal({
|
|
151
|
-
id: "alt-proposal-1",
|
|
152
|
-
status: "DRAFT",
|
|
153
|
-
}));
|
|
154
|
-
// Try to add proposal with same ID
|
|
155
|
-
currentDocument = reducer(currentDocument, creators.addAlternativeProposal({
|
|
156
|
-
id: "alt-proposal-1",
|
|
157
|
-
status: "SUBMITTED",
|
|
158
|
-
}));
|
|
159
|
-
expect(currentDocument.state.global.alternativeProposals).toHaveLength(1);
|
|
160
|
-
expect(currentDocument.state.global.alternativeProposals[0].status).toBe("DRAFT"); // Unchanged
|
|
161
|
-
});
|
|
162
|
-
it("should handle optional fields with defaults", () => {
|
|
163
|
-
const input = {
|
|
164
|
-
id: "alt-proposal-123",
|
|
165
|
-
sowId: undefined,
|
|
166
|
-
paymentTermsId: null,
|
|
167
|
-
status: undefined,
|
|
168
|
-
proposalAuthor: undefined,
|
|
169
|
-
};
|
|
170
|
-
const updatedDocument = reducer(document, creators.addAlternativeProposal(input));
|
|
171
|
-
const proposal = updatedDocument.state.global.alternativeProposals[0];
|
|
172
|
-
expect(proposal.sow).toBe("");
|
|
173
|
-
expect(proposal.paymentTerms).toBe("");
|
|
174
|
-
expect(proposal.status).toBe("DRAFT");
|
|
175
|
-
expect(proposal.author.id).toBe("");
|
|
176
|
-
expect(proposal.author.name).toBe(null);
|
|
177
|
-
expect(proposal.author.icon).toBe(null);
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
describe("editAlternativeProposal", () => {
|
|
181
|
-
beforeEach(() => {
|
|
182
|
-
// Add a proposal to edit
|
|
183
|
-
document = reducer(document, creators.addAlternativeProposal({
|
|
184
|
-
id: "alt-proposal-123",
|
|
185
|
-
sowId: "initial-sow",
|
|
186
|
-
status: "DRAFT",
|
|
187
|
-
proposalAuthor: {
|
|
188
|
-
id: "initial-author",
|
|
189
|
-
name: "Initial Author",
|
|
190
|
-
},
|
|
191
|
-
}));
|
|
192
|
-
});
|
|
193
|
-
it("should edit existing alternative proposal", () => {
|
|
194
|
-
const input = {
|
|
195
|
-
id: "alt-proposal-123",
|
|
196
|
-
sowId: "updated-sow",
|
|
197
|
-
paymentTermsId: "updated-terms",
|
|
198
|
-
status: "SUBMITTED",
|
|
199
|
-
proposalAuthor: {
|
|
200
|
-
id: "updated-author",
|
|
201
|
-
name: "Updated Author",
|
|
202
|
-
icon: "https://example.com/updated-avatar.jpg",
|
|
203
|
-
},
|
|
204
|
-
};
|
|
205
|
-
const updatedDocument = reducer(document, creators.editAlternativeProposal(input));
|
|
206
|
-
const proposal = updatedDocument.state.global.alternativeProposals[0];
|
|
207
|
-
expect(proposal.sow).toBe("updated-sow");
|
|
208
|
-
expect(proposal.paymentTerms).toBe("updated-terms");
|
|
209
|
-
expect(proposal.status).toBe("SUBMITTED");
|
|
210
|
-
expect(proposal.author.id).toBe("updated-author");
|
|
211
|
-
expect(proposal.author.name).toBe("Updated Author");
|
|
212
|
-
expect(proposal.author.icon).toBe("https://example.com/updated-avatar.jpg");
|
|
213
|
-
});
|
|
214
|
-
it("should update only provided fields", () => {
|
|
215
|
-
const input = {
|
|
216
|
-
id: "alt-proposal-123",
|
|
217
|
-
status: "ACCEPTED",
|
|
218
|
-
};
|
|
219
|
-
const updatedDocument = reducer(document, creators.editAlternativeProposal(input));
|
|
220
|
-
const proposal = updatedDocument.state.global.alternativeProposals[0];
|
|
221
|
-
expect(proposal.sow).toBe("initial-sow"); // Unchanged
|
|
222
|
-
expect(proposal.status).toBe("ACCEPTED"); // Changed
|
|
223
|
-
expect(proposal.author.name).toBe("Initial Author"); // Unchanged
|
|
224
|
-
});
|
|
225
|
-
it("should handle non-existent proposal ID gracefully", () => {
|
|
226
|
-
const input = {
|
|
227
|
-
id: "non-existent-proposal",
|
|
228
|
-
status: "SUBMITTED",
|
|
229
|
-
};
|
|
230
|
-
const updatedDocument = reducer(document, creators.editAlternativeProposal(input));
|
|
231
|
-
// Original proposal should remain unchanged
|
|
232
|
-
const proposal = updatedDocument.state.global.alternativeProposals[0];
|
|
233
|
-
expect(proposal.id).toBe("alt-proposal-123");
|
|
234
|
-
expect(proposal.status).toBe("DRAFT"); // Unchanged
|
|
235
|
-
});
|
|
236
|
-
it("should handle optional field updates", () => {
|
|
237
|
-
const input = {
|
|
238
|
-
id: "alt-proposal-123",
|
|
239
|
-
sowId: "",
|
|
240
|
-
paymentTermsId: null,
|
|
241
|
-
status: undefined,
|
|
242
|
-
proposalAuthor: undefined,
|
|
243
|
-
};
|
|
244
|
-
const updatedDocument = reducer(document, creators.editAlternativeProposal(input));
|
|
245
|
-
const proposal = updatedDocument.state.global.alternativeProposals[0];
|
|
246
|
-
expect(proposal.sow).toBe("");
|
|
247
|
-
expect(proposal.paymentTerms).toBe("");
|
|
248
|
-
expect(proposal.status).toBe("DRAFT"); // Default when undefined
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
describe("removeAlternativeProposal", () => {
|
|
252
|
-
beforeEach(() => {
|
|
253
|
-
// Add multiple proposals to test removal
|
|
254
|
-
document = reducer(document, creators.addAlternativeProposal({
|
|
255
|
-
id: "alt-proposal-1",
|
|
256
|
-
status: "DRAFT",
|
|
257
|
-
}));
|
|
258
|
-
document = reducer(document, creators.addAlternativeProposal({
|
|
259
|
-
id: "alt-proposal-2",
|
|
260
|
-
status: "SUBMITTED",
|
|
261
|
-
}));
|
|
262
|
-
document = reducer(document, creators.addAlternativeProposal({
|
|
263
|
-
id: "alt-proposal-3",
|
|
264
|
-
status: "ACCEPTED",
|
|
265
|
-
}));
|
|
266
|
-
});
|
|
267
|
-
it("should remove existing alternative proposal", () => {
|
|
268
|
-
const input = {
|
|
269
|
-
id: "alt-proposal-2",
|
|
270
|
-
};
|
|
271
|
-
const updatedDocument = reducer(document, creators.removeAlternativeProposal(input));
|
|
272
|
-
expect(updatedDocument.state.global.alternativeProposals).toHaveLength(2);
|
|
273
|
-
const remainingIds = updatedDocument.state.global.alternativeProposals.map((p) => p.id);
|
|
274
|
-
expect(remainingIds).toContain("alt-proposal-1");
|
|
275
|
-
expect(remainingIds).toContain("alt-proposal-3");
|
|
276
|
-
expect(remainingIds).not.toContain("alt-proposal-2");
|
|
277
|
-
});
|
|
278
|
-
it("should handle removal of non-existent proposal gracefully", () => {
|
|
279
|
-
const input = {
|
|
280
|
-
id: "non-existent-proposal",
|
|
281
|
-
};
|
|
282
|
-
const updatedDocument = reducer(document, creators.removeAlternativeProposal(input));
|
|
283
|
-
// All original proposals should remain
|
|
284
|
-
expect(updatedDocument.state.global.alternativeProposals).toHaveLength(3);
|
|
285
|
-
const remainingIds = updatedDocument.state.global.alternativeProposals.map((p) => p.id);
|
|
286
|
-
expect(remainingIds).toContain("alt-proposal-1");
|
|
287
|
-
expect(remainingIds).toContain("alt-proposal-2");
|
|
288
|
-
expect(remainingIds).toContain("alt-proposal-3");
|
|
289
|
-
});
|
|
290
|
-
it("should handle removal from empty array gracefully", () => {
|
|
291
|
-
// Start with empty document
|
|
292
|
-
const emptyDocument = utils.createDocument();
|
|
293
|
-
const input = {
|
|
294
|
-
id: "any-proposal",
|
|
295
|
-
};
|
|
296
|
-
const updatedDocument = reducer(emptyDocument, creators.removeAlternativeProposal(input));
|
|
297
|
-
expect(updatedDocument.state.global.alternativeProposals).toHaveLength(0);
|
|
298
|
-
});
|
|
299
|
-
it("should remove first proposal correctly", () => {
|
|
300
|
-
const input = {
|
|
301
|
-
id: "alt-proposal-1",
|
|
302
|
-
};
|
|
303
|
-
const updatedDocument = reducer(document, creators.removeAlternativeProposal(input));
|
|
304
|
-
expect(updatedDocument.state.global.alternativeProposals).toHaveLength(2);
|
|
305
|
-
expect(updatedDocument.state.global.alternativeProposals[0].id).toBe("alt-proposal-2");
|
|
306
|
-
expect(updatedDocument.state.global.alternativeProposals[1].id).toBe("alt-proposal-3");
|
|
307
|
-
});
|
|
308
|
-
it("should remove last proposal correctly", () => {
|
|
309
|
-
const input = {
|
|
310
|
-
id: "alt-proposal-3",
|
|
311
|
-
};
|
|
312
|
-
const updatedDocument = reducer(document, creators.removeAlternativeProposal(input));
|
|
313
|
-
expect(updatedDocument.state.global.alternativeProposals).toHaveLength(2);
|
|
314
|
-
expect(updatedDocument.state.global.alternativeProposals[0].id).toBe("alt-proposal-1");
|
|
315
|
-
expect(updatedDocument.state.global.alternativeProposals[1].id).toBe("alt-proposal-2");
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workstream-reducers.test.d.ts","sourceRoot":"","sources":["../../../../../document-models/workstream/src/tests/workstream-reducers.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|