ปรับ icon

This commit is contained in:
setthawutttty 2024-03-08 10:26:49 +07:00
parent f65a7086bd
commit 01fcd48b06

View file

@ -161,13 +161,11 @@ function deleteData(id: string) {
}
function editPopup(data: RowList, status: string) {
console.log(data);
if (status == "read") {
isRead.value = true;
}
editCheck.value = true;
dialog.value = true;
console.log(dialog.value);
idRound.value = data.id;
period.value = data.period ? data.period : "";
yearData.value = data.year ? data.year : 0;
@ -382,58 +380,90 @@ onMounted(async () => {
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-td>
<q-btn
color="edit"
flat
dense
round
class="q-mr-xs"
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
:icon="
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
? 'mdi-eye-outline'
: 'edit'
>
<q-menu>
<q-list dense style="min-width: 200px">
<q-item
clickable
v-close-popup
@click.stop="
dateToISO(new Date()) >=
dateToISO(props.row.effectiveDate)
? editPopup(props.row, 'read')
: editPopup(props.row, 'edit')
"
>
<q-item-section>
<div class="row items-center">
<q-icon
color="edit"
size="17px"
:name="
dateToISO(new Date()) >=
dateToISO(props.row.effectiveDate)
? 'mdi-eye-outline'
: 'edit'
"
/>
<div class="q-pl-md">
{{
dateToISO(new Date()) >=
dateToISO(props.row.effectiveDate)
? "ดูข้อมูล"
: "แก้ไขข้อมูล"
}}
</div>
</div>
</q-item-section>
</q-item>
<q-item
v-if="
props.row.isClose == false
? dateToISO(new Date()) >=
dateToISO(props.row.effectiveDate)
? true
: false
: false
"
clickable
@click="
clickable
v-close-popup
@click.stop="dialogClose(props.row.id)"
>
<q-item-section>
<div class="row items-center">
<q-icon color="red" size="17px" name="mdi-close-box" />
<div class="q-pl-md">ดรอบ</div>
</div>
</q-item-section>
</q-item>
<q-item
v-if="
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
? editPopup(props.row, 'read')
: editPopup(props.row, 'edit')
? false
: true
"
>
<q-tooltip>{{
dateToISO(new Date()) >= dateToISO(props.row.effectiveDate)
? "ดูข้อมูล"
: "แก้ไขข้อมูล"
}}</q-tooltip>
</q-btn>
<q-btn
v-if="props.row.isClose == false ? dateToISO(new Date()) >= dateToISO(props.row.effectiveDate) ? true : false:false"
color="red"
flat
dense
round
size="12px"
icon="mdi-close-box"
clickable
@click.stop="dialogClose(props.row.id)"
>
<q-tooltip>ดรอบ</q-tooltip>
</q-btn>
<q-btn
v-if="dateToISO(new Date()) >= dateToISO(props.row.effectiveDate) ? false : true"
color="red"
flat
dense
round
size="12px"
icon="mdi-delete"
clickable
@click.stop="dialogRemove( $q, async () => await deleteData(props.row.id))"
v-close-popup
>
<q-tooltip>ลบขอม</q-tooltip>
clickable
v-close-popup
@click.stop=" dialogRemove($q, async () => await deleteData(props.row.id))"
>
<q-item-section>
<div class="row items-center">
<q-icon color="red" size="17px" name="mdi-delete" />
<div class="q-pl-md">ลบขอม</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>