@kuzntsv/uikit 1.0.118 → 1.0.120
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.
|
@@ -1853,13 +1853,9 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
1853
1853
|
dataResource;
|
|
1854
1854
|
countResource;
|
|
1855
1855
|
data = computed(() => {
|
|
1856
|
-
console.log("data start, this.dataResource=", this.dataResource);
|
|
1857
1856
|
if (!this.dataResource) return [];
|
|
1858
|
-
console.log("this.dataResource.error()=", this.dataResource.error());
|
|
1859
1857
|
if (this.dataResource.error()) return [];
|
|
1860
|
-
console.log("data after error, this.dataResource?.value()=", this.dataResource?.value());
|
|
1861
1858
|
const rawData = this.dataResource?.value() || [];
|
|
1862
|
-
console.log("this.fnMapEntity=", this.fnMapEntity, "Array.isArray(rawData)=", Array.isArray(rawData));
|
|
1863
1859
|
return this.fnMapEntity && Array.isArray(rawData) ? rawData.map(this.fnMapEntity()) : rawData;
|
|
1864
1860
|
}, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
1865
1861
|
length = computed(() => {
|
|
@@ -1906,6 +1902,22 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
1906
1902
|
if (filterChanged) {}
|
|
1907
1903
|
previousFilters = { ...currentFilters };
|
|
1908
1904
|
});
|
|
1905
|
+
effect(() => {
|
|
1906
|
+
const dataError = this.dataResource?.error();
|
|
1907
|
+
if (dataError) {
|
|
1908
|
+
const errorMessage = dataError instanceof Error ? dataError.message : String(dataError);
|
|
1909
|
+
console.log(`[Валидация данных] Ошибка структуры JSON от сервера:\n${errorMessage}`);
|
|
1910
|
+
this.notificationService.error("Произошла ошибка при чтении/парсинге данных с сервера.", 0);
|
|
1911
|
+
}
|
|
1912
|
+
});
|
|
1913
|
+
effect(() => {
|
|
1914
|
+
const countError = this.countResource?.error();
|
|
1915
|
+
if (countError) {
|
|
1916
|
+
const errorMessage = countError instanceof Error ? countError.message : String(countError);
|
|
1917
|
+
console.log(`[Валидация пагинации] ${errorMessage}`);
|
|
1918
|
+
this.notificationService.error("Произошла ошибка при чтении/парсинге данных с сервера.", 0);
|
|
1919
|
+
}
|
|
1920
|
+
});
|
|
1909
1921
|
}
|
|
1910
1922
|
ngOnDestroy() {
|
|
1911
1923
|
this.subscription.unsubscribe();
|
|
@@ -2607,23 +2619,23 @@ function provideLogger(config) {
|
|
|
2607
2619
|
}
|
|
2608
2620
|
const secUserViewSchema = z.object({
|
|
2609
2621
|
id: z.number().default(0),
|
|
2610
|
-
idHuman: z.number().default(0),
|
|
2611
|
-
loginAD: z.string().default("").
|
|
2612
|
-
dept: z.number().default(0),
|
|
2613
|
-
tabnum: z.number().default(0),
|
|
2614
|
-
lastname: z.string().default(""),
|
|
2615
|
-
firstname: z.string().default(""),
|
|
2616
|
-
middlename: z.string().default(""),
|
|
2617
|
-
fio: z.string().default(""),
|
|
2618
|
-
dateHuman: z.coerce.date().optional(),
|
|
2619
|
-
profession: z.string().default("")
|
|
2622
|
+
idHuman: z.number().default(0).nullable(),
|
|
2623
|
+
loginAD: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2624
|
+
dept: z.number().default(0).nullable(),
|
|
2625
|
+
tabnum: z.number().default(0).nullable(),
|
|
2626
|
+
lastname: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2627
|
+
firstname: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2628
|
+
middlename: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2629
|
+
fio: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2630
|
+
dateHuman: z.coerce.date().optional().nullable(),
|
|
2631
|
+
profession: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string())
|
|
2620
2632
|
});
|
|
2621
2633
|
const secUserSchema = z.object({
|
|
2622
2634
|
id: z.number().default(0),
|
|
2623
|
-
login: z.string().default(""),
|
|
2624
|
-
fio: z.string().default(""),
|
|
2625
|
-
dept: z.number().default(0),
|
|
2626
|
-
tabnum: z.number().default(0),
|
|
2635
|
+
login: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2636
|
+
fio: z.string().nullable().default("").transform((val) => val === null ? "" : val).pipe(z.string()),
|
|
2637
|
+
dept: z.number().default(0).nullable(),
|
|
2638
|
+
tabnum: z.number().default(0).nullable(),
|
|
2627
2639
|
userView: secUserViewSchema.optional().nullable()
|
|
2628
2640
|
});
|
|
2629
2641
|
var SafePipe = class SafePipe {
|