diff --git a/frontend/src/App.vue b/frontend/src/App.vue index adb0b25..e0b33ed 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,9 +2,7 @@ import { Dialog } from "primevue"; import { useErrorStore } from "./stores/error.store"; import CommentScheme from "./comment/CommentScheme.vue"; -import PostScheme from "./post/PostScheme.vue"; import PosttypeScheme from "./posttype/PosttypeScheme.vue"; -import AuthorScheme from "./author/AuthorScheme.vue"; const errorStore = useErrorStore(); @@ -19,9 +17,6 @@ const errorStore = useErrorStore();

{{ errorStore.message }}

- - -
diff --git a/frontend/src/posttype/PosttypeScheme.vue b/frontend/src/posttype/PosttypeScheme.vue index 5d93377..babbb74 100644 --- a/frontend/src/posttype/PosttypeScheme.vue +++ b/frontend/src/posttype/PosttypeScheme.vue @@ -7,7 +7,6 @@ import type { Scheme } from "../types/scheme.type"; import { PostType } from "../../bindings/app/internal/services"; import { ref } from "vue"; import type { Validate } from "../types/validate.type"; -import { ImportFromExcel } from "../../bindings/app/internal/services/posttypeservice.ts"; const service = new Service(); @@ -20,7 +19,6 @@ const load = async () => { onMounted(async () => { await load(); - await ImportFromExcel(); }); const scheme: Scheme = reactive({ @@ -48,10 +46,17 @@ const validate: Validate = (entity) => { status: "success", }; }; + +const colorize = (data: PostType): string => { + if (data.Name === "test") { + return "red"; + } + +} diff --git a/frontend/src/table/Table.vue b/frontend/src/table/Table.vue index ffe6668..c579e87 100644 --- a/frontend/src/table/Table.vue +++ b/frontend/src/table/Table.vue @@ -64,6 +64,18 @@ const slots = defineSlots(); const createSlotName = (key: any) => key + "Create"; const updateSlotName = (key: any) => key + "Update"; + +watch(() => props.items, () => { + if (props.colorize) { + const trs = document.querySelectorAll("tr"); + props.items.forEach(item => { + const tr = trs[item.Id]; + if (tr) { + tr.style.backgroundColor = props.colorize(item); + } + }) + } +})