Revert "add delete button"

This reverts commit 772ee9cd0e.
This commit is contained in:
AnandaTon 2023-06-30 10:07:14 +07:00
parent 772ee9cd0e
commit 0f867b94db

View file

@ -69,70 +69,46 @@
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<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">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'notification'">
<q-select
:class="getClass(true)"
hide-bottom-space
multiple
:outlined="true"
dense
use-chips
lazy-rules
:readonly="!true"
:borderless="!true"
v-model="col.value"
:rules="[(val:any) => !!val || `${'กรุณาเลือกช่องทาง'}`,(val:any) => val.length > 0 || `${'กรุณาเลือกช่องทาง'}`]"
:label="`${'เลือกช่องทาง'}`"
emit-value
map-options
option-label="name"
:options="notificationOption"
option-value="id"
input-debounce="0"
color="primary"
>
<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)">
{{ col.value }}
</div>
</q-td>
<q-td>
<q-btn
<template v-slot:body-cell="props">
<q-td :props="props">
<div v-if="props.col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="props.col.name == 'notification'">
<q-select
:class="getClass(true)"
hide-bottom-space
multiple
:outlined="true"
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.id)"
icon="mdi-delete"
use-chips
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="notificationOption"
option-value="id"
input-debounce="0"
color="primary"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
<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
@ -150,15 +126,14 @@
</div>
<q-separator />
<div class="flex justify-end q-pa-sm q-gutter-sm">
<q-btn
dense
outline
color="primary"
icon="chevron_left"
@click="previous"
<q-btn
dense
outline
color="primary"
icon="chevron_left"
@click="previous"
class="q-pr-md"
label="เลือกรายชื่อ"
>
label="เลือกรายชื่อ">
</q-btn>
<q-btn
dense
@ -167,12 +142,12 @@
color="public"
@click="next"
class="q-px-md"
><!-- icon="mdi-content-save-outline"
<q-tooltip>นท</q-tooltip> -->
><!-- icon="mdi-content-save-outline"
<q-tooltip>นท</q-tooltip> -->
</q-btn>
<!-- <q-btn flat round color="primary" icon="chevron_right" @click="next">
<q-tooltip>อไป</q-tooltip>
</q-btn> -->
<q-tooltip>อไป</q-tooltip>
</q-btn> -->
</div>
</div>
</template>