ngx-t-forms 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-B9tCHtwV.mjs +411 -0
- package/fesm2022/ngx-t-forms-api-endpoint-config.component-B9tCHtwV.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs → ngx-t-forms-auto-complete-input-element.component-D2Vty1Aj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs.map → ngx-t-forms-auto-complete-input-element.component-D2Vty1Aj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs → ngx-t-forms-basic-input-input-element.component-Dr2bhCnH.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs.map → ngx-t-forms-basic-input-input-element.component-Dr2bhCnH.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs → ngx-t-forms-calculated-field-rules.component-DLBTjfMj.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs.map → ngx-t-forms-calculated-field-rules.component-DLBTjfMj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs → ngx-t-forms-chip-options-creator-editor.component-Bh6jMmtu.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs.map → ngx-t-forms-chip-options-creator-editor.component-Bh6jMmtu.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-conditional-display-config.component-ayrWl-c2.mjs +513 -0
- package/fesm2022/ngx-t-forms-conditional-display-config.component-ayrWl-c2.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-nOnJfMTo.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-nOnJfMTo.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs → ngx-t-forms-data-source-picker.component-mmyhOBvA.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs.map → ngx-t-forms-data-source-picker.component-mmyhOBvA.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs → ngx-t-forms-date-picker-input-element.component-DmiBra1D.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs.map → ngx-t-forms-date-picker-input-element.component-DmiBra1D.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs → ngx-t-forms-date-range-picker-input-element.component-Cke5qSzR.mjs} +11 -2
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-Cke5qSzR.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs → ngx-t-forms-document-list-label-config-editor.component-C0xx4jrN.mjs} +3 -3
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs.map → ngx-t-forms-document-list-label-config-editor.component-C0xx4jrN.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-document-picker.component-DIqaaBSl.mjs → ngx-t-forms-document-picker.component-DI7wtEv6.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-document-picker.component-DIqaaBSl.mjs.map → ngx-t-forms-document-picker.component-DI7wtEv6.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs → ngx-t-forms-editor-input-element.component-DbogKrdk.mjs} +46 -191
- package/fesm2022/ngx-t-forms-editor-input-element.component-DbogKrdk.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs → ngx-t-forms-file-upload-input-element.component-DbwvZghJ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs.map → ngx-t-forms-file-upload-input-element.component-DbwvZghJ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs → ngx-t-forms-form-input-selector.component-CkuzNdjx.mjs} +2 -3
- package/fesm2022/{ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs.map → ngx-t-forms-form-input-selector.component-CkuzNdjx.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-DzJKFl4c.mjs → ngx-t-forms-form-json-view.component-DBCpa_rZ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-DzJKFl4c.mjs.map → ngx-t-forms-form-json-view.component-DBCpa_rZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs → ngx-t-forms-form-section-stepper.component-jLj6vePZ.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs.map → ngx-t-forms-form-section-stepper.component-jLj6vePZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs → ngx-t-forms-forms-builder-menu.component-Iyd0grju.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs.map → ngx-t-forms-forms-builder-menu.component-Iyd0grju.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-geo-location.component-Bj_qIEqi.mjs → ngx-t-forms-geo-location.component-BUXRaPy0.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-geo-location.component-Bj_qIEqi.mjs.map → ngx-t-forms-geo-location.component-BUXRaPy0.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-BLmAqiQA.mjs +158 -0
- package/fesm2022/ngx-t-forms-header-template-editor.component-BLmAqiQA.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs → ngx-t-forms-image-capture-input-element.component-D6Ffuhbv.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs.map → ngx-t-forms-image-capture-input-element.component-D6Ffuhbv.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-index-CKj1Oacc.mjs +2 -0
- package/fesm2022/ngx-t-forms-index-CKj1Oacc.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-custom.component-DiciFhSS.mjs → ngx-t-forms-input-custom.component-BMui37o-.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-input-custom.component-DiciFhSS.mjs.map → ngx-t-forms-input-custom.component-BMui37o-.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-input-editor.component-D12hrHOc.mjs → ngx-t-forms-input-editor.component-D60TpWzO.mjs} +3 -4
- package/fesm2022/{ngx-t-forms-input-editor.component-D12hrHOc.mjs.map → ngx-t-forms-input-editor.component-D60TpWzO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs → ngx-t-forms-map-mat-options-keys-yfxnNDPs.mjs} +2 -3
- package/fesm2022/ngx-t-forms-map-mat-options-keys-yfxnNDPs.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs → ngx-t-forms-mat-chip-list-editor.component-cfBBan80.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs.map → ngx-t-forms-mat-chip-list-editor.component-cfBBan80.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs → ngx-t-forms-missing-form-configs.component-BcYuduah.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs.map → ngx-t-forms-missing-form-configs.component-BcYuduah.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs → ngx-t-forms-mscoa-chart-toolbar.component-nLawxM9j.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-nLawxM9j.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-config.component-B9G_WlEc.mjs +594 -0
- package/fesm2022/ngx-t-forms-mscoa-config.component-B9G_WlEc.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs → ngx-t-forms-mscoa-segment-config.component-DKEEZ8MD.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs.map → ngx-t-forms-mscoa-segment-config.component-DKEEZ8MD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs → ngx-t-forms-multiple-input-input-element.component-B99ANTUL.mjs} +34 -30
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-B99ANTUL.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs → ngx-t-forms-ngx-t-forms-9BfJdjl4.mjs} +2281 -759
- package/fesm2022/ngx-t-forms-ngx-t-forms-9BfJdjl4.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs → ngx-t-forms-paginated-selection-table-Bm5-5VWe.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs.map → ngx-t-forms-paginated-selection-table-Bm5-5VWe.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs → ngx-t-forms-payload-template-editor.component-2hwGuKAB.mjs} +11 -6
- package/fesm2022/ngx-t-forms-payload-template-editor.component-2hwGuKAB.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs → ngx-t-forms-pipeline-generator.component-BvjT2zfL.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs.map → ngx-t-forms-pipeline-generator.component-BvjT2zfL.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-quill-input.component-BsuOKfZT.mjs +731 -0
- package/fesm2022/ngx-t-forms-quill-input.component-BsuOKfZT.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CtCOIpai.mjs → ngx-t-forms-record-list-manager.component-BK5nwwDp.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CtCOIpai.mjs.map → ngx-t-forms-record-list-manager.component-BK5nwwDp.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-D9wIdOhg.mjs → ngx-t-forms-required-inputs.component-DiwMttVf.mjs} +2 -3
- package/fesm2022/{ngx-t-forms-required-inputs.component-D9wIdOhg.mjs.map → ngx-t-forms-required-inputs.component-DiwMttVf.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs → ngx-t-forms-rest-api-call-setup.component-CBgG_f06.mjs} +249 -25
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CBgG_f06.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-section-report.component-U9uQ_Ow9.mjs → ngx-t-forms-section-report.component-CyPpFiWS.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-section-report.component-U9uQ_Ow9.mjs.map → ngx-t-forms-section-report.component-CyPpFiWS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-select-input-element.component-CxYTmuvV.mjs → ngx-t-forms-select-input-element.component-B2wr5_88.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-select-input-element.component-CxYTmuvV.mjs.map → ngx-t-forms-select-input-element.component-B2wr5_88.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs → ngx-t-forms-selection-options-editor.component-BEZLG1Z8.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs.map → ngx-t-forms-selection-options-editor.component-BEZLG1Z8.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs → ngx-t-forms-textarea-input-element.component-Cmbd0krg.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map → ngx-t-forms-textarea-input-element.component-Cmbd0krg.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs → ngx-t-forms-toggle-input-element.component-Dd_FcAoD.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map → ngx-t-forms-toggle-input-element.component-Dd_FcAoD.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-token-binding-menu.component-CLpjkUnf.mjs +109 -0
- package/fesm2022/ngx-t-forms-token-binding-menu.component-CLpjkUnf.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-token-text-input.component-DY04Z0fn.mjs +296 -0
- package/fesm2022/ngx-t-forms-token-text-input.component-DY04Z0fn.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-validators-config.component-EM7RSWIz.mjs → ngx-t-forms-validators-config.component-Btmz2cKH.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-validators-config.component-EM7RSWIz.mjs.map → ngx-t-forms-validators-config.component-Btmz2cKH.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-CT6sN9E4.mjs +2096 -0
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-CT6sN9E4.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/styles/_tokens.scss +6 -0
- package/types/ngx-t-forms.d.ts +155 -4
- package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs +0 -417
- package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-getInputIcon-B4ADgevZ.mjs +0 -31
- package/fesm2022/ngx-t-forms-getInputIcon-B4ADgevZ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs +0 -129
- package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs +0 -2
- package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +0 -173
- package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs +0 -1303
- package/fesm2022/ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-workflow-adjudication.component-CT6sN9E4.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/adjudication-chart/adjudication-chart.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/adjudication-chart/adjudication-chart.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/adjudication-docs/adjudication-docs.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/adjudication-docs/adjudication-docs.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/adjudication-shell/adjudication-shell.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/adjudication-shell/adjudication-shell.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/points-creation/points-creation.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/points-creation/points-creation.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/microflow-fetch.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/price-preference.ts","../../../projects/ngx-t-forms/src/lib/shared/functions/mapColors.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/quill-notes.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/elements/submission-review-dialog/submission-review-dialog.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/elements/submission-review-dialog/submission-review-dialog.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/submission-review.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/submission-review.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/elements/point-assignment-dialog/point-assignment-dialog.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/elements/point-assignment-dialog/point-assignment-dialog.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/point-assignment.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/point-assignment.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/supplier-selection/supplier-selection.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/supplier-selection/supplier-selection.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/workflow-adjudication.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/workflow-adjudication.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n/** A vertical reference line on the chart's shared axis. */\nexport interface AdjChartRef {\n /** Microscopic label drawn at the line (e.g. \"median\", \"−15%\"). */\n label: string;\n /** Position as % of the axis. */\n pct: number;\n kind: 'neutral' | 'warning';\n}\n\n/** One legend entry; `kind` maps to the swatch colour. */\nexport interface AdjChartLegendItem {\n label: string;\n kind: 'primary' | 'secondary' | 'warning';\n}\n\n/** One row of the chart: a primary bar, an optional thin secondary bar. */\nexport interface AdjChartRow {\n id: string;\n name: string;\n /** Primary bar width as % of the axis. */\n primaryPct: number;\n /** Figure shown for the primary bar (right column, tabular). */\n primaryLabel: string;\n /** Optional thin bar on its own scale (e.g. points). */\n secondaryPct?: number;\n secondaryLabel?: string;\n /** Compact annotation under the track (e.g. drift, exclusion). */\n note?: string;\n /** normal = accent bar · warning = amber bar + note · muted = struck out. */\n state: 'normal' | 'warning' | 'muted';\n}\n\n/** Everything the chart renders; built by the step components. */\nexport interface AdjChartVm {\n /** One-line reading aid above the plot. */\n caption?: string;\n /** Shaded zone from 0 to this % of the axis (e.g. the abnormally-low zone). */\n zonePct?: number;\n refs: AdjChartRef[];\n legend: AdjChartLegendItem[];\n rows: AdjChartRow[];\n footnote?: string;\n}\n\n/**\n * Compact horizontal-bar chart shared by the adjudication steps: one aligned\n * grid of name · track · figures per row, reference lines and a shaded zone\n * spanning the whole track column, and per-row notes for anything that needs\n * a reviewer's eye. Pure presentation — every number arrives precomputed on\n * the {@link AdjChartVm}.\n *\n * @example\n * <lib-adjudication-chart [vm]=\"chart\" />\n */\n@Component({\n selector: 'lib-adjudication-chart',\n templateUrl: './adjudication-chart.component.html',\n styleUrl: './adjudication-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: { 'class': 'lib-adjudication-chart' },\n imports: [MatTooltipModule],\n})\nexport class AdjudicationChartComponent {\n /** The prepared chart model. */\n readonly vm = input.required<AdjChartVm>();\n}\n","@if (vm().caption) {\n <p class=\"chart-caption\">{{ vm().caption }}</p>\n}\n\n<div class=\"plot\">\n <!-- Zone + reference lines span the track column only (the fixed name and\n figure columns are excluded via the CSS column variables). -->\n <div class=\"overlay\" aria-hidden=\"true\">\n @if (vm().zonePct != null) {\n <div class=\"zone\" [style.width.%]=\"vm().zonePct\"></div>\n }\n @for (ref of vm().refs; track ref.label) {\n <div class=\"ref\" [class.warning]=\"ref.kind === 'warning'\" [style.left.%]=\"ref.pct\">\n <span>{{ ref.label }}</span>\n </div>\n }\n </div>\n\n @for (row of vm().rows; track row.id) {\n <div class=\"row\"\n [class.warning]=\"row.state === 'warning'\"\n [class.muted]=\"row.state === 'muted'\">\n <span class=\"name\" [matTooltip]=\"row.name\">{{ row.name }}</span>\n <div class=\"track\">\n <div class=\"bar primary\" [style.width.%]=\"row.primaryPct\"></div>\n @if (row.secondaryPct != null) {\n <div class=\"bar secondary\" [style.width.%]=\"row.secondaryPct\"></div>\n }\n </div>\n <span class=\"figures\">\n <span class=\"figure\">{{ row.primaryLabel }}</span>\n @if (row.secondaryLabel) {\n <span class=\"figure secondary-figure\">{{ row.secondaryLabel }}</span>\n }\n </span>\n @if (row.note) {\n <span class=\"note\">{{ row.note }}</span>\n }\n </div>\n }\n</div>\n\n@if (vm().legend.length) {\n <div class=\"legend\">\n @for (item of vm().legend; track item.label) {\n <span class=\"legend-item\">\n <span class=\"swatch\" [class]=\"'swatch ' + item.kind\"></span>{{ item.label }}\n </span>\n }\n </div>\n}\n@if (vm().footnote) {\n <p class=\"footnote\">{{ vm().footnote }}</p>\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { AdjudicationSteps } from 'ngx-t-forms-types';\n\n/**\n * Everything the guide adapts to: the adjudication step type plus the live\n * step configuration, so each line states what applies HERE, not generic\n * theory.\n */\nexport interface AdjudicationDocsContext {\n step: AdjudicationSteps;\n /** \"80/20\" | \"90/10\" when the price engine resolved a system. */\n system?: string;\n /** Form key prices are read from, when the engine is active. */\n priceKey?: string;\n /** Configured cap on compliant bids (`maxLength` on the review step). */\n complianceLimit?: number;\n /** Whether a score sheet feeds this step. */\n hasScoreSheet?: boolean;\n}\n\n/** One compact term → explanation line of the guide. */\ninterface DocsRule {\n term: string;\n text: string;\n}\n\n/**\n * The in-component guide to the adjudication rules: one compact term/text list\n * per step type, assembled from {@link AdjudicationDocsContext} so the content\n * matches the step in view (its system, its price key, its compliance limit).\n * Short by design — every line is one sentence a reviewer can act on.\n *\n * @example\n * <lib-adjudication-docs [context]=\"{ step: AdjudicationSteps.SubMissionReview }\" />\n */\n@Component({\n selector: 'lib-adjudication-docs',\n templateUrl: './adjudication-docs.component.html',\n styleUrl: './adjudication-docs.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: { 'class': 'lib-adjudication-docs' },\n imports: [],\n})\nexport class AdjudicationDocsComponent {\n /** The step to explain, plus its live configuration. */\n readonly context = input.required<AdjudicationDocsContext>();\n\n protected readonly heading = computed(() => {\n switch (this.context().step) {\n case AdjudicationSteps.ScoreCreation: return 'Building the score sheet';\n case AdjudicationSteps.PointAssignment: return 'Assigning points';\n case AdjudicationSteps.SupplierSelection: return 'Selecting the supplier';\n default: return 'Reviewing submissions';\n }\n });\n\n /** The step-specific rule lines, shortest useful form. */\n protected readonly rules = computed<DocsRule[]>(() => {\n const ctx = this.context();\n switch (ctx.step) {\n case AdjudicationSteps.ScoreCreation:\n return [\n { term: 'Score sheet', text: 'The criteria reviewers will score every compliant bid against; each carries its maximum points.' },\n { term: 'Point types', text: 'Group criteria (e.g. technical, price) — each group becomes its own tab at point assignment.' },\n { term: 'Linked fields', text: 'Link a criterion to a form field to score what bidders actually submitted; or type a custom one.' },\n { term: 'Practice', text: 'Finalise the sheet before bids open, keep descriptions unambiguous, keep totals realistic.' },\n ];\n case AdjudicationSteps.PointAssignment:\n return [\n { term: 'Task', text: 'Score every compliant bid against the score sheet, one criterion at a time.' },\n { term: 'Groups', text: 'Criteria appear grouped by point type; a bid\\'s total is the sum across all groups.' },\n { term: 'Feeds into', text: 'Totals carry into supplier selection, scaled onto the specific-goals portion of the final score.' },\n { term: 'Practice', text: 'Score all bids on one criterion before moving to the next, and note the reasoning as you go.' },\n ];\n case AdjudicationSteps.SupplierSelection: {\n const split = ctx.system ?? '80/20 or 90/10';\n return [\n { term: 'Final score', text: `Points for price plus score-sheet points scaled onto the ${split} split — a total out of 100.` },\n { term: 'Award', text: 'The highest total is appointed; equal totals fall to the higher specific-goals score.' },\n { term: 'Practice', text: 'Resolve every open flag before appointing, and record resolution notes with the appointment.' },\n ];\n }\n default: {\n const scale = ctx.system?.slice(0, 2) ?? '80';\n const rules: DocsRule[] = [\n { term: 'Benchmark', text: `The lowest compliant price earns the full ${scale} points; each 1% above it costs 0.${scale} points, floored at 0, shown to two decimals.` },\n { term: 'System', text: 'R50 million or less → 80/20; above → 90/10. Picked from the step\\'s formula, else the tender estimate, else the lowest compliant bid.' },\n { term: 'Non-compliant', text: 'The verdict removes a bid from the pool. If it held the lowest price, the benchmark shifts and every score — including saved ones — recalculates instantly.' },\n { term: 'Abnormally low', text: 'A bid more than 15% below the median compliant price (the middle price — immune to one extreme bid) is flagged amber. The flag means investigate; it never auto-rejects.' },\n { term: 'Practice', text: 'Preview before judging · investigate every amber flag · note each verdict · never hand-adjust scores.' },\n ];\n if (ctx.complianceLimit) {\n rules.splice(3, 0, {\n term: 'Limit',\n text: `At most ${ctx.complianceLimit} bid(s) may end compliant — once reached, the rest are marked non-compliant automatically.`,\n });\n }\n return rules;\n }\n }\n });\n\n /** Live-config chips shown under the heading, one per known fact. */\n protected readonly facts = computed<string[]>(() => {\n const ctx = this.context();\n const facts: string[] = [];\n if (ctx.system) facts.push(`${ctx.system} system in effect`);\n if (ctx.priceKey) facts.push(`prices read from “${ctx.priceKey}”`);\n if (ctx.complianceLimit) facts.push(`compliance limit ${ctx.complianceLimit}`);\n if (ctx.hasScoreSheet) facts.push('score sheet configured');\n return facts;\n });\n}\n","<section class=\"docs\">\n <span class=\"eyebrow\">Guide</span>\n <h4 class=\"heading\">{{ heading() }}</h4>\n @if (facts().length) {\n <div class=\"facts\">\n @for (fact of facts(); track fact) {\n <span class=\"fact\">{{ fact }}</span>\n }\n </div>\n }\n\n <dl class=\"rules\">\n @for (rule of rules(); track rule.term) {\n <div class=\"rule\">\n <dt>{{ rule.term }}</dt>\n <dd>{{ rule.text }}</dd>\n </div>\n }\n </dl>\n\n <p class=\"fineprint\">PPR 2022 regs 3–5 · National Treasury Implementation Guide, March 2023.\n Abnormally-low detection uses the 15% best-practice band; SA guidance requires judgment, not automatic rejection.</p>\n</section>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, input, signal } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { AdjudicationChartComponent, AdjChartVm } from '../adjudication-chart/adjudication-chart.component';\nimport { AdjudicationDocsComponent, AdjudicationDocsContext } from '../adjudication-docs/adjudication-docs.component';\n\n/**\n * The frame every adjudication step renders inside: a thin identity bar\n * (step label + system chip), the view switch (working view · chart · guide),\n * and a fullscreen toggle for dense pools. The working view is projected; the\n * chart and the guide are rendered here from their prepared models, so all\n * four step types share one behaviour and one look.\n *\n * Fullscreen is a CSS takeover (fixed, inset 0) rather than the browser\n * Fullscreen API — SSR-safe, no permission prompt, Escape exits.\n *\n * @example\n * <lib-adjudication-shell label=\"Submission review\" [system]=\"vm.priceSystem\"\n * [docsContext]=\"vm.docsContext\" [chart]=\"vm.priceChart\">\n * ...working view...\n * </lib-adjudication-shell>\n */\n@Component({\n selector: 'lib-adjudication-shell',\n templateUrl: './adjudication-shell.component.html',\n styleUrl: './adjudication-shell.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n 'class': 'lib-adjudication-shell',\n '[class.fullscreen]': 'fullscreen()',\n '(document:keydown.escape)': 'onEscape()',\n },\n imports: [MatButtonModule, MatIconModule, MatTooltipModule, AdjudicationChartComponent, AdjudicationDocsComponent],\n})\nexport class AdjudicationShellComponent {\n /** Step name shown in the identity bar (e.g. \"Submission review\"). */\n readonly label = input.required<string>();\n\n /** Preference point system chip (\"80/20\" / \"90/10\"), when known. */\n readonly system = input<string | undefined>(undefined);\n\n /** Context the guide adapts its content to. */\n readonly docsContext = input.required<AdjudicationDocsContext>();\n\n /** Chart model; the chart button only appears when one is provided. */\n readonly chart = input<AdjChartVm | undefined>(undefined);\n\n /** Which face is showing. Presentational only — no step state changes. */\n protected readonly view = signal<'main' | 'chart' | 'docs'>('main');\n\n /** CSS takeover state; host gets the `fullscreen` class. */\n protected readonly fullscreen = signal(false);\n\n protected onEscape(): void {\n if (this.fullscreen()) this.fullscreen.set(false);\n }\n}\n","<header class=\"shell-bar\">\n <div class=\"shell-id\">\n <span class=\"shell-label\">{{ label() }}</span>\n @if (system()) {\n <span class=\"shell-system\"\n matTooltip=\"Preference point system in effect (PPR 2022): points for price are computed automatically against the lowest compliant bid.\">\n {{ system() }}\n </span>\n }\n </div>\n <div class=\"shell-actions\">\n <button mat-icon-button type=\"button\" [class.active]=\"view() === 'main'\"\n matTooltip=\"Review table\" aria-label=\"Review table\"\n [attr.aria-pressed]=\"view() === 'main'\" (click)=\"view.set('main')\">\n <mat-icon>table_rows</mat-icon>\n </button>\n @if (chart()) {\n <button mat-icon-button type=\"button\" [class.active]=\"view() === 'chart'\"\n matTooltip=\"Chart\" aria-label=\"Records by price chart\"\n [attr.aria-pressed]=\"view() === 'chart'\" (click)=\"view.set('chart')\">\n <mat-icon>insights</mat-icon>\n </button>\n }\n <button mat-icon-button type=\"button\" [class.active]=\"view() === 'docs'\"\n matTooltip=\"Guide\" aria-label=\"How scoring works\"\n [attr.aria-pressed]=\"view() === 'docs'\" (click)=\"view.set('docs')\">\n <mat-icon>menu_book</mat-icon>\n </button>\n <button mat-icon-button type=\"button\" class=\"fullscreen-toggle\"\n [matTooltip]=\"fullscreen() ? 'Exit full screen (Esc)' : 'Full screen'\"\n [attr.aria-label]=\"fullscreen() ? 'Exit full screen' : 'Full screen'\"\n [attr.aria-pressed]=\"fullscreen()\" (click)=\"fullscreen.set(!fullscreen())\">\n <mat-icon>{{ fullscreen() ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>\n </button>\n </div>\n</header>\n\n<div class=\"shell-body\">\n @switch (view()) {\n @case ('docs') {\n <lib-adjudication-docs [context]=\"docsContext()\" />\n }\n @case ('chart') {\n @if (chart(); as chartVm) {\n <lib-adjudication-chart [vm]=\"chartVm\" />\n }\n }\n @default {\n <ng-content />\n }\n }\n</div>\n","import { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, computed, effect, inject, input, output } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { TextFieldModule } from '@angular/cdk/text-field';\r\n\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule, MatSelectChange } from '@angular/material/select';\r\nimport { MatSortModule } from '@angular/material/sort';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { tap } from 'rxjs';\r\nimport { AdjudicationSteps, FormColumnInputs, ITowerStepColumn, WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens';\r\nimport { AdjudicationDocsContext } from '../adjudication-docs/adjudication-docs.component';\r\nimport { AdjudicationShellComponent } from '../adjudication-shell/adjudication-shell.component';\r\nimport { getInputIcon } from '../../../../../../shared/functions/getInputIcon';\r\n\r\n@Component({\r\n selector: 'lib-points-creation',\r\n templateUrl: './points-creation.component.html',\r\n styleUrls: ['./points-creation.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n ReactiveFormsModule,\r\n FormsModule,\r\n TextFieldModule,\r\n MatAutocompleteModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatSelectModule,\r\n MatSortModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n AdjudicationShellComponent,\r\n ],\r\n})\r\nexport class PointsCreationComponent {\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n /** Static guide context: this step authors the sheet, nothing dynamic yet. */\r\n protected readonly docsContext: AdjudicationDocsContext = {\r\n step: AdjudicationSteps.ScoreCreation,\r\n };\r\n\r\n /** Tower step column config that drives column layout, types, and disabled/readonly state. */\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n\r\n /** Existing points list pushed in from the parent (workflow-adjudication-reactive-input). */\r\n // NOTE(phase-4): Trap 6 — parent (`workflow-adjudication-reactive-input`) binds a\r\n // `WorkflowAdjudicationValue | null` union of three incompatible shapes. Until the parent\r\n // template is split per adjudication step type, this input must remain `any`.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n /** Emits the updated points list whenever the user saves, edits, or removes a row. */\r\n readonly pointsChange = output<WorkflowAdjudicationScoreSheetValue[]>();\r\n\r\n protected pointRow: WorkflowAdjudicationScoreSheetValue = this.#createDefaultPointRow();\r\n protected selectAllWorkflowInputs: FormColumnInputs[] = [];\r\n #points: WorkflowAdjudicationScoreSheetValue[] = [];\r\n\r\n /** Material table columns derived from the input config. */\r\n protected readonly cols = computed(() => {\r\n const cfg = this.inputConfig();\r\n let cols: string[] = (cfg?.adjudicationPointTypes?.length || 0) > 0\r\n ? ['description', 'totalPoints', 'pointType', 'actions']\r\n : ['description', 'totalPoints', 'actions'];\r\n if (cfg?.disabled || !!cfg?.readonly) {\r\n cols = cols.filter(col => col !== 'actions');\r\n }\r\n return cols;\r\n });\r\n\r\n /** Mirrors the legacy `set value` setter — pushes incoming `value` into the internal `#points` buffer. */\r\n protected readonly valueBridge = effect(() => {\r\n const next = this.value();\r\n this.#points = (next || []) as WorkflowAdjudicationScoreSheetValue[];\r\n });\r\n\r\n constructor() {\r\n this.#config.formBuilder.getCurrentFormAvailableInputOptions().pipe(\r\n tap((inputs: FormColumnInputs[]) => {\r\n this.selectAllWorkflowInputs = inputs;\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n ).subscribe();\r\n }\r\n\r\n protected get points(): WorkflowAdjudicationScoreSheetValue[] {\r\n const cfg = this.inputConfig();\r\n if (cfg?.disabled || !!cfg?.readonly) {\r\n return this.#points;\r\n }\r\n return [...this.#points, this.pointRow];\r\n }\r\n\r\n protected get filteredInputs(): FormColumnInputs[] {\r\n const description = this.pointRow.description?.toLowerCase() || '';\r\n if (!description) {\r\n return this.selectAllWorkflowInputs;\r\n }\r\n const regex = new RegExp(description.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'i');\r\n return this.selectAllWorkflowInputs.filter((input: FormColumnInputs) =>\r\n (typeof input.label === 'string' && regex.test(input.label)) ||\r\n (typeof input.hintLabel === 'string' && regex.test(input.hintLabel)),\r\n );\r\n }\r\n\r\n protected get pointInEditIsValid(): boolean {\r\n const cfg = this.inputConfig();\r\n const typeRequired = (cfg?.adjudicationPointTypes?.length || 0) > 0;\r\n return !!this.pointRow.description && this.pointRow.totalPoints > 0 && (!typeRequired || !!this.pointRow.pointType);\r\n }\r\n\r\n #createDefaultPointRow(): WorkflowAdjudicationScoreSheetValue {\r\n return {\r\n id: '',\r\n formControlName: '',\r\n totalPoints: 0,\r\n description: '',\r\n pointType: '',\r\n inputId: undefined,\r\n isEditRow: true,\r\n };\r\n }\r\n\r\n #resetPointRow(): void {\r\n this.pointRow = this.#createDefaultPointRow();\r\n }\r\n\r\n protected selectActiveInput(input: FormColumnInputs): void {\r\n const cfg = this.inputConfig();\r\n this.pointRow = {\r\n ...this.pointRow,\r\n totalPoints: 0,\r\n description: input.label || '',\r\n id: input.id,\r\n formControlName: input.formControlName,\r\n pointType: this.pointRow.pointType || cfg?.adjudicationPointTypes[0] || '',\r\n inputId: input.id,\r\n };\r\n }\r\n\r\n protected selectPointType(pointType: MatSelectChange): void {\r\n this.pointRow = {\r\n ...this.pointRow,\r\n pointType: pointType.value,\r\n };\r\n }\r\n\r\n protected savePoints(): void {\r\n const pointToSave: WorkflowAdjudicationScoreSheetValue = {\r\n ...this.pointRow,\r\n id: this.pointRow.id || uuidv4(),\r\n formControlName: this.pointRow.formControlName || this.pointRow.description,\r\n isEditRow: undefined,\r\n };\r\n this.#points = [...this.#points, pointToSave];\r\n this.pointsChange.emit(this.#points);\r\n this.#resetPointRow();\r\n }\r\n\r\n protected edit(element: WorkflowAdjudicationScoreSheetValue): void {\r\n this.pointRow = {\r\n ...element,\r\n isEditRow: true,\r\n };\r\n this.#points = this.#points.filter(p => p.id !== element.id);\r\n this.pointsChange.emit(this.#points);\r\n }\r\n\r\n protected remove(element: WorkflowAdjudicationScoreSheetValue): void {\r\n this.#points = this.#points.filter(p => p.id !== element.id);\r\n this.pointsChange.emit(this.#points);\r\n }\r\n\r\n protected getInputIcon(input: FormColumnInputs): string {\r\n return getInputIcon(input.element);\r\n }\r\n}\r\n","<lib-adjudication-shell label=\"Score sheet\" [docsContext]=\"docsContext\">\r\n<div style=\"resize: both; overflow: auto;\">\r\n @if (!points || points.length === 1) {\r\n <h5 style=\"margin-bottom: 5px; margin-top: 0px;\">\r\n ℹ️ To add a scoring item:\r\n </h5>\r\n <ol>\r\n <li>\r\n <strong>Enter Description:</strong>\r\n <ul style=\"margin-top: 5px; margin-bottom: 5px; padding-left: 20px; list-style-type: disc;\">\r\n <li>\r\n To <strong>link</strong> a field: You <strong>must select it</strong> from the list first (you can\r\n edit it after).\r\n </li>\r\n <li>\r\n For a <strong>custom</strong> point: <strong>Ignore the list</strong> and just type your own\r\n description.\r\n </li>\r\n </ul>\r\n </li>\r\n <li>\r\n <strong>Set Details:</strong>\r\n Assign the <strong>Points</strong> and select the <strong>Point Type</strong>.\r\n </li>\r\n <li>\r\n <strong>Save:</strong>\r\n Click the <strong>\"Save\"</strong> button to add the item.\r\n </li>\r\n </ol>\r\n }\r\n <table mat-table [dataSource]=\"points\" matSort>\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef>Description</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (element.isEditRow) {\r\n <mat-form-field subscriptSizing=\"dynamic\" class=\"input-add\" appearance=\"outline\">\r\n <textarea [matAutocomplete]=\"auto\" [(ngModel)]=\"pointRow.description\" matInput cdkTextareaAutosize\r\n cdkAutosizeMinRows=\"1\" placeholder=\"Enter point description\"></textarea>\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (input of filteredInputs; track input.id) {\r\n <mat-option [value]=\"input.label\" (click)=\"selectActiveInput(input)\">\r\n <div style=\"display: flex;align-items: center;gap:8px\">\r\n <mat-icon style=\"font-size:24px; width:24px; height:24px;\"\r\n [attr.aria-label]=\"input.label\">\r\n {{ getInputIcon(input) }}\r\n </mat-icon>\r\n <span>\r\n <div style=\"font-size: 0.75em;\">\r\n <strong>\r\n {{ input.label }}\r\n </strong>\r\n </div>\r\n <div\r\n style=\"font-size: 0.75em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\">\r\n {{ input.hintLabel || input.formControlName }}\r\n </div>\r\n </span>\r\n </div>\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n } @else {\r\n {{ element.description }}\r\n }\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"totalPoints\">\r\n <th mat-header-cell *matHeaderCellDef>Points</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (element.isEditRow) {\r\n <mat-form-field subscriptSizing=\"dynamic\" class=\"input-add\" appearance=\"outline\">\r\n <input matInput [(ngModel)]=\"pointRow.totalPoints\"\r\n placeholder=\"Enter points , eg 50\" type=\"number\">\r\n </mat-form-field>\r\n } @else {\r\n {{ element.totalPoints }}\r\n }\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"pointType\">\r\n <th mat-header-cell *matHeaderCellDef>Point Type</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (element.isEditRow) {\r\n <mat-form-field subscriptSizing=\"dynamic\" class=\"input-add\" appearance=\"outline\">\r\n <mat-select (selectionChange)=\"selectPointType($event)\" ngDefaultControl\r\n [value]=\"pointRow.pointType\"\r\n placeholder=\"Select\">\r\n @for (type of inputConfig()?.adjudicationPointTypes || []; track $index) {\r\n <mat-option [value]=\"type\">{{ type }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n } @else {\r\n {{ element.pointType }}\r\n }\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"actions\" [stickyEnd]=\"true\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <span style=\"display: flex; justify-content: center;\">\r\n @if (element.isEditRow) {\r\n <button matTooltip=\"Save Point in Edit\" color=\"primary\" style=\"white-space: nowrap;\r\n height: 26px;\r\n margin-bottom: 0px;\" mat-flat-button (click)=\"savePoints()\" [disabled]=\"!pointInEditIsValid || inputConfig()?.disabled || inputConfig()?.readonly\">\r\n <span style=\"font-size: 0.875em;\">\r\n save\r\n </span>\r\n </button>\r\n } @else {\r\n <button mat-icon-button (click)=\"edit(element)\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button mat-icon-button (click)=\"remove(element)\">\r\n <mat-icon>delete_forever</mat-icon>\r\n </button>\r\n }\r\n </span>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"cols()\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: cols()\"></tr>\r\n </table>\r\n</div>\r\n</lib-adjudication-shell>\r\n","import { Observable, catchError, map, of, shareReplay, startWith, switchMap, take } from 'rxjs';\n\nimport type { AdjResponseReviewColumnMapping, WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\n\nimport type { ISubmission } from './elements/submission-review/submission-review.component';\n\n/**\n * The `formBuilder.getCurrentStepMicroflowSubmissions()` payload as the\n * adjudication steps read it. Mirrors the `IStoreFunctions` contract, with\n * `submissions` narrowed from `any[]` to the row shape the tables index into.\n * Each step consumes a subset (submission-review ignores the score-sheet\n * fields; supplier-selection reads all four).\n */\nexport interface MicroflowSubmissionsPayload {\n submissions: ISubmission[];\n columnMapping: AdjResponseReviewColumnMapping;\n scoreSheet?: WorkflowAdjudicationScoreSheetValue[];\n adjudicationPricePreferenceCalculationFormula?: string;\n /**\n * \"Rand value\" of the procurement (PPR 2022 reg 1: estimated contract value\n * at invitation, taxes included). Feeds 80/20 vs 90/10 auto-selection and\n * abnormally-low-tender flagging in the price preference engine.\n */\n estimatedProcurementValue?: number;\n}\n\n/**\n * Lifecycle of one micro-flow submissions fetch attempt. Modelled as data\n * (instead of letting the error propagate) so a failed fetch cannot complete a\n * step's `vm$` — the stream, and with it the \"Try Again\" refetch, must outlive\n * every failure.\n */\nexport type MicroflowFetchState =\n | { readonly status: 'loading' }\n | { readonly status: 'loaded'; readonly payload: MicroflowSubmissionsPayload }\n | { readonly status: 'failed'; readonly reason: string };\n\n/** Human-readable reason for an unknown thrown value, for the error card. */\nexport function describeError(error: unknown): string {\n if (error instanceof Error && error.message) return error.message;\n if (typeof error === 'string' && error.length > 0) return error;\n return 'Unknown error';\n}\n\n/**\n * One fetch per trigger emission, surfaced as {@link MicroflowFetchState}.\n *\n * Errors are caught INSIDE the `switchMap`, so a failed request completes only\n * its own inner observable: the trigger subscription survives and the next\n * trigger genuinely refetches. (The historical defect placed `catchError` on\n * the consuming `vm$` itself — the first error tore the whole chain down and\n * \"Try Again\" pushed into a dead trigger.) `startWith` re-enters the loading\n * state on every trigger, so a retry shows the spinner instead of a stale\n * error card.\n *\n * @param trigger$ - Emits whenever a (re)fetch should run.\n * @param fetch - The `getCurrentStepMicroflowSubmissions` call, deferred so\n * each trigger issues a fresh request.\n * @returns Replayed (`shareReplay(1)`) state stream for a step's `vm$`.\n */\nexport function microflowFetchStates(\n trigger$: Observable<void>,\n fetch: () => Observable<MicroflowSubmissionsPayload>,\n): Observable<MicroflowFetchState> {\n return trigger$.pipe(\n switchMap(() =>\n fetch().pipe(\n take(1),\n map((payload): MicroflowFetchState => ({ status: 'loaded', payload })),\n catchError((error: unknown) =>\n of<MicroflowFetchState>({ status: 'failed', reason: describeError(error) })),\n startWith<MicroflowFetchState>({ status: 'loading' }),\n ),\n ),\n shareReplay(1),\n );\n}\n","import type { ISubmission } from './elements/submission-review/submission-review.component';\n\n/**\n * PPPFA price preference calculation engine.\n *\n * Computes the \"points for price\" of the South African preferential\n * procurement framework ORGANICALLY inside the library, from the tendered\n * prices and the reviewers' live compliance verdicts — the host consumer no\n * longer pre-computes or stamps scores (though stamped scores remain the\n * fallback when no price data reaches the library).\n *\n * ## Legal basis (verified against the primary sources, 2026-08)\n *\n * - Preferential Procurement Policy Framework Act 5 of 2000 (PPPFA).\n * - Preferential Procurement Regulations, 2022 (GN 2721, Gazette 47452,\n * 4 Nov 2022; in force 16 Jan 2023) — \"PPR 2022\".\n * - National Treasury (OCPO) Implementation Guide: PPR 2022, v1 March 2023.\n *\n * Reg 4(1): points out of 80 for price, tenders with Rand value ≤ R50 million\n * (all applicable taxes included): `Ps = 80 × (1 − (Pt − Pmin) / Pmin)`.\n * Reg 5(1): points out of 90 for price, Rand value > R50 million:\n * `Ps = 90 × (1 − (Pt − Pmin) / Pmin)`. Where Ps = points scored for price of\n * the tender under consideration, Pt = its price, and Pmin = price of the\n * LOWEST ACCEPTABLE tender. PPR 2022 reg 1 defines \"lowest acceptable tender\"\n * as one that \"complies with all specifications and conditions of tender and\n * that has lowest price\", \"price\" as tax-inclusive less unconditional\n * discounts, and \"Rand value\" as the total ESTIMATED contract value at the\n * time of the tender invitation.\n *\n * ## The five engine rules this module enforces\n *\n * 1. **Zero floor.** The raw formula goes negative once `Pt > 2 × Pmin`; the\n * lowest possible price score is 0, so results are capped with\n * `Math.max(0, ps)`. (Practice endorsed by Treasury-aligned guidance — the\n * regulation text itself is silent on the negative branch.)\n * 2. **Conditional Pmin recalculation.** Pmin is derived ONLY from responsive\n * bids. A bid the reviewer marks non-compliant is excluded and the next\n * lowest responsive bid becomes Pmin; every score is recomputed from the\n * new Pmin on the same pass. Unreviewed bids count as provisionally\n * responsive until a verdict lands.\n * 3. **Abnormally-low-tender (ALT) flagging.** A bid priced more than\n * {@link DEFAULT_ABNORMALLY_LOW_FRACTION} below the median responsive\n * price — or below the estimated Rand value, when provided — is FLAGGED,\n * never auto-excluded: SA guidance (NT construction procurement standards\n * via ISO 10845) requires a judgment call on unrealistic offers, so\n * exclusion stays a reviewer decision (which then shifts Pmin via rule 2).\n * 4. **Decimal precision.** Internal arithmetic keeps full float precision;\n * only the final score is rounded, half-up, to exactly two decimals —\n * matching regs 4(3)/5(3), which round the combined price+goals total \"to\n * the nearest two decimal places\".\n * 5. **Scale auto-selection.** 80/20 vs 90/10 by the R50 million threshold\n * (regs 4(1)/5(1)), resolved in precedence order: the system the tender\n * was advertised under (explicit override) → the estimated Rand value at\n * invitation (reg 1 \"Rand value\") → the lowest acceptable tender received\n * (reg 3(b), the route for tenders advertised under both systems).\n */\n\n/** The price portion of the two statutory preference point systems. */\nexport type PricePreferenceScale = 80 | 90;\n\n/**\n * R50 million: the Rand-value boundary between the 80/20 and 90/10 systems\n * (PPR 2022 regs 4(1) and 5(1); ≤ threshold → 80/20, above → 90/10).\n */\nexport const RAND_VALUE_SCALE_THRESHOLD = 50_000_000;\n\n/**\n * Default form key holding each submission's tendered price. Matches the\n * `totalBidPrice` token the published formula strings are written against;\n * hosts override per tender via `AdjResponseReviewColumnMapping.responsePriceKey`.\n */\nexport const DEFAULT_RESPONSE_PRICE_KEY = 'totalBidPrice';\n\n/**\n * Default ALT sensitivity: a bid more than 15% below the median responsive\n * price (or below the estimated Rand value) is flagged for investigation.\n * A best-practice heuristic — SA guidance prescribes judgment, not a fixed\n * percentage — chosen at the sensitive end of the common 15–20% band so\n * borderline under-quotes surface rather than slip through.\n */\nexport const DEFAULT_ABNORMALLY_LOW_FRACTION = 0.15;\n\n/** Row key the engine writes its ALT flag to (read by the review template). */\nexport const ABNORMALLY_LOW_FLAG_KEY = 'adj_priceScore_abnormallyLow';\n\n/** Inputs to {@link computePricePreference}. */\nexport interface PricePreferenceOptions {\n /** Form key holding each row's price. Default {@link DEFAULT_RESPONSE_PRICE_KEY}. */\n priceKey?: string;\n /**\n * Ids of bids the reviewers have marked non-compliant. Excluded from Pmin,\n * the ALT median, and scored 0 (rule 2 — they are not \"acceptable tenders\").\n */\n nonResponsiveIds?: ReadonlySet<string>;\n /**\n * \"Rand value\" of the procurement (estimated contract value at invitation,\n * taxes included). Drives scale auto-selection ahead of Pmin and anchors\n * ALT detection. Optional.\n */\n estimatedProcurementValue?: number;\n /**\n * The system the tender was advertised under, when fixed up front. Wins\n * over every auto-selection route (rule 5 precedence).\n */\n scaleOverride?: PricePreferenceScale;\n /** ALT sensitivity as a fraction. Default {@link DEFAULT_ABNORMALLY_LOW_FRACTION}. */\n abnormallyLowFraction?: number;\n}\n\n/** Per-bid outcome of one calculation pass. */\nexport interface PricePreferenceScore {\n /**\n * Points for price: zero-floored, rounded half-up to two decimals (rules\n * 1 & 4). 0 for non-responsive bids and bids without a usable price.\n */\n readonly points: number;\n /** Rule 3: priced suspiciously far below the responsive median / estimate. */\n readonly abnormallyLow: boolean;\n /** Excluded from Pmin because a reviewer marked the bid non-compliant. */\n readonly nonResponsive: boolean;\n /** The row carried no finite positive price under the price key. */\n readonly priceMissing: boolean;\n}\n\n/** Outcome of one {@link computePricePreference} pass over the bid pool. */\nexport interface PricePreferenceResult {\n /**\n * False when no row at all carried a usable price — price data is not\n * reaching the library, and the caller must keep whatever scores the host\n * stamped. (An empty RESPONSIVE pool with prices present is still computed:\n * no acceptable tender means every price score is 0.)\n */\n readonly computed: boolean;\n /** The system applied (80 or 90), or null when nothing was computed. */\n readonly scale: PricePreferenceScale | null;\n /**\n * Price of the lowest acceptable (responsive) tender; null when nothing was\n * computed or every priced bid was disqualified.\n */\n readonly pMin: number | null;\n /**\n * Median of the responsive prices — the anchor abnormally-low detection\n * measures drift against (rule 3). Exposed so the review UI can SHOW the\n * anchor and each bid's drift from it, keeping the flag auditable rather\n * than a black box. Null when no responsive bid carried a usable price.\n */\n readonly median: number | null;\n /** Per-bid scores keyed by submission id. Empty when `computed` is false. */\n readonly scores: ReadonlyMap<string, PricePreferenceScore>;\n}\n\n/**\n * Reads the 80/90 base out of a stored formula string such as\n * `80(1-((totalBidPrice-Pmin)/(Pmin)))` — the shape workflow steps persist in\n * `adjudicationPricePreferenceCalculationFormula`. Returns undefined for\n * anything else so auto-selection (rule 5) takes over.\n */\nexport function parsePreferenceScale(formula: string | undefined): PricePreferenceScale | undefined {\n const match = /^\\s*(80|90)\\s*\\(/.exec(formula ?? '');\n if (match?.[1] === '80') return 80;\n if (match?.[1] === '90') return 90;\n return undefined;\n}\n\n/**\n * Rule 5 precedence: advertised system → estimated Rand value → lowest\n * acceptable tender (reg 3(b)). Exported for the spec; `pMin` may be null\n * only while nothing is computable, in which case the default is 80/20 (the\n * band the overwhelming majority of tenders fall in).\n */\nexport function selectPreferenceScale(\n scaleOverride: PricePreferenceScale | undefined,\n estimatedProcurementValue: number | undefined,\n pMin: number | null,\n): PricePreferenceScale {\n if (scaleOverride) return scaleOverride;\n if (Number.isFinite(estimatedProcurementValue) && (estimatedProcurementValue as number) > 0) {\n return (estimatedProcurementValue as number) <= RAND_VALUE_SCALE_THRESHOLD ? 80 : 90;\n }\n if (pMin !== null) {\n return pMin <= RAND_VALUE_SCALE_THRESHOLD ? 80 : 90;\n }\n return 80;\n}\n\n/** Rule 4: full precision internally; final figure only, two decimals, half-up. */\nfunction roundToTwoDecimals(value: number): number {\n return Math.round((value + Number.EPSILON) * 100) / 100;\n}\n\n/** Median of a non-empty list (mean of the middle pair for even lengths). */\nfunction median(sortedAscending: readonly number[]): number {\n const mid = Math.floor(sortedAscending.length / 2);\n return sortedAscending.length % 2 === 1\n ? sortedAscending[mid]!\n : (sortedAscending[mid - 1]! + sortedAscending[mid]!) / 2;\n}\n\n/**\n * One full calculation pass over the bid pool.\n *\n * Pure and synchronous: feed it the current rows and the current review\n * verdicts and every score comes back consistent with that state — which is\n * what makes rule 2's \"recalculate instantly on disqualification\" a matter of\n * simply calling it again from reactive state.\n *\n * @param rows - The submission rows (each must carry `id`; prices are read\n * from `options.priceKey`).\n * @param options - See {@link PricePreferenceOptions}.\n * @returns See {@link PricePreferenceResult}; check `computed` before use.\n */\nexport function computePricePreference(\n rows: readonly ISubmission[],\n options?: PricePreferenceOptions,\n): PricePreferenceResult {\n const priceKey = options?.priceKey || DEFAULT_RESPONSE_PRICE_KEY;\n const nonResponsiveIds = options?.nonResponsiveIds ?? new Set<string>();\n const altFraction = options?.abnormallyLowFraction ?? DEFAULT_ABNORMALLY_LOW_FRACTION;\n\n const priceOf = (row: ISubmission): number | undefined => {\n const price = Number(row[priceKey]);\n return Number.isFinite(price) && price > 0 ? price : undefined;\n };\n\n // The engine only stands down when price data simply is not reaching the\n // library: no row at all carries a usable price under the price key. Then\n // the caller keeps host-stamped scores (the pre-engine behaviour).\n const anyUsablePrice = rows.some(row => priceOf(row) !== undefined);\n if (!anyUsablePrice) {\n return { computed: false, scale: null, pMin: null, median: null, scores: new Map() };\n }\n\n // Rule 2: the acceptable pool is responsive bids with a usable price. An\n // EMPTY pool (every priced bid disqualified) is still a computed state —\n // with no acceptable tender there is no Pmin and every price score is 0.\n const responsivePrices = rows\n .filter(row => !nonResponsiveIds.has(row.id))\n .map(priceOf)\n .filter((price): price is number => price !== undefined)\n .sort((a, b) => a - b);\n\n const pMin = responsivePrices.length > 0 ? responsivePrices[0]! : null;\n const scale = selectPreferenceScale(\n options?.scaleOverride,\n options?.estimatedProcurementValue,\n pMin,\n );\n\n // Rule 3 anchors: the responsive median, plus the estimate when provided.\n const responsiveMedian = responsivePrices.length > 0 ? median(responsivePrices) : undefined;\n const altBelowMedian =\n responsiveMedian !== undefined ? responsiveMedian * (1 - altFraction) : undefined;\n const estimate = options?.estimatedProcurementValue;\n const altBelowEstimate =\n Number.isFinite(estimate) && (estimate as number) > 0\n ? (estimate as number) * (1 - altFraction)\n : undefined;\n\n const scores = new Map<string, PricePreferenceScore>();\n for (const row of rows) {\n const nonResponsive = nonResponsiveIds.has(row.id);\n const price = priceOf(row);\n const priceMissing = price === undefined;\n\n let points = 0;\n if (!nonResponsive && price !== undefined && pMin !== null) {\n // Regs 4(1)/5(1): Ps = scale × (1 − (Pt − Pmin) / Pmin), floored at 0\n // (rule 1) and rounded last (rule 4).\n points = roundToTwoDecimals(Math.max(0, scale * (1 - (price - pMin) / pMin)));\n }\n\n // A disqualified bid is never flagged: it is already out of the pool and\n // cannot hold Pmin, which is the risk the flag exists to surface.\n const abnormallyLow =\n !nonResponsive &&\n price !== undefined &&\n ((altBelowMedian !== undefined && price < altBelowMedian) ||\n (altBelowEstimate !== undefined && price < altBelowEstimate));\n\n scores.set(row.id, { points, abnormallyLow, nonResponsive, priceMissing });\n }\n\n return { computed: true, scale, pMin, median: responsiveMedian ?? null, scores };\n}\n","export function getColorForNumber(targetNumber: number, numbers: number[], asc = true): string {\r\n if (numbers.length === 0) {\r\n throw new Error(\"The numbers array must not be empty.\");\r\n }\r\n\r\n // Avoid sorting the original array\r\n const sortedNumbers = [...numbers].sort((a, b) => asc ? a - b : b - a);\r\n const min = sortedNumbers[0];\r\n const max = sortedNumbers[sortedNumbers.length - 1];\r\n if (!min || !max) {\r\n return \"rgb(173, 173, 173)\";\r\n }\r\n if (min === max) {\r\n return \"rgb(173, 173, 173)\"; // Return gray if there is no range\r\n }\r\n\r\n const interpolateColor = (value: number): string => {\r\n const fraction = (value - min) / (max - min);\r\n const colors = [\r\n { color: [247, 0, 0], pos: 0.0 }, // Red\r\n { color: [247, 187, 0], pos: 0.25 }, // Orange\r\n { color: [247, 247, 0], pos: 0.5 }, // Yellow\r\n { color: [207, 247, 0], pos: 0.75 }, // Light green\r\n { color: [96, 247, 0], pos: 1.0 } // Green\r\n ];\r\n\r\n for (let i = 0; i < colors.length - 1; i++) {\r\n const nextColor = colors[i + 1]\r\n const currentColor = colors[i]\r\n if (currentColor && nextColor && fraction <= nextColor.pos) {\r\n\r\n const range = nextColor.pos - currentColor.pos;\r\n const localFraction = (fraction - currentColor.pos) / range;\r\n const r = Math.round(currentColor.color[0]! + localFraction * (nextColor.color[0]! - currentColor.color[0]!));\r\n const g = Math.round(currentColor.color[1]! + localFraction * (nextColor.color[1]! - currentColor.color[1]!));\r\n const b = Math.round(currentColor.color[2]! + localFraction * (nextColor.color[2]! - currentColor.color[2]!));\r\n return `rgb(${r}, ${g}, ${b})`;\r\n }\r\n }\r\n\r\n return `rgb(${colors[colors.length - 1]?.color[0]}, ${colors[colors.length - 1]?.color[1]}, ${colors[colors.length - 1]?.color[2]},0.6)`;\r\n };\r\n\r\n return interpolateColor(targetNumber);\r\n}\r\n","import type { Op } from 'quill';\n\nimport type { QuillContent } from '../../../editor-input-element/core/quill-input/quill.config';\n\n/**\n * Normalises whatever is stored under `adj_microFlow_review_notes` — or\n * configured as a step's `adjudicationReviewFeedbackTemplate` — into the\n * Quill Delta shape the notes editor consumes.\n *\n * The notes editor used to be EditorJS, so live documents hold EditorJS\n * `OutputData` (`{ blocks: [...] }`) and workflow steps hold EditorJS-shaped\n * feedback templates. Those must keep opening readably, so this converter is\n * the single migration boundary:\n *\n * - a Quill payload (`{ ops: [...] }`) passes through untouched;\n * - a legacy EditorJS document is flattened block-by-block (paragraphs,\n * headers, lists, quotes, tables, code, delimiters) with inline HTML\n * stripped — formatting fidelity is best-effort, the TEXT is what survives;\n * - a bare string becomes a single paragraph;\n * - anything else (including `{}` from an unconfigured template) → undefined.\n *\n * A document saved after this change is Quill-native and round-trips exactly.\n */\nexport function toQuillNotes(value: unknown): QuillContent | undefined {\n if (value === null || value === undefined) return undefined;\n\n if (typeof value === 'string') {\n const text = value.trim();\n return text ? { ops: [{ insert: text.endsWith('\\n') ? text : `${text}\\n` }] } : undefined;\n }\n\n if (typeof value !== 'object') return undefined;\n const record = value as Record<string, unknown>;\n\n if (Array.isArray(record['ops'])) {\n // Same reference back, not a re-wrap: identity survives, so equality\n // guards downstream (`_isEqual` short-circuits) see an unchanged value.\n return (record['ops'] as Op[]).length > 0 ? (value as QuillContent) : undefined;\n }\n\n if (Array.isArray(record['blocks'])) {\n const ops = (record['blocks'] as unknown[]).flatMap(blockToOps);\n return ops.length > 0 ? { ops } : undefined;\n }\n\n return undefined;\n}\n\n/** One legacy EditorJS block → the Delta ops that carry its text. */\nfunction blockToOps(block: unknown): Op[] {\n if (typeof block !== 'object' || block === null) return [];\n const { type, data } = block as { type?: unknown; data?: Record<string, unknown> };\n\n switch (type) {\n case 'header': {\n const text = plainText(data?.['text']);\n if (!text) return [];\n const level = Number(data?.['level']);\n return [\n { insert: text },\n { insert: '\\n', attributes: { header: level >= 1 && level <= 6 ? level : 2 } },\n ];\n }\n case 'list': {\n const style = data?.['style'] === 'ordered' ? 'ordered' : 'bullet';\n const items = Array.isArray(data?.['items']) ? (data['items'] as unknown[]) : [];\n return items.flatMap((item): Op[] => {\n // Items are plain strings in old documents, `{ content }` in newer ones.\n const text = plainText(\n typeof item === 'object' && item !== null\n ? (item as Record<string, unknown>)['content']\n : item,\n );\n return text ? [{ insert: text }, { insert: '\\n', attributes: { list: style } }] : [];\n });\n }\n case 'quote': {\n const text = plainText(data?.['text']);\n return text ? [{ insert: text }, { insert: '\\n', attributes: { blockquote: true } }] : [];\n }\n case 'code': {\n const code = typeof data?.['code'] === 'string' ? data['code'] : '';\n return code ? [{ insert: code }, { insert: '\\n', attributes: { 'code-block': true } }] : [];\n }\n case 'table': {\n // Rows flatten to \"cell | cell\" lines — legible, if no longer a table.\n const content = Array.isArray(data?.['content']) ? (data['content'] as unknown[]) : [];\n return content.flatMap((row): Op[] => {\n if (!Array.isArray(row)) return [];\n const line = row.map((cell) => plainText(cell)).filter(Boolean).join(' | ');\n return line ? [{ insert: `${line}\\n` }] : [];\n });\n }\n case 'delimiter':\n return [{ insert: '---\\n' }];\n default: {\n // Paragraphs, and any unknown block that carries a `text` field.\n const text = plainText(data?.['text']);\n return text ? [{ insert: `${text}\\n` }] : [];\n }\n }\n}\n\n/** Strips EditorJS inline HTML down to text; `<br>` survives as a newline. */\nfunction plainText(value: unknown): string {\n if (typeof value !== 'string') return '';\n return value\n .replace(/<br\\s*\\/?>/gi, '\\n')\n .replace(/<[^>]+>/g, '')\n .replace(/ /g, ' ')\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/"/g, '\"')\n .trim();\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { QuillInputComponent } from '../../../../../editor-input-element/core/quill-input/quill-input.component';\r\nimport type { QuillContent } from '../../../../../editor-input-element/core/quill-input/quill.config';\r\nimport { toQuillNotes } from '../../quill-notes';\r\n\r\nexport interface SubmissionReviewDialogData {\r\n readonly: boolean;\r\n respondentNameKey: string;\r\n respondentCodeKey: string;\r\n /**\r\n * The step's interpolated feedback template. `unknown` because live configs\r\n * are EditorJS-shaped — `toQuillNotes` migrates whatever arrives.\r\n */\r\n activeRowNotes: unknown;\r\n row: {\r\n nameOfBidder: string;\r\n [key: string]: unknown;\r\n /** Saved notes: Quill going forward, EditorJS `OutputData` in legacy rows. */\r\n adj_microFlow_review_notes: unknown;\r\n adj_microFlow_assignedScore: Record<string, number>;\r\n };\r\n}\r\n\r\n@Component({\r\n selector: 'lib-submission-review-dialog',\r\n templateUrl: './submission-review-dialog.component.html',\r\n styleUrl: './submission-review-dialog.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [MatDialogModule, MatFormFieldModule, MatButtonModule, QuillInputComponent],\r\n})\r\nexport class SubmissionReviewDialogComponent {\r\n protected readonly dialogRef = inject<MatDialogRef<SubmissionReviewDialogComponent>>(MatDialogRef);\r\n protected readonly data = inject<SubmissionReviewDialogData>(MAT_DIALOG_DATA);\r\n\r\n /**\r\n * What the Quill editor opens with: the saved notes when any exist, else the\r\n * step's feedback template — each migrated from its stored shape (legacy\r\n * EditorJS documents included) by {@link toQuillNotes}.\r\n */\r\n protected readonly initialNotes: QuillContent | undefined =\r\n toQuillNotes(this.data.row['adj_microFlow_review_notes']) ?? toQuillNotes(this.data.activeRowNotes);\r\n\r\n protected changedNotes: QuillContent | undefined;\r\n\r\n protected get notesInputConfig(): ITowerStepColumn {\r\n return {\r\n id: 'adj_microFlow_review_notes',\r\n label: 'Notes',\r\n readonly: this.data.readonly,\r\n required: false,\r\n formControlName: 'adj_microFlow_review_notes',\r\n } as ITowerStepColumn;\r\n }\r\n\r\n protected get respondentName(): string {\r\n const raw = this.data.row[this.data.respondentNameKey];\r\n return typeof raw === 'string' ? raw : '';\r\n }\r\n\r\n protected notesChanged(notes: QuillContent | undefined): void {\r\n this.changedNotes = notes;\r\n }\r\n}\r\n","<span mat-dialog-title>\r\n Review Feedback For <span class=\"bidder-name\">{{ respondentName }}</span>\r\n</span>\r\n\r\n<div class=\"dialog-instructions\">\r\n <p>\r\n Your notes will be visible to the respondent. Provide <strong>clear, constructive feedback</strong> to\r\n guide their future submissions.\r\n </p>\r\n</div>\r\n<mat-dialog-content style=\"padding-bottom: 8px;padding-bottom: 8px\">\r\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\" style=\"width: 100%;\r\n display: absolute;\r\n left: 0;\r\n margin-bottom: 8px;\r\n margin-top: 8px;\r\n border-radius:16px;\" appearance=\"outline\">\r\n <lib-quill-input [value]=\"initialNotes\"\r\n (valueChanged)=\"notesChanged($event)\" ngDefaultControl [inputConfig]=\"notesInputConfig\"\r\n [required]=\"notesInputConfig.required\">\r\n </lib-quill-input>\r\n <mat-hint>\r\n <strong>Tip:</strong> Use bold, lists, and tables to structure your feedback.\r\n </mat-hint>\r\n </mat-form-field>\r\n</mat-dialog-content>\r\n\r\n\r\n<mat-dialog-actions align=\"end\">\r\n <button mat-dialog-close mat-button >\r\n Cancel\r\n </button>\r\n @if( !data.readonly){\r\n <button mat-flat-button\r\n [mat-dialog-close]=\"changedNotes\"\r\n >\r\n Save Feedback\r\n </button>}\r\n</mat-dialog-actions>","import { AsyncPipe, DecimalPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, computed, effect, inject, input, output, signal } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatSelectModule, MatSelectChange } from '@angular/material/select';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { BehaviorSubject, Observable, combineLatest, map, shareReplay, take, tap } from 'rxjs';\r\n\r\nimport { AdjudicationSteps, InputDataTypes, ITowerStepColumn, IWorkflowDocListCols, AdjResponseReviewColumnMapping, WorkflowAdjudicationMicroFlowReviewValue } from 'ngx-t-forms-types';\r\n\r\nimport type { QuillContent } from '../../../editor-input-element/core/quill-input/quill.config';\r\n\r\n/**\r\n * Internal review status union for adjudication micro-flow rows.\r\n * Mirrors the shared `WorkflowAdjudicationMicroFlowReviewValue.adj_microFlow_review`\r\n * optional literal union and includes `undefined` for the \"not yet reviewed\" branch.\r\n */\r\ntype AdjMicroFlowReviewStatus = 'compliant' | 'non-compliant' | undefined;\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens/index';\r\nimport { AdjChartVm } from '../adjudication-chart/adjudication-chart.component';\r\nimport { AdjudicationDocsContext } from '../adjudication-docs/adjudication-docs.component';\r\nimport { AdjudicationShellComponent } from '../adjudication-shell/adjudication-shell.component';\r\nimport { MicroflowSubmissionsPayload, describeError, microflowFetchStates } from '../../microflow-fetch';\r\nimport {\r\n ABNORMALLY_LOW_FLAG_KEY,\r\n DEFAULT_ABNORMALLY_LOW_FRACTION,\r\n DEFAULT_RESPONSE_PRICE_KEY,\r\n PricePreferenceResult,\r\n PricePreferenceScale,\r\n computePricePreference,\r\n parsePreferenceScale,\r\n} from '../../price-preference';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\nimport { getColorForNumber } from '../../../../../../shared/functions/mapColors';\r\nimport { DaysAgoPipe } from '../../../../../../shared/pipes/date/days-ago.pipe';\r\nimport { SubmissionReviewDialogComponent } from './elements/submission-review-dialog/submission-review-dialog.component';\r\n\r\n// --- TYPE DEFINITIONS FOR ROBUSTNESS ---\r\n\r\nexport interface ISubmission extends Record<string, any> {\r\n id: string;\r\n adjudicationPricePreferenceCalculationColor?: string;\r\n backgroundShades?: Record<string, string>;\r\n}\r\n/**\r\n * Column of an adjudication table.\r\n *\r\n * Deliberately standalone rather than derived from `IWorkflowDocListCols`: these\r\n * columns are declared inline by the adjudication components and never address a\r\n * stored document, so the document `path` that the workflow-list columns require\r\n * would have no meaning here.\r\n */\r\nexport interface tableCols {\r\n label: string;\r\n formControlName: string;\r\n /** Includes the internal `'actions'` cell type used by this template's @switch. */\r\n type?: IWorkflowDocListCols['type'] | 'actions';\r\n showColor?: boolean;\r\n maxWidth?: string;\r\n}\r\ninterface IViewModel {\r\n submissions: ISubmission[];\r\n columnMapping: AdjResponseReviewColumnMapping;\r\n displayColumns?: tableCols[];\r\n displayCols: string[];\r\n loading: boolean;\r\n error?: string;\r\n /**\r\n * The preference point system the engine applied, as \"80/20\" / \"90/10\"\r\n * (PPR 2022 regs 4–5). Undefined while scores come host-stamped instead of\r\n * from the library engine.\r\n */\r\n priceSystem?: string;\r\n /**\r\n * The \"records by price\" chart, present only while the engine is computing\r\n * (it needs real prices and the median anchor). Undefined in host-stamped\r\n * mode — the shell's chart button hides with it.\r\n */\r\n priceChart?: AdjChartVm;\r\n /** Live context the shell's guide adapts its content to. */\r\n docsContext: AdjudicationDocsContext;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-submission-review',\r\n templateUrl: './submission-review.component.html',\r\n styleUrls: ['./submission-review.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n AsyncPipe,\r\n DecimalPipe,\r\n FormsModule,\r\n OverlayModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n DaysAgoPipe,\r\n AdjudicationShellComponent,\r\n ],\r\n})\r\nexport class SubmissionReviewComponent {\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly dialog = inject(MatDialog);\r\n\r\n readonly #refreshTrigger = new BehaviorSubject<void>(undefined);\r\n // A stream to push updates of the review values (`this.value`)\r\n readonly #valueChanges$ = new BehaviorSubject<WorkflowAdjudicationMicroFlowReviewValue[] | null>([]);\r\n\r\n readonly #valueSignal = signal<WorkflowAdjudicationMicroFlowReviewValue[] | null>([]);\r\n #value: WorkflowAdjudicationMicroFlowReviewValue[] | null = [];\r\n\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n /** The current review payload. Null while loading. */\r\n // Parent (`workflow-adjudication-reactive-input`) passes a `WorkflowAdjudicationValue | null`\r\n // union that includes three incompatible shapes (score-sheet array, micro-flow review array,\r\n // response-elected-supplier object). This component only consumes the micro-flow branch; the\r\n // input must remain `any` until parent template typing is split per micro-flow.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step type, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n protected readonly valueBridge = effect(() => {\r\n const raw: unknown = this.value();\r\n // `?? []` is NOT enough here: an unsaved control reaches this input as the\r\n // empty string (`formGenerator`'s `value || ''` seed), and any non-array\r\n // slipping through crashes the enrich pass (`''.find is not a function`) —\r\n // which the old vm$ catchError then misreported as a fetch failure.\r\n // Same guard as the sibling steps (point-assignment / supplier-selection).\r\n const next: WorkflowAdjudicationMicroFlowReviewValue[] = Array.isArray(raw)\r\n ? (raw as WorkflowAdjudicationMicroFlowReviewValue[])\r\n : [];\r\n if (_isEqual(next, this.#value)) return;\r\n this.#value = next;\r\n this.#valueSignal.set(next);\r\n this.#valueChanges$.next(next);\r\n });\r\n\r\n readonly reviewChange = output<WorkflowAdjudicationMicroFlowReviewValue[]>();\r\n\r\n protected selected: string = '';\r\n protected columnMapping: AdjResponseReviewColumnMapping | undefined = undefined;\r\n protected submissions: ISubmission[] = [];\r\n\r\n readonly #initialState: IViewModel = {\r\n loading: true,\r\n submissions: [],\r\n columnMapping: { respondentNameKey: '', respondentCodeKey: '' },\r\n displayCols: [],\r\n displayColumns: [],\r\n error: undefined,\r\n docsContext: { step: AdjudicationSteps.SubMissionReview },\r\n };\r\n\r\n // One fetch per trigger; failures become 'failed' states instead of killing\r\n // the stream, so \"Try Again\" genuinely refetches. See `microflowFetchStates`.\r\n readonly #fetchedData$ = microflowFetchStates(this.#refreshTrigger, () =>\r\n this.#config.formBuilder.getCurrentStepMicroflowSubmissions(),\r\n );\r\n\r\n /**\r\n * Combines the fetched data with the ongoing stream of local review changes\r\n * (`valueChanges$`), so a status/note edit re-projects without re-fetching.\r\n *\r\n * Failure is reported per branch: a fetch error and a projection error render\r\n * different messages, so a bug in the enrich/sort pass can never masquerade\r\n * as \"the server call failed\" (which is exactly how the `''.find` crash from\r\n * a non-array `value` used to surface).\r\n */\r\n protected readonly vm$: Observable<IViewModel> = combineLatest([\r\n this.#fetchedData$,\r\n this.#valueChanges$\r\n ]).pipe(\r\n map(([fetched, reviewValues]): IViewModel => {\r\n if (fetched.status === 'loading') {\r\n return this.#initialState;\r\n }\r\n if (fetched.status === 'failed') {\r\n return {\r\n ...this.#initialState,\r\n loading: false,\r\n error: `Could not load submissions: ${fetched.reason}`,\r\n };\r\n }\r\n try {\r\n return this.#buildViewModel(fetched.payload, reviewValues);\r\n } catch (error: unknown) {\r\n // The data DID arrive — say so, and surface the real reason instead of\r\n // swallowing it into a generic load-failure message.\r\n return {\r\n ...this.#initialState,\r\n loading: false,\r\n error: `Submissions were received but could not be displayed: ${describeError(error)}`,\r\n };\r\n }\r\n }),\r\n shareReplay(1)\r\n );\r\n\r\n /**\r\n * Projects a successful fetch plus the current local review values into the\r\n * view model. A throw here is caught by `vm$` and reported as a display\r\n * failure — never as a load failure.\r\n */\r\n #buildViewModel(\r\n payload: MicroflowSubmissionsPayload,\r\n reviewValues: WorkflowAdjudicationMicroFlowReviewValue[] | null,\r\n ): IViewModel {\r\n const { columnMapping } = payload;\r\n\r\n this.columnMapping = columnMapping;\r\n\r\n // PPPFA engine pass (see ../../price-preference.ts): points for price are\r\n // recomputed here, from the tendered prices and the CURRENT verdicts, on\r\n // every projection — so marking a bid non-compliant re-derives Pmin and\r\n // every other score in the same pass (engine rule 2). Host-stamped scores\r\n // remain the fallback when no price data reaches the library.\r\n const { rows, scale, chart } = this.#applyPricePreference(payload, reviewValues);\r\n this.submissions = rows;\r\n\r\n const enrichedSubmissions = this.#enrichSubmissionsData(rows, columnMapping, reviewValues);\r\n const calcKey = columnMapping.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation';\r\n const sortedSubmissions = [...enrichedSubmissions].sort((a, b) => Number(b[calcKey]) - Number(a[calcKey]));\r\n return {\r\n loading: false,\r\n submissions: sortedSubmissions,\r\n columnMapping: columnMapping,\r\n priceSystem: scale ? `${scale}/${100 - scale}` : undefined,\r\n priceChart: chart,\r\n docsContext: {\r\n step: AdjudicationSteps.SubMissionReview,\r\n system: scale ? `${scale}/${100 - scale}` : undefined,\r\n priceKey: scale ? columnMapping.responsePriceKey || DEFAULT_RESPONSE_PRICE_KEY : undefined,\r\n complianceLimit: this.maxLimit(),\r\n },\r\n displayCols: [columnMapping.respondentNameKey, 'adjudicationPricePreferenceCalculation', 'status', 'actions'],\r\n displayColumns: [\r\n { label: 'name', formControlName: columnMapping.respondentNameKey, type: InputDataTypes.String },\r\n { label: 'Preference', formControlName: 'adjudicationPricePreferenceCalculation', type: InputDataTypes.Number, showColor: true },\r\n { label: 'Actions', formControlName: 'actions', type: InputDataTypes.String },\r\n { label: 'status and Notes', formControlName: 'status', type: 'actions' },\r\n ],\r\n error: undefined,\r\n };\r\n }\r\n\r\n /**\r\n * Latest per-id points for price computed by the engine, or null while the\r\n * engine is not computing (no usable prices → host-stamped mode). Read by\r\n * {@link #withCurrentScores} so every emission carries current figures.\r\n */\r\n #priceScores: ReadonlyMap<string, number> | null = null;\r\n\r\n /**\r\n * Runs the PPPFA price preference engine over the fetched rows and writes\r\n * the outcome onto copies of them: the points under the preference\r\n * calculation key (so sorting, colour banding and review records all read\r\n * the engine's figure) and the abnormally-low flag under\r\n * `ABNORMALLY_LOW_FLAG_KEY` (rendered as the amber warning in the points\r\n * column — flagged for investigation, never auto-excluded).\r\n *\r\n * Scale precedence (engine rule 5): the step's configured formula string\r\n * (the advertised system) → the estimated Rand value → the lowest\r\n * acceptable tender (PPR 2022 reg 3(b)).\r\n *\r\n * When no responsive row carries a usable price under\r\n * `columnMapping.responsePriceKey` (default `totalBidPrice`), the rows pass\r\n * through untouched and host-stamped scores keep working — the pre-engine\r\n * behaviour.\r\n */\r\n #applyPricePreference(\r\n payload: MicroflowSubmissionsPayload,\r\n reviewValues: WorkflowAdjudicationMicroFlowReviewValue[] | null,\r\n ): { rows: ISubmission[]; scale: PricePreferenceScale | null; chart?: AdjChartVm } {\r\n const { submissions, columnMapping } = payload;\r\n const nonResponsiveIds = new Set(\r\n (reviewValues ?? [])\r\n .filter((v) => v.adj_microFlow_review === 'non-compliant')\r\n .map((v) => v.id),\r\n );\r\n const result = computePricePreference(submissions, {\r\n priceKey: columnMapping.responsePriceKey,\r\n nonResponsiveIds,\r\n estimatedProcurementValue: payload.estimatedProcurementValue,\r\n scaleOverride: parsePreferenceScale(payload.adjudicationPricePreferenceCalculationFormula),\r\n });\r\n if (!result.computed) {\r\n this.#priceScores = null;\r\n return { rows: submissions, scale: null };\r\n }\r\n const calcKey = columnMapping.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation';\r\n this.#priceScores = new Map(\r\n Array.from(result.scores, ([id, score]) => [id, score.points] as const),\r\n );\r\n return {\r\n scale: result.scale,\r\n chart: this.#buildPriceChart(submissions, columnMapping, result),\r\n rows: submissions.map((row) => {\r\n const score = result.scores.get(row.id);\r\n if (!score) return row;\r\n return { ...row, [calcKey]: score.points, [ABNORMALLY_LOW_FLAG_KEY]: score.abnormallyLow };\r\n }),\r\n };\r\n }\r\n\r\n /**\r\n * Projects an engine pass into the shared adjudication chart: one price bar\r\n * and one points bar per bid on a shared axis, the responsive median and\r\n * the abnormally-low cutoff (median − 15%) as reference lines, and a\r\n * per-bid drift note so the chart SAYS why a bid is flagged, not just\r\n * paints it amber. Rows without a usable price are left off and counted in\r\n * the footnote.\r\n */\r\n #buildPriceChart(\r\n submissions: ISubmission[],\r\n columnMapping: AdjResponseReviewColumnMapping,\r\n result: PricePreferenceResult,\r\n ): AdjChartVm | undefined {\r\n if (result.scale === null) return undefined;\r\n const scale = result.scale;\r\n const priceKey = columnMapping.responsePriceKey || DEFAULT_RESPONSE_PRICE_KEY;\r\n\r\n const priced = submissions\r\n .map((row) => {\r\n const price = Number(row[priceKey]);\r\n const score = result.scores.get(row.id);\r\n if (!Number.isFinite(price) || price <= 0 || !score) return null;\r\n return { row, price, score };\r\n })\r\n .filter((entry): entry is NonNullable<typeof entry> => entry !== null)\r\n .sort((a, b) => a.price - b.price);\r\n if (priced.length === 0) return undefined;\r\n\r\n const median = result.median;\r\n const cutoff = median !== null ? median * (1 - DEFAULT_ABNORMALLY_LOW_FRACTION) : null;\r\n // 5% headroom so the longest bar never kisses the edge; the median line\r\n // must always sit inside the axis even when every bid is below it.\r\n const axisMax = Math.max(priced[priced.length - 1]!.price, median ?? 0) * 1.05;\r\n const pct = (value: number): number => Math.round((value / axisMax) * 1000) / 10;\r\n const rand = (value: number): string =>\r\n `R ${value.toLocaleString('en-ZA', { maximumFractionDigits: 2 })}`;\r\n\r\n const unpriced = submissions.length - priced.length;\r\n return {\r\n caption: `Thick bar = tendered price · thin bar = points for price (0–${scale}). ` +\r\n (median !== null\r\n ? 'Bids left of the −15% line sit in the shaded zone: abnormally low against the median.'\r\n : ''),\r\n zonePct: cutoff !== null ? pct(cutoff) : undefined,\r\n refs: [\r\n ...(median !== null ? [{ label: 'median', pct: pct(median), kind: 'neutral' as const }] : []),\r\n ...(cutoff !== null ? [{ label: '−15%', pct: pct(cutoff), kind: 'warning' as const }] : []),\r\n ],\r\n legend: [\r\n { label: 'Tendered price', kind: 'primary' },\r\n { label: 'Abnormally low — investigate', kind: 'warning' },\r\n { label: `Points for price (0–${scale})`, kind: 'secondary' },\r\n ],\r\n footnote: unpriced > 0\r\n ? `${unpriced} submission(s) carry no usable price under “${priceKey}” and are not charted.`\r\n : undefined,\r\n rows: priced.map(({ row, price, score }) => {\r\n const drift = median !== null ? ((price - median) / median) * 100 : null;\r\n return {\r\n id: row.id,\r\n name: String(row[columnMapping.respondentNameKey] ?? row.id),\r\n primaryPct: pct(price),\r\n primaryLabel: rand(price),\r\n secondaryPct: Math.round((score.points / scale) * 1000) / 10,\r\n secondaryLabel: `${score.points.toFixed(2)} pts`,\r\n state: score.nonResponsive ? 'muted' : score.abnormallyLow ? 'warning' : 'normal',\r\n note: score.nonResponsive\r\n ? 'non-compliant — excluded from benchmark'\r\n : score.abnormallyLow && drift !== null\r\n ? `${Number((-drift).toFixed(1))}% below median — investigate`\r\n : undefined,\r\n };\r\n }),\r\n };\r\n }\r\n\r\n /**\r\n * Single funnel for every review emission. Re-stamps each record with the\r\n * engine's CURRENT points before it leaves the component, so a verdict that\r\n * shifted Pmin updates the committed score of EVERY record in the same\r\n * emission — the saved value can never carry a score computed against a\r\n * superseded Pmin (engine rule 2, extended to the audit trail). A no-op in\r\n * host-stamped mode.\r\n */\r\n #emitReview(\r\n values: WorkflowAdjudicationMicroFlowReviewValue[],\r\n ): WorkflowAdjudicationMicroFlowReviewValue[] {\r\n const scores = this.#priceScores;\r\n const stamped = !scores\r\n ? values\r\n : values.map((v) => {\r\n const points = scores.get(v.id);\r\n return points === undefined || v.adjudicationPricePreferenceCalculation === points\r\n ? v\r\n : { ...v, adjudicationPricePreferenceCalculation: points };\r\n });\r\n this.reviewChange.emit(stamped);\r\n return stamped;\r\n }\r\n\r\n loadMicroSubmissions(): void {\r\n this.#refreshTrigger.next();\r\n }\r\n\r\n /**\r\n * REFACTORED: Now accepts `reviewValues` as a parameter instead of relying on `this.value`.\r\n */\r\n #enrichSubmissionsData(\r\n submissions: ISubmission[],\r\n cols: AdjResponseReviewColumnMapping,\r\n reviewValues: WorkflowAdjudicationMicroFlowReviewValue[] | null\r\n ): ISubmission[] {\r\n const numberSets = new Map<string, number[]>();\r\n numberSets.set(\r\n cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation',\r\n submissions.map((s) => Number(s[cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation'] || 0))\r\n );\r\n // NOTE(phase-4): the legacy fallback assigns review-value rows into a submission-shaped slot —\r\n // the two only share `id`, so most downstream property reads degrade to undefined. Preserved\r\n // for behavioural parity. `ISubmission` extends `Record<string, any>`, so review-value entries\r\n // satisfy the structural shape (with most fields as undefined). Flagged as a pre-existing\r\n // latent defect — out of scope for Phase 4 type tightening.\r\n const list: ReadonlyArray<ISubmission> = submissions.length > 0\r\n ? submissions\r\n : ((this.#value ?? []) as ReadonlyArray<ISubmission>);\r\n return list.map((submission: ISubmission) => {\r\n const priceCalcKey = cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation';\r\n const numbers = numberSets.get(priceCalcKey) || [];\r\n const color = numbers.length === 0 ? submission.adjudicationPricePreferenceCalculationColor : this.#getColorString(submission[priceCalcKey], numbers);\r\n const backgroundShades = numbers.length === 0 ? submission['backgroundShades'] : { [priceCalcKey]: this.#getScoreShade(color ?? '') };\r\n // Use the passed `reviewValues` argument. Notes stay `unknown` here —\r\n // they are forwarded as stored (legacy EditorJS payloads included); the\r\n // notes dialog migrates to Quill format on open via `toQuillNotes`.\r\n const submissionReview: Partial<WorkflowAdjudicationMicroFlowReviewValue> =\r\n reviewValues?.find((v) => v.id === submission.id) ?? {};\r\n\r\n return {\r\n ...submission,\r\n submissionIsReviewed: !!submissionReview,\r\n adj_microFlow_review_notes: submissionReview?.adj_microFlow_review_notes || '',\r\n submissionHasReviewNotes: !!submissionReview?.adj_microFlow_review_notes,\r\n adj_microFlow_review: submissionReview?.['adj_microFlow_review'],\r\n adjudicationPricePreferenceCalculationColor: color,\r\n adjudicationPricePreferenceCalculation: submission[cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation'],\r\n backgroundShades\r\n };\r\n });\r\n }\r\n\r\n #getColorString(target: number, numbers: number[]): string {\r\n return getColorForNumber(target, numbers, true);\r\n }\r\n\r\n #getScoreShade(rgbColor: string): string {\r\n if (!rgbColor) return '';\r\n return rgbColor.replace('rgb', 'rgba').replace(')', `, 0.1)`);\r\n }\r\n\r\n viewMicroSubmission(res: ISubmission): void {\r\n const alreadyInValue = this.#value?.find((v) => v.id === res.id);\r\n if (!alreadyInValue) {\r\n const newReview: WorkflowAdjudicationMicroFlowReviewValue = this.#buildReviewRecord(res, undefined);\r\n this.#emitReview([...(this.#value || []), newReview]);\r\n }\r\n this.#config.formBuilder['previewWorkflowDocument'](res.id);\r\n }\r\n\r\n /**\r\n * Builds a review record from a submission row. Status, createdAt and updatedAt are\r\n * all optional on the shared `WorkflowAdjudicationMicroFlowReviewValue` type, so\r\n * `undefined` flows through naturally without any casts.\r\n */\r\n #buildReviewRecord(res: ISubmission, status: AdjMicroFlowReviewStatus): WorkflowAdjudicationMicroFlowReviewValue {\r\n const cm = this.columnMapping;\r\n const createdAt: Date | undefined = res[cm?.responseDateKey || 'createdAt'] || undefined;\r\n const updatedAt: Date | undefined = res[cm?.responseDateKey || 'updatedAt'] || undefined;\r\n return {\r\n id: res.id,\r\n adj_microFlow_review: status,\r\n nameOfBidder: res[cm?.respondentNameKey || ''] || '',\r\n supplierNumber: res[cm?.respondentCodeKey || ''] || '',\r\n createdAt,\r\n updatedAt,\r\n adjudicationPricePreferenceCalculation: res[cm?.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation'] || 0,\r\n reference: res['reference'] || '',\r\n };\r\n }\r\n\r\n protected reviewStatuses = [\r\n {\r\n label: '✅ Compliant',\r\n value: 'compliant',\r\n color: 'var(--mat-sys-primary)',\r\n },\r\n {\r\n label: '❌ Non-compliant',\r\n value: 'non-compliant',\r\n color: 'var(--mat-sys-error)',\r\n },\r\n ];\r\n\r\n setResponseStatus(res: ISubmission, status: MatSelectChange): void {\r\n const alreadyInValue = this.#value?.find((v) => v.id === res.id);\r\n const statusValue = status.value as AdjMicroFlowReviewStatus;\r\n\r\n if (!alreadyInValue) {\r\n const newReview = this.#buildReviewRecord(res, statusValue);\r\n this.reachedMax(this.#emitReview([...(this.#value || []), newReview]));\r\n return;\r\n }\r\n const newValue = (this.#value || []).map((v) => {\r\n if (v.id === res.id) {\r\n return { ...v, adj_microFlow_review: statusValue };\r\n }\r\n return v;\r\n });\r\n\r\n this.reachedMax(this.#emitReview(newValue));\r\n }\r\n\r\n protected readonly maxLimit = computed(() => {\r\n const hasMax = this.inputConfig()?.maxLength;\r\n if (!hasMax || isNaN(Number(hasMax))) {\r\n return undefined;\r\n }\r\n return Number(hasMax);\r\n });\r\n\r\n reachedMax(newValue: WorkflowAdjudicationMicroFlowReviewValue[] | null): void {\r\n const hasMax = this.inputConfig()?.maxLength;\r\n if (!hasMax || isNaN(Number(hasMax))) {\r\n return; // No limit set, do nothin\r\n }\r\n const allCompetentSubmissions = newValue?.filter((v) => (v.adj_microFlow_review as unknown) === 'compliant').length || 0;\r\n if (!(allCompetentSubmissions >= (Number(hasMax) || 1))) {\r\n return;\r\n }\r\n const missingSubmission = this.submissions\r\n .filter((s) => !newValue?.find((v) => v.id === s.id))\r\n .map((s) => this.#buildReviewRecord(s, 'non-compliant'));\r\n const unique = new Set([...(newValue || []), ...missingSubmission]);\r\n this.#emitReview(Array.from(unique));\r\n }\r\n\r\n protected notesOpenForRowId: string | null = null;\r\n // FIX: A Map to hold notes being edited, keyed by row ID. This prevents shared state.\r\n\r\n /**\r\n * REFACTORED: Saves the notes from the `notesBeingEdited` map.\r\n */\r\n notesBlur(notesToSave: QuillContent | undefined): void {\r\n if (!this.notesOpenForRowId || !notesToSave) {\r\n this.notesOpenForRowId = null;\r\n return;\r\n }\r\n\r\n const alreadyInValue = this.#value?.find((v) => v.id === this.notesOpenForRowId);\r\n\r\n if (!alreadyInValue) {\r\n const newReview: WorkflowAdjudicationMicroFlowReviewValue = {\r\n id: this.notesOpenForRowId,\r\n adj_microFlow_review_notes: notesToSave,\r\n adj_microFlow_review: undefined,\r\n nameOfBidder: '',\r\n supplierNumber: '',\r\n createdAt: undefined,\r\n updatedAt: undefined,\r\n adjudicationPricePreferenceCalculation: 0,\r\n reference: '',\r\n };\r\n this.#emitReview([...(this.#value || []), newReview]);\r\n } else {\r\n const newValue = (this.#value ?? []).map((v) => {\r\n if (v.id === this.notesOpenForRowId) {\r\n return { ...v, adj_microFlow_review_notes: notesToSave };\r\n }\r\n return v;\r\n });\r\n this.#emitReview(newValue);\r\n }\r\n\r\n // Clean up and close the overlay\r\n }\r\n\r\n protected bulkOperations = [\r\n {\r\n label: '✅ Set all to Compliant',\r\n value: 'compliant',\r\n color: 'var(--mat-sys-primary)',\r\n },\r\n {\r\n label: '❌ Set all to Non-compliant',\r\n value: 'non-compliant',\r\n color: 'var(--mat-sys-error)',\r\n },\r\n {\r\n label: '🔄 Reset all ',\r\n value: 'reset',\r\n color: 'var(--mat-sys-secondary)',\r\n }\r\n ];\r\n\r\n protected readonly bulkStatus = computed(() => {\r\n // Re-read on submissions and value changes via the signal\r\n void this.#valueSignal();\r\n const allCompliant = this.submissions.every((s) => s['adj_microFlow_review'] === 'compliant');\r\n\r\n if (allCompliant) {\r\n return 'compliant';\r\n }\r\n\r\n const allNonCompliant = this.submissions.every((s) => s['adj_microFlow_review'] === 'non-compliant');\r\n if (allNonCompliant) {\r\n return 'non-compliant';\r\n }\r\n\r\n return 'mixed';\r\n });\r\n\r\n bulkStatusChanged(event: MatSelectChange): void {\r\n const newStatus = event.value;\r\n if (newStatus === 'reset') {\r\n this.#emitReview([]);\r\n return;\r\n }\r\n // Create a Map of existing values for efficient O(1) lookup\r\n const existingValueMap = new Map((this.#value ?? []).map(v => [v.id, v]));\r\n\r\n // Destructure column keys with fallbacks for cleaner access\r\n const {\r\n respondentNameKey = '',\r\n respondentCodeKey = '',\r\n responseDateKey = 'createdAt',\r\n responsePreferenceCalculationKey = 'adjudicationPricePreferenceCalculation',\r\n } = this.columnMapping || {};\r\n\r\n let allItems = this.submissions.map(s => {\r\n // Efficiently look up the existing value using the Map\r\n const existingValue = existingValueMap.get(s.id);\r\n\r\n // If it exists, spread its properties to preserve them and update the status\r\n if (existingValue) {\r\n return { ...existingValue, adj_microFlow_review: newStatus };\r\n }\r\n\r\n // Otherwise, create a new object from the submission data\r\n return {\r\n id: s.id,\r\n adj_microFlow_review: newStatus,\r\n nameOfBidder: s[respondentNameKey] || '',\r\n supplierNumber: s[respondentCodeKey] || '',\r\n createdAt: s[responseDateKey] || undefined,\r\n updatedAt: s[this.columnMapping?.responseDateKey || 'updatedAt'] || undefined,\r\n adjudicationPricePreferenceCalculation: s[responsePreferenceCalculationKey] || 0,\r\n reference: s['reference'] || '',\r\n };\r\n });\r\n\r\n // Apply the compliance limit if necessary\r\n const limit = this.maxLimit();\r\n if (limit !== undefined && newStatus === 'compliant') {\r\n // Sort by preference calculation, highest first\r\n allItems.sort((a, b) =>\r\n (b.adjudicationPricePreferenceCalculation ?? 0) - (a.adjudicationPricePreferenceCalculation ?? 0)\r\n );\r\n\r\n // Mark items beyond the limit as 'non-compliant'\r\n allItems = allItems.map((item, index) => {\r\n if (index >= limit) {\r\n return { ...item, adj_microFlow_review: 'non-compliant' };\r\n }\r\n return item;\r\n });\r\n }\r\n\r\n this.#emitReview(allItems as WorkflowAdjudicationMicroFlowReviewValue[]);\r\n }\r\n\r\n openNotes(row: ISubmission): void {\r\n this.notesOpenForRowId = row.id;\r\n\r\n const stringfiedTemplate = JSON.stringify(this.inputConfig()?.adjudicationReviewFeedbackTemplate);\r\n const template = stringfiedTemplate?.replace(/\\$bidderName/g, row[this.columnMapping?.respondentNameKey || ''])\r\n ?.replace(/\\$bidderCode/g, row[this.columnMapping?.respondentCodeKey || ''])\r\n ?.replace(/\\$responseDate/g, row[this.columnMapping?.responseDateKey || ''])\r\n ?.replace(/\\$responsePreferenceCalculation/g, row[this.columnMapping?.responsePreferenceCalculationKey || ''] || '0');\r\n\r\n this.dialog.open(\r\n SubmissionReviewDialogComponent, {\r\n height: 'fit-content',\r\n data: {\r\n row,\r\n respondentNameKey: this.columnMapping?.respondentNameKey || '',\r\n respondentCodeKey: this.columnMapping?.respondentCodeKey || '',\r\n readonly: this.inputConfig()?.readonly || false,\r\n // EditorJS-shaped in legacy step configs — the dialog migrates it.\r\n activeRowNotes: JSON.parse(template || '{}') as unknown\r\n },\r\n autoFocus: false,\r\n disableClose: true\r\n }).afterClosed().pipe(\r\n take(1),\r\n tap((result: QuillContent | undefined) => {\r\n this.notesBlur(result);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n ).subscribe();\r\n }\r\n\r\n canChangeStatus(row: ISubmission): boolean {\r\n if (row['adj_microFlow_review'] === 'compliant') return true;\r\n const maxLength = this.inputConfig()?.maxLength;\r\n // check if max exists and is a number\r\n if (!maxLength || isNaN(Number(maxLength))) {\r\n return true; // No limit set, allow status change\r\n }\r\n const allCompetentSubmissions = this.#value?.filter((v) => (v.adj_microFlow_review as unknown) === 'compliant').length || 0;\r\n return allCompetentSubmissions < (Number(maxLength) || 1);\r\n }\r\n}\r\n","@if (vm$ | async; as vm) {\r\n\r\n @if (vm.loading) {\r\n <div style=\"display: flex; justify-content: center; align-items: center; padding:24px;width: 100%;\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n } @else if (vm.error) {\r\n <div class=\"info-card error-card\">\r\n <!-- Heading stays cause-neutral: vm.error states WHICH half failed\r\n (the fetch vs. displaying data that did arrive). -->\r\n <h5 class=\"info-title\">❌ Unable to show submissions</h5>\r\n <p>{{ vm.error }}</p>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\">\r\n Try Again\r\n </button>\r\n </div>\r\n } @else {\r\n <lib-adjudication-shell label=\"Submission review\" [system]=\"vm.priceSystem\"\r\n [docsContext]=\"vm.docsContext\" [chart]=\"vm.priceChart\">\r\n @if (!vm.displayCols.length) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">⚙️ This step needs to be configured to show data.</h5>\r\n <ol>\r\n <li>\r\n <strong>Why you're seeing this:</strong>\r\n <ul>\r\n <li>This component is designed for a <strong>\"Submission Review\"</strong> workflow step.</li>\r\n <li>It's currently missing the required column setup.</li>\r\n </ul>\r\n </li>\r\n <li>\r\n <strong>What to do (for Administrators):</strong>\r\n To fix this, go to the <strong>Workflow Builder</strong> and for this specific step, <strong>map the display\r\n columns</strong> to the desired submission data (e.g., form fields or document keys).\r\n </li>\r\n </ol>\r\n </div>\r\n } @else if (!vm.submissions.length) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">ℹ️ There are no submissions to display.</h5>\r\n <ul>\r\n <li>This can happen if <strong>no one has responded</strong> yet, or if the <strong>submission closing date has\r\n passed</strong>.</li>\r\n <li>If you are expecting to see submissions, try clicking the <strong>Refresh</strong> button.</li>\r\n </ul>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\" class=\"load-button\">\r\n Refresh\r\n </button>\r\n </div>\r\n } @else {\r\n @if (!value() || (value()?.length ?? 0) === 0) {\r\n <!-- value() typed `any` per parent's mixed union; length check survives null -->\r\n\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">📝 How to Review Submissions</h5>\r\n <ol>\r\n <li>\r\n <strong>View Response:</strong> Click the <strong>Preview</strong> (<mat-icon\r\n class=\"smallIcon\">preview</mat-icon>) icon to see the full submission.\r\n </li>\r\n <li>\r\n <strong>Set Status:</strong> Use the dropdown to select <strong>Compliant</strong> or\r\n <strong>Non-compliant</strong>.\r\n </li>\r\n <li>\r\n <strong>Add Note (If Non-compliant):</strong>\r\n <ul>\r\n <li>If you select <strong>Non-compliant</strong>, you <strong>must</strong> add a note.</li>\r\n <li>Click the <strong>Add Note</strong> (<mat-icon class=\"smallIcon\">add_comment</mat-icon>) icon, write your\r\n feedback, and hit <strong>Save Feedback</strong>. Your note will be visible to the applicant.</li>\r\n </ul>\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n <table mat-table [dataSource]=\"vm.submissions\">\r\n @for (col of vm.displayColumns; track col.formControlName) {\r\n <ng-container [matColumnDef]=\"col.formControlName\">\r\n <th mat-header-cell *matHeaderCellDef style=\"padding:4px\">\r\n\r\n @if (col.formControlName === 'status' && !inputConfig()?.readonly) {\r\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\" style=\"width: 100%;\r\n margin-bottom: 8px;\r\n margin-top: 8px;\r\n border-radius:16px;\" appearance=\"outline\">\r\n <mat-label>\r\n Bulk Status Selection\r\n </mat-label>\r\n <mat-select\r\n [style.color]=\"bulkStatus() === 'non-compliant' ? 'var(--mat-sys-error)' : bulkStatus()==='compliant'? 'var(--mat-sys-primary)' : ''\"\r\n (selectionChange)=\"bulkStatusChanged($event)\" ngDefaultControl [value]=\"bulkStatus()\"\r\n placeholder=\" Select Status\">\r\n @for (type of bulkOperations || []; track type) {\r\n <mat-option [value]=\"type.value\">{{type.label}}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n } @else {\r\n {{ col.label }}\r\n }\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\" mat-ripple class=\"table-cell\" [class.selected-row]=\"selected === row.id\"\r\n (click)=\"$event.stopPropagation()\" [class.price-preference-cell]=\"true\"\r\n [style.border-bottom-color]=\"row.adjudicationPricePreferenceCalculationColor\"\r\n [style.background]=\"row.backgroundShades?.[col.formControlName]\">\r\n\r\n @if (col.formControlName === 'actions') {\r\n <span style=\"display: flex; align-items: center;\">\r\n <button matTooltipPosition=\"before\"\r\n [matTooltip]=\"`View and review **` + row[vm.columnMapping.respondentNameKey]+ `** 's' Submission`\"\r\n (click)=\"viewMicroSubmission(row)\" mat-icon-button>\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n @if (!(inputConfig()?.readonly) || (inputConfig()?.readonly) && !!row['submissionHasReviewNotes']) {\r\n <button (click)=\"openNotes(row)\" cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" matTooltipPosition=\"after\"\r\n [matTooltip]=\"\r\n `Add a review note for **` + row[vm.columnMapping.respondentNameKey] + `**`\" mat-icon-button>\r\n <mat-icon [style.color]=\"\r\n notesOpenForRowId === row.id ? 'var(--mat-sys-primary)' : (row['adj_microFlow_review']==='non-compliant' && !row['adj_microFlow_review_notes']?'var(--mat-sys-error)':'')\r\n \">\r\n {{ !row['submissionHasReviewNotes']? 'add_comment' : 'comment' }}\r\n </mat-icon>\r\n </button>\r\n }\r\n </span>\r\n } @else if (col.formControlName === 'status') {\r\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\" style=\"width: 100%;\r\n margin-bottom: 8px;\r\n margin-top: 8px;\r\n border-radius:16px;\" appearance=\"outline\">\r\n <mat-select [disabled]=\"!canChangeStatus(row) || inputConfig()?.readonly === true\"\r\n [style.color]=\"row['adj_microFlow_review'] === 'non-compliant' ? 'var(--mat-sys-error)' : row['adj_microFlow_review']==='compliant'? 'var(--mat-sys-primary)' : ''\"\r\n (selectionChange)=\"setResponseStatus(row,$event)\" ngDefaultControl [value]=\"row.adj_microFlow_review\"\r\n placeholder=\" Select Status\">\r\n @for (type of reviewStatuses || []; track type) {\r\n <mat-option [value]=\"type.value\">{{type.label}}</mat-option>\r\n }\r\n </mat-select>\r\n @if (row['adj_microFlow_review']==='non-compliant' && !row['adj_microFlow_review_notes']) {\r\n <mat-hint style=\"color:var(--mat-sys-error)\">\r\n Rejection reason is required. Add a review note.\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n @switch (col?.type) {\r\n @case ('daysAgo') {\r\n {{ row[col.formControlName] | daysAgo }}\r\n }\r\n @case ('number') {\r\n <div class=\"number-cell\">\r\n <span>\r\n {{ (row[col.formControlName] | number:'0.0-2' ) || 'N/A' }}\r\n </span>\r\n @if (row['adj_priceScore_abnormallyLow']) {\r\n <!-- Abnormally low tender: flagged for investigation,\r\n never auto-excluded (amber = act, no blame). -->\r\n <mat-icon class=\"alt-flag\"\r\n matTooltip=\"Abnormally low tender: this bid is priced well below the responsive pool. Investigate sustainability before scoring — if found non-responsive, mark it non-compliant and every score recalculates against the next lowest compliant bid.\">\r\n warning_amber\r\n </mat-icon>\r\n }\r\n @if (col.showColor) {\r\n <mat-icon [style.color]=\"row.adjudicationPricePreferenceCalculationColor\">\r\n fiber_manual_record\r\n </mat-icon>\r\n }\r\n </div>\r\n }\r\n @default {\r\n @if ($index === 0) {\r\n <span class=\"main-submission-text\">\r\n <mat-icon style=\"font-size: 1em;height:16px;width:16px\">domain</mat-icon>\r\n <strong>\r\n {{ row[col.formControlName] }}\r\n </strong>\r\n </span>\r\n <span class=\"secondary-text\">\r\n <mat-icon>fingerprint</mat-icon>\r\n {{row[vm.columnMapping.respondentCodeKey]}}\r\n <mat-icon>more_time</mat-icon>\r\n {{ row[vm.columnMapping.responseDateKey ||''] | daysAgo}}\r\n </span>\r\n } @else {\r\n {{ row[col.formControlName] }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"vm.displayCols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: vm.displayCols\"></tr>\r\n </table>\r\n }\r\n </lib-adjudication-shell>\r\n }\r\n\r\n}\r\n","import { AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, inject } from '@angular/core';\r\nimport {\r\n FormBuilder,\r\n FormControl,\r\n FormGroup,\r\n FormGroupDirective,\r\n NgForm,\r\n ReactiveFormsModule,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { ErrorStateMatcher } from '@angular/material/core';\r\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\nimport { Observable, map, startWith } from 'rxjs';\r\nimport { WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\r\n\r\nexport interface ScoreSheetGroup {\r\n key: string;\r\n name: string;\r\n}\r\n\r\nexport interface PointAssignmentDialogData {\r\n readonly: boolean;\r\n row: { nameOfBidder: string; adj_microFlow_assignedScore: Record<string, number> };\r\n scoreSheetGroups: ScoreSheetGroup[];\r\n groupedScoreSheet: Record<string, WorkflowAdjudicationScoreSheetValue[]>;\r\n existingScores: Record<string, Record<string, number | null>>;\r\n}\r\n\r\n/** Shows validation errors as soon as the control becomes dirty + invalid. */\r\nexport class ShowErrorOnDirtyMatcher implements ErrorStateMatcher {\r\n isErrorState(control: FormControl | null, _form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && control.dirty);\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'lib-point-assignment-dialog',\r\n templateUrl: './point-assignment-dialog.component.html',\r\n styleUrl: './point-assignment-dialog.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n AsyncPipe,\r\n ReactiveFormsModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatProgressBarModule,\r\n MatExpansionModule,\r\n MatDividerModule,\r\n ],\r\n})\r\nexport class PointAssignmentDialogComponent implements OnInit {\r\n protected readonly dialogRef = inject<MatDialogRef<PointAssignmentDialogComponent>>(MatDialogRef);\r\n protected readonly data = inject<PointAssignmentDialogData>(MAT_DIALOG_DATA);\r\n readonly #fb = inject(FormBuilder);\r\n\r\n protected pointsForm!: FormGroup;\r\n protected totalPoints$!: Observable<number>;\r\n protected maxPossiblePoints = 0;\r\n protected readonly matcher = new ShowErrorOnDirtyMatcher();\r\n\r\n ngOnInit(): void {\r\n this.#calculateMaxPoints();\r\n this.pointsForm = this.#buildForm();\r\n this.totalPoints$ = this.#createTotalPointsObservable();\r\n }\r\n\r\n protected correctMaxValue(event: Event, groupKey: string, controlId: string, maxPoints: number): void {\r\n const inputElement = event.target as HTMLInputElement;\r\n const currentValue = parseFloat(inputElement.value);\r\n\r\n if (currentValue > maxPoints) {\r\n this.pointsForm.get([groupKey, controlId])?.patchValue(maxPoints);\r\n }\r\n }\r\n\r\n #buildForm(): FormGroup {\r\n const groupOfGroups = this.data.scoreSheetGroups.reduce((acc, group) => {\r\n const scoresInGroup = this.data.groupedScoreSheet[group.key] || [];\r\n const groupControls = scoresInGroup.reduce((ctrls, score) => {\r\n const existingScore = this.data.row.adj_microFlow_assignedScore?.[score.id] ?? null;\r\n ctrls[score.id] = new FormControl(existingScore, [\r\n Validators.required,\r\n Validators.min(0),\r\n Validators.max(score.totalPoints),\r\n ]);\r\n return ctrls;\r\n }, {} as Record<string, FormControl>);\r\n acc[group.key] = this.#fb.group(groupControls);\r\n return acc;\r\n }, {} as Record<string, FormGroup>);\r\n return this.#fb.group(groupOfGroups);\r\n }\r\n\r\n #calculateMaxPoints(): void {\r\n this.maxPossiblePoints = Object.values(this.data.groupedScoreSheet)\r\n .flat()\r\n .reduce((acc, score) => acc + score.totalPoints, 0);\r\n }\r\n\r\n #createTotalPointsObservable(): Observable<number> {\r\n return this.pointsForm.valueChanges.pipe(\r\n startWith(this.pointsForm.value),\r\n map(formValue => {\r\n let total = 0;\r\n Object.values(formValue || {}).forEach((group: unknown) => {\r\n if (group && typeof group === 'object') {\r\n Object.values(group).forEach(score => {\r\n total += Number(score) || 0;\r\n });\r\n }\r\n });\r\n return total;\r\n }),\r\n );\r\n }\r\n}\r\n","<span mat-dialog-title>\r\n Assign Points for <span class=\"bidder-name\">{{ data.row['nameOfBidder'] }}</span>\r\n</span>\r\n @if( !data.readonly){\r\n<div class=\"dialog-instructions\">\r\n @if(!pointsForm.dirty && !pointsForm.touched){\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">💯 How to Assign Points\r\n\r\n </h5>\r\n <ol>\r\n <li>\r\n <strong>Enter a score</strong> for each item listed below.\r\n </li>\r\n <li>\r\n <strong>Follow the rules:</strong>\r\n <ul>\r\n <li>Your score cannot be higher than the maximum points shown (e.g., / 10).</li>\r\n <li>The <strong>\"Save Points\"</strong> button at the bottom will turn blue when everything is filled\r\n out correctly.</li>\r\n </ul>\r\n </li>\r\n <li>\r\n <strong>Click the blue \"Save Points\" button</strong> to finish.\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n @else {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">✍️ Editing Your Scores</h5>\r\n <ol>\r\n <li>\r\n <strong>You are viewing saved scores.</strong> To make a change, simply click on a score and type in a\r\n new number.\r\n </li>\r\n <li>\r\n The <strong>Total Points</strong> bar at the top will update as you make edits.\r\n </li>\r\n <li>\r\n Click <strong>\"Save Points\"</strong> to confirm your changes when you're done.\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n</div>\r\n\r\n }\r\n\r\n\r\n<mat-dialog-content style=\"padding-bottom: 8px;padding-bottom: 8px\" [formGroup]=\"pointsForm\">\r\n <div class=\"summary-bar\">\r\n <h3>Total Points: {{ totalPoints$ | async }} / {{ maxPossiblePoints }}</h3>\r\n <mat-progress-bar mode=\"determinate\"\r\n [value]=\"((totalPoints$ | async) || 0) / maxPossiblePoints * 100\"></mat-progress-bar>\r\n </div>\r\n\r\n <mat-accordion multi>\r\n @for (group of data.scoreSheetGroups; track group.key) {\r\n <mat-expansion-panel [expanded]=\"true\" [formGroupName]=\"group.key\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>{{ group.name }}</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n @for (score of data.groupedScoreSheet[group.key] || []; track score.id) {\r\n <div class=\"score-item\">\r\n <label [for]=\"score.id\" class=\"score-description\">{{ score.description }}</label>\r\n\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"score-input\">\r\n <mat-label>Score</mat-label>\r\n <input [disabled]=\"data.readonly\" matInput type=\"number\" placeholder=\"0\" [id]=\"score.id\"\r\n [formControlName]=\"score.id\" [max]=\"score.totalPoints\" min=\"0\" [errorStateMatcher]=\"matcher\"\r\n (input)=\"correctMaxValue($event, group.key, score.id, score.totalPoints)\" />\r\n <span matSuffix>\r\n <span style=\"min-width: 58px; display:flex\">\r\n / {{ score.totalPoints }}\r\n </span>\r\n </span>\r\n\r\n @if (pointsForm.get(group.key)?.get(score.id)?.hasError('required')) {\r\n <mat-error>A score is required.</mat-error>\r\n }\r\n @if (pointsForm.get(group.key)?.get(score.id)?.hasError('max')) {\r\n <mat-error>Score cannot exceed {{ score.totalPoints }}.</mat-error>\r\n }\r\n @if (pointsForm.get(group.key)?.get(score.id)?.hasError('min')) {\r\n <mat-error>Score cannot be negative.</mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n <mat-divider></mat-divider>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions align=\"end\">\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n @if( !data.readonly){\r\n <button mat-flat-button color=\"primary\" \r\n [mat-dialog-close]=\"pointsForm.getRawValue()\"\r\n [disabled]=\"pointsForm.invalid\">\r\n Save Points\r\n </button>\r\n }\r\n\r\n</mat-dialog-actions>","import { AsyncPipe, DecimalPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, computed, effect, inject, input, output, signal } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { BehaviorSubject, Observable, combineLatest, map, of, shareReplay, switchMap, take, tap } from 'rxjs';\r\n\r\nimport { AdjResponseReviewColumnMapping, AdjudicationSteps, ITowerStepColumn, WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens';\r\nimport { AdjChartVm } from '../adjudication-chart/adjudication-chart.component';\r\nimport { AdjudicationDocsContext } from '../adjudication-docs/adjudication-docs.component';\r\nimport { AdjudicationShellComponent } from '../adjudication-shell/adjudication-shell.component';\r\nimport { MicroflowSubmissionsPayload, describeError, microflowFetchStates } from '../../microflow-fetch';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\nimport { getColorForNumber } from '../../../../../../shared/functions/mapColors';\r\nimport { DaysAgoPipe } from '../../../../../../shared/pipes/date/days-ago.pipe';\r\nimport { ISubmission, tableCols } from '../submission-review/submission-review.component';\r\nimport { PointAssignmentDialogComponent } from './elements/point-assignment-dialog/point-assignment-dialog.component';\r\n\r\nexport interface IViewModel {\r\n submissions: ISubmission[];\r\n columnMapping: AdjResponseReviewColumnMapping;\r\n displayColumns?: tableCols[];\r\n displayCols: string[];\r\n loading: boolean;\r\n groupedScoreSheet?: Record<string, WorkflowAdjudicationScoreSheetValue[]>;\r\n scoreSheetGroups?: { name: string; key: string }[];\r\n error?: string;\r\n /** Context the shell's guide adapts its content to. */\r\n docsContext: AdjudicationDocsContext;\r\n /** Points chart for the shell; undefined when there is nothing to plot. */\r\n chart?: AdjChartVm;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-point-assignment',\r\n templateUrl: './point-assignment.component.html',\r\n styleUrls: ['./point-assignment.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n AsyncPipe,\r\n DecimalPipe,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n DaysAgoPipe,\r\n AdjudicationShellComponent,\r\n ],\r\n})\r\nexport class PointAssignmentComponent {\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #dialog = inject(MatDialog);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n readonly #refreshTrigger = new BehaviorSubject<void>(undefined);\r\n // A stream to push updates of the review values (`this.value`)\r\n readonly #valueChanges$ = new BehaviorSubject<unknown[] | null>([]);\r\n\r\n readonly #initialState: IViewModel = {\r\n loading: true,\r\n submissions: [],\r\n columnMapping: {} as AdjResponseReviewColumnMapping,\r\n displayCols: [],\r\n displayColumns: [],\r\n error: undefined,\r\n docsContext: { step: AdjudicationSteps.PointAssignment },\r\n };\r\n\r\n readonly #valueSignal = signal<unknown[] | null>([]);\r\n\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n // NOTE(phase-4): Trap 6 — parent (`workflow-adjudication-reactive-input`) binds a\r\n // `WorkflowAdjudicationValue | null` union of three incompatible shapes. Until the parent\r\n // template is split per adjudication step type, this input must remain `any`; narrow\r\n // inside `valueBridge`.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n protected readonly valueBridge = effect(() => {\r\n const raw = this.value();\r\n const next: unknown[] = Array.isArray(raw) ? raw : [];\r\n if (_isEqual(next, this.#valueSignal())) return;\r\n this.#valueSignal.set(next);\r\n this.#valueChanges$.next(next);\r\n });\r\n\r\n // NOTE(phase-4): Trap 6 — emitter forwards enriched `ISubmission[]` rows (with score-sheet\r\n // augmentation) back to the parent which then writes through the `WorkflowAdjudicationValue`\r\n // union. D-013: the parent (`workflow-adjudication-reactive-input`) `(pointsChange)=\"setValue($event)\"`\r\n // binding only typechecks under strictTemplates if `$event` is assignable to that union; the\r\n // enriched `ISubmission[]` payload matches no single branch (missing formControlName/totalPoints/\r\n // description), so the emitted type must stay `any[]` to preserve parity. Narrows when the parent\r\n // template is split per adjudication step type.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this emitter.\r\n readonly pointsChange = output<any[]>();\r\n\r\n // One fetch per trigger; failures become 'failed' states instead of killing\r\n // the stream, so \"Try Again\" genuinely refetches. See `microflowFetchStates`.\r\n readonly #fetchedData$ = microflowFetchStates(this.#refreshTrigger, () =>\r\n this.#config.formBuilder.getCurrentStepMicroflowSubmissions(),\r\n );\r\n\r\n /**\r\n * Combines the fetched data with the ongoing stream of local score changes.\r\n * Failure is reported per branch — a fetch error and a projection error\r\n * render different messages, so a bug in the enrich pass can never\r\n * masquerade as \"the server call failed\".\r\n */\r\n protected readonly vm$: Observable<IViewModel> = combineLatest([\r\n this.#fetchedData$,\r\n this.#valueChanges$,\r\n ]).pipe(\r\n map(([fetched, reviewValues]): IViewModel => {\r\n if (fetched.status === 'loading') {\r\n return this.#initialState;\r\n }\r\n if (fetched.status === 'failed') {\r\n return {\r\n ...this.#initialState,\r\n loading: false,\r\n error: `Could not load submissions: ${fetched.reason}`,\r\n };\r\n }\r\n try {\r\n return this.#buildViewModel(fetched.payload, reviewValues);\r\n } catch (error: unknown) {\r\n // The data DID arrive — surface a display failure with the real\r\n // reason instead of swallowing it into a generic load message.\r\n return {\r\n ...this.#initialState,\r\n loading: false,\r\n error: `Submissions were received but could not be displayed: ${describeError(error)}`,\r\n };\r\n }\r\n }),\r\n shareReplay(1),\r\n );\r\n\r\n /**\r\n * Projects a successful fetch plus the current local score values into the\r\n * view model. A throw here is caught by `vm$` and reported as a display\r\n * failure — never as a load failure.\r\n */\r\n #buildViewModel(payload: MicroflowSubmissionsPayload, reviewValues: unknown[] | null): IViewModel {\r\n const { columnMapping, submissions, scoreSheet } = payload;\r\n // group scoresheet by pointType\r\n const groupedScoreSheet = (scoreSheet || []).reduce((acc, curr) => {\r\n const pointType = curr.pointType || 'default';\r\n if (!acc[pointType]) {\r\n acc[pointType] = [];\r\n }\r\n acc[pointType].push(curr);\r\n return acc;\r\n }, {} as Record<string, WorkflowAdjudicationScoreSheetValue[]>);\r\n\r\n const enriched = this.#enrichSubmissionsData(submissions || [], reviewValues);\r\n return {\r\n docsContext: {\r\n step: AdjudicationSteps.PointAssignment,\r\n hasScoreSheet: (scoreSheet?.length ?? 0) > 0,\r\n },\r\n chart: this.#buildPointsChart(enriched, columnMapping, scoreSheet),\r\n submissions: enriched,\r\n loading: false,\r\n error: undefined,\r\n groupedScoreSheet,\r\n scoreSheetGroups: Object.keys(groupedScoreSheet).map((key) => ({\r\n name: key.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/([A-Z])([A-Z][a-z])/g, '$1 $2'),\r\n key,\r\n })),\r\n columnMapping,\r\n displayCols: [\r\n 'nameOfBidder',\r\n 'adj_microFlow_review',\r\n 'adjudicationPricePreferenceCalculation',\r\n 'adj_microFlow_scoreSheetTotalPoints',\r\n 'actions',\r\n ],\r\n displayColumns: [\r\n { label: 'name', formControlName: 'nameOfBidder', type: 'string' } as tableCols,\r\n { label: 'Pref Calc', formControlName: 'adjudicationPricePreferenceCalculation', type: 'number', showColor: true } as tableCols,\r\n { label: 'status', formControlName: 'adj_microFlow_review', type: 'string' } as tableCols,\r\n { label: 'Score', formControlName: 'adj_microFlow_scoreSheetTotalPoints', type: 'number', showColor: true } as tableCols,\r\n { label: '', formControlName: 'actions', type: 'string' } as tableCols,\r\n ],\r\n };\r\n }\r\n\r\n protected readonly readonly = computed(() => this.inputConfig()?.readonly ?? false);\r\n\r\n /**\r\n * Points chart for the shell: score-sheet points as the primary bar (axis\r\n * 0–total possible) and points for price as the thin secondary bar (its own\r\n * 0–100 scale), sorted best score first. Undefined when no sheet total\r\n * exists — the chart button hides with it.\r\n */\r\n #buildPointsChart(\r\n rows: ISubmission[],\r\n columnMapping: AdjResponseReviewColumnMapping,\r\n scoreSheet: WorkflowAdjudicationScoreSheetValue[] | undefined,\r\n ): AdjChartVm | undefined {\r\n const totalPossible = (scoreSheet ?? []).reduce((acc, s) => acc + (Number(s.totalPoints) || 0), 0);\r\n if (rows.length === 0 || totalPossible <= 0) return undefined;\r\n\r\n const pct = (value: number, max: number): number =>\r\n Math.max(0, Math.min(100, Math.round((value / max) * 1000) / 10));\r\n const sorted = [...rows].sort(\r\n (a, b) =>\r\n Number(b['adj_microFlow_scoreSheetTotalPoints'] ?? 0) -\r\n Number(a['adj_microFlow_scoreSheetTotalPoints'] ?? 0),\r\n );\r\n return {\r\n caption: `Bar = score-sheet points awarded (0–${totalPossible}) · thin bar = points for price (0–100 scale).`,\r\n refs: [],\r\n legend: [\r\n { label: `Score-sheet points (0–${totalPossible})`, kind: 'primary' },\r\n { label: 'Points for price (0–100)', kind: 'secondary' },\r\n ],\r\n rows: sorted.map((row) => {\r\n const points = Number(row['adj_microFlow_scoreSheetTotalPoints'] ?? 0);\r\n const price = Number(row['adjudicationPricePreferenceCalculation'] ?? 0);\r\n // Enrich maps the review verdict to ✅/❌ for the table.\r\n const nonCompliant = row['adj_microFlow_review'] === '❌';\r\n return {\r\n id: row.id,\r\n name: String(row[columnMapping?.respondentNameKey || 'nameOfBidder'] ?? row['nameOfBidder'] ?? row.id),\r\n primaryPct: pct(points, totalPossible),\r\n primaryLabel: `${Number(points.toFixed(2))}/${totalPossible} pts`,\r\n secondaryPct: pct(price, 100),\r\n secondaryLabel: `${Number(price.toFixed(2))} price pts`,\r\n state: nonCompliant ? 'muted' : 'normal',\r\n note: nonCompliant ? 'non-compliant' : undefined,\r\n };\r\n }),\r\n };\r\n }\r\n\r\n loadMicroSubmissions(): void {\r\n this.#refreshTrigger.next();\r\n }\r\n\r\n viewMicroSubmission(res: { id: string }): void {\r\n this.#config.formBuilder['previewWorkflowDocument'](res.id);\r\n }\r\n\r\n #enrichSubmissionsData(submissions: ISubmission[], reviewValues: unknown[] | null): ISubmission[] {\r\n const numberSets = new Map<string, number[]>();\r\n numberSets.set(\r\n 'adjudicationPricePreferenceCalculation',\r\n submissions.map((s) => Number(s['adjudicationPricePreferenceCalculation'] || 0)),\r\n );\r\n const list = submissions.length > 0 ? submissions : ((reviewValues as ISubmission[]) || []);\r\n return list.map((submission) => {\r\n const numbers = numberSets.get('adjudicationPricePreferenceCalculation') || [];\r\n const color = numbers.length === 0\r\n ? submission['adjudicationPricePreferenceCalculationColor']\r\n : this.#getColorString(submission['adjudicationPricePreferenceCalculation'], numbers);\r\n const backgroundShades = { ['adjudicationPricePreferenceCalculation']: this.#getScoreShade(color ?? '') };\r\n const existing = (this.#valueSignal() as ISubmission[] | null)?.find((v) => v.id === submission.id);\r\n return {\r\n ...submission,\r\n adj_microFlow_review: submission['adj_microFlow_review'] === 'compliant' ? '✅' : '❌',\r\n adjudicationPricePreferenceCalculationColor: color,\r\n backgroundShades,\r\n ...existing,\r\n };\r\n });\r\n }\r\n\r\n #getScoreShade(rgbColor: string): string {\r\n if (!rgbColor) return '';\r\n return rgbColor.replace('rgb', 'rgba').replace(')', `, 0.1)`);\r\n }\r\n\r\n #getColorString(target: number, numbers: number[]): string {\r\n return getColorForNumber(target, numbers, true);\r\n }\r\n\r\n openPointAssignmentDialog(\r\n row: ISubmission,\r\n groupedScoreSheet: Record<string, WorkflowAdjudicationScoreSheetValue[]> | undefined,\r\n scoreSheetGroups: { name: string; key: string }[] | undefined,\r\n ): void {\r\n this.#dialog\r\n .open(PointAssignmentDialogComponent, {\r\n height: 'fit-content',\r\n data: {\r\n row,\r\n groupedScoreSheet,\r\n scoreSheetGroups,\r\n readonly: this.inputConfig()?.readonly || false,\r\n },\r\n autoFocus: false,\r\n disableClose: true,\r\n })\r\n .afterClosed()\r\n .pipe(\r\n take(1),\r\n switchMap((result: Record<string, Record<string, number>> | undefined) => {\r\n if (!result) return of(null);\r\n // Update the value with the new point assignments\r\n const assignment = Object.values(result).reduce((acc, curr) => {\r\n acc = { ...acc, ...curr };\r\n return acc;\r\n }, {} as Record<string, number>);\r\n row['adj_microFlow_assignedScore'] = assignment;\r\n const currentList = (this.#valueSignal() as ISubmission[] | null) ?? [];\r\n const alreadyInValue = currentList.find((v) => v.id === row.id);\r\n let newValue: ISubmission[];\r\n if (!alreadyInValue) {\r\n newValue = [\r\n ...currentList,\r\n {\r\n ...row,\r\n adj_microFlow_assignedScore: assignment,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(assignment).reduce((acc, curr) => acc + curr, 0),\r\n },\r\n ];\r\n } else {\r\n newValue = currentList.map((v) => {\r\n if (v.id === row.id) {\r\n return {\r\n ...v,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(assignment).reduce((acc, curr) => acc + curr, 0),\r\n adj_microFlow_assignedScore: assignment,\r\n };\r\n }\r\n return v;\r\n });\r\n }\r\n return of(newValue);\r\n }),\r\n tap((newValue) => {\r\n if (!newValue || this.inputConfig()?.readonly) return;\r\n this.pointsChange.emit(newValue);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n}\r\n","@if (vm$ | async; as vm) {\r\n @if (vm.loading) {\r\n <div style=\"display: flex; justify-content: center; align-items: center; padding:24px;width: 100%;\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n } @else if (vm.error) {\r\n <div class=\"info-card error-card\">\r\n <!-- Heading stays cause-neutral: vm.error states WHICH half failed\r\n (the fetch vs. displaying data that did arrive). -->\r\n <h5 class=\"info-title\">❌ Unable to show submissions</h5>\r\n <p>{{ vm.error }}</p>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\">\r\n Try Again\r\n </button>\r\n </div>\r\n } @else {\r\n <lib-adjudication-shell label=\"Point assignment\" [docsContext]=\"vm.docsContext\" [chart]=\"vm.chart\">\r\n @if (vm.submissions.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">ℹ️ There are no submissions to display.</h5>\r\n <ul>\r\n <li>This can happen if <strong>no one has responded</strong> yet, or if <strong>none of the submission were\r\n compliant </strong>.</li>\r\n <li>If you are expecting to see submissions, try clicking the <strong>Refresh</strong> button.</li>\r\n </ul>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\" class=\"load-button\">\r\n Refresh\r\n </button>\r\n </div>\r\n } @else {\r\n @if (!value || value.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">📝 How to Review Submissions</h5>\r\n <ol>\r\n <li>\r\n <strong>View Response:</strong> Click the <strong>Preview</strong> (<mat-icon\r\n class=\"smallIcon\">preview</mat-icon>) icon to see the full submission.\r\n </li>\r\n <li>\r\n <strong>Set Status:</strong> Use the dropdown to select <strong>Compliant</strong> or\r\n <strong>Non-compliant</strong>.\r\n </li>\r\n <li>\r\n <strong>Add Note (If Non-compliant):</strong>\r\n <ul>\r\n <li>If you select <strong>Non-compliant</strong>, you <strong>must</strong> add a note.</li>\r\n <li>Click the <strong>Add Note</strong> (<mat-icon class=\"smallIcon\">add_comment</mat-icon>) icon, write your\r\n feedback, and hit <strong>Save Feedback</strong>. Your note will be visible to the applicant.</li>\r\n </ul>\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n <table mat-table [dataSource]=\"vm.submissions\">\r\n @for (col of vm.displayColumns; track col.formControlName) {\r\n <ng-container [matColumnDef]=\"col.formControlName\">\r\n <th mat-header-cell *matHeaderCellDef style=\"padding:4px\">\r\n {{ col.label }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\" mat-ripple class=\"table-cell\" (click)=\"$event.stopPropagation()\"\r\n [class.price-preference-cell]=\"true\"\r\n [style.border-bottom-color]=\"row.adjudicationPricePreferenceCalculationColor\"\r\n [style.background]=\"row.backgroundShades?.[col.formControlName]\">\r\n @if (col.formControlName === 'actions') {\r\n <span style=\"display: flex; align-items: center;\">\r\n <button matTooltipPosition=\"before\"\r\n [matTooltip]=\"'View and review **' + row[vm.columnMapping.respondentNameKey] + '\\'s\\' Submission'\"\r\n (click)=\"viewMicroSubmission(row)\" mat-icon-button>\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n </span>\r\n } @else if (col.formControlName === 'adj_microFlow_scoreSheetTotalPoints') {\r\n <button\r\n (click)=\"openPointAssignmentDialog(row, vm?.groupedScoreSheet, vm.scoreSheetGroups)\"\r\n [id]=\"row.id\" mat-stroked-button>\r\n {{ (row[col.formControlName] | number:'0.0-0') || 'Assign Points' }}\r\n </button>\r\n } @else {\r\n @switch (col?.type) {\r\n @case ('daysAgo') {\r\n {{ row[col.formControlName] | daysAgo }}\r\n }\r\n @case ('number') {\r\n {{ (row[col.formControlName] | number:'0.0-0') || 'N/A' }}\r\n }\r\n @default {\r\n @if ($index === 0) {\r\n <span class=\"main-submission-text\">\r\n <mat-icon style=\"font-size: 1em;height:16px;width:16px\">domain</mat-icon>\r\n <strong>\r\n {{ row[col.formControlName] }}\r\n </strong>\r\n </span>\r\n <span class=\"secondary-text\">\r\n <mat-icon>fingerprint</mat-icon>\r\n {{ row[vm.columnMapping.respondentCodeKey] }}\r\n <mat-icon>more_time</mat-icon>\r\n {{ row[vm.columnMapping.responseDateKey || ''] | daysAgo }}\r\n </span>\r\n } @else {\r\n {{ row[col.formControlName] }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"vm.displayCols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: vm.displayCols\"></tr>\r\n </table>\r\n }\r\n </lib-adjudication-shell>\r\n }\r\n}\r\n","import { AsyncPipe, DecimalPipe } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatDialog, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport {\r\n AdjResponseReviewColumnMapping,\r\n AdjudicationSteps,\r\n InputDataTypes,\r\n ITowerStepColumn,\r\n WorkflowAdjudicationScoreSheetValue,\r\n} from 'ngx-t-forms-types';\r\nimport {\r\n BehaviorSubject,\r\n Observable,\r\n combineLatest,\r\n map,\r\n of,\r\n shareReplay,\r\n switchMap,\r\n take,\r\n tap,\r\n} from 'rxjs';\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens';\r\nimport { AdjChartVm } from '../adjudication-chart/adjudication-chart.component';\r\nimport { AdjudicationShellComponent } from '../adjudication-shell/adjudication-shell.component';\r\nimport { MicroflowSubmissionsPayload, describeError, microflowFetchStates } from '../../microflow-fetch';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\nimport { getColorForNumber } from '../../../../../../shared/functions/mapColors';\r\nimport { DaysAgoPipe } from '../../../../../../shared/pipes/date/days-ago.pipe';\r\nimport { IViewModel } from '../point-assignment/point-assignment.component';\r\nimport { PointAssignmentDialogComponent } from '../point-assignment/elements/point-assignment-dialog/point-assignment-dialog.component';\r\nimport { ISubmission } from '../submission-review/submission-review.component';\r\n\r\n/**\r\n * NOTE(phase-4): the parent `workflow-adjudication-reactive-input` binds `value` from a union\r\n * of three adjudication payloads (score-sheet, micro-flow review, elected-supplier). This\r\n * component consumes the micro-flow review branch — until the parent splits its template by\r\n * `adjudicationStep` (Trap 6), the input must accept the broader shape (`unknown`) and narrow\r\n * via the `toSupplierValue` guard.\r\n *\r\n * NOTE(phase-4 shared-type drift): the shared `WorkflowAdjudicationMicroFlowReviewValue` does\r\n * not declare `adj_microFlow_supplierAppointed`, `adj_microFlow_assignedScore`, or\r\n * `adj_microFlow_scoreSheetTotalPoints`, but the runtime payload carries them through this\r\n * component. `SupplierRow` extends `ISubmission` (a `Record<string, any>`) and adds the known\r\n * fields for editor support; the shared type should be widened in a follow-up.\r\n */\r\ntype SupplierRow = ISubmission & {\r\n adj_microFlow_supplierAppointed?: boolean;\r\n adj_microFlow_assignedScore?: Record<string, number>;\r\n adj_microFlow_scoreSheetTotalPoints?: number;\r\n adj_microFlow_pointsAwarded?: number;\r\n adj_microFlow_pricePointCalculation?: number;\r\n colColors?: Record<string, string>;\r\n};\r\n\r\nfunction toSupplierValue(input: unknown): SupplierRow[] {\r\n // Runtime guard — the parent supplies a union of array / object payloads.\r\n return Array.isArray(input) ? (input as SupplierRow[]) : [];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-supplier-selection',\r\n templateUrl: './supplier-selection.component.html',\r\n styleUrl: './supplier-selection.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n AsyncPipe,\r\n DecimalPipe,\r\n FormsModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n DaysAgoPipe,\r\n AdjudicationShellComponent,\r\n ],\r\n})\r\nexport class SupplierSelectionComponent {\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n\r\n // Phase-4 TODO: parent (workflow-adjudication-reactive-input) accepts broader `WorkflowAdjudicationValue` union.\r\n // Emitting narrower `SupplierRow[]` is structurally compatible at runtime; output widened to `any` for template typecheck (Trap 6).\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n readonly supplierSelection = output<any>();\r\n\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #dialog = inject(MatDialog);\r\n\r\n readonly #refreshTrigger = new BehaviorSubject<void>(undefined);\r\n // A stream to push updates of the review values (`this.value`)\r\n readonly #valueChanges$ = new BehaviorSubject<SupplierRow[]>([]);\r\n\r\n readonly #initialState: IViewModel = {\r\n loading: true,\r\n submissions: [],\r\n columnMapping: {} as AdjResponseReviewColumnMapping,\r\n displayCols: [],\r\n displayColumns: [],\r\n error: undefined,\r\n docsContext: { step: AdjudicationSteps.SupplierSelection },\r\n };\r\n\r\n #value: SupplierRow[] = [];\r\n\r\n // NOTE(phase-4): Trap 6 — parent (`workflow-adjudication-reactive-input`) binds a\r\n // `WorkflowAdjudicationValue | null` union of three incompatible shapes. The template\r\n // also reads `value.length` directly. Until parent template is split per adjudication step\r\n // the input must remain `any`; narrow inside the `valueBridge` via `toSupplierValue`.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n protected readonly valueBridge = effect(() => {\r\n const next = toSupplierValue(this.value());\r\n if (_isEqual(next, this.#value)) return;\r\n this.#value = next;\r\n this.#valueChanges$.next(this.#value);\r\n });\r\n\r\n // One fetch per trigger; failures become 'failed' states instead of killing\r\n // the stream, so \"Try Again\" genuinely refetches. See `microflowFetchStates`.\r\n readonly #fetchedData$ = microflowFetchStates(this.#refreshTrigger, () =>\r\n this.#config.formBuilder.getCurrentStepMicroflowSubmissions(),\r\n );\r\n\r\n protected loadMicroSubmissions(): void {\r\n this.#refreshTrigger.next();\r\n }\r\n\r\n /**\r\n * Combines the fetched data with the ongoing stream of local appointment\r\n * changes. Failure is reported per branch — a fetch error and a projection\r\n * error render different messages, so a bug in the enrich/scoring pass can\r\n * never masquerade as \"the server call failed\".\r\n */\r\n protected readonly vm$: Observable<IViewModel> = combineLatest([\r\n this.#fetchedData$,\r\n this.#valueChanges$,\r\n ]).pipe(\r\n map(([fetched, reviewValues]): IViewModel => {\r\n if (fetched.status === 'loading') {\r\n return this.#initialState;\r\n }\r\n if (fetched.status === 'failed') {\r\n return {\r\n ...this.#initialState,\r\n loading: false,\r\n error: `Could not load submissions: ${fetched.reason}`,\r\n };\r\n }\r\n try {\r\n return this.#buildViewModel(fetched.payload, reviewValues);\r\n } catch (error: unknown) {\r\n // The data DID arrive — surface a display failure with the real\r\n // reason instead of swallowing it into a generic load message.\r\n return {\r\n ...this.#initialState,\r\n loading: false,\r\n error: `Submissions were received but could not be displayed: ${describeError(error)}`,\r\n };\r\n }\r\n }),\r\n shareReplay(1),\r\n );\r\n\r\n /**\r\n * Projects a successful fetch plus the current local appointment values into\r\n * the view model. A throw here is caught by `vm$` and reported as a display\r\n * failure — never as a load failure.\r\n */\r\n #buildViewModel(payload: MicroflowSubmissionsPayload, reviewValues: SupplierRow[]): IViewModel {\r\n const {\r\n columnMapping,\r\n submissions,\r\n scoreSheet,\r\n adjudicationPricePreferenceCalculationFormula,\r\n } = payload;\r\n //group scoreSheet by pointType\r\n const groupedScoreSheet = (scoreSheet || []).reduce(\r\n (acc, curr) => {\r\n const pointType = curr.pointType || 'default';\r\n if (!acc[pointType]) {\r\n acc[pointType] = [];\r\n }\r\n acc[pointType].push(curr);\r\n return acc;\r\n },\r\n {} as Record<string, WorkflowAdjudicationScoreSheetValue[]>,\r\n );\r\n const totalPossibleScore = (scoreSheet || []).reduce(\r\n (acc, curr) => acc + curr.totalPoints,\r\n 0,\r\n );\r\n\r\n const maxPointsAwarded: number =\r\n adjudicationPricePreferenceCalculationFormula ===\r\n '80(1-((totalBidPrice-Pmin)/(Pmin)))'\r\n ? 20\r\n : adjudicationPricePreferenceCalculationFormula ===\r\n '90(1-((totalBidPrice-Pmin)/(Pmin)))'\r\n ? 10\r\n : 100;\r\n const enriched = this.#enrichSubmissionsData(\r\n submissions || [],\r\n reviewValues,\r\n totalPossibleScore,\r\n maxPointsAwarded,\r\n );\r\n return {\r\n docsContext: {\r\n step: AdjudicationSteps.SupplierSelection,\r\n system: `${100 - maxPointsAwarded}/${maxPointsAwarded}`,\r\n hasScoreSheet: (scoreSheet?.length ?? 0) > 0,\r\n },\r\n chart: this.#buildTotalsChart(enriched, columnMapping, maxPointsAwarded),\r\n submissions: enriched,\r\n loading: false,\r\n error: undefined,\r\n groupedScoreSheet,\r\n\r\n scoreSheetGroups: Object.keys(groupedScoreSheet).map((key) => ({\r\n name: key\r\n .replace(/([a-z])([A-Z])/g, '$1 $2')\r\n .replace(/([A-Z])([A-Z][a-z])/g, '$1 $2'),\r\n key: key,\r\n })),\r\n maxPointsAwarded,\r\n totalPossibleScore,\r\n columnMapping: columnMapping,\r\n displayCols: [\r\n 'nameOfBidder',\r\n 'adjudicationPricePreferenceCalculation',\r\n 'adj_microFlow_pointsAwarded',\r\n 'adj_microFlow_pricePointCalculation',\r\n\r\n 'actions',\r\n 'adj_microFlow_supplierAppointed',\r\n ],\r\n displayColumns: [\r\n { label: 'name', formControlName: 'nameOfBidder', type: InputDataTypes.String },\r\n {\r\n label: `${100 - maxPointsAwarded}`,\r\n formControlName: 'adjudicationPricePreferenceCalculation',\r\n type: InputDataTypes.Number,\r\n },\r\n {\r\n label: `${maxPointsAwarded}`,\r\n formControlName: 'adj_microFlow_pointsAwarded',\r\n type: InputDataTypes.Number,\r\n },\r\n {\r\n label: 'Total',\r\n formControlName: 'adj_microFlow_pricePointCalculation',\r\n type: InputDataTypes.Number,\r\n },\r\n // `actions` is an internal cell type used by the template `@switch`; widened locally in `tableCols`.\r\n { label: '', formControlName: 'actions', type: 'actions' as const },\r\n {\r\n label: 'Appointed',\r\n formControlName: 'adj_microFlow_supplierAppointed',\r\n type: InputDataTypes.Boolean,\r\n showColor: true,\r\n },\r\n ],\r\n } as IViewModel;\r\n }\r\n\r\n protected viewMicroSubmission(res: ISubmission): void {\r\n this.#config.formBuilder['previewWorkflowDocument'](res.id);\r\n }\r\n\r\n /**\r\n * Final-score chart for the shell: the combined price + points total as the\r\n * primary bar (axis 0–100) and the scaled score-sheet award as the thin\r\n * secondary bar (0–maxPointsAwarded), sorted best total first. The\r\n * appointed supplier is annotated on its row.\r\n */\r\n #buildTotalsChart(\r\n rows: SupplierRow[],\r\n columnMapping: AdjResponseReviewColumnMapping,\r\n maxPointsAwarded: number,\r\n ): AdjChartVm | undefined {\r\n if (rows.length === 0) return undefined;\r\n const pct = (value: number, max: number): number =>\r\n Math.max(0, Math.min(100, Math.round((value / max) * 1000) / 10));\r\n const sorted = [...rows].sort(\r\n (a, b) =>\r\n Number(b['adj_microFlow_pricePointCalculation'] ?? 0) -\r\n Number(a['adj_microFlow_pricePointCalculation'] ?? 0),\r\n );\r\n return {\r\n caption: `Bar = final score out of 100 (price + scaled score-sheet points) · thin bar = score-sheet award (0–${maxPointsAwarded}).`,\r\n refs: [],\r\n legend: [\r\n { label: 'Final score (0–100)', kind: 'primary' },\r\n { label: `Score-sheet award (0–${maxPointsAwarded})`, kind: 'secondary' },\r\n ],\r\n rows: sorted.map((row) => {\r\n const total = Number(row['adj_microFlow_pricePointCalculation'] ?? 0);\r\n const awarded = Number(row['adj_microFlow_pointsAwarded'] ?? 0);\r\n return {\r\n id: row.id,\r\n name: String(row[columnMapping?.respondentNameKey || 'nameOfBidder'] ?? row['nameOfBidder'] ?? row.id),\r\n primaryPct: pct(total, 100),\r\n primaryLabel: `${Number(total.toFixed(2))}/100`,\r\n secondaryPct: pct(awarded, maxPointsAwarded),\r\n secondaryLabel: `${Number(awarded.toFixed(2))}/${maxPointsAwarded} awarded`,\r\n state: 'normal' as const,\r\n note: row['adj_microFlow_supplierAppointed'] === true ? 'Appointed' : undefined,\r\n };\r\n }),\r\n };\r\n }\r\n\r\n #enrichSubmissionsData(\r\n submissions: ISubmission[],\r\n value: SupplierRow[],\r\n totalPossibleScore: number,\r\n maxPointsAwarded: number,\r\n ): SupplierRow[] {\r\n // 1. Handle edge cases first for clarity.\r\n\r\n // 2. Improve performance by creating a lookup map to avoid O(n^2) complexity.\r\n // This is much faster than using .find() inside a loop.\r\n const valueMap = new Map<string, SupplierRow>(\r\n this.#value?.map((v) => [v.id, v]) || [],\r\n );\r\n const list: ISubmission[] = submissions.length > 0 ? submissions : (value || []);\r\n // 3. First pass: Enrich submissions with calculated scores.\r\n const enrichedSubmissions: SupplierRow[] = list.map((submission) => {\r\n const v = valueMap.get(submission.id);\r\n\r\n // Use nullish coalescing (??) for cleaner fallback logic.\r\n const totalPoints =\r\n (v?.['adj_microFlow_scoreSheetTotalPoints'] as number | undefined) ??\r\n (submission?.['adj_microFlow_scoreSheetTotalPoints'] as number | undefined) ??\r\n 0;\r\n\r\n // Simplify calculation: remove unnecessary try-catch. Division by zero in JS results\r\n // in Infinity, not an error. The check for totalPossibleScore > 0 handles this.\r\n const pointsAwarded =\r\n totalPossibleScore > 0\r\n ? (totalPoints / totalPossibleScore) * maxPointsAwarded\r\n : 0;\r\n\r\n const pricePointCalculation =\r\n (Number(submission['adjudicationPricePreferenceCalculation'] ?? 0)) + pointsAwarded;\r\n\r\n return {\r\n ...submission,\r\n ...v,\r\n adj_microFlow_pointsAwarded: pointsAwarded,\r\n adj_microFlow_pricePointCalculation: pricePointCalculation,\r\n };\r\n });\r\n\r\n // 4. Define keys to process to avoid repetition (DRY principle).\r\n const keysToColor = ['adj_microFlow_pricePointCalculation'] as const;\r\n\r\n // 5. Correctly build the number sets from the *newly enriched* data.\r\n const numberSets = new Map<string, number[]>();\r\n for (const key of keysToColor) {\r\n const values = enrichedSubmissions.map((s) => Number(s[key] ?? 0));\r\n numberSets.set(key, values);\r\n }\r\n\r\n // 6. Second pass: Add colors and shades based on the complete dataset.\r\n return enrichedSubmissions.map((submission) => {\r\n const colColors: Record<string, string> = {};\r\n const backgroundShades: Record<string, string> = {\r\n ...(submission.backgroundShades ?? {}),\r\n };\r\n\r\n for (const key of keysToColor) {\r\n const scoreValue = Number(submission[key] ?? 0);\r\n const allScores = numberSets.get(key) || [];\r\n const color = this.#getColorString(scoreValue, allScores);\r\n\r\n colColors[key] = color;\r\n backgroundShades[key] = this.#getScoreShade(color);\r\n }\r\n backgroundShades['adjudicationPricePreferenceCalculation'] = '';\r\n\r\n return {\r\n ...submission,\r\n colColors,\r\n backgroundShades,\r\n };\r\n });\r\n }\r\n\r\n #getScoreShade(rgbColor: string): string {\r\n if (!rgbColor) return '';\r\n return rgbColor.replace('rgb', 'rgba').replace(')', `, 0.1)`);\r\n }\r\n\r\n #getColorString(target: number, numbers: number[]): string {\r\n return getColorForNumber(target, numbers, true);\r\n }\r\n\r\n protected openPointAssignmentDialog(\r\n row: SupplierRow,\r\n groupedScoreSheet:\r\n | Record<string, WorkflowAdjudicationScoreSheetValue[]>\r\n | undefined,\r\n scoreSheetGroups:\r\n | {\r\n name: string;\r\n key: string;\r\n }[]\r\n | undefined,\r\n ): void {\r\n this.#dialog\r\n .open(PointAssignmentDialogComponent, {\r\n height: 'fit-content',\r\n data: {\r\n row,\r\n groupedScoreSheet,\r\n scoreSheetGroups,\r\n },\r\n autoFocus: false,\r\n disableClose: true,\r\n })\r\n .afterClosed()\r\n .pipe(\r\n take(1),\r\n switchMap((result: Record<string, Record<string, number>>) => {\r\n if (!result) return of(null);\r\n // Update the value with the new point assignments\r\n const assignment = Object.values(result).reduce(\r\n (acc, curr) => {\r\n acc = {\r\n ...acc,\r\n ...curr,\r\n };\r\n return acc;\r\n },\r\n {} as Record<string, number>,\r\n );\r\n row['adj_microFlow_assignedScore'] = assignment;\r\n const alreadyInValue = this.#value?.find((v) => v.id === row.id);\r\n let newValue: SupplierRow[];\r\n if (!alreadyInValue) {\r\n newValue = [\r\n ...(this.#value || []),\r\n {\r\n ...row,\r\n adj_microFlow_assignedScore: assignment,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(assignment).reduce(\r\n (acc, curr) => acc + curr,\r\n 0,\r\n ),\r\n },\r\n ];\r\n } else {\r\n newValue =\r\n this.#value?.map((v) => {\r\n if (v.id === row.id) {\r\n return {\r\n ...v,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(\r\n assignment,\r\n ).reduce((acc, curr) => acc + curr, 0),\r\n adj_microFlow_assignedScore: assignment,\r\n };\r\n }\r\n return v;\r\n }) || [];\r\n }\r\n\r\n return of(newValue);\r\n }),\r\n tap((newValue) => {\r\n if (!newValue) return;\r\n this.supplierSelection.emit(newValue);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n\r\n protected appointASupplier(row: ISubmission): void {\r\n if (this.inputConfig()?.readonly || this.inputConfig()?.disabled) {\r\n return;\r\n }\r\n if (row['adj_microFlow_supplierAppointed']) {\r\n row['adj_microFlow_supplierAppointed'] = false;\r\n } else {\r\n row['adj_microFlow_supplierAppointed'] = true;\r\n }\r\n const alreadyInValue = this.#value?.find((v) => v.id === row.id);\r\n let newValue: SupplierRow[] | undefined;\r\n if (!alreadyInValue) {\r\n const otherRows = this.#value?.map((v) => ({\r\n ...v,\r\n adj_microFlow_supplierAppointed: false,\r\n }));\r\n newValue = [...(otherRows || []), row];\r\n } else {\r\n newValue =\r\n this.#value?.map((v) => {\r\n if (v.id === row.id) {\r\n return {\r\n ...v,\r\n adj_microFlow_supplierAppointed: row['adj_microFlow_supplierAppointed'],\r\n };\r\n }\r\n return {\r\n ...v,\r\n adj_microFlow_supplierAppointed: false,\r\n };\r\n }) || [];\r\n }\r\n if (newValue) {\r\n this.supplierSelection.emit(newValue);\r\n }\r\n }\r\n}\r\n","@if (vm$ | async; as vm) {\r\n @if (vm.loading) {\r\n <div style=\"display: flex; justify-content: center; align-items: center; padding:24px;width: 100%;\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n } @else if (vm.error) {\r\n <div class=\"info-card error-card\">\r\n <!-- Heading stays cause-neutral: vm.error states WHICH half failed\r\n (the fetch vs. displaying data that did arrive). -->\r\n <h5 class=\"info-title\">❌ Unable to show submissions</h5>\r\n <p>{{ vm.error }}</p>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\">\r\n Try Again\r\n </button>\r\n </div>\r\n } @else {\r\n <lib-adjudication-shell label=\"Supplier selection\" [system]=\"vm.docsContext.system\" [docsContext]=\"vm.docsContext\" [chart]=\"vm.chart\">\r\n\r\n @if (vm.submissions.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">ℹ️ There are no submissions to display.</h5>\r\n <ul>\r\n <li>This can happen if <strong>no one has responded</strong> yet, or if <strong>none of the submission were\r\n compliant </strong>.</li>\r\n <li>If you are expecting to see submissions, try clicking the <strong>Refresh</strong> button.</li>\r\n </ul>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\" class=\"load-button\">\r\n Refresh\r\n </button>\r\n </div>\r\n } @else {\r\n\r\n @if (!value || value.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">📝 How to Appoint</h5>\r\n <ol>\r\n <li>\r\n <strong>View Response:</strong> Click the <strong>Preview</strong> (<mat-icon\r\n class=\"smallIcon\">preview</mat-icon>) icon to see the full submission.\r\n </li>\r\n <li>\r\n <strong>Appoint:</strong> Click the <strong>Appoint</strong> button to appoint the supplier.\r\n </li>\r\n\r\n </ol>\r\n </div>\r\n }\r\n <table mat-table [dataSource]=\"vm.submissions\">\r\n @for (col of vm.displayColumns; track col.formControlName) {\r\n <ng-container [matColumnDef]=\"col.formControlName\">\r\n <th mat-header-cell *matHeaderCellDef style=\"padding:4px\">\r\n {{ col.label }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\" mat-ripple class=\"table-cell\" (click)=\"$event.stopPropagation()\"\r\n [class.price-preference-cell]=\"true\" [style.border-bottom-color]=\"row.colColors[col.formControlName]\"\r\n [style.background]=\"row.backgroundShades?.[col.formControlName]\">\r\n @if (col.formControlName === 'actions') {\r\n <span style=\"display: flex; align-items: center;\">\r\n <button matTooltipPosition=\"before\"\r\n [matTooltip]=\"`View and review **` + row[vm.columnMapping.respondentNameKey]+ `** 's' Submission`\"\r\n (click)=\"viewMicroSubmission(row)\" mat-icon-button>\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n </span>\r\n } @else if (col.formControlName === 'adj_microFlow_supplierAppointed') {\r\n @if (row[col.formControlName] === true) {\r\n <button (click)=\"appointASupplier(row)\" mat-flat-button color=\"primary\">\r\n <mat-icon>\r\n check_circle\r\n </mat-icon>\r\n Appointed\r\n </button>\r\n } @else {\r\n <button (click)=\"appointASupplier(row)\" mat-stroked-button>\r\n Appoint\r\n </button>\r\n }\r\n } @else {\r\n @switch (col?.type) {\r\n @case ('daysAgo') {\r\n {{ row[col.formControlName] | daysAgo }}\r\n }\r\n @case ('number') {\r\n {{ (row[col.formControlName] | number:'0.0-0' ) || 'N/A' }}\r\n }\r\n @default {\r\n @if ($index === 0) {\r\n <span class=\"main-submission-text\">\r\n <mat-icon style=\"font-size: 1em;height:16px;width:16px\">domain</mat-icon>\r\n <strong>\r\n {{ row[col.formControlName] }}\r\n </strong>\r\n </span>\r\n <span class=\"secondary-text\">\r\n <mat-icon>fingerprint</mat-icon>\r\n {{ row[vm.columnMapping.respondentCodeKey] }}\r\n <mat-icon>more_time</mat-icon>\r\n {{ row[vm.columnMapping.responseDateKey ||''] | daysAgo }}\r\n </span>\r\n } @else {\r\n {{ row[col.formControlName] }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"vm.displayCols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: vm.displayCols\"></tr>\r\n </table>\r\n }\r\n </lib-adjudication-shell>\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { TitleCasePipe } from '@angular/common';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport {\r\n AdjudicationSteps,\r\n FormBuilderFunctions,\r\n ITowerStepColumn,\r\n WorkflowAdjudicationMicroFlowReviewValue,\r\n WorkflowAdjudicationResponseElectedSupplierSelectionValue,\r\n WorkflowAdjudicationScoreSheetValue,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { PointsCreationComponent } from '../points-creation/points-creation.component';\r\nimport { SubmissionReviewComponent } from '../submission-review/submission-review.component';\r\nimport { PointAssignmentComponent } from '../point-assignment/point-assignment.component';\r\nimport { SupplierSelectionComponent } from '../supplier-selection/supplier-selection.component';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-workflow-adjudication-reactive-input',\r\n nextId: 0,\r\n};\r\n\r\ntype WorkflowAdjudicationValue =\r\n | WorkflowAdjudicationScoreSheetValue[]\r\n | WorkflowAdjudicationMicroFlowReviewValue[]\r\n | WorkflowAdjudicationResponseElectedSupplierSelectionValue;\r\n\r\n@Component({\r\n selector: 'lib-workflow-adjudication-reactive-input',\r\n templateUrl: './workflow-adjudication-reactive-input.component.html',\r\n styleUrl: './workflow-adjudication-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n imports: [\r\n TitleCasePipe,\r\n PointsCreationComponent,\r\n SubmissionReviewComponent,\r\n SupplierSelectionComponent,\r\n PointAssignmentComponent,\r\n ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: WorkflowAdjudicationReactiveInputComponent }],\r\n})\r\nexport class WorkflowAdjudicationReactiveInputComponent extends BaseCustomInput<WorkflowAdjudicationValue> {\r\n override get empty(): boolean {\r\n return this.value === null || this.value === undefined || Object.keys(this.value).length === 0;\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly editorMode = input<boolean>(false);\r\n readonly formBuilderFunctions = input<FormBuilderFunctions | undefined>(undefined);\r\n\r\n protected readonly adjudicationSteps = AdjudicationSteps;\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n protected setValue(value: WorkflowAdjudicationValue): void {\r\n this.value = value;\r\n this.onChange(value);\r\n this.onTouched();\r\n }\r\n}\r\n","@switch (inputConfig().adjudicationStep) {\r\n@case (adjudicationSteps.ScoreCreation) {\r\n<lib-points-creation [inputConfig]=\"inputConfig()\" [value]=\"value\" (pointsChange)=\"setValue($event)\">\r\n</lib-points-creation>\r\n}\r\n@case (adjudicationSteps.SubMissionReview) {\r\n<lib-submission-review [inputConfig]=\"inputConfig()\" [value]=\"value\"\r\n (reviewChange)=\"setValue($event)\"></lib-submission-review>\r\n}\r\n@case (adjudicationSteps.SupplierSelection) {\r\n<lib-supplier-selection [inputConfig]=\"inputConfig()\" [value]=\"value\"\r\n (supplierSelection)=\"setValue($event)\"></lib-supplier-selection>\r\n}\r\n@case (adjudicationSteps.PointAssignment) {\r\n<lib-point-assignment [inputConfig]=\"inputConfig()\" [value]=\"value\"\r\n (pointsChange)=\"setValue($event)\"></lib-point-assignment>\r\n}\r\n@default {\r\n<h6>\r\n {{ inputConfig().adjudicationStep | titlecase }} is not implemented yet.\r\n</h6>\r\n}\r\n}\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { FormBuilderFunctions, ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { WorkflowAdjudicationReactiveInputComponent } from './elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a workflow-adjudication reactive control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-workflow-adjudication',\r\n templateUrl: './workflow-adjudication.component.html',\r\n styleUrl: './workflow-adjudication.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n WorkflowAdjudicationReactiveInputComponent,\r\n ],\r\n})\r\nexport class WorkflowAdjudicationComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly editorMode = input<boolean>(false);\r\n readonly formBuilderFunctions = input<FormBuilderFunctions | undefined>(undefined);\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field\r\n [appearance]=\"inputConfig.appearance || 'fill'\"\r\n [floatLabel]=\"'always'\"\r\n subscriptSizing=\"dynamic\"\r\n >\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-workflow-adjudication-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n [formGroup]=\"formGroup()\"\r\n [editorMode]=\"editorMode()\"\r\n [formBuilderFunctions]=\"formBuilderFunctions()\"\r\n ></lib-workflow-adjudication-reactive-input>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </m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