osl-base-extended 1.0.17 → 1.0.19
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.
|
@@ -242,13 +242,16 @@ class Httpbase {
|
|
|
242
242
|
isSuccessful: false,
|
|
243
243
|
error: this.mapError(error),
|
|
244
244
|
statusCode: error.status,
|
|
245
|
-
result:
|
|
245
|
+
result: null,
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
+
flatObject(object) {
|
|
249
|
+
return Object.values(object)?.flat()?.map((x) => x.toString());
|
|
250
|
+
}
|
|
248
251
|
mapError(error) {
|
|
249
252
|
switch (error.status) {
|
|
250
253
|
case 0: return 'Connection Error! Please Contact Administration';
|
|
251
|
-
case 400: return error.error?.message || 'Bad Request';
|
|
254
|
+
case 400: return error.error?.errors ? this.flatObject(error.error?.errors) : error.error?.message || 'Bad Request';
|
|
252
255
|
case 401: return 'Unauthorized Access';
|
|
253
256
|
case 403: return "You don't have rights to perform this action";
|
|
254
257
|
case 404: return 'Resource not found';
|
|
@@ -1687,7 +1690,11 @@ class OslDatepicker {
|
|
|
1687
1690
|
label = '';
|
|
1688
1691
|
required = false;
|
|
1689
1692
|
disabled = false;
|
|
1690
|
-
|
|
1693
|
+
_model = '';
|
|
1694
|
+
set model(val) {
|
|
1695
|
+
this._model = val?.includes('T') ? val.split('T')[0] : (val ?? '');
|
|
1696
|
+
}
|
|
1697
|
+
get model() { return this._model; }
|
|
1691
1698
|
dateType = 'date';
|
|
1692
1699
|
placeholder = '';
|
|
1693
1700
|
minDate = '';
|