Add color request feature with modal and Safari styling fixes
- Implement color request modal popup instead of separate page - Add Serbian translations throughout - Fix Safari form styling issues with custom CSS - Add 'Other' option to material and finish dropdowns - Create admin panel for managing color requests - Add database migration for color_requests table - Implement API endpoints for color request management
This commit is contained in:
@@ -101,4 +101,34 @@ export const filamentService = {
|
||||
},
|
||||
};
|
||||
|
||||
export const colorRequestService = {
|
||||
getAll: async () => {
|
||||
const response = await api.get('/color-requests');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
submit: async (request: {
|
||||
color_name: string;
|
||||
material_type: string;
|
||||
finish_type?: string;
|
||||
user_email?: string;
|
||||
user_name?: string;
|
||||
description?: string;
|
||||
reference_url?: string;
|
||||
}) => {
|
||||
const response = await api.post('/color-requests', request);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
updateStatus: async (id: string, status: string, admin_notes?: string) => {
|
||||
const response = await api.put(`/color-requests/${id}`, { status, admin_notes });
|
||||
return response.data;
|
||||
},
|
||||
|
||||
delete: async (id: string) => {
|
||||
const response = await api.delete(`/color-requests/${id}`);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
export default api;
|
||||
Reference in New Issue
Block a user