feat: add btn delete PersonalInformation
This commit is contained in:
parent
3cdbba6cc0
commit
41c11f6913
4 changed files with 84 additions and 4 deletions
|
|
@ -371,7 +371,7 @@ function handleDelete(id: string) {
|
|||
// dialogRemove($q, async () => {
|
||||
// showLoader();
|
||||
// try {
|
||||
// await http.delete(config.API.รอAPI + `/${id}`);
|
||||
// await http.delete(config.API.profileChangeNameUpdate + `${id}`);
|
||||
// await fetchData(profileId.value);
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// } catch (err) {
|
||||
|
|
|
|||
|
|
@ -375,8 +375,6 @@ function onOpenDialogForm(
|
|||
isStatusEdit: boolean = false,
|
||||
data: any = undefined
|
||||
) {
|
||||
console.log(data);
|
||||
|
||||
modal.value = true;
|
||||
typeForm.value = type;
|
||||
isEdit.value = isStatusEdit;
|
||||
|
|
@ -509,6 +507,21 @@ async function fetchDataHistory() {
|
|||
}
|
||||
}
|
||||
|
||||
function handleDelete(id: string) {
|
||||
// dialogRemove($q, async () => {
|
||||
// showLoader();
|
||||
// try {
|
||||
// await http.delete(config.API.profileChangeNameUpdate + `${id}`);
|
||||
// await fetchDataCouple();
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
|
|
@ -830,6 +843,19 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
color="red"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="delete"
|
||||
@click="handleDelete(item.id)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
round
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -576,6 +576,21 @@ async function fetchDataHistory() {
|
|||
}
|
||||
}
|
||||
|
||||
function handleDelete(id: string) {
|
||||
// dialogRemove($q, async () => {
|
||||
// showLoader();
|
||||
// try {
|
||||
// await http.delete(config.API.profileChangeNameUpdate + `${id}`);
|
||||
// await fetchData(profileId.value);
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/** ฟังก์ค้นหาข้อมูลรายการประวัติการศึกษา */
|
||||
function serchDataTable() {
|
||||
rows.value = onSearchDataTable(
|
||||
|
|
@ -736,6 +751,18 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="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"
|
||||
|
|
|
|||
|
|
@ -252,8 +252,8 @@ async function fetchData(id: string) {
|
|||
await http
|
||||
.get(config.API.profileNewAbilityByProfileId(id, empType.value))
|
||||
.then(async (res) => {
|
||||
rows.value = await res.data.result;
|
||||
rowsMain.value = await res.data.result;
|
||||
serchDataTable();
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -403,6 +403,21 @@ function serchDataTable() {
|
|||
);
|
||||
}
|
||||
|
||||
function handleDelete(rowId: string) {
|
||||
// dialogRemove($q, async () => {
|
||||
// showLoader();
|
||||
// try {
|
||||
// await http.delete(config.API.profileChangeNameUpdate + `${rowId}`);
|
||||
// await fetchData(id.value);
|
||||
// success($q, "ลบข้อมูลสำเร็จ");
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||
onMounted(() => {
|
||||
fetchData(id.value);
|
||||
|
|
@ -529,6 +544,18 @@ onMounted(() => {
|
|||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue