ifixkart-admin/services/api/deliverySettingsService.ts
adithiyan b5837073e7 feat: add warranties, refunds, notification templates, user POS analytics, credit & delivery services
New pages:
- app/(admin)/warranties/ — full warranty management with claims
- app/(admin)/refunds/ — refund management
- app/(admin)/notification-templates/ — email/SMS template editor
- app/(admin)/user-pos-analytics/ — per-user POS analytics

New components:
- components/quotations/ — quotation components
- components/ui/PartNumbersModal.tsx — part numbers selection

New services:
- creditService.ts, deliverySettingsService.ts
- notificationTemplateService.ts, roleNotificationSettingsService.ts

Updated:
- Sidebar navigation, dashboard, orders, POS sessions, products
- Bulk quotations, CRM leads/quotations, notifications gateway
- settings, service invoices, quotes, technician, users pages
- adminService, billingFinanceService, catalogService, client
- inventoryPosService, notificationGatewayService, openwaService, userService
- Removed pos-sync page (merged into POS sessions)
2026-10-13 22:05:55 +05:30

20 lines
587 B
TypeScript

import { apiFetch } from './client';
export interface DeliverySettings {
delivery_charge: number;
free_delivery_enabled: boolean;
free_delivery_min_order_amount: number;
}
export const deliverySettingsService = {
getSettings: async (): Promise<DeliverySettings> => {
return apiFetch<DeliverySettings>('/api/v1/settings/delivery');
},
updateSettings: async (payload: Partial<DeliverySettings>): Promise<DeliverySettings> => {
return apiFetch<DeliverySettings>('/api/v1/settings/delivery', {
method: 'PUT',
body: JSON.stringify(payload),
});
},
};