From d13ae2205f55f2e8d82dfb863f532a61b3d37224 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 20 Jul 2026 21:50:14 -0400 Subject: [PATCH] enhancement #10 --- .../VehiclePricingManager.helpers.test.ts | 12 +- .../src/components/VehiclePricingManager.tsx | 534 +----------------- 2 files changed, 37 insertions(+), 509 deletions(-) diff --git a/apps/dashboard/src/components/VehiclePricingManager.helpers.test.ts b/apps/dashboard/src/components/VehiclePricingManager.helpers.test.ts index d00d9f4..611590b 100644 --- a/apps/dashboard/src/components/VehiclePricingManager.helpers.test.ts +++ b/apps/dashboard/src/components/VehiclePricingManager.helpers.test.ts @@ -73,17 +73,17 @@ describe('VehiclePricingManager helpers', () => { it('builds a stable editable configuration form from API pricing data', () => { expect(buildConfigForm(configuration)).toEqual({ - pricingMode: 'AUTOMATIC', + pricingMode: 'MANUAL', baseDailyRate: '500.00', weeklyRate: '2800.00', - weekendRate: '650.00', + weekendRate: '', holidayRate: '', monthlyRate: '9500.00', longTermDailyRate: '', - minimumDailyRate: '400.00', - maximumDailyRate: '800.00', - maxDailyPriceMovementPct: '12', - automaticPricingEnabled: true, + minimumDailyRate: '', + maximumDailyRate: '', + maxDailyPriceMovementPct: '0', + automaticPricingEnabled: false, approvalRequired: false, }) }) diff --git a/apps/dashboard/src/components/VehiclePricingManager.tsx b/apps/dashboard/src/components/VehiclePricingManager.tsx index bb37ca4..a19dd8d 100644 --- a/apps/dashboard/src/components/VehiclePricingManager.tsx +++ b/apps/dashboard/src/components/VehiclePricingManager.tsx @@ -1,7 +1,7 @@ 'use client' import { useEffect, useState } from 'react' -import { CalendarRange, History, PlusCircle, Save, Sparkles, Trash2 } from 'lucide-react' +import { History, Save } from 'lucide-react' import { formatCurrency } from '@rentaldrivego/types' import { apiFetch } from '@/lib/api' import { useDashboardI18n } from '@/components/I18nProvider' @@ -131,18 +131,18 @@ export function toDateInput(value: string) { export function buildConfigForm(configuration: PricingConfiguration): ConfigForm { return { - pricingMode: configuration.pricingMode, + pricingMode: 'MANUAL', baseDailyRate: centsToInput(configuration.baseDailyRate), weeklyRate: centsToInput(configuration.weeklyRate), - weekendRate: centsToInput(configuration.weekendRate), - holidayRate: centsToInput(configuration.holidayRate), + weekendRate: '', + holidayRate: '', monthlyRate: centsToInput(configuration.monthlyRate), - longTermDailyRate: centsToInput(configuration.longTermDailyRate), - minimumDailyRate: centsToInput(configuration.minimumDailyRate), - maximumDailyRate: centsToInput(configuration.maximumDailyRate), - maxDailyPriceMovementPct: String(configuration.maxDailyPriceMovementPct), - automaticPricingEnabled: configuration.automaticPricingEnabled, - approvalRequired: configuration.approvalRequired, + longTermDailyRate: '', + minimumDailyRate: '', + maximumDailyRate: '', + maxDailyPriceMovementPct: '0', + automaticPricingEnabled: false, + approvalRequired: false, } } @@ -174,68 +174,17 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string const copy = { en: { title: 'Pricing management', - subtitle: 'Manage fixed rates, automatic pricing bounds, seasonal rules, and pricing history for this vehicle.', + subtitle: 'Set the static daily, weekly, and monthly rental prices for this vehicle.', savePricing: 'Save pricing', saving: 'Saving…', loading: 'Loading pricing settings…', - mode: 'Pricing method', - manual: 'Manual fixed pricing', - automatic: 'Automatic dynamic pricing', - baseDailyRate: 'Base daily rate (MAD)', + baseDailyRate: 'Daily price (MAD)', weeklyRate: 'Weekly rate (MAD)', - weekendRate: 'Weekend rate (MAD)', - holidayRate: 'Holiday rate (MAD)', monthlyRate: 'Monthly rate (MAD)', - longTermDailyRate: 'Long-term daily rate (MAD)', - minimumDailyRate: 'Minimum daily rate (MAD)', - maximumDailyRate: 'Maximum daily rate (MAD)', - automaticPricingEnabled: 'Automatic pricing enabled', - approvalRequired: 'Approve automatic price changes before they go live', - maxDailyMovement: 'Max daily price movement (%)', - currentPreview: 'Current pricing preview', - next14Days: 'Next 14 days', - matchedRule: 'Matched rule', - noRule: 'No rule', - rules: 'Seasonal and manual rules', - addRule: 'Add rule', - createRule: 'Create rule', - updateRule: 'Save rule', - deleting: 'Deleting…', - deleteRule: 'Delete', - noRules: 'No vehicle-specific pricing rules yet.', history: 'Pricing history', noHistory: 'No pricing changes recorded yet.', - active: 'Active', - inactive: 'Inactive', - startDate: 'Start date', - endDate: 'End date', - name: 'Rule name', - ruleType: 'Rule type', - adjustmentPct: 'Auto adjustment (%)', - priceAdjustment: 'Flat adjustment (MAD)', - sortOrder: 'Priority', - saveErrorBase: 'Base daily rate is required.', - saveErrorBounds: 'Minimum daily rate cannot be greater than maximum daily rate.', - saveErrorRule: 'Rules need a name plus at least one rate, bound, or adjustment.', + saveErrorBase: 'Daily price is required.', configSaved: 'Pricing settings saved.', - ruleSaved: 'Pricing rule saved.', - ruleCreated: 'Pricing rule created.', - ruleDeleted: 'Pricing rule deleted.', - previewLabels: { - MANUAL_BASE: 'Base manual price', - AUTOMATIC_BASE: 'Automatic base price', - WEEKEND_RATE: 'Weekend price', - RULE_RATE: 'Manual rule', - AUTOMATIC_RULE: 'Automatic rule', - } as Record, - ruleTypeLabels: { - DATE_RANGE: 'Date range', - SEASONAL: 'Season', - HOLIDAY: 'Holiday', - WEEKEND: 'Weekend', - SPECIAL_EVENT: 'Special event', - MANUAL_OVERRIDE: 'Manual override', - } as Record, historyLabels: { CONFIG_UPDATE: 'Configuration updated', RULE_CREATED: 'Rule created', @@ -243,72 +192,20 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string RULE_DELETED: 'Rule deleted', MANUAL_OVERRIDE: 'Manual override', } as Record, - ruleHint: 'Use direct rates for fixed pricing or adjustments and bounds to guide automatic pricing.', }, fr: { title: 'Gestion des tarifs', - subtitle: 'Gérez les tarifs fixes, les limites automatiques, les saisons et l’historique des prix de ce véhicule.', + subtitle: 'Définissez les tarifs statiques journalier, hebdomadaire et mensuel de ce véhicule.', savePricing: 'Enregistrer les tarifs', saving: 'Enregistrement…', loading: 'Chargement des paramètres tarifaires…', - mode: 'Méthode tarifaire', - manual: 'Tarification fixe manuelle', - automatic: 'Tarification dynamique automatique', - baseDailyRate: 'Tarif journalier de base (MAD)', + baseDailyRate: 'Tarif journalier (MAD)', weeklyRate: 'Tarif hebdomadaire (MAD)', - weekendRate: 'Tarif week-end (MAD)', - holidayRate: 'Tarif jours fériés (MAD)', monthlyRate: 'Tarif mensuel (MAD)', - longTermDailyRate: 'Tarif long séjour / jour (MAD)', - minimumDailyRate: 'Tarif journalier minimum (MAD)', - maximumDailyRate: 'Tarif journalier maximum (MAD)', - automaticPricingEnabled: 'Tarification automatique activée', - approvalRequired: 'Valider les changements automatiques avant publication', - maxDailyMovement: 'Variation maximale par jour (%)', - currentPreview: 'Aperçu des tarifs', - next14Days: '14 prochains jours', - matchedRule: 'Règle appliquée', - noRule: 'Aucune règle', - rules: 'Règles saisonnières et manuelles', - addRule: 'Ajouter une règle', - createRule: 'Créer la règle', - updateRule: 'Enregistrer la règle', - deleting: 'Suppression…', - deleteRule: 'Supprimer', - noRules: 'Aucune règle spécifique au véhicule pour le moment.', history: 'Historique tarifaire', noHistory: 'Aucun changement tarifaire enregistré.', - active: 'Active', - inactive: 'Inactive', - startDate: 'Date de début', - endDate: 'Date de fin', - name: 'Nom de la règle', - ruleType: 'Type de règle', - adjustmentPct: 'Ajustement auto (%)', - priceAdjustment: 'Ajustement fixe (MAD)', - sortOrder: 'Priorité', - saveErrorBase: 'Le tarif journalier de base est requis.', - saveErrorBounds: 'Le tarif minimum ne peut pas dépasser le maximum.', - saveErrorRule: 'Les règles nécessitent un nom et au moins un tarif, une limite ou un ajustement.', + saveErrorBase: 'Le tarif journalier est requis.', configSaved: 'Paramètres tarifaires enregistrés.', - ruleSaved: 'Règle tarifaire enregistrée.', - ruleCreated: 'Règle tarifaire créée.', - ruleDeleted: 'Règle tarifaire supprimée.', - previewLabels: { - MANUAL_BASE: 'Tarif manuel de base', - AUTOMATIC_BASE: 'Base automatique', - WEEKEND_RATE: 'Tarif week-end', - RULE_RATE: 'Règle manuelle', - AUTOMATIC_RULE: 'Règle automatique', - } as Record, - ruleTypeLabels: { - DATE_RANGE: 'Plage de dates', - SEASONAL: 'Saison', - HOLIDAY: 'Jour férié', - WEEKEND: 'Week-end', - SPECIAL_EVENT: 'Événement spécial', - MANUAL_OVERRIDE: 'Forçage manuel', - } as Record, historyLabels: { CONFIG_UPDATE: 'Configuration mise à jour', RULE_CREATED: 'Règle créée', @@ -316,72 +213,20 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string RULE_DELETED: 'Règle supprimée', MANUAL_OVERRIDE: 'Forçage manuel', } as Record, - ruleHint: 'Utilisez des tarifs directs pour le fixe ou des ajustements et limites pour guider l’automatique.', }, ar: { title: 'إدارة التسعير', - subtitle: 'إدارة الأسعار الثابتة وحدود التسعير التلقائي والقواعد الموسمية وسجل تغييرات السعر لهذه السيارة.', + subtitle: 'حدد الأسعار الثابتة اليومية والأسبوعية والشهرية لهذه السيارة.', savePricing: 'حفظ التسعير', saving: 'جارٍ الحفظ…', loading: 'جارٍ تحميل إعدادات التسعير…', - mode: 'طريقة التسعير', - manual: 'تسعير ثابت يدوي', - automatic: 'تسعير ديناميكي تلقائي', - baseDailyRate: 'السعر اليومي الأساسي (درهم)', + baseDailyRate: 'السعر اليومي (درهم)', weeklyRate: 'السعر الأسبوعي (درهم)', - weekendRate: 'سعر عطلة نهاية الأسبوع (درهم)', - holidayRate: 'سعر العطل (درهم)', monthlyRate: 'السعر الشهري (درهم)', - longTermDailyRate: 'سعر الإيجار الطويل / يوم (درهم)', - minimumDailyRate: 'الحد الأدنى للسعر اليومي (درهم)', - maximumDailyRate: 'الحد الأقصى للسعر اليومي (درهم)', - automaticPricingEnabled: 'تفعيل التسعير التلقائي', - approvalRequired: 'اعتماد تغييرات السعر التلقائية قبل نشرها', - maxDailyMovement: 'أقصى تغيير يومي (%)', - currentPreview: 'معاينة التسعير الحالية', - next14Days: 'الأيام الـ 14 القادمة', - matchedRule: 'القاعدة المطبقة', - noRule: 'لا توجد قاعدة', - rules: 'القواعد الموسمية واليدوية', - addRule: 'إضافة قاعدة', - createRule: 'إنشاء القاعدة', - updateRule: 'حفظ القاعدة', - deleting: 'جارٍ الحذف…', - deleteRule: 'حذف', - noRules: 'لا توجد قواعد تسعير خاصة بهذه السيارة بعد.', history: 'سجل التسعير', noHistory: 'لا توجد تغييرات تسعير مسجلة بعد.', - active: 'نشطة', - inactive: 'غير نشطة', - startDate: 'تاريخ البدء', - endDate: 'تاريخ الانتهاء', - name: 'اسم القاعدة', - ruleType: 'نوع القاعدة', - adjustmentPct: 'تعديل تلقائي (%)', - priceAdjustment: 'تعديل ثابت (درهم)', - sortOrder: 'الأولوية', - saveErrorBase: 'السعر اليومي الأساسي مطلوب.', - saveErrorBounds: 'لا يمكن أن يكون الحد الأدنى أعلى من الحد الأقصى.', - saveErrorRule: 'تحتاج القواعد إلى اسم وإلى سعر أو حد أو تعديل واحد على الأقل.', + saveErrorBase: 'السعر اليومي مطلوب.', configSaved: 'تم حفظ إعدادات التسعير.', - ruleSaved: 'تم حفظ قاعدة التسعير.', - ruleCreated: 'تم إنشاء قاعدة التسعير.', - ruleDeleted: 'تم حذف قاعدة التسعير.', - previewLabels: { - MANUAL_BASE: 'السعر اليدوي الأساسي', - AUTOMATIC_BASE: 'السعر الأساسي التلقائي', - WEEKEND_RATE: 'سعر عطلة نهاية الأسبوع', - RULE_RATE: 'قاعدة يدوية', - AUTOMATIC_RULE: 'قاعدة تلقائية', - } as Record, - ruleTypeLabels: { - DATE_RANGE: 'نطاق تاريخ', - SEASONAL: 'موسم', - HOLIDAY: 'عطلة', - WEEKEND: 'نهاية أسبوع', - SPECIAL_EVENT: 'مناسبة خاصة', - MANUAL_OVERRIDE: 'تجاوز يدوي', - } as Record, historyLabels: { CONFIG_UPDATE: 'تم تحديث الإعدادات', RULE_CREATED: 'تم إنشاء قاعدة', @@ -389,27 +234,19 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string RULE_DELETED: 'تم حذف قاعدة', MANUAL_OVERRIDE: 'تجاوز يدوي', } as Record, - ruleHint: 'استخدم أسعاراً مباشرة للتسعير الثابت أو تعديلات وحدوداً لتوجيه التسعير التلقائي.', }, }[language] const [loading, setLoading] = useState(true) const [savingConfig, setSavingConfig] = useState(false) - const [savingRuleId, setSavingRuleId] = useState(null) - const [deletingRuleId, setDeletingRuleId] = useState(null) const [error, setError] = useState(null) const [success, setSuccess] = useState(null) const [configForm, setConfigForm] = useState(null) - const [rules, setRules] = useState([]) - const [newRule, setNewRule] = useState(buildRuleForm()) const [history, setHistory] = useState([]) - const [preview, setPreview] = useState(null) function applyResponse(data: PricingResponse) { setConfigForm(buildConfigForm(data.configuration)) - setRules(data.rules.map((rule) => buildRuleForm(rule))) setHistory(data.history) - setPreview(data.preview) } async function load() { @@ -432,17 +269,11 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string async function saveConfiguration() { if (!configForm) return const baseDailyRate = inputToCents(configForm.baseDailyRate) - const minimumDailyRate = inputToCents(configForm.minimumDailyRate) - const maximumDailyRate = inputToCents(configForm.maximumDailyRate) if (baseDailyRate == null) { setError(copy.saveErrorBase) return } - if (minimumDailyRate != null && maximumDailyRate != null && minimumDailyRate > maximumDailyRate) { - setError(copy.saveErrorBounds) - return - } setSavingConfig(true) setError(null) @@ -451,18 +282,18 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string const data = await apiFetch(`/vehicles/${vehicleId}/pricing`, { method: 'PUT', body: JSON.stringify({ - pricingMode: configForm.pricingMode, + pricingMode: 'MANUAL', baseDailyRate, weeklyRate: inputToCents(configForm.weeklyRate), - weekendRate: inputToCents(configForm.weekendRate), - holidayRate: inputToCents(configForm.holidayRate), + weekendRate: null, + holidayRate: null, monthlyRate: inputToCents(configForm.monthlyRate), - longTermDailyRate: inputToCents(configForm.longTermDailyRate), - minimumDailyRate, - maximumDailyRate, - maxDailyPriceMovementPct: numericInputToInt(configForm.maxDailyPriceMovementPct) ?? 10, - automaticPricingEnabled: configForm.automaticPricingEnabled, - approvalRequired: configForm.approvalRequired, + longTermDailyRate: null, + minimumDailyRate: null, + maximumDailyRate: null, + maxDailyPriceMovementPct: 0, + automaticPricingEnabled: false, + approvalRequired: false, note: copy.configSaved, }), }) @@ -475,77 +306,7 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string } } - async function saveRule(rule: RuleForm, create = false) { - const hasPricingEffect = [ - inputToCents(rule.dailyRate), - inputToCents(rule.weeklyRate), - inputToCents(rule.weekendRate), - inputToCents(rule.monthlyRate), - inputToCents(rule.minDailyRate), - inputToCents(rule.maxDailyRate), - numericInputToInt(rule.automaticAdjustmentPct), - inputToCents(rule.priceAdjustment), - ].some((value) => value != null) - - if (!rule.name.trim() || !hasPricingEffect) { - setError(copy.saveErrorRule) - return - } - - const payload = { - name: rule.name.trim(), - ruleType: rule.ruleType, - startDate: rule.startDate, - endDate: rule.endDate, - dailyRate: inputToCents(rule.dailyRate), - weeklyRate: inputToCents(rule.weeklyRate), - weekendRate: inputToCents(rule.weekendRate), - monthlyRate: inputToCents(rule.monthlyRate), - minDailyRate: inputToCents(rule.minDailyRate), - maxDailyRate: inputToCents(rule.maxDailyRate), - automaticAdjustmentPct: numericInputToInt(rule.automaticAdjustmentPct), - priceAdjustment: inputToCents(rule.priceAdjustment), - isActive: rule.isActive, - sortOrder: numericInputToInt(rule.sortOrder) ?? 0, - } - - setSavingRuleId(rule.id ?? 'new') - setError(null) - setSuccess(null) - try { - const data = create - ? await apiFetch(`/vehicles/${vehicleId}/pricing/rules`, { method: 'POST', body: JSON.stringify(payload) }) - : await apiFetch(`/vehicles/${vehicleId}/pricing/rules/${rule.id}`, { method: 'PATCH', body: JSON.stringify(payload) }) - applyResponse(data) - if (create) { - setNewRule(buildRuleForm()) - setSuccess(copy.ruleCreated) - } else { - setSuccess(copy.ruleSaved) - } - } catch (err: any) { - setError(err.message ?? copy.saveErrorRule) - } finally { - setSavingRuleId(null) - } - } - - async function deleteRule(ruleId: string) { - setDeletingRuleId(ruleId) - setError(null) - setSuccess(null) - try { - const data = await apiFetch(`/vehicles/${vehicleId}/pricing/rules/${ruleId}`, { method: 'DELETE' }) - applyResponse(data) - setSuccess(copy.ruleDeleted) - } catch (err: any) { - setError(err.message ?? copy.ruleDeleted) - } finally { - setDeletingRuleId(null) - } - } - - if (loading || !configForm || !preview) { + if (loading || !configForm) { return
{copy.loading}
} @@ -566,15 +327,8 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string {error &&
{error}
} {success &&
{success}
} -
-
-
- - -
+
+
setConfigForm((current) => current ? { ...current, baseDailyRate: event.target.value } : current)} /> @@ -583,236 +337,10 @@ export default function VehiclePricingManager({ vehicleId }: { vehicleId: string setConfigForm((current) => current ? { ...current, weeklyRate: event.target.value } : current)} />
-
- - setConfigForm((current) => current ? { ...current, weekendRate: event.target.value } : current)} /> -
-
- - setConfigForm((current) => current ? { ...current, holidayRate: event.target.value } : current)} /> -
setConfigForm((current) => current ? { ...current, monthlyRate: event.target.value } : current)} />
-
- - setConfigForm((current) => current ? { ...current, longTermDailyRate: event.target.value } : current)} /> -
-
- - setConfigForm((current) => current ? { ...current, minimumDailyRate: event.target.value } : current)} /> -
-
- - setConfigForm((current) => current ? { ...current, maximumDailyRate: event.target.value } : current)} /> -
-
- - setConfigForm((current) => current ? { ...current, maxDailyPriceMovementPct: event.target.value } : current)} /> -
-
- - -
-
- -
-
- -

