updated format code
This commit is contained in:
parent
b75d69ea08
commit
b14bad2249
241 changed files with 14012 additions and 13811 deletions
|
|
@ -1,156 +1,110 @@
|
|||
<!-- card บุคคลที่สามารถติดต่อได้ -->
|
||||
<template>
|
||||
<HeaderTop
|
||||
v-model:edit="edit"
|
||||
header="บุคคลที่สามารถติดต่อได้"
|
||||
icon="mdi-account-circle"
|
||||
:addData="true"
|
||||
:editOnly="false"
|
||||
:editData="false"
|
||||
/>
|
||||
<q-form ref="myform">
|
||||
<div
|
||||
class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs"
|
||||
>
|
||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||
<q-select
|
||||
:class="
|
||||
getClass(
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
)
|
||||
"
|
||||
:readonly="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:borderless="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="defaultContact.contactPrefixId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="prefixOptions"
|
||||
option-value="id"
|
||||
:label="`${'คำนำหน้า'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="
|
||||
getClass(
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
)
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:borderless="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
v-model="defaultContact.contactFirstname"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||
:label="`${'ชื่อ'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="
|
||||
getClass(
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
)
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:borderless="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
v-model="defaultContact.contactLastname"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||
:label="`${'นามสกุล'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||
<q-input
|
||||
:class="
|
||||
getClass(
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
)
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:borderless="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
v-model="defaultContact.contactRelations"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
||||
:label="`${'เกี่ยวข้องเป็น'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||
<q-input
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
:counter="
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
? true
|
||||
: false
|
||||
"
|
||||
lazy-rules
|
||||
type="tel"
|
||||
mask="##########"
|
||||
maxlength="10"
|
||||
:class="
|
||||
getClass(
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
)
|
||||
"
|
||||
:readonly="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:borderless="
|
||||
!(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
v-model="defaultContact.contactTel"
|
||||
:label="`${'โทรศัพท์'}`"
|
||||
:rules="[
|
||||
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
||||
(val) =>
|
||||
(val.length >= 9 &&
|
||||
val.length <= 10 &&
|
||||
val.startsWith('0')) ||
|
||||
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
<HeaderTop
|
||||
v-model:edit="edit"
|
||||
header="บุคคลที่สามารถติดต่อได้"
|
||||
icon="mdi-account-circle"
|
||||
:addData="true"
|
||||
:editOnly="false"
|
||||
:editData="false"
|
||||
/>
|
||||
<q-form ref="myform">
|
||||
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||
<q-select
|
||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="defaultContact.contactPrefixId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="prefixOptions"
|
||||
option-value="id"
|
||||
:label="`${'คำนำหน้า'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||
v-model="defaultContact.contactFirstname"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||
:label="`${'ชื่อ'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||
v-model="defaultContact.contactLastname"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||
:label="`${'นามสกุล'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||
<q-input
|
||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||
v-model="defaultContact.contactRelations"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
||||
:label="`${'เกี่ยวข้องเป็น'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||
<q-input
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
:counter="
|
||||
status == 'checkRegister' || status == 'payment' ? true : false
|
||||
"
|
||||
lazy-rules
|
||||
type="tel"
|
||||
mask="##########"
|
||||
maxlength="10"
|
||||
:class="getClass(status == 'checkRegister' || status == 'payment')"
|
||||
:readonly="!(status == 'checkRegister' || status == 'payment')"
|
||||
:borderless="!(status == 'checkRegister' || status == 'payment')"
|
||||
v-model="defaultContact.contactTel"
|
||||
:label="`${'โทรศัพท์'}`"
|
||||
:rules="[
|
||||
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
||||
(val) =>
|
||||
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
||||
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch, PropType } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type {
|
||||
Contact,
|
||||
DataOption,
|
||||
Contact,
|
||||
DataOption,
|
||||
} from "@/modules/03_recruiting/interface/index/Main";
|
||||
import {
|
||||
defaultContact,
|
||||
changeData,
|
||||
defaultContact,
|
||||
changeData,
|
||||
} from "@/modules/03_recruiting/interface/index/Main";
|
||||
import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
|
@ -159,18 +113,18 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useQuasar } from "quasar";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
prefixOptions: {
|
||||
type: Array as PropType<DataOption[]>,
|
||||
required: true,
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
prefixOptions: {
|
||||
type: Array as PropType<DataOption[]>,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["update:form"]);
|
||||
|
||||
|
|
@ -183,43 +137,43 @@ const route = useRoute();
|
|||
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||
|
||||
watch(myform, async (count: any, prevCount: any) => {
|
||||
emit("update:form", count);
|
||||
emit("update:form", count);
|
||||
});
|
||||
|
||||
watch(defaultContact, async (count: Contact, prevCount: Contact) => {
|
||||
await changeData("contact", count);
|
||||
await changeData("contact", count);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchData();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateContact(candidateId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
if (data != null) {
|
||||
defaultContact.value.contactPrefixId = data.contactPrefixId;
|
||||
defaultContact.value.contactFirstname = data.contactFirstname;
|
||||
defaultContact.value.contactLastname = data.contactLastname;
|
||||
defaultContact.value.contactRelations = data.contactRelations;
|
||||
defaultContact.value.contactTel = data.contactTel;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e)
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateContact(candidateId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
if (data != null) {
|
||||
defaultContact.value.contactPrefixId = data.contactPrefixId;
|
||||
defaultContact.value.contactFirstname = data.contactFirstname;
|
||||
defaultContact.value.contactLastname = data.contactLastname;
|
||||
defaultContact.value.contactRelations = data.contactRelations;
|
||||
defaultContact.value.contactTel = data.contactTel;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e)
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
"full-width inputgreen cursor-pointer": val,
|
||||
"full-width cursor-pointer": !val,
|
||||
};
|
||||
return {
|
||||
"full-width inputgreen cursor-pointer": val,
|
||||
"full-width cursor-pointer": !val,
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<q-toolbar>
|
||||
<q-toolbar-title class="text-subtitle2 text-bold">{{ tittle }}</q-toolbar-title>
|
||||
<q-toolbar-title class="text-subtitle2 text-bold">{{
|
||||
tittle
|
||||
}}</q-toolbar-title>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@
|
|||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
<template #body="props">
|
||||
|
|
|
|||
|
|
@ -126,7 +126,11 @@
|
|||
round
|
||||
flat
|
||||
color="indigo"
|
||||
v-if="statusPayment && setSeat == true && checkPermission($route)?.attrIsUpdate"
|
||||
v-if="
|
||||
statusPayment &&
|
||||
setSeat == true &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
@click="candidateToPlacement"
|
||||
>
|
||||
<q-tooltip>บรรจุผู้ผ่านการคัดเลือก</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
<div class="flex items-center q-pb-md">
|
||||
<div class="flex items-center" v-if="header != ''">
|
||||
<q-icon :name="icon" size="1.5em" color="grey-5" class="q-mr-md" />
|
||||
<div class="text-weight-medium text-dark col-12 row items-center text-subtitle1">
|
||||
<div
|
||||
class="text-weight-medium text-dark col-12 row items-center text-subtitle1"
|
||||
>
|
||||
{{ header }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
interface DataProps {
|
||||
row: RequestItemsObject
|
||||
rowIndex: number
|
||||
row: RequestItemsObject;
|
||||
rowIndex: number;
|
||||
}
|
||||
|
||||
//ข้อมูล
|
||||
interface RequestItemsObject {
|
||||
id: string
|
||||
location: string
|
||||
position: string
|
||||
salary: number | null
|
||||
duration: [Date, Date]
|
||||
reason: string
|
||||
id: string;
|
||||
location: string;
|
||||
position: string;
|
||||
salary: number | null;
|
||||
duration: [Date, Date];
|
||||
reason: string;
|
||||
}
|
||||
|
||||
//columns
|
||||
interface Columns {
|
||||
[index: number]: {
|
||||
name: String
|
||||
align: String
|
||||
label: String
|
||||
sortable: Boolean
|
||||
field: String
|
||||
headerStyle: String
|
||||
style: String
|
||||
}
|
||||
name: String;
|
||||
align: String;
|
||||
label: String;
|
||||
sortable: Boolean;
|
||||
field: String;
|
||||
headerStyle: String;
|
||||
style: String;
|
||||
};
|
||||
}
|
||||
|
||||
export type { RequestItemsObject, Columns, DataProps }
|
||||
export type { RequestItemsObject, Columns, DataProps };
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
import { ref, computed } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const useExamDataStore = defineStore('exam', () => {
|
||||
export const useExamDataStore = defineStore("exam", () => {
|
||||
interface exam {
|
||||
main: { columns: String[] }
|
||||
education: { columns: String[] }
|
||||
career: { columns: String[] }
|
||||
main: { columns: String[] };
|
||||
education: { columns: String[] };
|
||||
career: { columns: String[] };
|
||||
}
|
||||
|
||||
const examData = ref<exam>({
|
||||
main: { columns: [] },
|
||||
education: { columns: [] },
|
||||
career: { columns: [] }
|
||||
})
|
||||
career: { columns: [] },
|
||||
});
|
||||
|
||||
const consend = ref<boolean>(false)
|
||||
const status = ref<string>('')
|
||||
const consend = ref<boolean>(false);
|
||||
const status = ref<string>("");
|
||||
|
||||
const changeExamColumns = (system: String, val: String[]) => {
|
||||
if (system == 'main') examData.value.main.columns = val
|
||||
if (system == 'education') examData.value.education.columns = val
|
||||
if (system == 'career') examData.value.career.columns = val
|
||||
localStorage.setItem('exam', JSON.stringify(examData.value))
|
||||
}
|
||||
if (system == "main") examData.value.main.columns = val;
|
||||
if (system == "education") examData.value.education.columns = val;
|
||||
if (system == "career") examData.value.career.columns = val;
|
||||
localStorage.setItem("exam", JSON.stringify(examData.value));
|
||||
};
|
||||
|
||||
if (localStorage.getItem('exam') !== null) {
|
||||
examData.value = JSON.parse(localStorage.getItem('exam') || '{}')
|
||||
if (localStorage.getItem("exam") !== null) {
|
||||
examData.value = JSON.parse(localStorage.getItem("exam") || "{}");
|
||||
}
|
||||
|
||||
const changeStatus = (val: string) => {
|
||||
status.value = val
|
||||
}
|
||||
status.value = val;
|
||||
};
|
||||
|
||||
return {
|
||||
examData,
|
||||
changeExamColumns,
|
||||
consend,
|
||||
status,
|
||||
changeStatus
|
||||
}
|
||||
})
|
||||
changeStatus,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@
|
|||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click="
|
||||
checkPermission($route)?.attrIsGet && viewDetail(props.row)
|
||||
"
|
||||
@click="checkPermission($route)?.attrIsGet && viewDetail(props.row)"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
|
|
|
|||
|
|
@ -502,7 +502,6 @@
|
|||
:rules="[(val:any) => !!val || `${'กรุณาเลือกประเภทแบบฟอร์ม'}`]"
|
||||
></selector>
|
||||
</q-td>
|
||||
|
||||
</q-tr>
|
||||
</template>
|
||||
</ProfileTable>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue