cat-qw-lib 0.29.2 → 0.29.3
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/cat-qw-lib.mjs +43 -45
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -576,14 +576,14 @@ class BaseControlComponent {
|
|
|
576
576
|
this.baseStore.setIsFormSubmitted(false);
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
|
-
this.baseQuery.getAttributeModelList()
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
})
|
|
579
|
+
// this.baseQuery.getAttributeModelList()
|
|
580
|
+
// .pipe(takeUntil(this.attributeDestroy$))
|
|
581
|
+
// .subscribe((res) => {
|
|
582
|
+
// console.log(res);
|
|
583
|
+
// if(res !== undefined && res !== null){
|
|
584
|
+
// BaseControlComponent.allAttributes = res;
|
|
585
|
+
// }
|
|
586
|
+
// })
|
|
587
587
|
}
|
|
588
588
|
ngOnChanges() {
|
|
589
589
|
if (this.store) {
|
|
@@ -1223,43 +1223,41 @@ class BaseFormComponent {
|
|
|
1223
1223
|
this.baseQuery.getAttributeModelList()
|
|
1224
1224
|
.pipe(takeUntil(this.destroy$))
|
|
1225
1225
|
.subscribe((attributeModels) => {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
});
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1226
|
+
console.log(attributeModels);
|
|
1227
|
+
// attributeModels.forEach(attr => {
|
|
1228
|
+
// const handleCheckAndAddMissingField = (value: any) => {
|
|
1229
|
+
// if (attr.isRequired &&
|
|
1230
|
+
// (value === undefined || value === null || (typeof value === SHARED.STRING && value.trim() === SHARED.EMPTY))
|
|
1231
|
+
// ) {
|
|
1232
|
+
// if(this.baseStore) this.baseStore.missingFields.push(attr.displayText || attr.name);
|
|
1233
|
+
// }
|
|
1234
|
+
// };
|
|
1235
|
+
// if (attr.isRequired && attr.name in this.record) {
|
|
1236
|
+
// handleCheckAndAddMissingField(this.record[attr.name]);
|
|
1237
|
+
// }
|
|
1238
|
+
// [SHARED.DICTIONARYITEMS, SHARED.DATAITEMS].forEach(key => {
|
|
1239
|
+
// this.record[key]?.forEach((val: any) => {
|
|
1240
|
+
// if(val.hasOwnProperty(attr.name)) {
|
|
1241
|
+
// handleCheckAndAddMissingField(val[attr.name])
|
|
1242
|
+
// }
|
|
1243
|
+
// });
|
|
1244
|
+
// });
|
|
1245
|
+
// });
|
|
1246
|
+
// if (this.baseStore && this.baseStore.missingFields.length > 0) {
|
|
1247
|
+
// if(this.baseStore) this.baseStore.setIsFormSubmitted(true);
|
|
1248
|
+
// console.error(ERROR.MISSING_REQUIRED_FIELD, this.baseStore.missingFields);
|
|
1249
|
+
// } else {
|
|
1250
|
+
// if(!this.currentState?.isApiValidated && this.currentState?.isApiValidated !== null) {
|
|
1251
|
+
// this.baseStore?.setIsShowMessage(!this.currentState?.isApiValidated);
|
|
1252
|
+
// }
|
|
1253
|
+
// else if(validateRecords) {
|
|
1254
|
+
// if (this.record._id) {
|
|
1255
|
+
// this.handleUpdateRecord();
|
|
1256
|
+
// } else {
|
|
1257
|
+
// this.handleAddRecord();
|
|
1258
|
+
// }
|
|
1259
|
+
// }
|
|
1260
|
+
// }
|
|
1263
1261
|
});
|
|
1264
1262
|
}
|
|
1265
1263
|
}
|