diff --git a/frontend/src/components/selects/MultiSelect.vue b/frontend/src/components/selects/MultiSelect.vue index f35de79..2ee8409 100644 --- a/frontend/src/components/selects/MultiSelect.vue +++ b/frontend/src/components/selects/MultiSelect.vue @@ -22,7 +22,7 @@ const pushOrRemove = (option: T) => { const setNullIds = () => { selected.value = selected.value.map(item => { - item[entityId] = 0 + (item as any)[entityId] = 0 return item }) } diff --git a/frontend/src/posttype/PosttypeScheme.vue b/frontend/src/posttype/PosttypeScheme.vue index babbb74..68a96a4 100644 --- a/frontend/src/posttype/PosttypeScheme.vue +++ b/frontend/src/posttype/PosttypeScheme.vue @@ -51,7 +51,7 @@ const colorize = (data: PostType): string => { if (data.Name === "test") { return "red"; } - + return '' } diff --git a/frontend/src/table/DialogWindow.vue b/frontend/src/table/DialogWindow.vue index 6af62c4..4e7707d 100644 --- a/frontend/src/table/DialogWindow.vue +++ b/frontend/src/table/DialogWindow.vue @@ -38,7 +38,7 @@ async function handleSave() { const mode = props.updateMode ? 'update' : 'create'; const result = await props.validate(editableItem.value as T, mode); if (result.status === 'error') { - errorStore.summon(result.message); + errorStore.summon(result.message ?? 'Ошибка валидации'); return; } try { @@ -52,7 +52,7 @@ async function handleSave() { await emits('onSave', editableItem.value as T); } } catch (e) { - errorStore.summon(e.message) + errorStore.summon((e as Error).message ?? 'Ошибка сохранения'); return } props.load() diff --git a/frontend/src/table/Table.vue b/frontend/src/table/Table.vue index 460d13e..42dd882 100644 --- a/frontend/src/table/Table.vue +++ b/frontend/src/table/Table.vue @@ -71,7 +71,7 @@ watch(() => props.items, () => { props.items.forEach(item => { const tr = trs[item.Id]; if (tr) { - tr.style.backgroundColor = props.colorize(item); + tr.style.backgroundColor = props.colorize!(item); } }) } diff --git a/frontend/src/utils/date/view.util.ts b/frontend/src/utils/date/view.util.ts index 03cf131..651c9a2 100644 --- a/frontend/src/utils/date/view.util.ts +++ b/frontend/src/utils/date/view.util.ts @@ -1,7 +1,7 @@ import type { PrimitiveFieldType } from "../../types/primitive-field-type.type" import { toDate } from "./converters.util"; -export const viewDate = (data: unknown, type: PrimitiveFieldType) => { +export const viewDate = (data: unknown, type?: PrimitiveFieldType) => { if (type !== 'date') return data; return toDate(data as number | Date).toLocaleDateString('ru-RU', { year: 'numeric', diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index 6ae27b2..c4945f4 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -5,11 +5,9 @@ "allowImportingTsExtensions": true, "noEmit": true, /* Linting */ - "strict": false, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noFallthroughCasesInSwitch": false, - "noUncheckedSideEffectImports": false, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true, + "strictNullChecks": true, "lib": ["ES2015", "DOM"] }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], diff --git a/wails_windows_amd64.syso b/wails_windows_amd64.syso new file mode 100644 index 0000000..fca2145 Binary files /dev/null and b/wails_windows_amd64.syso differ