@iapps/ng-dhis2-ui 1.2.135 → 1.2.136
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.
|
@@ -10736,7 +10736,36 @@ class ProgramEntryFormModule {
|
|
|
10736
10736
|
// );
|
|
10737
10737
|
// this.#updateInstance(assignedDataValues);
|
|
10738
10738
|
// }
|
|
10739
|
+
// #updateInstanceWithAutoAssignedValues(
|
|
10740
|
+
// autoAssignedValues: AutoAssignedValues[]
|
|
10741
|
+
// ) {
|
|
10742
|
+
// const valueCount = autoAssignedValues?.length ?? 0;
|
|
10743
|
+
// if (valueCount === 0) {
|
|
10744
|
+
// return;
|
|
10745
|
+
// }
|
|
10746
|
+
// const metaData = this.metaData();
|
|
10747
|
+
// const aggregatedValues: Record<string, unknown> = {};
|
|
10748
|
+
// for (let index = 0; index < valueCount; index++) {
|
|
10749
|
+
// const { field: configuredKey, value } = autoAssignedValues[index];
|
|
10750
|
+
// const semanticKey = metaData
|
|
10751
|
+
// ? this.#resolveFieldRuntimeId(configuredKey, metaData)
|
|
10752
|
+
// : configuredKey;
|
|
10753
|
+
// aggregatedValues[semanticKey] = value;
|
|
10754
|
+
// if (configuredKey !== semanticKey) {
|
|
10755
|
+
// aggregatedValues[configuredKey] = value;
|
|
10756
|
+
// }
|
|
10757
|
+
// }
|
|
10758
|
+
// if (Object.keys(aggregatedValues).length === 0) {
|
|
10759
|
+
// return;
|
|
10760
|
+
// }
|
|
10761
|
+
// this.#updateInstance(aggregatedValues);
|
|
10762
|
+
// }
|
|
10739
10763
|
#updateInstanceWithAutoAssignedValues(autoAssignedValues) {
|
|
10764
|
+
const trackedEntityId = this.trackedEntity?.();
|
|
10765
|
+
if (typeof trackedEntityId === 'string' &&
|
|
10766
|
+
trackedEntityId.trim().length > 0) {
|
|
10767
|
+
return;
|
|
10768
|
+
}
|
|
10740
10769
|
const valueCount = autoAssignedValues?.length ?? 0;
|
|
10741
10770
|
if (valueCount === 0) {
|
|
10742
10771
|
return;
|