Add reservations module and rename teams visibility label to file-access level.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -123,7 +123,8 @@ export type OrgModuleKey =
|
||||
| "sms_campaigns"
|
||||
| "teams"
|
||||
| "woocommerce"
|
||||
| "voip";
|
||||
| "voip"
|
||||
| "reservations";
|
||||
|
||||
export const ORG_MODULE_KEYS: OrgModuleKey[] = [
|
||||
"customers",
|
||||
@@ -157,6 +158,7 @@ export const ORG_MODULE_KEYS: OrgModuleKey[] = [
|
||||
"teams",
|
||||
"woocommerce",
|
||||
"voip",
|
||||
"reservations",
|
||||
];
|
||||
|
||||
export const ORG_MODULE_LABELS: Record<OrgModuleKey, string> = {
|
||||
@@ -188,9 +190,10 @@ export const ORG_MODULE_LABELS: Record<OrgModuleKey, string> = {
|
||||
saved_views: "فیلترهای ذخیرهشده",
|
||||
public_api: "API و وبهوک",
|
||||
sms_campaigns: "پیامک گروهی",
|
||||
teams: "تیمها و دیدپذیری",
|
||||
teams: "تیمها و سطح دسترسی به پروندهها",
|
||||
woocommerce: "ووکامرس",
|
||||
voip: "تلفن سازمانی",
|
||||
reservations: "رزرو و نوبتدهی",
|
||||
};
|
||||
|
||||
export const ORG_MODULE_GROUPS: Array<{
|
||||
@@ -232,6 +235,7 @@ export const ORG_MODULE_GROUPS: Array<{
|
||||
"saved_views",
|
||||
"woocommerce",
|
||||
"voip",
|
||||
"reservations",
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -3115,7 +3119,7 @@ export interface SmsCampaignListResponse {
|
||||
total: number;
|
||||
}
|
||||
|
||||
/* ——— تیمها و دیدپذیری ——— */
|
||||
/* ——— تیمها و سطح دسترسی به پروندهها ——— */
|
||||
|
||||
export type TeamMemberRole = "member" | "manager";
|
||||
|
||||
@@ -3280,3 +3284,96 @@ export interface VoipWebhookEvent {
|
||||
caller?: string;
|
||||
callee?: string;
|
||||
}
|
||||
|
||||
/* ——— رزرو و نوبتدهی ——— */
|
||||
|
||||
export type ReservationStatus =
|
||||
| "pending"
|
||||
| "confirmed"
|
||||
| "canceled"
|
||||
| "done";
|
||||
|
||||
export const RESERVATION_STATUSES: ReservationStatus[] = [
|
||||
"pending",
|
||||
"confirmed",
|
||||
"canceled",
|
||||
"done",
|
||||
];
|
||||
|
||||
export const RESERVATION_STATUS_LABELS: Record<ReservationStatus, string> = {
|
||||
pending: "در انتظار",
|
||||
confirmed: "تأیید شده",
|
||||
canceled: "لغو شده",
|
||||
done: "انجام شده",
|
||||
};
|
||||
|
||||
export interface ReservationServiceDto {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
durationMinutes: number;
|
||||
/** روزهای هفته ۰=یکشنبه … ۶=شنبه (JS getDay) */
|
||||
workDays: number[];
|
||||
dayStartHour: number;
|
||||
dayEndHour: number;
|
||||
isActive: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface CreateReservationServiceRequest {
|
||||
name: string;
|
||||
description?: string;
|
||||
durationMinutes: number;
|
||||
workDays?: number[];
|
||||
dayStartHour?: number;
|
||||
dayEndHour?: number;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export type UpdateReservationServiceRequest =
|
||||
Partial<CreateReservationServiceRequest>;
|
||||
|
||||
export interface ReservationAppointmentDto {
|
||||
id: string;
|
||||
serviceId: string;
|
||||
serviceName: string;
|
||||
personId: string;
|
||||
personName: string;
|
||||
assigneeId: string | null;
|
||||
assigneeName: string | null;
|
||||
startsAt: string;
|
||||
endsAt: string;
|
||||
status: ReservationStatus;
|
||||
notes: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface CreateReservationAppointmentRequest {
|
||||
serviceId: string;
|
||||
personId: string;
|
||||
assigneeId?: string | null;
|
||||
startsAt: string;
|
||||
status?: ReservationStatus;
|
||||
notes?: string | null;
|
||||
}
|
||||
|
||||
export interface UpdateReservationAppointmentRequest {
|
||||
serviceId?: string;
|
||||
personId?: string;
|
||||
assigneeId?: string | null;
|
||||
startsAt?: string;
|
||||
status?: ReservationStatus;
|
||||
notes?: string | null;
|
||||
}
|
||||
|
||||
export interface ReservationSlotDto {
|
||||
startsAt: string;
|
||||
endsAt: string;
|
||||
}
|
||||
|
||||
export interface ReservationListResponse {
|
||||
items: ReservationAppointmentDto[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user