ข้อมูลหลัก => comment btn delete

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-17 11:42:03 +07:00
parent 0c894aa6bc
commit 319103d8e2
15 changed files with 104 additions and 102 deletions

View file

@ -386,7 +386,7 @@ const dialogOrder = ref<boolean>(false);
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -400,7 +400,7 @@ const dialogOrder = ref<boolean>(false);
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -233,70 +233,76 @@ async function onSubmit() {
</div>
</q-toolbar>
<d-table
ref="table"
:columns="columns"
:rows="store.row"
:filter="filterKeyword"
row-key="name"
flat
bordered
:paging="true"
dense
class="custom-header-table"
:visible-columns="visibleColumns"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
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-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 }}
</div>
</q-td>
<q-td auto-width>
<q-btn
color="edit"
flat
dense
round
class="q-mr-xs"
size="12px"
icon="edit"
clickable
@click.stop="
() => {
dialogStatus = 'edit';
dialog = true;
editId = props.row.id;
name = props.row.name;
isActive = props.row.isActive;
}
"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<div class="col-12">
<d-table
ref="table"
:columns="columns"
:rows="store.row"
:filter="filterKeyword"
row-key="name"
flat
bordered
:paging="true"
dense
class="custom-header-table"
:visible-columns="visibleColumns"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
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-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 }}
</div>
</q-td>
<q-td auto-width>
<q-btn
color="edit"
flat
dense
round
class="q-mr-xs"
size="12px"
icon="edit"
clickable
@click.stop="
() => {
dialogStatus = 'edit';
dialog = true;
editId = props.row.id;
name = props.row.name;
isActive = props.row.isActive;
}
"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<!-- <q-btn
color="red"
flat
dense
@ -310,11 +316,12 @@ async function onSubmit() {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>
</q-btn> -->
</q-td>
</q-tr>
</template>
</d-table>
</div>
<q-dialog v-model="dialog" class="dialog" persistent>
<q-card style="min-width: 350px">

View file

@ -232,7 +232,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -246,7 +246,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -230,7 +230,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -244,7 +244,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -230,7 +230,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -244,7 +244,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -230,7 +230,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -244,7 +244,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -230,7 +230,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -244,7 +244,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -258,7 +258,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -272,7 +272,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -245,7 +245,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -259,7 +259,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -238,7 +238,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -252,7 +252,7 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -272,7 +272,7 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -283,7 +283,7 @@ onMounted(() => {
@click.stop="onClickDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -307,7 +307,7 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -317,7 +317,7 @@ onMounted(() => {
@click="onClickDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -281,7 +281,7 @@ async function onSubmit() {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -295,7 +295,7 @@ async function onSubmit() {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -214,7 +214,7 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -226,7 +226,7 @@ onMounted(() => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>

View file

@ -355,7 +355,7 @@ onMounted(async () => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
<!-- <q-btn
color="red"
flat
dense
@ -369,12 +369,11 @@ onMounted(async () => {
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-btn> -->
</q-td>
</q-tr>
</template>
</d-table>
</div>
<q-dialog v-model="dialog" class="dialog" persistent>
<q-card style="width: 350px">
@ -401,7 +400,6 @@ onMounted(async () => {
hide-bottom-space
:rules="[(val) => val.length > 0 || 'กรุณากรอกระดับตำแหน่ง']"
class="inputgreen"
/>
</div>
@ -420,7 +418,6 @@ onMounted(async () => {
hide-bottom-space
mask="############"
class="inputgreen"
/>
</div>
@ -441,7 +438,6 @@ onMounted(async () => {
bg-color="white"
hide-bottom-space
class="inputgreen"
/>
</div>
@ -457,7 +453,6 @@ onMounted(async () => {
hide-bottom-space
readonly
class="inputgreen"
/>
</div>
</q-card-section>