Add sale management feature for admin panel
- Add database migration for sale fields (percentage, active, dates) - Update API to handle sale operations and bulk updates - Create SaleManager component for admin interface - Update FilamentTableV2 to display sale prices on frontend - Add sale column in admin dashboard - Implement sale price calculations with strikethrough styling
This commit is contained in:
@@ -87,6 +87,17 @@ export const filamentService = {
|
||||
const response = await api.delete(`/filaments/${id}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
updateBulkSale: async (data: {
|
||||
filamentIds?: string[];
|
||||
salePercentage: number;
|
||||
saleStartDate?: string;
|
||||
saleEndDate?: string;
|
||||
enableSale: boolean;
|
||||
}) => {
|
||||
const response = await api.post('/filaments/sale/bulk', data);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
export default api;
|
||||
Reference in New Issue
Block a user