fix(registry): add delete button for other

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-18 14:43:17 +07:00
parent da79633e85
commit 505a932b88

View file

@ -126,8 +126,8 @@ async function getData() {
await http await http
.get(config.API.profileNewOtherByProfileId(profileId.value, empType.value)) .get(config.API.profileNewOtherByProfileId(profileId.value, empType.value))
.then((res) => { .then((res) => {
rows.value = res.data.result;
rowsMain.value = res.data.result; rowsMain.value = res.data.result;
serchDataTable();
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -242,6 +242,21 @@ function serchDataTable() {
); );
} }
function handleDelete(rowId: string) {
// dialogRemove($q, async () => {
// showLoader();
// try {
// await http.delete(config.API.profileChangeNameUpdate + `${rowId}`);
// await getData();
// success($q, "");
// } catch (err) {
// messageError($q, err);
// } finally {
// hideLoader();
// }
// });
}
onMounted(() => { onMounted(() => {
getData(); getData();
}); });
@ -361,6 +376,18 @@ onMounted(() => {
> >
<q-tooltip>แกไขขอม</q-tooltip> <q-tooltip>แกไขขอม</q-tooltip>
</q-btn> </q-btn>
<q-btn
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
color="red"
flat
dense
round
icon="delete"
@click="handleDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td> </q-td>
<q-td <q-td
v-for="col in props.cols" v-for="col in props.cols"
@ -383,8 +410,9 @@ onMounted(() => {
flat flat
round round
@click="openDialogHistory(props.row.id)" @click="openDialogHistory(props.row.id)"
><q-tooltip>ประวแกไขอนๆ</q-tooltip></q-btn
> >
<q-tooltip>ประวแกไขอนๆ</q-tooltip>
</q-btn>
<q-btn <q-btn
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate" v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
color="edit" color="edit"
@ -392,8 +420,20 @@ onMounted(() => {
flat flat
round round
@click="openDialogEdit(props.row)" @click="openDialogEdit(props.row)"
><q-tooltip>แกไขขอม</q-tooltip></q-btn
> >
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
color="red"
flat
dense
round
icon="delete"
@click="handleDelete(props.row.id)"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-card-actions> </q-card-actions>
<q-separator /> <q-separator />