diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index 465982b..ba33d4b 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -6,6 +6,8 @@ const profileOrg = `${env.API_URI}/org/profile`; const report = `${env.API_URI}/org`; const workflow = `${env.API_URI}/org/workflow`; export default { + orgCommandCode: `${metadata}commandCode`, + profilePosition: () => `${org}/profile/keycloak/position`, searchCommander: `${org}/profile/search/commander`, diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue index 2e62377..a2fc877 100644 --- a/src/modules/10_registry/02_Government/07_Position.vue +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -1,16 +1,18 @@ diff --git a/src/modules/10_registry/05_Other/03_FileOther.vue b/src/modules/10_registry/05_Other/03_FileOther.vue new file mode 100644 index 0000000..4682422 --- /dev/null +++ b/src/modules/10_registry/05_Other/03_FileOther.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/modules/10_registry/interface/response/Main.ts b/src/modules/10_registry/interface/response/Main.ts index 136aded..531e11c 100644 --- a/src/modules/10_registry/interface/response/Main.ts +++ b/src/modules/10_registry/interface/response/Main.ts @@ -11,4 +11,14 @@ interface DataRequest { topic: string; } -export type { DataRequest }; +interface DataCommandCode { + id: string; + createdAt: Date; + lastUpdatedAt: Date; + createdFullName: string; + lastUpdateFullName: string; + name: string; + code: number; +} + +export type { DataRequest, DataCommandCode }; diff --git a/src/modules/10_registry/store/Position.ts b/src/modules/10_registry/store/Position.ts new file mode 100644 index 0000000..7fee4f6 --- /dev/null +++ b/src/modules/10_registry/store/Position.ts @@ -0,0 +1,35 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; +import { useQuasar } from "quasar"; + +import { useCounterMixin } from "@/stores/mixin"; + +import type { DataOption } from "@/modules/10_registry/interface/index/Main"; + +const $q = useQuasar(); +const mixin = useCounterMixin(); +const {} = mixin; + +export const useGovernmentPosDataStore = defineStore("GovernmentPos", () => { + // commandCode ขอตำแหน่ง + const positionCode = ref([ + 0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, + ]); + + const commandCodeData = ref([]); + + function convertCommandCodeName(val: string) { + return ( + commandCodeData.value.find((e: DataOption) => e.id === val)?.name ?? "-" + ); + } + + return { + // Data + commandCodeData, + positionCode, + + // Function + convertCommandCodeName, + }; +}); diff --git a/src/modules/10_registry/store/registry.ts b/src/modules/10_registry/store/registry.ts index 075e83f..8c7aa40 100644 --- a/src/modules/10_registry/store/registry.ts +++ b/src/modules/10_registry/store/registry.ts @@ -10,6 +10,7 @@ export const useRegistryInFormationStore = defineStore( () => { const typeProfile = ref("OFFICER"); const profileId = ref(""); + const citizenId = ref(""); function typeChangeName(val: string) { switch (val) { @@ -29,6 +30,6 @@ export const useRegistryInFormationStore = defineStore( return "-"; } } - return { typeChangeName, typeProfile, profileId }; + return { typeChangeName, typeProfile, profileId, citizenId }; } ); diff --git a/src/modules/10_registry/tabs/05_other.vue b/src/modules/10_registry/tabs/05_other.vue index 09b87e2..7dde665 100644 --- a/src/modules/10_registry/tabs/05_other.vue +++ b/src/modules/10_registry/tabs/05_other.vue @@ -4,6 +4,7 @@ import { useRouter } from "vue-router"; /** component */ import Other from "@/modules/10_registry/05_Other/01_Other.vue"; import File from "@/modules/10_registry/05_Other/02_File.vue"; +import FileOther from "@/modules/10_registry/05_Other/03_FileOther.vue"; const router = useRouter(); @@ -27,6 +28,7 @@ const router = useRouter();
+