remove approve button for payments
This commit is contained in:
parent
3a6558ae64
commit
f137fcb0dc
|
@ -35,13 +35,13 @@
|
|||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-tooltip text="تایید پرداختهای انتخابی" location="bottom">
|
||||
<!-- <v-tooltip text="تایید پرداختهای انتخابی" location="bottom">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn v-bind="props" icon color="success" @click="approveSelectedPayments">
|
||||
<v-icon>mdi-check-decagram</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
</v-tooltip> -->
|
||||
<v-menu>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn v-bind="props" icon color="success">
|
||||
|
@ -441,27 +441,27 @@ const updateSelectedSum = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const approveSelectedPayments = async () => {
|
||||
if (selectedItems.value.length === 0) {
|
||||
Swal.fire({ text: 'هیچ آیتمی انتخاب نشده است.', icon: 'warning', confirmButtonText: 'قبول' });
|
||||
return;
|
||||
}
|
||||
const res = await Swal.fire({ title: 'تایید پرداختها', text: 'پرداختهای انتخابی تایید خواهند شد.', icon: 'question', showCancelButton: true, confirmButtonText: 'بله', cancelButtonText: 'خیر' });
|
||||
if (!res.isConfirmed) return;
|
||||
loading.value = true;
|
||||
try {
|
||||
for (const it of selectedItems.value) {
|
||||
await axios.post(`/api/sell/payment/approve/${it.code}`);
|
||||
}
|
||||
Swal.fire({ text: 'پرداختها تایید شدند.', icon: 'success', confirmButtonText: 'قبول' });
|
||||
selectedItems.value = [];
|
||||
await loadData();
|
||||
} catch (e) {
|
||||
Swal.fire({ text: 'خطا در تایید پرداختها', icon: 'error', confirmButtonText: 'قبول' });
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
// const approveSelectedPayments = async () => {
|
||||
// if (selectedItems.value.length === 0) {
|
||||
// Swal.fire({ text: 'هیچ آیتمی انتخاب نشده است.', icon: 'warning', confirmButtonText: 'قبول' });
|
||||
// return;
|
||||
// }
|
||||
// const res = await Swal.fire({ title: 'تایید پرداختها', text: 'پرداختهای انتخابی تایید خواهند شد.', icon: 'question', showCancelButton: true, confirmButtonText: 'بله', cancelButtonText: 'خیر' });
|
||||
// if (!res.isConfirmed) return;
|
||||
// loading.value = true;
|
||||
// try {
|
||||
// for (const it of selectedItems.value) {
|
||||
// await axios.post(`/api/sell/payment/approve/${it.code}`);
|
||||
// }
|
||||
// Swal.fire({ text: 'پرداختها تایید شدند.', icon: 'success', confirmButtonText: 'قبول' });
|
||||
// selectedItems.value = [];
|
||||
// await loadData();
|
||||
// } catch (e) {
|
||||
// Swal.fire({ text: 'خطا در تایید پرداختها', icon: 'error', confirmButtonText: 'قبول' });
|
||||
// } finally {
|
||||
// loading.value = false;
|
||||
// }
|
||||
// };
|
||||
|
||||
const print = async (allItems = true) => {
|
||||
if (!allItems && selectedItems.value.length === 0) {
|
||||
|
|
Loading…
Reference in a new issue