feat: add unit of measure tables and seed data for material types management
This commit is contained in:
@@ -37,11 +37,20 @@ export const materialTypesApi = {
|
||||
* Lista todos los tipos de material con paginación
|
||||
* @param page - Número de página (por defecto 1)
|
||||
* @param pageSize - Tamaño de página (por defecto 50)
|
||||
* @param type - Filtrar por tipo (ACTIVO FIJO, MATERIALES, PRODUCTOS)
|
||||
*/
|
||||
list: (page = 1, pageSize = 50) =>
|
||||
api.get<MaterialTypeListResponse>(
|
||||
`/v1/public/refrence_data/material-types?page=${page}&page_size=${pageSize}`
|
||||
),
|
||||
list: (page = 1, pageSize = 50, type?: string) => {
|
||||
const params = new URLSearchParams({
|
||||
page: page.toString(),
|
||||
page_size: pageSize.toString()
|
||||
});
|
||||
if (type) {
|
||||
params.append('type', type);
|
||||
}
|
||||
return api.get<MaterialTypeListResponse>(
|
||||
`/v1/public/refrence_data/material-types?${params.toString()}`
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Obtiene un tipo de material por key
|
||||
|
||||
Reference in New Issue
Block a user