chore: add multiple delivery mode

This commit is contained in:
2026-03-25 18:52:16 +01:00
parent 4aa356f9fe
commit b044e634a5
2 changed files with 146 additions and 3 deletions
+11
View File
@@ -747,6 +747,16 @@ export const DEFAULT_DELIVERY_SCHEDULE: DeliverySchedule = {
saturday: { ...DEFAULT_DAY }, sunday: { ...DEFAULT_DAY },
};
export interface CategoryRoute {
deliveryman_username: string;
categories: string[];
}
export interface DeliveryModeConfig {
mode: "single" | "category_based";
category_routes: CategoryRoute[];
}
export interface PenaltyTier {
min_cancel: number;
amount: number;
@@ -768,6 +778,7 @@ export interface AppSettings {
nowpayments_currencies: string[];
telegram_bot_token: string;
telegram_bot_username: string;
delivery_mode: DeliveryModeConfig;
}
export const getSettings = async (): Promise<{