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