@colijnit/transaction 262.1.13 → 262.1.14
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.
|
@@ -355,8 +355,8 @@ import { DateField } from '@colijnit/ioneconnector/build/factory/decorators/date
|
|
|
355
355
|
class Version {
|
|
356
356
|
name = "@colijnit/transaction";
|
|
357
357
|
description = "Colijn IT transaction package";
|
|
358
|
-
symVer = "262.1.
|
|
359
|
-
publishDate = "
|
|
358
|
+
symVer = "262.1.14";
|
|
359
|
+
publishDate = "07/06/2026, 14:17:10";
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
class CheckoutModuleService extends BaseModuleService {
|
|
@@ -1792,6 +1792,13 @@ class ErrorService {
|
|
|
1792
1792
|
showValidationError(response) {
|
|
1793
1793
|
const messages = [];
|
|
1794
1794
|
const messagesDetails = [];
|
|
1795
|
+
const messagesDetailsDistinct = [];
|
|
1796
|
+
const addMessageDetails = (message) => {
|
|
1797
|
+
if (messagesDetailsDistinct.indexOf(message) === -1) {
|
|
1798
|
+
messagesDetailsDistinct.push(message);
|
|
1799
|
+
messagesDetails.push(message);
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1795
1802
|
messages.push('<div class="dialog-error-wrapper">');
|
|
1796
1803
|
if (response.message) {
|
|
1797
1804
|
messages.push(this._messageAsValidationError(response.message));
|
|
@@ -1801,12 +1808,12 @@ class ErrorService {
|
|
|
1801
1808
|
response.validationResult.messages.forEach(m => {
|
|
1802
1809
|
messages.push(this._messageAsValidationError(m.message));
|
|
1803
1810
|
if (m.messageCode) {
|
|
1804
|
-
|
|
1811
|
+
addMessageDetails(this._messageDetails(m.messageCode));
|
|
1805
1812
|
}
|
|
1806
1813
|
});
|
|
1807
1814
|
}
|
|
1808
1815
|
else if (response.validationResult.fieldValidations) {
|
|
1809
|
-
messages.push(this._messageAsValidationError(
|
|
1816
|
+
messages.push(this._messageAsValidationError("Validation error"));
|
|
1810
1817
|
for (let key in response.validationResult.fieldValidations) {
|
|
1811
1818
|
if (response.validationResult.fieldValidations.hasOwnProperty(key)) {
|
|
1812
1819
|
if (response.validationResult.fieldValidations[key].messages && response.validationResult.fieldValidations[key].messages.length > 0) {
|
|
@@ -1815,7 +1822,7 @@ class ErrorService {
|
|
|
1815
1822
|
value: response.validationResult.fieldValidations[key].messages[i].fieldId,
|
|
1816
1823
|
defaultStr: response.validationResult.fieldValidations[key].messages[i].message
|
|
1817
1824
|
};
|
|
1818
|
-
|
|
1825
|
+
addMessageDetails(this._messageDetails(messageCode));
|
|
1819
1826
|
}
|
|
1820
1827
|
}
|
|
1821
1828
|
if (response.validationResult.fieldValidations[key].subValidations && response.validationResult.fieldValidations[key].subValidations.length > 0) {
|
|
@@ -1823,15 +1830,29 @@ class ErrorService {
|
|
|
1823
1830
|
const subValidation = response.validationResult.fieldValidations[key].subValidations[i];
|
|
1824
1831
|
if (!subValidation.success) {
|
|
1825
1832
|
if (subValidation.fieldValidations) {
|
|
1826
|
-
for (let
|
|
1827
|
-
if (subValidation.fieldValidations.hasOwnProperty(
|
|
1828
|
-
|
|
1833
|
+
for (let subKey in subValidation.fieldValidations) {
|
|
1834
|
+
if (subValidation.fieldValidations.hasOwnProperty(subKey)) {
|
|
1835
|
+
const fieldValidation = subValidation.fieldValidations[subKey];
|
|
1836
|
+
if (fieldValidation.messages && fieldValidation.messages.length > 0) {
|
|
1837
|
+
addMessageDetails(this._messageAsValidationError(`${subKey}: ${fieldValidation.messages[0].message}`));
|
|
1838
|
+
}
|
|
1839
|
+
if (fieldValidation.subValidations && fieldValidation.subValidations.length > 0) {
|
|
1840
|
+
fieldValidation.subValidations.forEach(nestedSubValidation => {
|
|
1841
|
+
if (!nestedSubValidation.success && nestedSubValidation.messages && nestedSubValidation.messages.length > 0) {
|
|
1842
|
+
nestedSubValidation.messages.forEach(m => {
|
|
1843
|
+
addMessageDetails(this._messageAsValidationError(`${subKey}: ${m.message}`));
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1829
1848
|
}
|
|
1830
1849
|
}
|
|
1831
1850
|
}
|
|
1832
|
-
subValidation.messages.
|
|
1833
|
-
|
|
1834
|
-
|
|
1851
|
+
if (subValidation.messages && subValidation.messages.length > 0) {
|
|
1852
|
+
subValidation.messages.forEach(m => {
|
|
1853
|
+
addMessageDetails(this._messageAsValidationError(`${key}: ${m.message}`));
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1835
1856
|
}
|
|
1836
1857
|
}
|
|
1837
1858
|
}
|
|
@@ -1839,8 +1860,8 @@ class ErrorService {
|
|
|
1839
1860
|
}
|
|
1840
1861
|
}
|
|
1841
1862
|
}
|
|
1842
|
-
messages.push(
|
|
1843
|
-
return this._dialogService.showError(messages.join(
|
|
1863
|
+
messages.push("</div>");
|
|
1864
|
+
return this._dialogService.showError(messages.join(""), false, messagesDetails.length > 0 ? messagesDetails.join("") : undefined);
|
|
1844
1865
|
}
|
|
1845
1866
|
showValidationMessage(validationResult) {
|
|
1846
1867
|
const messages = [];
|
|
@@ -29232,7 +29253,7 @@ class DialogTransactionHeaderDiscountComponent extends DialogTransactionHeaderBa
|
|
|
29232
29253
|
</div>
|
|
29233
29254
|
</ng-template>
|
|
29234
29255
|
|
|
29235
|
-
@if (showDiscountCodesPopup) {
|
|
29256
|
+
@if (showDiscountCodesPopup && showDiscountCode) {
|
|
29236
29257
|
<co-discount-codes-popup
|
|
29237
29258
|
[discountType]="activeDiscountType"
|
|
29238
29259
|
(discountSet)="onDiscountSet($event)"
|
|
@@ -29357,7 +29378,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
29357
29378
|
</div>
|
|
29358
29379
|
</ng-template>
|
|
29359
29380
|
|
|
29360
|
-
@if (showDiscountCodesPopup) {
|
|
29381
|
+
@if (showDiscountCodesPopup && showDiscountCode) {
|
|
29361
29382
|
<co-discount-codes-popup
|
|
29362
29383
|
[discountType]="activeDiscountType"
|
|
29363
29384
|
(discountSet)="onDiscountSet($event)"
|