ข้อมูลหลัก => comment btn delete
This commit is contained in:
parent
0c894aa6bc
commit
319103d8e2
15 changed files with 104 additions and 102 deletions
|
|
@ -386,7 +386,7 @@ const dialogOrder = ref<boolean>(false);
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -400,7 +400,7 @@ const dialogOrder = ref<boolean>(false);
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -233,70 +233,76 @@ async function onSubmit() {
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
||||||
<d-table
|
<div class="col-12">
|
||||||
ref="table"
|
<d-table
|
||||||
:columns="columns"
|
ref="table"
|
||||||
:rows="store.row"
|
:columns="columns"
|
||||||
:filter="filterKeyword"
|
:rows="store.row"
|
||||||
row-key="name"
|
:filter="filterKeyword"
|
||||||
flat
|
row-key="name"
|
||||||
bordered
|
flat
|
||||||
:paging="true"
|
bordered
|
||||||
dense
|
:paging="true"
|
||||||
class="custom-header-table"
|
dense
|
||||||
:visible-columns="visibleColumns"
|
class="custom-header-table"
|
||||||
>
|
:visible-columns="visibleColumns"
|
||||||
<template v-slot:header="props">
|
>
|
||||||
<q-tr :props="props">
|
<template v-slot:header="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-tr :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
</q-th>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
<q-th auto-width />
|
</q-th>
|
||||||
</q-tr>
|
<q-th auto-width />
|
||||||
</template>
|
</q-tr>
|
||||||
<template v-slot:body="props">
|
</template>
|
||||||
<q-tr
|
<template v-slot:body="props">
|
||||||
:props="props"
|
<q-tr
|
||||||
class="cursor-pointer"
|
:props="props"
|
||||||
@click.stop="onclickDetail(props.row.id)"
|
class="cursor-pointer"
|
||||||
>
|
@click.stop="onclickDetail(props.row.id)"
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
>
|
||||||
<div v-if="col.name == 'isActive'">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<q-icon
|
<div v-if="col.name == 'isActive'">
|
||||||
v-if="col.value == false"
|
<q-icon
|
||||||
name="mdi-close"
|
v-if="col.value == false"
|
||||||
color="red"
|
name="mdi-close"
|
||||||
class="text-h5"
|
color="red"
|
||||||
/>
|
class="text-h5"
|
||||||
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
/>
|
||||||
</div>
|
<q-icon
|
||||||
<div v-else>
|
v-else
|
||||||
{{ col.value }}
|
name="mdi-check"
|
||||||
</div>
|
color="positive"
|
||||||
</q-td>
|
class="text-h5"
|
||||||
<q-td auto-width>
|
/>
|
||||||
<q-btn
|
</div>
|
||||||
color="edit"
|
<div v-else>
|
||||||
flat
|
{{ col.value }}
|
||||||
dense
|
</div>
|
||||||
round
|
</q-td>
|
||||||
class="q-mr-xs"
|
<q-td auto-width>
|
||||||
size="12px"
|
<q-btn
|
||||||
icon="edit"
|
color="edit"
|
||||||
clickable
|
flat
|
||||||
@click.stop="
|
dense
|
||||||
() => {
|
round
|
||||||
dialogStatus = 'edit';
|
class="q-mr-xs"
|
||||||
dialog = true;
|
size="12px"
|
||||||
editId = props.row.id;
|
icon="edit"
|
||||||
name = props.row.name;
|
clickable
|
||||||
isActive = props.row.isActive;
|
@click.stop="
|
||||||
}
|
() => {
|
||||||
"
|
dialogStatus = 'edit';
|
||||||
>
|
dialog = true;
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
editId = props.row.id;
|
||||||
</q-btn>
|
name = props.row.name;
|
||||||
<q-btn
|
isActive = props.row.isActive;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -310,11 +316,12 @@ async function onSubmit() {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-dialog v-model="dialog" class="dialog" persistent>
|
<q-dialog v-model="dialog" class="dialog" persistent>
|
||||||
<q-card style="min-width: 350px">
|
<q-card style="min-width: 350px">
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -246,7 +246,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -244,7 +244,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -244,7 +244,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -244,7 +244,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -244,7 +244,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -272,7 +272,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -259,7 +259,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -252,7 +252,7 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -283,7 +283,7 @@ onMounted(() => {
|
||||||
@click.stop="onClickDelete(props.row.id)"
|
@click.stop="onClickDelete(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -317,7 +317,7 @@ onMounted(() => {
|
||||||
@click="onClickDelete(props.row.id)"
|
@click="onClickDelete(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ async function onSubmit() {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -295,7 +295,7 @@ async function onSubmit() {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -226,7 +226,7 @@ onMounted(() => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<!-- <q-btn
|
||||||
color="red"
|
color="red"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -369,12 +369,11 @@ onMounted(async () => {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn> -->
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="dialog" class="dialog" persistent>
|
<q-dialog v-model="dialog" class="dialog" persistent>
|
||||||
<q-card style="width: 350px">
|
<q-card style="width: 350px">
|
||||||
|
|
@ -401,7 +400,6 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => val.length > 0 || 'กรุณากรอกระดับตำแหน่ง']"
|
:rules="[(val) => val.length > 0 || 'กรุณากรอกระดับตำแหน่ง']"
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -420,7 +418,6 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
mask="############"
|
mask="############"
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -441,7 +438,6 @@ onMounted(async () => {
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -457,7 +453,6 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
readonly
|
readonly
|
||||||
class="inputgreen"
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue