awaiting_payment

This commit is contained in:
2026-06-29 15:49:13 +03:30
parent ddc24612cb
commit 54e2d31a51
11 changed files with 363 additions and 15 deletions
+22 -4
View File
@@ -135,6 +135,21 @@
فاصله بین ساعت‌های قابل رزرو. مثلاً ۳۰ یعنی ۱۰:۰۰، ۱۰:۳۰، ۱۱:۰۰ و …
</p>
<label class="flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface px-4 py-3">
<input
v-model="bookingForm.autoApproveBookings"
type="checkbox"
class="mt-1"
/>
<span class="min-w-0">
<span class="block text-sm font-medium text-text">تأیید خودکار درخواست‌ها</span>
<span class="mt-1 block text-xs text-muted">
اگر فعال باشد، رزرو بلافاصله برای پرداخت آنلاین ارسال می‌شود. در غیر این صورت ابتدا
شما درخواست را تأیید می‌کنید و سپس لینک پرداخت برای مشتری ارسال می‌شود.
</span>
</span>
</label>
<AppButton :loading="savingBooking" @click="onSaveBookingSettings">
ذخیره تنظیمات نوبت‌دهی
</AppButton>
@@ -514,6 +529,7 @@ const form = ref({
const bookingForm = ref({
concurrentCapacity: '1',
slotStepMinutes: '30',
autoApproveBookings: false,
});
const bookingExpanded = ref(false);
@@ -557,10 +573,10 @@ const servicesSummary = computed(() => {
return `${count} خدمت · ${activeCount} فعال`;
});
const bookingSummary = computed(
() =>
`${bookingForm.value.concurrentCapacity} همزمان · گام ${bookingForm.value.slotStepMinutes} دقیقه`,
);
const bookingSummary = computed(() => {
const auto = bookingForm.value.autoApproveBookings ? 'تأیید خودکار' : 'تأیید دستی';
return `${bookingForm.value.concurrentCapacity} همزمان · گام ${bookingForm.value.slotStepMinutes} دقیقه · ${auto}`;
});
function emptyClassPriceForm() {
const result: Record<string, { price: string; durationMinutes: string }> = {};
@@ -658,6 +674,7 @@ onMounted(async () => {
bookingForm.value = {
concurrentCapacity: String(business.value.concurrentCapacity ?? 1),
slotStepMinutes: String(business.value.slotStepMinutes ?? 30),
autoApproveBookings: business.value.autoApproveBookings === true,
};
await loadServicesAndTemplates();
}
@@ -776,6 +793,7 @@ async function onSaveBookingSettings() {
business.value = await updateBusiness(business.value.id, {
concurrentCapacity,
slotStepMinutes,
autoApproveBookings: bookingForm.value.autoApproveBookings,
});
tenant.syncSingleBusiness(business.value);
message.value = 'تنظیمات نوبت‌دهی ذخیره شد.';