{copy.currentPreview}

-
-
-

{preview.today.date}

-

{formatCurrency(preview.today.dailyRate, 'MAD')}

-

{copy.previewLabels[preview.today.pricingType]}

-

{copy.matchedRule}: {preview.today.matchedRuleName ?? copy.noRule}

-
-
-
- -

{copy.next14Days}

-
-
- {preview.next14Days.map((item) => ( -
-
-

{item.date}

-

{copy.previewLabels[item.pricingType]}

-
-
-

{formatCurrency(item.dailyRate, 'MAD')}

-

{item.matchedRuleName ?? copy.noRule}

-
-
- ))} -
-
-
-
-
- -
-

{copy.rules}

-

{copy.ruleHint}

- -
- {rules.map((rule, index) => ( -
-
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, name: event.target.value } : entry))} /> -
-
- - -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, startDate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, endDate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, dailyRate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, weeklyRate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, weekendRate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, monthlyRate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, minDailyRate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, maxDailyRate: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, automaticAdjustmentPct: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, priceAdjustment: event.target.value } : entry))} /> -
-
- - setRules((current) => current.map((entry, entryIndex) => entryIndex === index ? { ...entry, sortOrder: event.target.value } : entry))} /> -
-
- -
-
-
- - -
-
- ))} - - {rules.length === 0 &&
{copy.noRules}
} -
- -
-
- -

{copy.addRule}

-
-
-
- - setNewRule((current) => ({ ...current, name: event.target.value }))} /> -
-
- - -
-
- - setNewRule((current) => ({ ...current, startDate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, endDate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, dailyRate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, weeklyRate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, weekendRate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, monthlyRate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, minDailyRate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, maxDailyRate: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, automaticAdjustmentPct: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, priceAdjustment: event.target.value }))} /> -
-
- - setNewRule((current) => ({ ...current, sortOrder: event.target.value }))} /> -
-
-
-