Merge branch 'oat_dev' into develop
This commit is contained in:
commit
5465b33de1
7 changed files with 6 additions and 247 deletions
|
|
@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "isActive",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "isActive",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const isActive = ref<boolean>(false);
|
|
||||||
const prefix = ref<string>("");
|
const prefix = ref<string>("");
|
||||||
const prefixRef = ref<any>(null);
|
const prefixRef = ref<any>(null);
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
|
|
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"isActive",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
|
|
@ -95,7 +82,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -103,7 +89,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "System Administrator",
|
lastUpdateFullName: "System Administrator",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: "3",
|
||||||
|
|
@ -111,7 +96,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
|
|
@ -186,16 +170,7 @@ onMounted(async () => {
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'isActive'">
|
<div>
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -250,7 +225,6 @@ onMounted(async () => {
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="prefix"
|
v-model:data="prefix"
|
||||||
v-model:isActive="isActive"
|
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
v-model:dialogStatus="dialogStatus"
|
v-model:dialogStatus="dialogStatus"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "isActive",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "isActive",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const isActive = ref<boolean>(false);
|
|
||||||
const rank = ref<string>("");
|
const rank = ref<string>("");
|
||||||
const rankRef = ref<any>(null);
|
const rankRef = ref<any>(null);
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
|
|
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"isActive",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
|
|
@ -95,7 +82,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -103,7 +89,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "System Administrator",
|
lastUpdateFullName: "System Administrator",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: "3",
|
||||||
|
|
@ -111,7 +96,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
|
|
@ -186,16 +170,7 @@ onMounted(async () => {
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'isActive'">
|
<div>
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -250,7 +225,6 @@ onMounted(async () => {
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="rank"
|
v-model:data="rank"
|
||||||
v-model:isActive="isActive"
|
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
v-model:dialogStatus="dialogStatus"
|
v-model:dialogStatus="dialogStatus"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "isActive",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "isActive",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const isActive = ref<boolean>(false);
|
|
||||||
const bloodGroup = ref<string>("");
|
const bloodGroup = ref<string>("");
|
||||||
const bloodGroupRef = ref<any>(null);
|
const bloodGroupRef = ref<any>(null);
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
|
|
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"isActive",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
|
|
@ -95,7 +82,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -103,7 +89,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "System Administrator",
|
lastUpdateFullName: "System Administrator",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: "3",
|
||||||
|
|
@ -111,7 +96,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
|
|
@ -186,16 +170,7 @@ onMounted(async () => {
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'isActive'">
|
<div>
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -250,7 +225,6 @@ onMounted(async () => {
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="bloodGroup"
|
v-model:data="bloodGroup"
|
||||||
v-model:isActive="isActive"
|
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
v-model:dialogStatus="dialogStatus"
|
v-model:dialogStatus="dialogStatus"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "isActive",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "isActive",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const isActive = ref<boolean>(false);
|
|
||||||
const gender = ref<string>("");
|
const gender = ref<string>("");
|
||||||
const genderRef = ref<any>(null);
|
const genderRef = ref<any>(null);
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
|
|
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"isActive",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
|
|
@ -95,7 +82,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -103,7 +89,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "System Administrator",
|
lastUpdateFullName: "System Administrator",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: "3",
|
||||||
|
|
@ -111,7 +96,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
|
|
@ -186,16 +170,7 @@ onMounted(async () => {
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'isActive'">
|
<div>
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -250,7 +225,6 @@ onMounted(async () => {
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="gender"
|
v-model:data="gender"
|
||||||
v-model:isActive="isActive"
|
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
v-model:dialogStatus="dialogStatus"
|
v-model:dialogStatus="dialogStatus"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "isActive",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "isActive",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const isActive = ref<boolean>(false);
|
|
||||||
const religion = ref<string>("");
|
const religion = ref<string>("");
|
||||||
const religionRef = ref<any>(null);
|
const religionRef = ref<any>(null);
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
|
|
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"isActive",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
|
|
@ -95,7 +82,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -103,7 +89,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "System Administrator",
|
lastUpdateFullName: "System Administrator",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: "3",
|
||||||
|
|
@ -111,7 +96,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "4",
|
id: "4",
|
||||||
|
|
@ -119,7 +103,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
|
|
@ -194,16 +177,7 @@ onMounted(async () => {
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'isActive'">
|
<div>
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -258,7 +232,6 @@ onMounted(async () => {
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="religion"
|
v-model:data="religion"
|
||||||
v-model:isActive="isActive"
|
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
v-model:dialogStatus="dialogStatus"
|
v-model:dialogStatus="dialogStatus"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "isActive",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะ",
|
|
||||||
sortable: true,
|
|
||||||
field: "isActive",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
const isActive = ref<boolean>(false);
|
|
||||||
const relationship = ref<string>("");
|
const relationship = ref<string>("");
|
||||||
const relationshipRef = ref<any>(null);
|
const relationshipRef = ref<any>(null);
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
|
|
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
|
||||||
"createdAt",
|
"createdAt",
|
||||||
"lastUpdatedAt",
|
"lastUpdatedAt",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
"isActive",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
|
|
@ -95,7 +82,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
lastUpdateFullName: "สาวิตรี ศรีสมัย",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -103,7 +89,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "System Administrator",
|
lastUpdateFullName: "System Administrator",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "3",
|
id: "3",
|
||||||
|
|
@ -111,7 +96,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "4",
|
id: "4",
|
||||||
|
|
@ -119,7 +103,6 @@ function fetchData() {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
|
||||||
isActive: true,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
|
|
@ -194,16 +177,7 @@ onMounted(async () => {
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div v-if="col.name == 'isActive'">
|
<div>
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|
@ -258,7 +232,6 @@ onMounted(async () => {
|
||||||
<DialogForm
|
<DialogForm
|
||||||
v-model:dialog="dialog"
|
v-model:dialog="dialog"
|
||||||
v-model:data="relationship"
|
v-model:data="relationship"
|
||||||
v-model:isActive="isActive"
|
|
||||||
v-model:personalName="personalName"
|
v-model:personalName="personalName"
|
||||||
v-model:dialogStatus="dialogStatus"
|
v-model:dialogStatus="dialogStatus"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ const dataRef = ref<any>(null);
|
||||||
const data = defineModel<string>("data", {
|
const data = defineModel<string>("data", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
const isActive = defineModel<boolean>("isActive");
|
|
||||||
const personalName = defineModel<string>("personalName");
|
const personalName = defineModel<string>("personalName");
|
||||||
const dialogStatus = defineModel<string>("dialogStatus");
|
const dialogStatus = defineModel<string>("dialogStatus");
|
||||||
const dialog = defineModel<boolean>("dialog");
|
const dialog = defineModel<boolean>("dialog");
|
||||||
|
|
@ -33,7 +32,6 @@ async function onSubmit() {
|
||||||
async () => {
|
async () => {
|
||||||
closeDialog();
|
closeDialog();
|
||||||
data.value = "";
|
data.value = "";
|
||||||
isActive.value = false;
|
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||||
|
|
@ -67,17 +65,6 @@ async function onSubmit() {
|
||||||
:rules="[(val) => val.length > 0 || 'กรุณากรอก' + personalName]"
|
:rules="[(val) => val.length > 0 || 'กรุณากรอก' + personalName]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
<div
|
|
||||||
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
|
||||||
>
|
|
||||||
<div class="row items-center q-my-sm justify-between">
|
|
||||||
<p class="q-ma-none">สถานะการใช้งาน</p>
|
|
||||||
<label class="toggle-control">
|
|
||||||
<input type="checkbox" dense v-model="isActive" />
|
|
||||||
<span class="control"></span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
|
|
@ -97,73 +84,3 @@ async function onSubmit() {
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.border_custom {
|
|
||||||
border-radius: 6px !important;
|
|
||||||
border: 1px solid #e1e1e1;
|
|
||||||
}
|
|
||||||
$toggle-background-color-on: #06884d;
|
|
||||||
$toggle-background-color-off: darkgray;
|
|
||||||
$toggle-control-color: white;
|
|
||||||
$toggle-width: 40px;
|
|
||||||
$toggle-height: 25px;
|
|
||||||
$toggle-gutter: 3px;
|
|
||||||
$toggle-radius: 50%;
|
|
||||||
$toggle-control-speed: 0.15s;
|
|
||||||
$toggle-control-ease: ease-in;
|
|
||||||
|
|
||||||
// These are our computed variables
|
|
||||||
// change at your own risk.
|
|
||||||
$toggle-radius: $toggle-height / 2;
|
|
||||||
$toggle-control-size: $toggle-height - ($toggle-gutter * 2);
|
|
||||||
|
|
||||||
.toggle-control {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
padding-left: $toggle-width;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 22px;
|
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
input {
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
height: 0;
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:checked ~ .control {
|
|
||||||
background-color: $toggle-background-color-on;
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
left: $toggle-width - $toggle-control-size - $toggle-gutter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.control {
|
|
||||||
position: absolute;
|
|
||||||
top: -7px;
|
|
||||||
left: -15px;
|
|
||||||
height: $toggle-height;
|
|
||||||
width: $toggle-width;
|
|
||||||
border-radius: $toggle-radius;
|
|
||||||
background-color: $toggle-background-color-off;
|
|
||||||
transition: background-color $toggle-control-speed $toggle-control-ease;
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: $toggle-gutter;
|
|
||||||
top: $toggle-gutter;
|
|
||||||
width: $toggle-control-size;
|
|
||||||
height: $toggle-control-size;
|
|
||||||
border-radius: $toggle-radius;
|
|
||||||
background: $toggle-control-color;
|
|
||||||
transition: left $toggle-control-speed $toggle-control-ease;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue