ข้อมูลบุคคล: APIระดับการศึกษา
This commit is contained in:
parent
8558cf9b45
commit
727f3c6765
2 changed files with 15 additions and 4 deletions
|
|
@ -71,7 +71,7 @@ const columns = [
|
||||||
] as const satisfies QTableProps["columns"];
|
] as const satisfies QTableProps["columns"];
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const editId = ref<string>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const educationLevel = ref<string>("");
|
const educationLevel = ref<string>("");
|
||||||
|
|
@ -139,6 +139,8 @@ onMounted(async () => {
|
||||||
() => {
|
() => {
|
||||||
dialogStatus = 'create';
|
dialogStatus = 'create';
|
||||||
dialog = true;
|
dialog = true;
|
||||||
|
educationLevel = '';
|
||||||
|
educationRank = undefined;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -211,6 +213,9 @@ onMounted(async () => {
|
||||||
() => {
|
() => {
|
||||||
dialogStatus = 'edit';
|
dialogStatus = 'edit';
|
||||||
dialog = true;
|
dialog = true;
|
||||||
|
editId = props.row.id;
|
||||||
|
educationLevel = props.row.name;
|
||||||
|
educationRank = props.row.rank;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -223,7 +228,12 @@ onMounted(async () => {
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item clickable>
|
<q-item clickable>
|
||||||
<q-item-section
|
<q-item-section
|
||||||
@click="dialogRemove($q, async () => {})"
|
@click="
|
||||||
|
dialogRemove(
|
||||||
|
$q,
|
||||||
|
async () => await deleteData(props.row.id)
|
||||||
|
)
|
||||||
|
"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<div class="row items-center white">
|
<div class="row items-center white">
|
||||||
|
|
@ -241,7 +251,7 @@ onMounted(async () => {
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:educationRank:="educationRank"
|
v-model:educationRank="educationRank"
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="educationLevel"
|
v-model:data="educationLevel"
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ const personalName = defineModel<string>("personalName");
|
||||||
const dialogStatus = defineModel<string>("dialogStatus");
|
const dialogStatus = defineModel<string>("dialogStatus");
|
||||||
const editId = defineModel<string>("editId");
|
const editId = defineModel<string>("editId");
|
||||||
const dialog = defineModel<boolean>("dialog");
|
const dialog = defineModel<boolean>("dialog");
|
||||||
const educationRank = defineModel<number>("rank");
|
const educationRank = defineModel<number>("educationRank");
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchData: {
|
fetchData: {
|
||||||
type: Function,
|
type: Function,
|
||||||
|
|
@ -52,6 +52,7 @@ async function onSubmit() {
|
||||||
: props.editData(editId.value);
|
: props.editData(editId.value);
|
||||||
closeDialog();
|
closeDialog();
|
||||||
data.value = "";
|
data.value = "";
|
||||||
|
educationRank.value = undefined;
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue