ทะเบียนประวัติ: แก้ path import (+interface)
This commit is contained in:
parent
7251cdc021
commit
2503a9992c
7 changed files with 234 additions and 37 deletions
|
|
@ -6,22 +6,16 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||
import type { InformationOps } from "@/modules/04_registry/interface/index/Main";
|
||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||
import type {
|
||||
RequestItemsHistoryObject,
|
||||
Columns,
|
||||
} from "@/modules/04_registry/interface/request/Information";
|
||||
import type {
|
||||
Information,
|
||||
DataOption,
|
||||
} from "@/modules/04_registry/components/profileType";
|
||||
import HistoryTable from "@/components/TableHistory.vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import type {
|
||||
InformationOps,
|
||||
DataOption,
|
||||
} from "@/modules/04_registryNew/interface/index/Main";
|
||||
import type { RequestItemsHistoryObject } from "@/modules/04_registryNew/interface/request/Information";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const profileStore = useProfileDataStore();
|
||||
const { showLoader, hideLoader, date2Thai, messageError } = mixin;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
|
|
@ -366,7 +360,6 @@ async function fetchPerson() {
|
|||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
// hideLoader();
|
||||
profileStore.isLoad++;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +471,6 @@ function onSubmit() {
|
|||
myForm.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
// await saveData();
|
||||
console.log("Hello");
|
||||
modal.value = false;
|
||||
}
|
||||
});
|
||||
|
|
@ -490,8 +482,6 @@ onMounted(async () => {
|
|||
</script>
|
||||
<template>
|
||||
<div class="row q-gutter-sm items-center">
|
||||
<div class="toptitle col text-dark">ประวัติส่วนตัว</div>
|
||||
|
||||
<div class="toptitle col text-right">
|
||||
<q-btn
|
||||
flat
|
||||
|
|
@ -510,8 +500,8 @@ onMounted(async () => {
|
|||
|
||||
<q-card bordered class="my-card bg-grey-1 q-pa-md">
|
||||
<div :class="$q.screen.gt.xs ? 'row' : 'column'">
|
||||
<!-- column 1 -->
|
||||
<div class="col-md-7 col-12 row">
|
||||
<!-- column 1 -->
|
||||
<div class="col-md-4 col-5 text-grey-6 text-weight-medium">
|
||||
<div
|
||||
v-for="label in Object.keys(dataLabel).slice(0, 6)"
|
||||
|
|
@ -552,6 +542,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- column 2 -->
|
||||
<div class="col-md-5 col-12 row">
|
||||
<div class="col-md-4 col-5 col text-grey-6 text-weight-medium">
|
||||
|
|
@ -704,7 +695,7 @@ onMounted(async () => {
|
|||
(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`,
|
||||
]"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
|
|
@ -843,13 +834,15 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<div class="text-right q-pa-sm">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
unelevated
|
||||
label="บันทึก"
|
||||
id="onSubmit"
|
||||
type="submit"
|
||||
icon="mdi-content-save-outline"
|
||||
color="secondary"
|
||||
color="public"
|
||||
class="q-px-md"
|
||||
>
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
|
|
@ -858,13 +851,13 @@ onMounted(async () => {
|
|||
|
||||
<history-table
|
||||
:rows="rowsHistory"
|
||||
:columns="columnsHistory"
|
||||
:filter="filterHistory"
|
||||
:columns="columnsHistory"
|
||||
:visible-columns="visibleColumnsHistory"
|
||||
v-model:modal="modalHistory"
|
||||
v-model:tittle="tittleHistory"
|
||||
v-model:inputfilter="filterHistory"
|
||||
v-model:inputvisible="visibleColumnsHistory"
|
||||
v-model:tittle="tittleHistory"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -7,13 +7,10 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
|
||||
import HistoryTable from "@/components/TableHistory.vue";
|
||||
import type { ResponseObject } from "@/components/information/interface/response/OldName";
|
||||
import type {
|
||||
RequestItemsObject,
|
||||
DataProps,
|
||||
} from "@/components/information/interface/request/OldName";
|
||||
import type { Pagination } from "@/modules/04_registryNew/interface/index/Main";
|
||||
import type { RequestItemsObject } from "@/components/information/interface/request/OldName";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
|
|
@ -278,9 +275,7 @@ onMounted(async () => {
|
|||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="row q-gutter-sm items-center">
|
||||
<div class="toptitle col text-dark">ประวัติการเปลี่ยนชื่อ-นามสกุล</div>
|
||||
|
||||
<div class="row justify-end items-center">
|
||||
<div class="toptitle row">
|
||||
<q-input
|
||||
dense
|
||||
|
|
@ -290,7 +285,7 @@ onMounted(async () => {
|
|||
ref="filterRef"
|
||||
v-model="filterSearch"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 150px"
|
||||
style="max-width: 200px"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" v-if="filterSearch == ''" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import type { QTableProps } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import HistoryTable from "@/components/TableHistory.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type {
|
||||
DataOption,
|
||||
|
|
@ -14,10 +16,8 @@ import type {
|
|||
Address,
|
||||
} from "@/modules/04_registryNew/interface/index/Main";
|
||||
import { defaultAddress } from "@/modules/04_registryNew/interface/index/Main";
|
||||
import DialogHeader from "@/modules/04_registryNew/components/DialogHeader.vue";
|
||||
import type { ResponseObject } from "@/modules/04_registryNew/interface/response/Address";
|
||||
import type { RequestItemsHistoryObject } from "@/modules/04_registryNew/interface/request/Address";
|
||||
import HistoryTable from "@/components/TableHistory.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
|
|
|
|||
|
|
@ -11,4 +11,65 @@ interface DataOption2 {
|
|||
name: string;
|
||||
}
|
||||
|
||||
export type { Pagination, DataOption, DataOption2 };
|
||||
interface zipCodeOption {
|
||||
id: string;
|
||||
name: string;
|
||||
zipCode: string;
|
||||
}
|
||||
|
||||
interface InformationOps {
|
||||
prefixOps: DataOption[];
|
||||
prefixOldOps: DataOption[];
|
||||
genderOps: DataOption[];
|
||||
bloodOps: DataOption[];
|
||||
statusOps: DataOption[];
|
||||
religionOps: DataOption[];
|
||||
employeeClassOps: DataOption[];
|
||||
employeeTypeOps: DataOption[];
|
||||
}
|
||||
|
||||
interface AddressOps {
|
||||
provinceOps: DataOption[];
|
||||
districtOps: DataOption[];
|
||||
districtCOps: DataOption[];
|
||||
subdistrictOps: zipCodeOption[];
|
||||
subdistrictCOps: zipCodeOption[];
|
||||
}
|
||||
|
||||
interface Address {
|
||||
address: string | null;
|
||||
provinceId: string | null;
|
||||
districtId: string | null;
|
||||
subdistrictId: string | null;
|
||||
addressC: string | null;
|
||||
provinceIdC: string | null;
|
||||
districtIdC: string | null;
|
||||
subdistrictIdC: string | null;
|
||||
same: string | null;
|
||||
codec: string | null;
|
||||
codep: string | null;
|
||||
}
|
||||
|
||||
const defaultAddress: Address = {
|
||||
address: null,
|
||||
provinceId: null,
|
||||
districtId: null,
|
||||
subdistrictId: null,
|
||||
addressC: null,
|
||||
provinceIdC: null,
|
||||
districtIdC: null,
|
||||
subdistrictIdC: null,
|
||||
codec: null,
|
||||
codep: null,
|
||||
same: "0",
|
||||
};
|
||||
export { defaultAddress };
|
||||
export type {
|
||||
Pagination,
|
||||
DataOption,
|
||||
DataOption2,
|
||||
zipCodeOption,
|
||||
InformationOps,
|
||||
AddressOps,
|
||||
Address,
|
||||
};
|
||||
|
|
|
|||
55
src/modules/04_registryNew/interface/request/Address.ts
Normal file
55
src/modules/04_registryNew/interface/request/Address.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
interface DataProps {
|
||||
row: RequestItemsObject;
|
||||
rowIndex: number;
|
||||
}
|
||||
|
||||
//ข้อมูล
|
||||
interface RequestItemsObject {
|
||||
currentAddress: String | null;
|
||||
currentDistrictId: String | null;
|
||||
currentProvinceId: String | null;
|
||||
currentSubDistrictId: String | null;
|
||||
currentZipCode: String | null;
|
||||
registrationAddress: String | null;
|
||||
registrationDistrictId: String | null;
|
||||
registrationProvinceId: String | null;
|
||||
registrationSame: Boolean | null;
|
||||
registrationSubDistrictId: String | null;
|
||||
registrationZipCode: String | null;
|
||||
}
|
||||
|
||||
interface RequestItemsHistoryObject {
|
||||
currentAddress: String | null;
|
||||
currentDistrict: String | null;
|
||||
currentProvince: String | null;
|
||||
currentSubDistrict: String | null;
|
||||
currentZipCode: String | null;
|
||||
registrationAddress: String | null;
|
||||
registrationDistrict: String | null;
|
||||
registrationProvince: String | null;
|
||||
registrationSame: Boolean | null;
|
||||
registrationSubDistrict: String | null;
|
||||
registrationZipCode: String | null;
|
||||
createdFullName: String | null;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
//columns
|
||||
interface Columns {
|
||||
[index: number]: {
|
||||
name: String;
|
||||
align: String;
|
||||
label: String;
|
||||
sortable: Boolean;
|
||||
field: String;
|
||||
headerStyle: String;
|
||||
style: String;
|
||||
};
|
||||
}
|
||||
|
||||
export type {
|
||||
RequestItemsObject,
|
||||
Columns,
|
||||
DataProps,
|
||||
RequestItemsHistoryObject,
|
||||
};
|
||||
59
src/modules/04_registryNew/interface/request/Information.ts
Normal file
59
src/modules/04_registryNew/interface/request/Information.ts
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
interface DataProps {
|
||||
row: RequestItemsObject;
|
||||
rowIndex: number;
|
||||
}
|
||||
|
||||
//ข้อมูล
|
||||
interface RequestItemsObject {
|
||||
birthDate: Date | null;
|
||||
bloodGroupId: string | null;
|
||||
citizenId: string | null;
|
||||
firstName: string | null;
|
||||
genderId: string | null;
|
||||
lastName: string | null;
|
||||
nationality: string | null;
|
||||
prefixId: string | null;
|
||||
race: string | null;
|
||||
relationshipId: string | null;
|
||||
religionId: string | null;
|
||||
telephoneNumber: string | null;
|
||||
employeeType: string | null;
|
||||
employeeClass: string | null;
|
||||
}
|
||||
|
||||
interface RequestItemsHistoryObject {
|
||||
citizenId: string | null;
|
||||
prefix: string | null;
|
||||
firstName: string | null;
|
||||
lastName: string | null;
|
||||
birthDate: Date;
|
||||
gender: string | null;
|
||||
relationship: string | null;
|
||||
bloodGroup: string | null;
|
||||
nationality: string | null;
|
||||
race: string | null;
|
||||
religion: string | null;
|
||||
telephoneNumber: string | null;
|
||||
createdFullName: string | null;
|
||||
createdAt: Date;
|
||||
employeeType: string | null;
|
||||
employeeClass: string | null;
|
||||
}
|
||||
|
||||
//columns
|
||||
interface Columns {
|
||||
name: String;
|
||||
align: String;
|
||||
label: String;
|
||||
sortable: Boolean;
|
||||
field: String;
|
||||
headerStyle: String;
|
||||
style: String;
|
||||
}
|
||||
|
||||
export type {
|
||||
RequestItemsObject,
|
||||
Columns,
|
||||
DataProps,
|
||||
RequestItemsHistoryObject,
|
||||
};
|
||||
34
src/modules/04_registryNew/interface/response/Address.ts
Normal file
34
src/modules/04_registryNew/interface/response/Address.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
//ข้อมูล
|
||||
interface ResponseObject {
|
||||
currentAddress: string | null;
|
||||
currentDistrictId: string | null;
|
||||
currentProvinceId: string | null;
|
||||
currentSubDistrictId: string | null;
|
||||
currentZipCode: string | null;
|
||||
registrationAddress: string | null;
|
||||
registrationDistrictId: string | null;
|
||||
registrationProvinceId: string | null;
|
||||
registrationSame: Boolean | null;
|
||||
registrationSubDistrictId: string | null;
|
||||
registrationZipCode: string | null;
|
||||
createdFullName: string | null;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
interface ResponseHistory {
|
||||
currentAddress: string | null;
|
||||
currentDistrictId: string | null;
|
||||
currentProvinceId: string | null;
|
||||
currentSubDistrictId: string | null;
|
||||
currentZipCode: string | null;
|
||||
registrationAddress: string | null;
|
||||
registrationDistrictId: string | null;
|
||||
registrationProvinceId: string | null;
|
||||
registrationSame: string | null;
|
||||
registrationSubDistrictId: string | null;
|
||||
registrationZipCode: string | null;
|
||||
createdFullName: string | null;
|
||||
createdAt: Date;
|
||||
}
|
||||
|
||||
export type { ResponseObject, ResponseHistory };
|
||||
Loading…
Add table
Add a link
Reference in a new issue