fix(registry): add delete button for other
This commit is contained in:
parent
da79633e85
commit
505a932b88
1 changed files with 43 additions and 3 deletions
|
|
@ -126,8 +126,8 @@ async function getData() {
|
|||
await http
|
||||
.get(config.API.profileNewOtherByProfileId(profileId.value, empType.value))
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
rowsMain.value = res.data.result;
|
||||
serchDataTable();
|
||||
})
|
||||
.catch((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(() => {
|
||||
getData();
|
||||
});
|
||||
|
|
@ -361,6 +376,18 @@ onMounted(() => {
|
|||
>
|
||||
<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-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
|
|
@ -383,8 +410,9 @@ onMounted(() => {
|
|||
flat
|
||||
round
|
||||
@click="openDialogHistory(props.row.id)"
|
||||
><q-tooltip>ประวิติแก้ไขอื่นๆ</q-tooltip></q-btn
|
||||
>
|
||||
<q-tooltip>ประวัติแก้ไขอื่นๆ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||
color="edit"
|
||||
|
|
@ -392,8 +420,20 @@ onMounted(() => {
|
|||
flat
|
||||
round
|
||||
@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-separator />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue