Merge commit 'afa42c0133' into develop

This commit is contained in:
Tanyalak 2023-07-19 10:48:27 +07:00
commit 87ecd70e03
32 changed files with 3536 additions and 426 deletions

View file

@ -534,7 +534,7 @@ const OriginalDataFetch = async () => {
//
const redirectToPage = (id?: number) => {
router.push({ name: "placementDetail" });
// router.push({ name: "placementDetail" });
router.push(`/placement/order/detail`);
};

View file

@ -46,9 +46,7 @@
/>
</div>
</div>
<q-table
flat
bordered
<d-table
:rows="rows"
:columns="columns"
:visible-columns="visibleColumns"
@ -56,9 +54,6 @@
row-key="name"
selection="multiple"
v-model:selected="selected"
class="custom-header-table"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<template v-slot:header-selection="scope">
<q-checkbox
@ -70,20 +65,6 @@
</template>
<template v-slot:body-selection="scope">
<!-- <q-checkbox
keep-color
color="primary"
dense
:model-value="scope.selected"
@update:model-value="
(val, evt) => {
Object.getOwnPropertyDescriptor(scope, 'selected').set(
val,
evt
);
}
"
/> -->
<q-checkbox
keep-color
color="primary"
@ -97,57 +78,13 @@
<div v-if="props.col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<!-- <div v-else-if="props.col.name == 'educate'">
<q-select
:class="getClass(true)"
hide-bottom-space
multiple
:outlined="true"
dense
lazy-rules
:readonly="!true"
:borderless="!true"
v-model="props.value"
:rules="[(val:any) => !!val || `${'กรุณาเลือกวุฒิการศึกษา'}`,(val:any) => val.length > 0 || `${'กรุณาเลือกวุฒิการศึกษา'}`]"
:label="`${'เลือกวุฒิการศึกษา'}`"
emit-value
map-options
option-label="name"
:options="[]"
option-value="id"
input-debounce="0"
color="primary"
>
<template v-slot:prepend>
<q-icon name="cast_for_education" color="primary" />
</template>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-black">
ไมพบขอมลทนหา
</q-item-section>
</q-item>
</template>
</q-select>
</div> -->
<div v-else @click="click(props)">
{{ props.value }}
</div>
</q-td>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="pagination.page"
active-color="primary"
color="dark"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</d-table>
</div>
<q-separator />
<div class="flex justify-end q-pa-sm q-gutter-sm">
@ -230,7 +167,7 @@ const columns = ref<QTableProps["columns"]>([
},
]);
const rows = [
const rows = ref<any>([
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
@ -297,7 +234,7 @@ const rows = [
idcard: "6598455632145",
educate: "ปริญญาตรี",
},
];
]);
const selected = ref([]);
const pagination = ref({
sortBy: "desc",
@ -332,13 +269,6 @@ const selectData = (row: any) => {};
const refresh = () => {};
const paginationLabel = (start: number, end: number, total: number) => {
// if (props.paging == true)
// return " " + start + " " + end + " " + total + " ";
// else
return start + "-" + end + " ใน " + total;
};
const resetFilter = () => {
// reset X
filter.value = "";
@ -352,33 +282,4 @@ const getClass = (val: boolean) => {
};
};
</script>
<style lang="scss">
.icon-color {
color: #4154b3;
}
.custom-header-table {
.q-table tr:nth-child(odd) td {
background: white;
}
.q-table tr:nth-child(even) td {
background: #f8f8f8;
}
.q-table thead tr {
background: #ecebeb;
}
.q-table thead tr th {
position: sticky;
z-index: 1;
}
/* this will be the loading indicator */
.q-table thead tr:last-child th {
/* height of all previous header rows */
top: 48px;
}
.q-table thead tr:first-child th {
top: 0;
}
}
</style>
<style lang="scss"></style>

View file

@ -46,18 +46,12 @@
/>
</div>
</div>
<q-table
flat
bordered
dense
<d-table
:rows="rows"
:columns="columns"
:visible-columns="visibleColumns"
:filter="filter"
row-key="name"
class="custom-header-table"
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<template v-slot:header="props">
<q-tr :props="props">
@ -127,19 +121,7 @@
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="pagination.page"
active-color="primary"
color="dark"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</d-table>
</div>
<q-separator />
<div class="flex justify-end q-pa-sm q-gutter-sm">
@ -246,10 +228,7 @@
/>
</div>
</div>
<q-table
flat
bordered
dense
<d-table
:rows="rowsModal"
:columns="columnsModal"
:visible-columns="visibleColumnsModal"
@ -257,9 +236,6 @@
row-key="name"
selection="multiple"
v-model:selected="selectedModal"
class="custom-header-table"
:pagination-label="paginationLabel"
v-model:pagination="paginationModal"
>
<template v-slot:header-selection="scope">
<q-checkbox
@ -304,19 +280,7 @@
</div>
</q-td>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="paginationModal.page"
active-color="primary"
color="dark"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</d-table>
</div>
</div>
</q-card-section>
@ -717,34 +681,4 @@ const onSelected = async (id: string) => {
const deleteData = async (id: string) => {};
</script>
<style lang="scss">
.icon-color {
color: #4154b3;
}
.custom-header-table {
height: auto;
.q-table tr:nth-child(odd) td {
background: white;
}
.q-table tr:nth-child(even) td {
background: #f8f8f8;
}
.q-table thead tr {
background: #ecebeb;
}
.q-table thead tr th {
position: sticky;
z-index: 1;
}
/* this will be the loading indicator */
.q-table thead tr:last-child th {
/* height of all previous header rows */
top: 48px;
}
.q-table thead tr:first-child th {
top: 0;
}
}
</style>
<style lang="scss"></style>