@trudb/tru-common-lib 0.2.205 → 0.2.206
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.
|
@@ -4043,8 +4043,14 @@ class TruDetailViewBase {
|
|
|
4043
4043
|
if (event?.successful && this.view.entities) {
|
|
4044
4044
|
this.recordsBeforeRevert = this.entities.length;
|
|
4045
4045
|
this.entities = this.entities.filter((e) => { return !e.entityAspect.entityState.isDetached(); });
|
|
4046
|
-
|
|
4047
|
-
|
|
4046
|
+
if (!this.entities.length) {
|
|
4047
|
+
this.view.window.goToPreviousView();
|
|
4048
|
+
this.view.window.removeForwardViews();
|
|
4049
|
+
}
|
|
4050
|
+
else {
|
|
4051
|
+
this.setNavigationIndex(this.calculateNextIndex());
|
|
4052
|
+
this.setEntityDisplayValues(this.tableName);
|
|
4053
|
+
}
|
|
4048
4054
|
}
|
|
4049
4055
|
}));
|
|
4050
4056
|
this.subs.push(this.view.onActive().subscribe((active) => {
|
|
@@ -6123,29 +6129,25 @@ class TruFormatter {
|
|
|
6123
6129
|
text += cfg.postalCode.$ + ' ';
|
|
6124
6130
|
return text;
|
|
6125
6131
|
};
|
|
6126
|
-
naPhone = (
|
|
6127
|
-
if (!
|
|
6132
|
+
naPhone = (config) => {
|
|
6133
|
+
if (!config) {
|
|
6128
6134
|
return '';
|
|
6129
6135
|
}
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6136
|
+
let number = config.$;
|
|
6137
|
+
if (number)
|
|
6138
|
+
number = number.replace(/[^0-9]/g, '');
|
|
6139
|
+
if (!number || number === '0')
|
|
6140
|
+
if (config.property.isNullable)
|
|
6141
|
+
return null;
|
|
6133
6142
|
else
|
|
6134
|
-
|
|
6135
|
-
}
|
|
6136
|
-
if (!number) {
|
|
6137
|
-
return '';
|
|
6138
|
-
}
|
|
6139
|
-
number = String(number);
|
|
6140
|
-
var formattedNumber = number;
|
|
6141
|
-
var c = (number[0] == '1') ? '+1 ' : '';
|
|
6142
|
-
number = number[0] == '1' ? number.slice(1) : number;
|
|
6143
|
+
return '';
|
|
6143
6144
|
var area = number.substring(0, 3);
|
|
6144
6145
|
var front = number.substring(3, 6);
|
|
6145
6146
|
var end = number.substring(6, 10);
|
|
6146
6147
|
var ext = number.substring(10, 20);
|
|
6148
|
+
let formattedNumber = '';
|
|
6147
6149
|
if (front) {
|
|
6148
|
-
formattedNumber = (
|
|
6150
|
+
formattedNumber = ("(" + area + ") " + front);
|
|
6149
6151
|
}
|
|
6150
6152
|
if (end) {
|
|
6151
6153
|
formattedNumber += ("-" + end);
|