sort
This commit is contained in:
parent
9349bd216e
commit
df93a526fa
18 changed files with 87 additions and 63 deletions
|
|
@ -16,9 +16,7 @@ const store = usePersonalDataStore();
|
|||
const { messageError, showLoader, hideLoader, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const TABLE_COLUMNS = [
|
||||
{
|
||||
name: "prefix",
|
||||
|
|
@ -71,6 +69,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "prefix",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -230,10 +231,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
@ -276,7 +277,7 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
{{ col.value }}
|
||||
{{ col.value ?? "-" }}
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ const store = usePersonalDataStore();
|
|||
const { messageError, showLoader, hideLoader, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = [
|
||||
{
|
||||
name: "rank",
|
||||
|
|
@ -71,6 +69,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "rank",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -227,10 +228,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ const store = usePersonalDataStore();
|
|||
const { messageError, showLoader, hideLoader, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = [
|
||||
{
|
||||
name: "gender",
|
||||
|
|
@ -71,6 +69,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "gender",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -227,10 +228,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ const store = usePersonalDataStore();
|
|||
const { messageError, showLoader, hideLoader, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = [
|
||||
{
|
||||
name: "relationship",
|
||||
|
|
@ -71,6 +69,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "relationship",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -227,10 +228,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ const store = usePersonalDataStore();
|
|||
const { messageError, showLoader, hideLoader, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = [
|
||||
{
|
||||
name: "bloodGroup",
|
||||
|
|
@ -71,6 +69,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "bloodGroup",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -226,10 +227,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "religion",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -227,10 +230,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@ const store = usePersonalDataStore();
|
|||
const { messageError, showLoader, hideLoader, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**
|
||||
* Teble
|
||||
*/
|
||||
/** Teble*/
|
||||
const columns = [
|
||||
{
|
||||
name: "name",
|
||||
|
|
@ -73,6 +71,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "name",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); // คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -242,6 +243,7 @@ onMounted(async () => {
|
|||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -80,6 +80,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "name",
|
||||
});
|
||||
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
const dialog = ref<boolean>(false); // เพิ่มข้อมูล,แก้ไขข้อมูล
|
||||
|
|
@ -241,10 +244,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ const {
|
|||
dialogRemove,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = [
|
||||
{
|
||||
name: "name",
|
||||
|
|
@ -80,6 +78,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "name",
|
||||
});
|
||||
|
||||
const id = ref<string>(route.params.id as string); // id จังหวัด
|
||||
const filterKeyword = ref<string>(""); //คำค้นหา
|
||||
|
|
@ -288,10 +289,10 @@ onMounted(async () => {
|
|||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ const {
|
|||
dialogRemove,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**
|
||||
* Table
|
||||
*/
|
||||
/** Table*/
|
||||
const columns = [
|
||||
{
|
||||
name: "name",
|
||||
|
|
@ -92,6 +90,9 @@ const visibleColumns = ref<string[]>([
|
|||
"lastUpdatedAt",
|
||||
"lastUpdateFullName",
|
||||
]);
|
||||
const pagination = ref({
|
||||
sortBy: "name",
|
||||
});
|
||||
|
||||
const id = ref<string>(route.params.id as string); // เขต/อำเภอ
|
||||
const rows = ref<FormSubDistrict[]>([]); // ข้อมูลรายการแขวง/ตำบล
|
||||
|
|
@ -298,6 +299,7 @@ onMounted(async () => {
|
|||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ const columns = [
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
a
|
||||
.toString()
|
||||
.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
{
|
||||
name: "createdAt",
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
a.toString().localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue