เพิ่ม ลบ backUp
This commit is contained in:
parent
662d8fa7b3
commit
c417262c6a
2 changed files with 23 additions and 7 deletions
|
|
@ -21,7 +21,7 @@ import { storeToRefs } from "pinia";
|
|||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, date2Thai, dialogRemove, dialogConfirm } =
|
||||
useCounterMixin();
|
||||
const { fetchListBackup, createBackUp, restore } = useDataStore();
|
||||
const { fetchListBackup, createBackUp, restore, deleteBackUp } = useDataStore();
|
||||
const storeData = useDataStore();
|
||||
const { dataBackUp } = storeToRefs(storeData);
|
||||
|
||||
|
|
@ -83,10 +83,10 @@ function onCreateBackup() {
|
|||
* function ลบรายการข้อมูสำรอง
|
||||
* @param id รายการสำรอง
|
||||
*/
|
||||
function onDelete(id: string) {
|
||||
dialogRemove($q, () => {
|
||||
function onDelete(name: string) {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
fetchListBackup();
|
||||
deleteBackUp(name);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ onMounted(async () => {
|
|||
icon="delete"
|
||||
color="red"
|
||||
size="12px"
|
||||
@click.petvent="onDelete(props.row.id)"
|
||||
@click.petvent="onDelete(props.row.name)"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูลสำรอง </q-tooltip>
|
||||
</q-btn>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue