diff --git a/src/api/types.ts b/src/api/types.ts
index 23b3362..b8ba013 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -23,6 +23,7 @@ export type Business = {
longitude: number | null;
isActive: boolean;
serviceClassesEnabled?: boolean;
+ concurrentCapacity?: number;
categoryId: string;
ownerId?: string | null;
category?: BusinessCategory;
@@ -65,6 +66,7 @@ export type UpdateBusinessPayload = {
latitude?: number | null;
longitude?: number | null;
serviceClassesEnabled?: boolean;
+ concurrentCapacity?: number;
};
export type BusinessServiceClass = {
diff --git a/src/views/app/AppOwnerView.vue b/src/views/app/AppOwnerView.vue
index 68d9906..cd5f6dc 100644
--- a/src/views/app/AppOwnerView.vue
+++ b/src/views/app/AppOwnerView.vue
@@ -61,6 +61,19 @@
/>
+
+
+ حداکثر تعداد مشتری که همزمان میتوانید پذیرش کنید. مثلاً ۳ یعنی هر ساعت تا ۳ رزرو همپوشان.
+
+
ذخیره تغییرات
@@ -413,6 +426,7 @@ const form = ref({
description: '',
contactPhone: '',
address: '',
+ concurrentCapacity: '1',
});
const serviceForm = ref({
@@ -536,6 +550,7 @@ onMounted(async () => {
description: business.value.description ?? '',
contactPhone: business.value.contactPhone ?? '',
address: business.value.address ?? '',
+ concurrentCapacity: String(business.value.concurrentCapacity ?? 1),
};
await loadServicesAndTemplates();
}
@@ -548,6 +563,11 @@ onMounted(async () => {
async function onSave() {
if (!business.value) return;
+ const concurrentCapacity = Number.parseInt(form.value.concurrentCapacity, 10);
+ if (!Number.isFinite(concurrentCapacity) || concurrentCapacity < 1 || concurrentCapacity > 20) {
+ error.value = 'پذیرش همزمان باید عددی بین ۱ تا ۲۰ باشد.';
+ return;
+ }
saving.value = true;
error.value = '';
message.value = '';
@@ -557,6 +577,7 @@ async function onSave() {
description: form.value.description.trim() || null,
contactPhone: form.value.contactPhone.trim() || null,
address: form.value.address.trim() || null,
+ concurrentCapacity,
});
message.value = 'اطلاعات ذخیره شد.';
} catch (e) {