Edgar Mendez Mendoza 3bea03f9db feat: add warehouse management components and services
- Implemented WarehouseForm.vue for creating new warehouses with form validation and category assignment.
- Developed WarehouseIndex.vue for displaying a list of warehouses with search and filter functionalities.
- Created warehouseClasificationService.ts for handling warehouse classification API interactions.
- Defined types for warehouse classifications in warehouse.clasification.d.ts.
- Established a Pinia store (warehouseStore.ts) for managing warehouse state and actions.
- Added an index.html file for the warehouse management interface layout.
2025-11-07 12:14:40 -06:00

16 lines
485 B
TypeScript

import api from '../../../services/api';
import type { WarehousesResponse } from '../types/warehouse';
export const warehouseService = {
async getWarehouses() {
try {
const response = await api.get<WarehousesResponse>('/api/warehouses');
console.log('Warehouses response:', response);
return response;
} catch (error) {
console.error('Error fetching warehouses:', error);
throw error;
}
}
};