From ee3d0e1134bf0ac44d1efbc91398b649d19442ad Mon Sep 17 00:00:00 2001 From: Juan Felipe Zapata Moreno Date: Wed, 18 Mar 2026 18:05:25 -0600 Subject: [PATCH] refactor: elimina componentes y servicios de estructuras de activos fijos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Se eliminaron componentes relacionados a estructuras de activos fijos y su servicio. - Se actualizó fixedAsset.ts con la nueva estructura y campos adicionales. - Se agregó fixedAssetsService.ts para gestionar activos fijos. - Se eliminaron rutas relacionadas en el router. --- src/components/layout/Sidebar.vue | 5 - src/modules/auth/services/authService.ts | 10 +- .../components/FixedAssetsIndex.vue | 270 +++++++----------- .../assets/FixedAssetAcquisitionSection.vue | 53 ++-- .../assets/FixedAssetAssignmentSection.vue | 30 +- .../components/assets/FixedAssetForm.vue | 80 +++--- .../assets/FixedAssetGeneralInfoSection.vue | 124 +++++--- .../components/assets/FixedAssetImageCard.vue | 64 ----- .../structures/FixedAssetStructureDetails.vue | 76 ----- .../structures/FixedAssetStructureForm.vue | 128 --------- .../structures/FixedAssetStructuresIndex.vue | 182 ------------ .../structures/StructureContentsTable.vue | 181 ------------ .../structures/StructureControlInfoCard.vue | 37 --- .../structures/StructureParentInfoCard.vue | 81 ------ .../structures/StructureValuationSummary.vue | 56 ---- .../services/fixedAssetStructuresService.ts | 124 -------- .../services/fixedAssetsService.ts | 120 ++++++++ src/modules/fixed-assets/types/fixedAsset.ts | 33 ++- .../fixed-assets/types/fixedAssetStructure.ts | 30 -- src/router/index.ts | 39 --- 20 files changed, 419 insertions(+), 1304 deletions(-) delete mode 100644 src/modules/fixed-assets/components/assets/FixedAssetImageCard.vue delete mode 100644 src/modules/fixed-assets/components/structures/FixedAssetStructureDetails.vue delete mode 100644 src/modules/fixed-assets/components/structures/FixedAssetStructureForm.vue delete mode 100644 src/modules/fixed-assets/components/structures/FixedAssetStructuresIndex.vue delete mode 100644 src/modules/fixed-assets/components/structures/StructureContentsTable.vue delete mode 100644 src/modules/fixed-assets/components/structures/StructureControlInfoCard.vue delete mode 100644 src/modules/fixed-assets/components/structures/StructureParentInfoCard.vue delete mode 100644 src/modules/fixed-assets/components/structures/StructureValuationSummary.vue delete mode 100644 src/modules/fixed-assets/services/fixedAssetStructuresService.ts create mode 100644 src/modules/fixed-assets/services/fixedAssetsService.ts delete mode 100644 src/modules/fixed-assets/types/fixedAssetStructure.ts diff --git a/src/components/layout/Sidebar.vue b/src/components/layout/Sidebar.vue index dc22bfd..37c0579 100644 --- a/src/components/layout/Sidebar.vue +++ b/src/components/layout/Sidebar.vue @@ -79,11 +79,6 @@ const menuItems = ref([ items: [ { label: 'Registro de Activos', icon: 'pi pi-building', to: '/fixed-assets' }, { label: 'Asignacion a Empleado', icon: 'pi pi-send', to: '/fixed-assets/assignments' }, - { label: 'Estructura de Activos', icon: 'pi pi-sitemap', to: '/fixed-assets/structures' }, - // { label: 'Marcas', icon: 'pi pi-building', to: '/fixed-assets/brands' }, - // { label: 'Modelos', icon: 'pi pi-building', to: '/fixed-assets/models' }, - // { label: 'Estados', icon: 'pi pi-building', to: '/fixed-assets/states' }, - // { label: 'Ubicaciones', icon: 'pi pi-building', to: '/fixed-assets/locations' }, ], }, { diff --git a/src/modules/auth/services/authService.ts b/src/modules/auth/services/authService.ts index a93edfb..216d244 100644 --- a/src/modules/auth/services/authService.ts +++ b/src/modules/auth/services/authService.ts @@ -53,7 +53,7 @@ class AuthService { */ async register(data: RegisterData): Promise { try { - const response = await api.post('/auth/register', data); + const response = await api.post('/api/auth/register', data); return response.data; } catch (error: any) { throw new Error(error.response?.data?.message || 'Error al registrar usuario'); @@ -88,7 +88,7 @@ class AuthService { */ async getCurrentUser(): Promise { try { - const response = await api.get('/auth/me'); + const response = await api.get('/api/auth/me'); return response.data; } catch (error: any) { throw new Error(error.response?.data?.message || 'Error al obtener usuario'); @@ -100,7 +100,7 @@ class AuthService { */ async updateProfile(data: Partial): Promise { try { - const response = await api.put('/auth/profile', data); + const response = await api.put('/api/auth/profile', data); return response.data; } catch (error: any) { throw new Error(error.response?.data?.message || 'Error al actualizar perfil'); @@ -126,7 +126,7 @@ class AuthService { */ async forgotPassword(email: string): Promise { try { - await api.post('/auth/forgot-password', { email }); + await api.post('/api/auth/forgot-password', { email }); } catch (error: any) { throw new Error(error.response?.data?.message || 'Error al solicitar recuperación'); } @@ -137,7 +137,7 @@ class AuthService { */ async resetPassword(token: string, password: string): Promise { try { - await api.post('/auth/reset-password', { token, password }); + await api.post('/api/auth/reset-password', { token, password }); } catch (error: any) { throw new Error(error.response?.data?.message || 'Error al resetear contraseña'); } diff --git a/src/modules/fixed-assets/components/FixedAssetsIndex.vue b/src/modules/fixed-assets/components/FixedAssetsIndex.vue index ca7d6b4..9bbc79e 100644 --- a/src/modules/fixed-assets/components/FixedAssetsIndex.vue +++ b/src/modules/fixed-assets/components/FixedAssetsIndex.vue @@ -1,5 +1,5 @@