fixing remove import file

This commit is contained in:
Warunee Tamkoo 2024-11-21 16:58:49 +07:00
parent e541bbb6d2
commit ed683d0bb3
24 changed files with 201 additions and 831 deletions

View file

@ -1,7 +1,7 @@
<script setup lang="ts">
import { checkPermission } from "@/utils/permissions";
import { ref, useAttrs } from "vue";
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
const attrs = ref<any>(useAttrs());
const table = ref<any>(null);

View file

@ -2,7 +2,7 @@
import { ref, useAttrs } from "vue";
import HeaderTop from "@/modules/03_recruiting/components/top1.vue";
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
const attrs = ref<any>(useAttrs());
const table = ref<any>(null);

View file

@ -254,14 +254,14 @@ const defaultEducation = ref<Education>({
educationLevelHighId: null,
});
async function changeData(system: String, val: any){
async function changeData(system: String, val: any) {
if (system == "information") defaultInformation.value = val;
if (system == "address") defaultAddress.value = val;
if (system == "famliy") defaultFamily.value = val;
if (system == "occupation") defaultOccupation.value = val;
if (system == "contact") defaultContact.value = val;
if (system == "education") defaultEducation.value = val;
};
}
export {
defaultInformation,

View file

@ -0,0 +1,77 @@
interface DataNumObject {
id: number;
count: number;
name: string;
color: string;
}
interface DataDateAddObject {
year: number;
holidayDate: Date | string;
name: string;
isSpecial: boolean;
}
interface DataDateMonthObject {
month: number;
year: number;
}
//ข้อมูล
interface RequestItemsObject {
createdAt?: Date;
createdFullName: string;
createdUserId: string;
holidayDate: Date | string;
id: string;
isSpecial: boolean;
lastUpdateFullName: string;
lastUpdateUserId: string;
lastUpdatedAt?: Date;
name: string;
originalDate: Date;
}
interface DataDateRowObject {
holidayDate: Date;
name: string;
isSpecial: boolean;
id: string;
}
interface DataDateListsObject {
id: string;
dateRange: [Date, Date];
dataRangeRow: DataDateRowObject[];
detail: string;
isSpecial: boolean;
}
//columns
interface Columns {
[index: number]: {
name: string;
align?: string;
label: string;
sortable?: boolean;
field: string | ((row: any) => any);
headerStyle?: string;
style?: string;
};
}
interface TabsObject {
label: string;
value: string;
}
export type {
DataNumObject,
DataDateAddObject,
DataDateMonthObject,
RequestItemsObject,
DataDateRowObject,
DataDateListsObject,
Columns,
TabsObject,
};

View file

@ -10,9 +10,9 @@ import { useCounterMixin } from "@/stores/mixin";
import type { RequestPeriodCompete } from "@/modules/03_recruiting/interface/request/Period";
import type {
DataOption,
DataOption2,
UploadType,
} from "@/modules/02_organizational/interface/index/Main";
} from "@/modules/02_organization/interface/index/Main";
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
@ -37,10 +37,10 @@ const datePayment = ref<[Date, Date] | null>(null); //วันที่จ่
const dateAnnouncement = ref<[Date, Date] | null>(null); //
const dateExam = ref<Date | null>(null); //
const dateAnnounce = ref<Date | null>(null); //
const positionPathOptions = ref<DataOption[]>([]);
const organizationShortName = ref<DataOption>({ id: "", name: "" });
const organizationName = ref<DataOption>({ id: "", name: "" });
const organizationNameOptions = ref<DataOption[]>([]);
const positionPathOptions = ref<DataOption2[]>([]);
const organizationShortName = ref<DataOption2>({ id: "", name: "" });
const organizationName = ref<DataOption2>({ id: "", name: "" });
const organizationNameOptions = ref<DataOption2[]>([]);
const fileDocDataUpload = ref<File[]>([]);
const fileDocs = ref<UploadType[]>([]);
const fileImgDataUpload = ref<File[]>([]);
@ -339,11 +339,11 @@ function dateThaiRange(val: [Date, Date]) {
}
}
watch(organizationShortName, (count: DataOption, prevCount: DataOption) => {
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
organizationNameOptions.value = [];
});
watch(organizationName, (count: DataOption, prevCount: DataOption) => {
watch(organizationName, (count: DataOption2, prevCount: DataOption2) => {
positionPathOptions.value = [];
});

View file

@ -10,9 +10,9 @@ import { useCounterMixin } from "@/stores/mixin";
import type { RequestPeriodDisable } from "@/modules/03_recruiting/interface/request/Period";
import type {
DataOption,
DataOption2,
UploadType,
} from "@/modules/02_organizational/interface/index/Main";
} from "@/modules/02_organization/interface/index/Main";
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
@ -40,10 +40,10 @@ const datePayment = ref<[Date, Date] | null>(null); //วันที่จ่
const dateAnnouncement = ref<[Date, Date] | null>(null); //
const dateExam = ref<Date | null>(null); //
const dateAnnounce = ref<Date | null>(null); //
const positionPathOptions = ref<DataOption[]>([]);
const organizationShortName = ref<DataOption>({ id: "", name: "" });
const organizationName = ref<DataOption>({ id: "", name: "" });
const organizationNameOptions = ref<DataOption[]>([]);
const positionPathOptions = ref<DataOption2[]>([]);
const organizationShortName = ref<DataOption2>({ id: "", name: "" });
const organizationName = ref<DataOption2>({ id: "", name: "" });
const organizationNameOptions = ref<DataOption2[]>([]);
const fileDocDataUpload = ref<File[]>([]);
const fileDocs = ref<UploadType[]>([]);
@ -337,11 +337,11 @@ function dateThaiRange(val: [Date, Date] | null) {
}
}
watch(organizationShortName, (count: DataOption, prevCount: DataOption) => {
watch(organizationShortName, (count: DataOption2, prevCount: DataOption2) => {
organizationNameOptions.value = [];
});
watch(organizationName, (count: DataOption, prevCount: DataOption) => {
watch(organizationName, (count: DataOption2, prevCount: DataOption2) => {
positionPathOptions.value = [];
});
@ -386,7 +386,7 @@ onMounted(async () => {
dense
lazy-rules
:rules="[
(val) =>
(val:string) =>
!!val || `${'กรุณากรอกชื่อรอบคัดเลือกคนพิการ/ชื่อประกาศ'}`,
]"
></q-input>
@ -446,7 +446,7 @@ onMounted(async () => {
lazy-rules
input-class="text-right"
:rules="[
(val) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
(val:any) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
]"
></q-input>
</div>

View file

@ -18,9 +18,9 @@ import type {
ResponsePayment,
} from "@/modules/03_recruiting/interface/response/Period";
import type {
DataOption,
DataOption2,
UploadType,
} from "@/modules/02_organizational/interface/index/Main";
} from "@/modules/02_organization/interface/index/Main";
import ProfileTable from "@/modules/03_recruiting/components/Table1.vue";
@ -60,12 +60,12 @@ const dateAnnounce = ref<Date | null>(null); //วันประกาศผล
const dateExam = ref<Date | null>(null); //
const myFormPayment = ref<any>();
const myFormPosition = ref<any>();
const positionPathOptions = ref<DataOption[]>([]);
const positionPathFilters = ref<DataOption[]>([]);
const positionLevelOptions = ref<DataOption[]>([]);
const positionLevelFilters = ref<DataOption[]>([]);
const organizationShortName = ref<DataOption>();
const organizationName = ref<DataOption>();
const positionPathOptions = ref<DataOption2[]>([]);
const positionPathFilters = ref<DataOption2[]>([]);
const positionLevelOptions = ref<DataOption2[]>([]);
const positionLevelFilters = ref<DataOption2[]>([]);
const organizationShortName = ref<DataOption2>();
const organizationName = ref<DataOption2>();
const examTypeOptions = [
{ name: "ทั่วไป", id: "normol" },
{ name: "แพทย์", id: "docter" },
@ -302,8 +302,8 @@ async function fetchPositionPath() {
.get(config.API.positionPath)
.then((res) => {
const data = res.data.result;
let option: DataOption[] = [];
data.map((r: DataOption) => {
let option: DataOption2[] = [];
data.map((r: DataOption2) => {
option.push({
id: r.id.toString(),
name: r.name.toString(),
@ -329,8 +329,8 @@ async function fetchPositionLevel() {
.get(config.API.positionLevel)
.then((res) => {
const data = res.data.result;
let option: DataOption[] = [];
data.map((r: DataOption) => {
let option: DataOption2[] = [];
data.map((r: DataOption2) => {
option.push({
id: r.id.toString(),
name: r.name.toString(),
@ -338,10 +338,10 @@ async function fetchPositionLevel() {
});
});
positionLevelOptions.value = option.filter(
(v: DataOption) => v.level === 0
(v: DataOption2) => v.level === 0
);
positionLevelFilters.value = option.filter(
(v: DataOption) => v.level === 0
(v: DataOption2) => v.level === 0
);
})
.catch((e) => {
@ -363,14 +363,14 @@ function filterSelector(val: any, update: Function, refData: string) {
case "positionLevel":
update(() => {
positionLevelOptions.value = positionLevelFilters.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption2) => v.name.indexOf(val) > -1
);
});
break;
case "position":
update(() => {
positionPathOptions.value = positionPathFilters.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
(v: DataOption2) => v.name.indexOf(val) > -1
);
});
break;
@ -775,7 +775,7 @@ onMounted(async () => {
:readonly="checkRoutePermisson"
lazy-rules
:rules="[
(val) => !!val || `${'กรุณากรอกชื่อรอบคัดเลือก/ชื่อประกาศ'}`,
(val:string) => !!val || `${'กรุณากรอกชื่อรอบคัดเลือก/ชื่อประกาศ'}`,
]"
></q-input>
</div>
@ -1282,7 +1282,7 @@ onMounted(async () => {
lazy-rules
mask="###-#-#####-#"
:rules="[
(val) =>
(val:any) =>
(val && val.length > 0) ||
'กรุณากรอกข้อมูลให้ครบ',
]"
@ -1298,7 +1298,7 @@ onMounted(async () => {
dense
lazy-rules
:rules="[
(val) =>
(val:any) =>
(val && val.length > 0) ||
'กรุณากรอกข้อมูลให้ครบ',
]"
@ -1314,7 +1314,7 @@ onMounted(async () => {
dense
lazy-rules
:rules="[
(val) =>
(val:any) =>
(val && val.length > 0) ||
'กรุณากรอกข้อมูลให้ครบ',
]"

View file

@ -9,7 +9,7 @@ import { checkPermission } from "@/utils/permissions";
import { useRouter, useRoute } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import type { DataNumObject } from "@/modules/01_metadata/interface/request/Calendar";
import type { DataNumObject } from "@/modules/03_recruiting/interface/request/Calendar";
import TableCandidate from "@/modules/03_recruiting/components/TableCandidate.vue";
import ExamFinished from "@/modules/03_recruiting/components/ExamFinished.vue";
@ -234,7 +234,7 @@ async function changePage(
/** ดึงข้อมูล */
async function fetchData(loading: boolean = true) {
loading === true ?? showLoader();
loading ?? showLoader();
await http
.get(
config.API.candidateOfPeriodExam(status.value, examId.value) +
@ -274,7 +274,7 @@ async function fetchData(loading: boolean = true) {
messageError($q, e);
})
.finally(() => {
loading === true ?? hideLoader();
loading ?? hideLoader();
});
}