@churchillliving/se-ui-toolkit 6.53.64 → 6.53.68
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/bundles/churchillliving-se-ui-toolkit.umd.js +18 -8
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/form/form.component.js +10 -3
- package/esm2015/lib/components/base/grid/grid.component.js +10 -7
- package/fesm2015/churchillliving-se-ui-toolkit.js +18 -8
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/package.json +1 -1
|
@@ -4586,12 +4586,18 @@
|
|
|
4586
4586
|
// check the validation of the field
|
|
4587
4587
|
GridComponent.prototype.gridValidation = function (columns, row) {
|
|
4588
4588
|
if (!this.gridService.checkValidity(columns, row)) {
|
|
4589
|
+
var errorMessageDetails_1 = '';
|
|
4590
|
+
columns === null || columns === void 0 ? void 0 : columns.forEach(function (column) {
|
|
4591
|
+
if (column.errorMessage) {
|
|
4592
|
+
errorMessageDetails_1 = errorMessageDetails_1 ? errorMessageDetails_1 + ' , ' + column.errorMessage : column.errorMessage;
|
|
4593
|
+
}
|
|
4594
|
+
});
|
|
4589
4595
|
var isRequired = columns.some(function (column) { return column.errorMessage && !row[column.field]; });
|
|
4590
4596
|
if (isRequired) {
|
|
4591
|
-
this.alertService.error(
|
|
4597
|
+
this.alertService.error(errorMessageDetails_1, 'REQUIRED FIELD');
|
|
4592
4598
|
}
|
|
4593
4599
|
else {
|
|
4594
|
-
this.alertService.error(
|
|
4600
|
+
this.alertService.error(errorMessageDetails_1, 'INVALID FIELD');
|
|
4595
4601
|
}
|
|
4596
4602
|
return false;
|
|
4597
4603
|
}
|
|
@@ -5067,10 +5073,7 @@
|
|
|
5067
5073
|
GridComponent.prototype.setFilterFocusOut = function (col, filter, event) {
|
|
5068
5074
|
var _this = this;
|
|
5069
5075
|
this.gridFilterObj = { column: col, filter: filter, event: event };
|
|
5070
|
-
var newColumn = {};
|
|
5071
|
-
setTimeout(function () {
|
|
5072
|
-
newColumn = Object.assign({}, col);
|
|
5073
|
-
}, col.type === exports.EGridColumnType.LOOKUP_INPUT ? 250 : 0);
|
|
5076
|
+
var newColumn = Object.assign({}, col);
|
|
5074
5077
|
//change filter calender format
|
|
5075
5078
|
if (newColumn.type === 'date' && newColumn.value) {
|
|
5076
5079
|
newColumn.value = this.datePipe.transform(col.value.toString().trim(), 'yyyy-MM-dd');
|
|
@@ -6453,15 +6456,22 @@
|
|
|
6453
6456
|
var _this = this;
|
|
6454
6457
|
var _a, _b, _c, _d, _e;
|
|
6455
6458
|
var validity = true;
|
|
6459
|
+
var errorMessageDetails = '';
|
|
6456
6460
|
(_a = this.form.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (formSection) {
|
|
6461
|
+
var _a;
|
|
6457
6462
|
if (formSection.fields) {
|
|
6458
6463
|
if (!_this.formService.checkValidity(formSection.fields)) {
|
|
6464
|
+
(_a = formSection.fields) === null || _a === void 0 ? void 0 : _a.forEach(function (formField) {
|
|
6465
|
+
if (formField.errorMessage) {
|
|
6466
|
+
errorMessageDetails = errorMessageDetails ? errorMessageDetails + " , " + formField.errorMessage : formField.errorMessage;
|
|
6467
|
+
}
|
|
6468
|
+
});
|
|
6459
6469
|
var field = formSection.fields.some(function (field) { return field.requiredField && field.errorMessage && !field.value; });
|
|
6460
6470
|
if (validity && field) {
|
|
6461
|
-
_this.alertService.error(
|
|
6471
|
+
_this.alertService.error(errorMessageDetails, 'REQUIRED FIELD');
|
|
6462
6472
|
}
|
|
6463
6473
|
else {
|
|
6464
|
-
_this.alertService.error(
|
|
6474
|
+
_this.alertService.error(errorMessageDetails, 'INVALID FIELD');
|
|
6465
6475
|
}
|
|
6466
6476
|
validity = false;
|
|
6467
6477
|
}
|