-
-
-
-
-
-
บับทึกข้อมูล
+
+
+
+
+ dataStore.filterSelector(inputValue, doneFn, 'filterrespondentType'
+ )"
>
+
+
+
+ ไม่มีข้อมูล
+
+
+
+
-
+
+
+
+
+
+
+ ผู้ถูกร้องเรียน
+
+ เพิ่มผู้ถูกร้องเรียน
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+ บับทึกข้อมูล
+
+
+
diff --git a/src/modules/11_discipline/interface/request/result.ts b/src/modules/11_discipline/interface/request/result.ts
index e016aa593..cdbc5b631 100644
--- a/src/modules/11_discipline/interface/request/result.ts
+++ b/src/modules/11_discipline/interface/request/result.ts
@@ -7,4 +7,36 @@ interface FormRef {
[key: string]: any;
}
-export type { FormData, FormRef };
+interface DataOption {
+ id: string;
+ name: string;
+}
+interface DataOptionRes {
+ organizationId: string;
+ organizationName: string;
+}
+interface DataListRow {
+ id: string
+ idInvestigate: string
+ idComplaint: string
+ respondentType: string
+ persons: PersonType
+ organizationId: string
+ resultDescription: string
+}
+
+interface PersonType{
+ id: string
+ idcard: string
+ name: string
+ prefix: string
+ firstName: string
+ lastName: string
+ position: string
+ positionLevel: string
+ salary: number
+ personId: string
+ posNo: string
+ organization: string
+ }
+export type { FormData, FormRef,DataOption,DataOptionRes,personType,DataListRow};
diff --git a/src/modules/11_discipline/store/ResultStore.ts b/src/modules/11_discipline/store/ResultStore.ts
index afd319e08..7ec74aa53 100644
--- a/src/modules/11_discipline/store/ResultStore.ts
+++ b/src/modules/11_discipline/store/ResultStore.ts
@@ -10,9 +10,10 @@ import type {
DataResult,
DataResultList,
} from "@/modules/11_discipline/interface/response/result";
+import { useCounterMixin } from "@/stores/mixin";
import { useDisciplineMainStore } from "@/modules/11_discipline/store";
-import { useCounterMixin } from "@/stores/mixin";
+
const mixin = useCounterMixin();
const storeMain = useDisciplineMainStore();
const { date2Thai } = mixin;
@@ -25,6 +26,21 @@ export const useDisciplineResultStore = defineStore(
const rows2 = ref
([]);
const selected = ref([]);
+ const complainantoptions = ref(
+ storeMain.complainantoptionsMain
+ );
+
+ function filterSelector(val: string, update: Function, type: string) {
+ update(() => {
+ const needle = val.toLowerCase();
+ if (type === "filterrespondentType") {
+ complainantoptions.value = storeMain.complainantoptionsMain.filter(
+ (v: any) => v.name.toLowerCase().indexOf(needle) > -1
+ );
+ }
+ });
+ }
+
async function fetchList(data: DataResult[]) {
const datalist: DataResultList[] = data.map((e: DataResult) => ({
id: e.id,
@@ -47,6 +63,7 @@ export const useDisciplineResultStore = defineStore(
rows.value = datalist;
}
+
async function fecthDirector(data: directorType[]) {
let datalistDirector: directorType[] = data.map((e: directorType) => ({
nameDirector: e.nameDirector,
@@ -239,6 +256,8 @@ export const useDisciplineResultStore = defineStore(
columns,
visibleColumnsDirector,
columnsDirector,
+ complainantoptions,
+ filterSelector
};
}
);