From fa1148c6e1531b34ba021d7681ea0f02e97a70bd Mon Sep 17 00:00:00 2001 From: Fernanda Andrade <119636766+fe222004@users.noreply.github.com> Date: Wed, 7 Aug 2024 09:13:54 -0500 Subject: [PATCH 1/3] DM2-2821-actualizar-diseno-de-formulario-y-carrusel-en-la-pagina-de-inicio --- src/app/app.module.ts | 5 - .../alert-confirmation.component.spec.ts | 21 -- .../carrusel/carrusel.component.html | 65 ++-- .../form-product-routing.module.ts | 10 - .../form-product/form-product.component.css | 83 ----- .../form-product/form-product.component.html | 283 ------------------ .../form-product/form-product.component.ts | 171 ----------- .../form-product/form-product.module.ts | 26 -- .../pages/components/menu/menu.component.html | 29 +- .../pages/components/menu/menu.component.ts | 1 - .../mobil-menu/mobil-menu.component.html | 3 - .../modal-product-routing.module.ts | 10 - .../modal-product/modal-product.component.css | 7 - .../modal-product.component.html | 77 ----- .../modal-product/modal-product.component.ts | 39 --- .../modal-product/modal-product.module.ts | 18 -- src/app/pages/dashboard/dashboard.module.ts | 2 - src/app/pages/home/home.component.html | 90 +----- src/app/pages/home/home.component.ts | 1 - src/app/pages/home/home.module.ts | 7 +- src/app/pages/pages-routing.module.ts | 6 - src/app/pages/pages.module.ts | 11 +- .../pages/product/product-routing.module.ts | 10 - src/app/pages/product/product.component.css | 34 --- src/app/pages/product/product.component.html | 217 -------------- src/app/pages/product/product.component.ts | 203 ------------- src/app/pages/product/product.module.ts | 24 -- .../pages/register/register.component.html | 19 +- src/app/pages/register/register.component.ts | 7 +- .../pages/services/product-modal.service.ts | 9 +- src/app/pages/services/translation.service.ts | 3 +- 31 files changed, 73 insertions(+), 1418 deletions(-) delete mode 100644 src/app/pages/components/alert-confirmation/alert-confirmation.component.spec.ts delete mode 100644 src/app/pages/components/form-product/form-product-routing.module.ts delete mode 100644 src/app/pages/components/form-product/form-product.component.css delete mode 100644 src/app/pages/components/form-product/form-product.component.html delete mode 100644 src/app/pages/components/form-product/form-product.component.ts delete mode 100644 src/app/pages/components/form-product/form-product.module.ts delete mode 100644 src/app/pages/components/modal-product/modal-product-routing.module.ts delete mode 100644 src/app/pages/components/modal-product/modal-product.component.css delete mode 100644 src/app/pages/components/modal-product/modal-product.component.html delete mode 100644 src/app/pages/components/modal-product/modal-product.component.ts delete mode 100644 src/app/pages/components/modal-product/modal-product.module.ts delete mode 100644 src/app/pages/product/product-routing.module.ts delete mode 100644 src/app/pages/product/product.component.css delete mode 100644 src/app/pages/product/product.component.html delete mode 100644 src/app/pages/product/product.component.ts delete mode 100644 src/app/pages/product/product.module.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4b99dc2..2255f8c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -15,10 +15,6 @@ import { FooterModule } from './pages/components/footer/footer.module'; import { HomeModule } from './pages/home/home.module'; import { DashboardModule } from './pages/dashboard/dashboard.module'; -import { ApplianceRegistrationModule } from './pages/appliance-registration/appliance-registration.module'; -import { AlertConfirmationModule } from './pages/components/alert-confirmation/alert-confirmation.module'; -import { ProductModule } from './pages/product/product.module'; -import { ModalProductModule } from './pages/components/modal-product/modal-product.module'; import { PaymentModule } from './pages/payment/payment.module'; export function HttpLoaderFactory(http: HttpClient) { @@ -33,7 +29,6 @@ export function HttpLoaderFactory(http: HttpClient) { AppRoutingModule, HomeModule, DashboardModule, - ProductModule, PaymentModule, ReactiveFormsModule, HttpClientModule, diff --git a/src/app/pages/components/alert-confirmation/alert-confirmation.component.spec.ts b/src/app/pages/components/alert-confirmation/alert-confirmation.component.spec.ts deleted file mode 100644 index e6bd387..0000000 --- a/src/app/pages/components/alert-confirmation/alert-confirmation.component.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { AlertConfirmationComponent } from './alert-confirmation.component'; - -describe('AlertConfirmationComponent', () => { - let component: AlertConfirmationComponent; - let fixture: ComponentFixture; - - beforeEach(() => { - TestBed.configureTestingModule({ - declarations: [AlertConfirmationComponent] - }); - fixture = TestBed.createComponent(AlertConfirmationComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/components/carrusel/carrusel.component.html b/src/app/pages/components/carrusel/carrusel.component.html index cc1cdf2..0da3ea2 100644 --- a/src/app/pages/components/carrusel/carrusel.component.html +++ b/src/app/pages/components/carrusel/carrusel.component.html @@ -1,42 +1,27 @@ - -
- - - - - - - -
-
- -

- {{ 'home.title' | translate }} -

-

- {{ 'home.description' | translate }} -

- -
+
+ + + + + + +
+
+

+ {{ 'home.title' | translate }} +

+

+ {{ 'home.description' | translate }} +

+
+
diff --git a/src/app/pages/components/form-product/form-product-routing.module.ts b/src/app/pages/components/form-product/form-product-routing.module.ts deleted file mode 100644 index fb009f9..0000000 --- a/src/app/pages/components/form-product/form-product-routing.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -const routes: Routes = []; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class FormProductRoutingModule { } diff --git a/src/app/pages/components/form-product/form-product.component.css b/src/app/pages/components/form-product/form-product.component.css deleted file mode 100644 index f20dd06..0000000 --- a/src/app/pages/components/form-product/form-product.component.css +++ /dev/null @@ -1,83 +0,0 @@ -.image-upload { - display: flex; - flex-direction: column; - align-items: center; - margin-top: 20px; -} - -.upload-area { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.image-upload-label { - cursor: pointer; - border: 2px dashed #cccccc; - border-radius: 8px; - padding: 20px; - text-align: center; - transition: border-color 0.3s; -} - -.image-upload-label:hover { - border-color: #888888; -} - -.image-upload-placeholder { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.upload-icon { - width: 40px; - height: 40px; - color: #888888; -} - -.upload-text { - margin-top: 10px; - color: #666666; -} - -input[type="file"] { - display: none; -} - -.image-preview { - position: relative; - margin-top: 20px; - display: flex; - justify-content: center; - align-items: center; -} - -.image-preview img { - max-width: 100%; - max-height: 300px; - border-radius: 8px; -} - -.remove-image { - position: absolute; - top: 5px; - right: 5px; - background: rgba(0, 0, 0, 0.5); - color: #ffffff; - border: none; - border-radius: 50%; - width: 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - font-size: 16px; - cursor: pointer; -} - -.remove-image:hover { - background: rgba(0, 0, 0, 0.7); -} diff --git a/src/app/pages/components/form-product/form-product.component.html b/src/app/pages/components/form-product/form-product.component.html deleted file mode 100644 index 645d639..0000000 --- a/src/app/pages/components/form-product/form-product.component.html +++ /dev/null @@ -1,283 +0,0 @@ -
-
-
-

- {{ 'formProduct.CONTACT_US_TITLE' | translate }} -

-

- {{ 'formProduct.CONTACT_US_DESCRIPTION' | translate }} -

-
-
-
-
-
-
-
- -

{{ - 'formProduct.APPLICANT_INFO_TITLE' | translate }}

-

{{ 'formProduct.APPLICANT_INFO_DESCRIPTION' | translate }} -

-
-
-
-
-
- - -
- -
-
-
- {{ 'formProduct.FIRST_NAME_REQUIRED' | translate }} -
-
- {{ 'formProduct.FIRST_NAME_MINLENGTH' | translate }} -
-
- {{ 'formProduct.FIRST_NAME_MAXLENGTH' | translate }} -
-
-
-
- - -
- -
-
-
- {{ 'formProduct.LAST_NAME_REQUIRED' | translate }} -
-
- {{ 'formProduct.LAST_NAME_MINLENGTH' | translate }} -
-
- {{ 'formProduct.LAST_NAME_MAXLENGTH' | translate }} -
-
-
-
- -
- -
-
-
- {{ 'formProduct.EMAIL_REQUIRED' | translate }} -
-
- {{ 'formProduct.EMAIL_INVALID' | translate }} -
-
-
-
- -
- -
-
-
- {{ 'formProduct.ADDRESS_REQUIRED' | translate }} -
-
-
-
- -
- -
-
-
- {{ 'formProduct.STATE_REQUIRED' | translate }} -
-
-
-
- -
- -
-
-
- {{ 'formProduct.PREFERRED_CONTACT_METHOD_REQUIRED' | translate }}
-
-
-
- -
- -
-
{{ - 'formProduct.STATE_REQUIRED' | translate }}
-
{{ - 'formProduct.PHONE_NUMBER_PATTERN_ERROR' | translate }}
-
-
-
-
-
-
- -
- -
-
-
{{ - 'formProduct.APPLIANCE_TYPE_REQUIRED' | translate }}
-
-
-
- -
- -
-
-
{{ - 'formProduct.BRAND_REQUIRED' | translate }}
-
-
-
- -
- -
-
-
{{ - 'formProduct.PROBLEM_DETAILS_REQUIRED' | translate }}
-
-
-
-
-
-

{{ - 'formProduct.APPLIANCE_IMAGE_LABEL' | translate - }} *

-

{{ 'formProduct.APPLIANCE_IMAGE_DESCRIPTION' | - translate }}

-
-
- -
-
- Imagen cargada - -
-
-
-
-
{{ - 'formProduct.IMAGE_REQUIRED' | translate }}
-
-
- -
-
- - -
-
-
-
-
-
-
- -
- -
- -
- -
- -
- -
\ No newline at end of file diff --git a/src/app/pages/components/form-product/form-product.component.ts b/src/app/pages/components/form-product/form-product.component.ts deleted file mode 100644 index 173f589..0000000 --- a/src/app/pages/components/form-product/form-product.component.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { DataTransferServiceService } from '../../services/data-transfer-service.service'; -import { Router } from '@angular/router'; -import { PROVINCES_ECUADOR } from 'src/app/constants/constants'; -import { ProductConstants } from 'src/app/constants/product.constants'; -import { ValidationConstants } from 'src/app/constants/validation.constants'; -import { AuthService } from 'src/app/components/service/auth.service'; - -@Component({ - selector: 'app-form-product', - templateUrl: './form-product.component.html', - styleUrls: ['./form-product.component.css'], -}) -export class FormProductComponent { - private readonly formBuilder: FormBuilder = inject(FormBuilder); - private readonly router: Router = inject(Router); - private readonly dataTransferService: DataTransferServiceService = inject( - DataTransferServiceService - ); - - urls = ProductConstants; - public form: FormGroup; - public imageSrc: string | ArrayBuffer | null = null; - public files: File[] = []; - public showAlert: boolean = false; - public showAlertForm: boolean = false; - isLoggedIn: boolean = false; - - provinces = PROVINCES_ECUADOR; - - constructor(private authService: AuthService) { - this.form = this.buildForm(); - this.isLoggedIn = this.authService.isLoggedIn(); - this.form.patchValue(JSON.parse(localStorage.getItem('user') || '{}')); - } - - private buildForm(): FormGroup { - return this.formBuilder.group({ - first_name: ['', [Validators.required]], - last_name: ['', [Validators.required]], - email: ['', [Validators.required]], - appliance_type: ['', [Validators.required]], - brand: [ - '', - [ - Validators.required, - Validators.minLength(ValidationConstants.BRAND_MIN_LENGTH), - Validators.maxLength(ValidationConstants.BRAND_MAX_LENGTH), - ], - ], - problem_details: [ - '', - [ - Validators.required, - Validators.minLength(ValidationConstants.BRAND_MIN_LENGTH), - ], - ], - address: [ - '', - [ - Validators.required, - Validators.minLength(ValidationConstants.BRAND_MIN_LENGTH), - Validators.maxLength(ValidationConstants.ADDRESSS_MAX_LENGTH), - ], - ], - preferred_contact_method: ['', [Validators.required]], - phone_number: [], - damaged_appliance_image: [null, Validators.required], - state: [ - '', - [ - Validators.required, - Validators.minLength(ValidationConstants.BRAND_MIN_LENGTH), - Validators.maxLength(ValidationConstants.ADDRESSS_MAX_LENGTH), - ], - ], - }); - } - - isFieldInvalid(field: string): boolean { - const control = this.form.get(field) ?? { - invalid: false, - dirty: false, - touched: false, - }; - return control.invalid && (control.dirty || control.touched); - } - - public onSubmit(): void { - if (this.form.invalid) { - this.showAlertForm = true; - Object.keys(this.form.controls).forEach((key) => { - this.form.get(key)?.markAsTouched(); - }); - return; - } - - const file = this.files[0]; - const formValueWithFile = { - ...this.form.value, - damaged_appliance_image: file ? file.name : null, - }; - - this.dataTransferService.setData(formValueWithFile); - this.showAlert = true; - } - - public onFileChange(event: any): void { - const file = event.target.files[0]; - if (file) { - this.files = [file]; - const reader = new FileReader(); - reader.onload = () => { - this.imageSrc = reader.result as string; - }; - reader.readAsDataURL(file); - this.form.patchValue({ damaged_appliance_image: file }); - this.form.get('damaged_appliance_image')?.updateValueAndValidity(); - } - } - - public getFile(event: Event): void { - const input = event.target as HTMLInputElement; - if (input.files && input.files.length > 0) { - const file = input.files[0]; - this.handleFile(file); - } - } - - onAlertClosed() { - this.showAlertForm = false; - } - - public chooseFile(): void { - const inputElement = document.getElementById( - 'damaged-appliance-image' - ) as HTMLInputElement; - inputElement?.click(); - } - - public onDrop(event: DragEvent): void { - event.preventDefault(); - event.stopPropagation(); - if (event.dataTransfer?.files && event.dataTransfer.files.length > 0) { - const file = event.dataTransfer.files[0]; - this.handleFile(file); - } - } - - public onDragOver(event: DragEvent): void { - event.preventDefault(); - } - - private handleFile(file: File): void { - const reader = new FileReader(); - reader.onload = () => { - this.imageSrc = reader.result || null; - }; - reader.readAsDataURL(file); - this.files = [file]; - this.form.patchValue({ damaged_appliance_image: file.name }); - this.form.get('damaged_appliance_image')?.updateValueAndValidity(); - } - - public removeImage(): void { - this.imageSrc = null; - this.files = []; - this.form.get('damaged_appliance_image')?.reset(); - } -} diff --git a/src/app/pages/components/form-product/form-product.module.ts b/src/app/pages/components/form-product/form-product.module.ts deleted file mode 100644 index 63de438..0000000 --- a/src/app/pages/components/form-product/form-product.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { FormProductRoutingModule } from './form-product-routing.module'; -import { FormProductComponent } from './form-product.component'; -import { ReactiveFormsModule } from '@angular/forms'; -import { AlertLoginRegisterModule } from 'src/app/components/auth/components/alert-login-register/alert-login-register.module'; -import { AlertFormModule } from '../alert-form/alert-form.module'; -import { TranslateModule } from '@ngx-translate/core'; -import { AlertConfirmationModule } from '../alert-confirmation/alert-confirmation.module'; - - -@NgModule({ - declarations: [FormProductComponent], - imports: [ - CommonModule, - FormProductRoutingModule, - ReactiveFormsModule, - AlertLoginRegisterModule, - AlertFormModule, - TranslateModule, - AlertConfirmationModule, - ], - exports: [FormProductComponent] -}) -export class FormProductModule { } diff --git a/src/app/pages/components/menu/menu.component.html b/src/app/pages/components/menu/menu.component.html index f52ffb4..4f895c0 100644 --- a/src/app/pages/components/menu/menu.component.html +++ b/src/app/pages/components/menu/menu.component.html @@ -27,12 +27,13 @@ - + - - - -
- \ No newline at end of file + diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 479a4d1..6ee3fdb 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -49,7 +49,6 @@ export class HomeComponent { this.applianceService .getUserAppliances(userIdNumber, page) .subscribe((response) => { - console.log(response); this.appliances = response.data; this.currentPage = response.meta.current_page; this.totalPages = response.meta.last_page; diff --git a/src/app/pages/home/home.module.ts b/src/app/pages/home/home.module.ts index ce2efcf..8306c93 100644 --- a/src/app/pages/home/home.module.ts +++ b/src/app/pages/home/home.module.ts @@ -7,17 +7,16 @@ import { FooterModule } from '../components/footer/footer.module'; import { TranslateModule } from '@ngx-translate/core'; import { MobilMenuModule } from '../components/mobil-menu/mobil-menu.module'; - @NgModule({ declarations: [HomeComponent], imports: [ - CommonModule, + CommonModule, HomeRoutingModule, MenuModule, FooterModule, TranslateModule, - MobilMenuModule + MobilMenuModule, ], - exports: [HomeComponent] + exports: [HomeComponent], }) export class HomeModule {} diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index c558f39..d8089be 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -1,11 +1,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './home/home.component'; -import { ProductComponent } from './product/product.component'; import { PaymentComponent } from './payment/payment.component'; import { RegisterComponent } from './register/register.component'; - const routes: Routes = [ { path: 'home', @@ -15,10 +13,6 @@ const routes: Routes = [ path: 'form', component: RegisterComponent, }, - { - path: 'product', - component: ProductComponent, - }, { path: 'payment/:id', component: PaymentComponent, diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index b0fdbdc..a974034 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -1,25 +1,18 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; - import { PagesRoutingModule } from './pages-routing.module'; -import { FormProductModule } from './components/form-product/form-product.module'; - import { TranslateModule } from '@ngx-translate/core'; -import { CarruselComponent } from './components/carrusel/carrusel.component'; import { RegisterModule } from './register/register.module'; import { MobilMenuModule } from './components/mobil-menu/mobil-menu.module'; - - @NgModule({ - declarations: [ ], + declarations: [], imports: [ CommonModule, PagesRoutingModule, TranslateModule, RegisterModule, - MobilMenuModule - + MobilMenuModule, ], }) export class PagesModule {} diff --git a/src/app/pages/product/product-routing.module.ts b/src/app/pages/product/product-routing.module.ts deleted file mode 100644 index b94580a..0000000 --- a/src/app/pages/product/product-routing.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -const routes: Routes = []; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class ProductRoutingModule { } diff --git a/src/app/pages/product/product.component.css b/src/app/pages/product/product.component.css deleted file mode 100644 index c22867a..0000000 --- a/src/app/pages/product/product.component.css +++ /dev/null @@ -1,34 +0,0 @@ -body { - background: linear-gradient(to right, rgba(0, 0, 255, 0.5), rgba(255, 255, 0, 0.5)); - margin: 0; - font-family: Arial, sans-serif; -} - -/* Estilo para la línea horizontal */ -.custom-line { - border: none; - height: 2px; - background-color: #4A90E2; - margin: 20px 0; - } - - /* Estilo para las tarjetas de electrodomésticos */ - .appliance-card { - cursor: pointer; - } - - /* Estilo para el mensaje del temporizador */ - .timer { - font-size: 1.5rem; - font-weight: bold; - color: #4A90E2; - margin-top: 20px; - } - - .gradient-background { - background: linear-gradient(to right, rgba(0, 0, 255, 0.5), rgba(255, 255, 0, 0.5)); - color: #000000ab; - padding: 20px; - border-radius: 8px; - text-align: center; /* Opcional, por si necesitas centrar el texto */ - } diff --git a/src/app/pages/product/product.component.html b/src/app/pages/product/product.component.html deleted file mode 100644 index 1771846..0000000 --- a/src/app/pages/product/product.component.html +++ /dev/null @@ -1,217 +0,0 @@ - - -
-
- -
-
-
-
-

{{ 'WELCOME_TITLE' | translate }}

-

{{ 'WELCOME_DESCRIPTION' | translate }}

-
-
-
- -
-
-
-
-
- -
-

- {{ 'APPLIANCE_MAINTENANCE_REPAIR' | translate }} -

-
-

- {{ 'TRUSTED_APPLIANCES' | translate }} -

-
- - - - - - -
-
- -
- {{ timerMessage }} {{ 'LETFTOVER' | translate }} -
-
- {{ 'TIMER_MESSAGE' | translate }} -
- -
    -
  • -
    - Appliance image -
    -
    -
    -

    - {{ appliance.appliance_type }} -

    -

    {{ appliance.brand }}

    -
    -

    {{ appliance.problem_details }}

    -
    -

    {{ appliance.application_date }}

    -
    - - -
    -
    -
    -
  • -
- -
-

{{ 'NO_APPLIANCES_FOUND' | translate }}

-
- -
-
- - -
- -
-
- - -
- -
-
- -
- diff --git a/src/app/pages/product/product.component.ts b/src/app/pages/product/product.component.ts deleted file mode 100644 index 4b7613f..0000000 --- a/src/app/pages/product/product.component.ts +++ /dev/null @@ -1,203 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { ApplianceServiceService } from '../services/appliance-service.service'; -import { ProductConstants } from 'src/app/constants/product.constants'; -import { IconsConstants } from 'src/app/constants/icons.constants'; -import { TranslateService } from '@ngx-translate/core'; -import { TimeConstants } from 'src/app/constants/time.constants'; -import { PaginationConstants } from 'src/app/constants/pagination.constants'; -import { Product } from 'src/app/models/product'; -import { User } from 'src/app/models/user'; -import { ProductModalService } from '../services/product-modal.service'; - -@Component({ - selector: 'app-product', - templateUrl: './product.component.html', - styleUrls: ['./product.component.css'], -}) -export class ProductComponent { - private readonly applianceService: ApplianceServiceService = inject( - ApplianceServiceService - ); - private readonly translate: TranslateService = inject(TranslateService); - - urls = ProductConstants; - icons = IconsConstants; - - initialPage = ProductConstants.INITIAL_PAGE; - initialTotalPages = ProductConstants.INITIAL_TOTAL_PAGES; - initialTotalItems = ProductConstants.INITIAL_TOTAL_ITEMS; - - selectedType: string | null = null; - private userId?: number; - appliances: any[] = []; - modalProduct: boolean = false; - products: Product[] = []; - - currentPage: number = this.initialPage; - totalPages: number = this.initialTotalPages; - totalItems: number = this.initialTotalItems; - PaginationConstants = PaginationConstants; - - timerMessage: string = ''; - timerInterval: any; - - constructor(private activatedRoute: ActivatedRoute, private router: Router, private productModalService: ProductModalService) { - this.initializeUserId(); - if (this.userId !== undefined) { - this.loadUserAppliances(this.currentPage); - } - } - - private initializeUserId() { - const userId = this.activatedRoute.snapshot.paramMap.get('userId'); - if (userId) { - this.userId = +userId; - } - } - - loadUserAppliances(page: number = this.initialPage): void { - this.applianceService - .getUserAppliances(this.userId!, page) - .subscribe((response) => { - console.log(response) - this.appliances = response.data; - this.currentPage = response.meta.current_page; - this.totalPages = response.meta.last_page; - this.totalItems = response.meta.total; - }); - } - - openProductModal(appliance: Product) { - this.modalProduct = true; - this.productModalService.openModal(appliance); - } - - getUserIdFromRoute(): string { - const urlSegments = window.location.pathname.split('/'); - return urlSegments[urlSegments.indexOf('pages') + 1]; - } - - goToHome(): void { - const userId = this.getUserIdFromRoute(); - this.router.navigate([`/pages/${userId}/home`]); - } - - onAlertClosed() { - this.modalProduct = false; - } - - nextPage(): void { - if (this.currentPage < this.totalPages) { - const nextPage = this.currentPage + 1; - this.loadUserAppliances(nextPage); - } - } - - previousPage(): void { - if (this.currentPage > 1) { - const previousPage = this.currentPage - 1; - this.loadUserAppliances(previousPage); - } - } - - onClickType(type: string) { - this.translate - .get(`APPLIANCE_TYPE_${type.toUpperCase()}`) - .subscribe((translatedType: string) => { - if (type !== ProductConstants.APPLIANCE_TYPE_ALL) { - this.selectedType = translatedType; - this.applianceService.setSelectedType(translatedType); - this.loadUserAppliances(); - } else { - this.selectedType = type; - this.applianceService.setSelectedType(null); - this.loadUserAppliances(); - } - }); - } - - showTimer(appliance: any): void { - if (!appliance.application_date) { - this.translate - .get('INVALID_APPLICATION_DATE') - .subscribe((msg: string) => { - this.timerMessage = msg; - }); - return; - } - - if (this.timerInterval) { - clearInterval(this.timerInterval); - } - - const startTime = new Date(appliance.application_date).getTime(); - let duration = 0; - - if (appliance.service_type === ProductConstants.MAINTENANCE) { - duration = ProductConstants.MAINTENANCE_DURATION; - } else if (appliance.service_type === ProductConstants.REPAIR) { - duration = ProductConstants.REPAIR_DURATION; - } else { - this.translate.get('INVALID_SERVICE_TYPE').subscribe((msg: string) => { - this.timerMessage = msg; - }); - return; - } - - const endTime = startTime + duration; - - this.timerInterval = setInterval(() => { - const now = new Date().getTime(); - const distance = endTime - now; - - if (distance < 0) { - clearInterval(this.timerInterval); - this.translate.get('SERVICE_COMPLETED').subscribe((msg: string) => { - this.timerMessage = msg; - }); - return; - } - - const days = Math.floor( - distance / - (TimeConstants.MILLISECONDS_PER_SECOND * - TimeConstants.SECONDS_PER_MINUTE * - TimeConstants.MINUTES_PER_HOUR * - TimeConstants.HOURS_PER_DAY) - ); - const hours = Math.floor( - (distance % - (TimeConstants.MILLISECONDS_PER_SECOND * - TimeConstants.SECONDS_PER_MINUTE * - TimeConstants.MINUTES_PER_HOUR * - TimeConstants.HOURS_PER_DAY)) / - (TimeConstants.MILLISECONDS_PER_SECOND * - TimeConstants.SECONDS_PER_MINUTE * - TimeConstants.MINUTES_PER_HOUR) - ); - const minutes = Math.floor( - (distance % - (TimeConstants.MILLISECONDS_PER_SECOND * - TimeConstants.SECONDS_PER_MINUTE * - TimeConstants.MINUTES_PER_HOUR)) / - (TimeConstants.MILLISECONDS_PER_SECOND * - TimeConstants.SECONDS_PER_MINUTE) - ); - const seconds = Math.floor( - (distance % - (TimeConstants.MILLISECONDS_PER_SECOND * - TimeConstants.SECONDS_PER_MINUTE)) / - TimeConstants.MILLISECONDS_PER_SECOND - ); - - this.translate.get('TIMER_FORMAT').subscribe((format: string) => { - this.timerMessage = format - .replace('{{days}}', days.toString()) - .replace('{{hours}}', hours.toString()) - .replace('{{minutes}}', minutes.toString()) - .replace('{{seconds}}', seconds.toString()); - }); - }, 1000); - } -} diff --git a/src/app/pages/product/product.module.ts b/src/app/pages/product/product.module.ts deleted file mode 100644 index 7bd114d..0000000 --- a/src/app/pages/product/product.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { ProductRoutingModule } from './product-routing.module'; -import { MenuModule } from '../components/menu/menu.module'; -import { FooterModule } from '../components/footer/footer.module'; -import { TranslateModule } from '@ngx-translate/core'; -import { ProductComponent } from './product.component'; -import { ModalProductModule } from '../components/modal-product/modal-product.module'; - - -@NgModule({ - declarations: [ProductComponent], - imports: [ - CommonModule, - ProductRoutingModule, - MenuModule, - FooterModule, - TranslateModule, - ModalProductModule - ], - exports: [ProductComponent] -}) -export class ProductModule { } diff --git a/src/app/pages/register/register.component.html b/src/app/pages/register/register.component.html index a53a41a..64931d4 100644 --- a/src/app/pages/register/register.component.html +++ b/src/app/pages/register/register.component.html @@ -1,15 +1,16 @@ +
- -
+ +
- +
diff --git a/src/app/pages/register/register.component.ts b/src/app/pages/register/register.component.ts index e4839ba..fba3054 100644 --- a/src/app/pages/register/register.component.ts +++ b/src/app/pages/register/register.component.ts @@ -4,12 +4,10 @@ import { Router } from '@angular/router'; @Component({ selector: 'app-register', templateUrl: './register.component.html', - styleUrls: ['./register.component.css'] + styleUrls: ['./register.component.css'], }) export class RegisterComponent { - - constructor( private router: Router) { - } + constructor(private router: Router) {} getUserIdFromRoute(): string { const urlSegments = window.location.pathname.split('/'); @@ -19,5 +17,4 @@ export class RegisterComponent { const userId = this.getUserIdFromRoute(); this.router.navigate([`/pages/${userId}/home`]); } - } diff --git a/src/app/pages/services/product-modal.service.ts b/src/app/pages/services/product-modal.service.ts index 374d264..2b00ec7 100644 --- a/src/app/pages/services/product-modal.service.ts +++ b/src/app/pages/services/product-modal.service.ts @@ -4,16 +4,15 @@ import { Product } from 'src/app/models/product'; import { User } from 'src/app/models/user'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ProductModalService { - private productSubject = new BehaviorSubject(null); - private userSource = new BehaviorSubject(null); - + private productSubject = new BehaviorSubject(null); + private userSource = new BehaviorSubject(null); + currentProduct = this.productSubject.asObservable(); currentUser = this.userSource.asObservable(); - openModal(product: Product): void { this.productSubject.next(product); } diff --git a/src/app/pages/services/translation.service.ts b/src/app/pages/services/translation.service.ts index 5873f1b..c24b3b7 100644 --- a/src/app/pages/services/translation.service.ts +++ b/src/app/pages/services/translation.service.ts @@ -2,10 +2,9 @@ import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class TranslationService { - constructor(private translate: TranslateService) { this.translate.setDefaultLang('es'); this.translate.use('es'); From 7c7c95e2f1a228e2eab5ee1b5b275f746bf606ac Mon Sep 17 00:00:00 2001 From: Fernanda Andrade <119636766+fe222004@users.noreply.github.com> Date: Wed, 7 Aug 2024 09:58:51 -0500 Subject: [PATCH 2/3] remove inline style --- src/app/components/service/auth.service.ts | 2 -- .../components/mobil-menu/mobil-menu.component.html | 4 ++-- src/app/pages/dashboard/dashboard.component.css | 9 +++++---- src/app/pages/register/register.component.css | 9 ++++++++- src/app/pages/register/register.component.html | 6 ++---- src/assets/i18n/es.json | 1 + 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/app/components/service/auth.service.ts b/src/app/components/service/auth.service.ts index 522183e..1a3ccb5 100644 --- a/src/app/components/service/auth.service.ts +++ b/src/app/components/service/auth.service.ts @@ -24,8 +24,6 @@ export class AuthService { .post(this.apiUrlAuthLogin, { email, password }) .pipe( map((response) => { - - console.log('Login response:', response); if (response && response.token) { localStorage.setItem('token', response.token); localStorage.setItem('userId', response.user.id.toString()); diff --git a/src/app/pages/components/mobil-menu/mobil-menu.component.html b/src/app/pages/components/mobil-menu/mobil-menu.component.html index 9d11c7c..85ef4ff 100644 --- a/src/app/pages/components/mobil-menu/mobil-menu.component.html +++ b/src/app/pages/components/mobil-menu/mobil-menu.component.html @@ -2,7 +2,7 @@
@@ -14,4 +14,4 @@
- \ No newline at end of file + diff --git a/src/app/pages/dashboard/dashboard.component.css b/src/app/pages/dashboard/dashboard.component.css index 164494b..610eafc 100644 --- a/src/app/pages/dashboard/dashboard.component.css +++ b/src/app/pages/dashboard/dashboard.component.css @@ -1,13 +1,14 @@ .mx-auto { - width: 100%; /* Asegúrate de que el contenedor ocupe el 100% del ancho */ + width: 100%; } .max-w-2xl { - max-width: 100%; /* Asegúrate de que el contenedor no esté limitado en su ancho */ + max-width: 100%; } .py-16, .sm\:py-24, .lg\:py-32 { - padding: 0; /* Ajusta el padding si es necesario */ - } \ No newline at end of file + padding: 0; + } + \ No newline at end of file diff --git a/src/app/pages/register/register.component.css b/src/app/pages/register/register.component.css index 63a6f58..c06b557 100644 --- a/src/app/pages/register/register.component.css +++ b/src/app/pages/register/register.component.css @@ -2,4 +2,11 @@ body { background: linear-gradient(to right, rgba(31, 143, 235, 0.288), rgba(255, 255, 0, 0.205)); margin: 0; font-family: Arial, sans-serif; -} \ No newline at end of file +} + +.custom-position { + position: absolute; + top: 200px; + z-index: 10; + margin-left: 1750px; + } diff --git a/src/app/pages/register/register.component.html b/src/app/pages/register/register.component.html index 64931d4..83a3785 100644 --- a/src/app/pages/register/register.component.html +++ b/src/app/pages/register/register.component.html @@ -1,7 +1,5 @@ - - -
+
-
+
diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 570edac..849c0cc 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -1,4 +1,5 @@ { + "title": "Appliance Care", "login": { "title": "Iniciar sesión en su cuenta", "emailLabel": "Dirección de correo electrónico", From 6afacefbf94435751f767754f2c3050803311399 Mon Sep 17 00:00:00 2001 From: Fernanda Andrade <119636766+fe222004@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:29:53 -0500 Subject: [PATCH 3/3] DM2-2833-estado-de-su-solicitud-de-arreglo-de-electrodomesticos --- src/app/app.module.ts | 5 +- src/app/constants/routes.constants.ts | 4 +- src/app/pages/home/home.component.html | 8 + src/app/pages/home/home.component.ts | 17 +-- src/app/pages/pages-routing.module.ts | 6 +- src/app/pages/pages.module.ts | 1 + src/app/pages/product/product.component.css | 4 + src/app/pages/product/product.component.html | 153 +++++++++++++++++++ src/app/pages/product/product.component.ts | 52 +++++++ src/app/pages/product/product.module.ts | 20 +++ src/app/pages/services/product.service.ts | 5 + src/assets/i18n/en.json | 18 ++- src/assets/i18n/es.json | 16 +- 13 files changed, 286 insertions(+), 23 deletions(-) create mode 100644 src/app/pages/product/product.component.css create mode 100644 src/app/pages/product/product.component.html create mode 100644 src/app/pages/product/product.component.ts create mode 100644 src/app/pages/product/product.module.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 2255f8c..2191a2c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -10,12 +10,12 @@ import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { AppComponent } from './app.component'; -import { MenuModule } from './pages/components/menu/menu.module'; -import { FooterModule } from './pages/components/footer/footer.module'; + import { HomeModule } from './pages/home/home.module'; import { DashboardModule } from './pages/dashboard/dashboard.module'; import { PaymentModule } from './pages/payment/payment.module'; +import { ProductModule } from './pages/product/product.module'; export function HttpLoaderFactory(http: HttpClient) { return new TranslateHttpLoader(http); @@ -29,6 +29,7 @@ export function HttpLoaderFactory(http: HttpClient) { AppRoutingModule, HomeModule, DashboardModule, + ProductModule, PaymentModule, ReactiveFormsModule, HttpClientModule, diff --git a/src/app/constants/routes.constants.ts b/src/app/constants/routes.constants.ts index e2aa545..99afbf6 100644 --- a/src/app/constants/routes.constants.ts +++ b/src/app/constants/routes.constants.ts @@ -4,6 +4,6 @@ export const RoutesConstants = { home: '', dashboard: '/pages/:userId/home', form: '/pages/:userId/form', - product: '/pages/:userId/product', - payment: '/pages/:userId/payment/:id', + //product: '/pages/:userId/product', + product: '/pages/:userId/product/:id', }; diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 2dcc257..4242dae 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -28,6 +28,11 @@

+
Producto @@ -45,6 +50,9 @@

{{ 'productInfo' | translat

+

diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 6ee3fdb..c4d9d89 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -1,5 +1,5 @@ import { Component, inject } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { ImageConstants } from 'src/app/constants/images.constants'; import { PaginationConstants } from 'src/app/constants/pagination.constants'; import { ProductConstants } from 'src/app/constants/product.constants'; @@ -15,6 +15,7 @@ export class HomeComponent { private readonly applianceService: ApplianceServiceService = inject( ApplianceServiceService ); + private readonly router: Router = inject(Router); userName: string | null = ''; userLastName: string | null = ''; @@ -28,14 +29,12 @@ export class HomeComponent { initialPage = ProductConstants.INITIAL_PAGE; initialTotalPages = ProductConstants.INITIAL_TOTAL_PAGES; initialTotalItems = ProductConstants.INITIAL_TOTAL_ITEMS; - + currentPage: number = this.initialPage; totalPages: number = this.initialTotalPages; totalItems: number = this.initialTotalItems; PaginationConstants = PaginationConstants; - - constructor(private activatedRoute: ActivatedRoute) { this.homepages = ImageConstants.homepages; this.avatar = ImageConstants.avatar; @@ -54,7 +53,7 @@ export class HomeComponent { this.totalPages = response.meta.last_page; this.totalItems = response.meta.total; }); -} + } toggleMenu(): void { this.isOpen = !this.isOpen; } @@ -67,11 +66,7 @@ export class HomeComponent { } } - goProduct(): string[] { - if (this.userId) { - return [RoutesConstants.product.replace(':userId', this.userId)]; - } else { - return [RoutesConstants.home]; - } + navigateToProduct(userId: number, productId: number): void { + this.router.navigate([`/pages/${userId}/product/${productId}`]); } } diff --git a/src/app/pages/pages-routing.module.ts b/src/app/pages/pages-routing.module.ts index d8089be..843d501 100644 --- a/src/app/pages/pages-routing.module.ts +++ b/src/app/pages/pages-routing.module.ts @@ -1,8 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './home/home.component'; -import { PaymentComponent } from './payment/payment.component'; import { RegisterComponent } from './register/register.component'; +import { ProductComponent } from './product/product.component'; const routes: Routes = [ { @@ -14,8 +14,8 @@ const routes: Routes = [ component: RegisterComponent, }, { - path: 'payment/:id', - component: PaymentComponent, + path: 'product/:id', + component: ProductComponent, }, ]; diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index a974034..bf260f1 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -4,6 +4,7 @@ import { PagesRoutingModule } from './pages-routing.module'; import { TranslateModule } from '@ngx-translate/core'; import { RegisterModule } from './register/register.module'; import { MobilMenuModule } from './components/mobil-menu/mobil-menu.module'; +import { ProductComponent } from './product/product.component'; @NgModule({ declarations: [], diff --git a/src/app/pages/product/product.component.css b/src/app/pages/product/product.component.css new file mode 100644 index 0000000..1e0f311 --- /dev/null +++ b/src/app/pages/product/product.component.css @@ -0,0 +1,4 @@ +.card{ + margin-left: 200px; + margin-right: 300px; +} diff --git a/src/app/pages/product/product.component.html b/src/app/pages/product/product.component.html new file mode 100644 index 0000000..4d2246d --- /dev/null +++ b/src/app/pages/product/product.component.html @@ -0,0 +1,153 @@ + +
+ +
+ +
+
+
+
+

{{ 'repair' | translate }}

+

{{ product?.appliance_type + }}-{{ product?.brand }}

+

{{ product?.problem_details}}

+
+
+
+ + {{ 'service' | translate }} +
+
+
{{ product?.service_type}}
+
+
+
+ + {{ 'contact' | translate }} +
+
+
{{ product?.preferred_contact_method}}
+
+
{{ product?.user?.email}}
+
+
{{ product?.user?.phone_number}}
+
+
+
+ + {{ 'collection_address' | translate }} +
+
+
{{ product?.collection_address}}-{{ product?.application_date}}
+
+
+ +
+
+ Product screenshot +
+
+ +
+
+
    +
  • +
    +
    + +
    +
    +

    {{ 'collection' | translate }}

    +

    {{ 'collection_details' | translate }} {{ + product?.collection_address}}-{{ product?.application_date}}.

    +
    +
    +
  • +
  • +
    +
    + +
    +
    +

    {{ 'diagnosis' | translate }}

    +

    {{ 'diagnosis_details' | translate }}

    +
    +
    +
  • +
  • +
    +
    + +
    +
    +

    {{ 'repair' | translate }}

    +

    {{ 'repair_details' | translate }}

    +
    +
    +
  • +
  • +
    +
    + +
    +
    +

    {{ 'delivery' | translate }}

    +

    {{ 'delivery_details' | translate }}

    +
    +
    +
  • +
  • +
    +
    + +
    +
    +

    {{ 'completion' | translate }}

    +

    {{ 'completion_details' | translate }}

    +
    +
    +
  • +
+
+
+ +
+ +
diff --git a/src/app/pages/product/product.component.ts b/src/app/pages/product/product.component.ts new file mode 100644 index 0000000..3cda0ac --- /dev/null +++ b/src/app/pages/product/product.component.ts @@ -0,0 +1,52 @@ +import { Component, inject } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ApplianceServiceService } from '../services/appliance-service.service'; +import { ProductService } from '../services/product.service'; +import { Product } from 'src/app/models/product'; + +@Component({ + selector: 'app-product', + templateUrl: './product.component.html', + styleUrls: ['./product.component.css'], +}) +export class ProductComponent { + private readonly productService: ProductService = inject(ProductService); + + userId: number | undefined; + productId: number | undefined; + + product: Product | null = null; + + constructor(private router: Router, private route: ActivatedRoute) { + this.getid(); + } + + getid() { + return this.route.paramMap.subscribe((params) => { + const userIdParam = params.get('userId'); + const productIdParam = params.get('id'); + + this.userId = userIdParam ? +userIdParam : undefined; + this.productId = productIdParam ? +productIdParam : undefined; + + if (this.productId) { + this.loadUserProduct(this.productId); + } + }); + } + + loadUserProduct(productId: number): void { + this.productService.getProduct(productId).subscribe((response) => { + this.product = response.data; + }); + } + + getUserIdFromRoute(): string { + const urlSegments = window.location.pathname.split('/'); + return urlSegments[urlSegments.indexOf('pages') + 1]; + } + goToHome(): void { + const userId = this.getUserIdFromRoute(); + this.router.navigate([`/pages/${userId}/home`]); + } +} diff --git a/src/app/pages/product/product.module.ts b/src/app/pages/product/product.module.ts new file mode 100644 index 0000000..d64567b --- /dev/null +++ b/src/app/pages/product/product.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ProductComponent } from './product.component'; +import { MenuModule } from '../components/menu/menu.module'; +import { FooterModule } from '../components/footer/footer.module'; +import { TranslateModule } from '@ngx-translate/core'; + + + +@NgModule({ + declarations: [ProductComponent], + imports: [ + CommonModule, + MenuModule, + FooterModule, + TranslateModule + ], + exports: [ProductComponent] +}) +export class ProductModule { } diff --git a/src/app/pages/services/product.service.ts b/src/app/pages/services/product.service.ts index ca4d008..68a2d66 100644 --- a/src/app/pages/services/product.service.ts +++ b/src/app/pages/services/product.service.ts @@ -16,4 +16,9 @@ export class ProductService { registerProduct(formData: FormData): Observable { return this.httpClient.post(this.apiUrl, formData); } + + getProduct(productId: number): Observable { + const url = `${this.apiUrl}/${productId}`; + return this.httpClient.get(url); + } } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 3e0bd85..65bef98 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -291,6 +291,18 @@ "productInfo": "Product Information", "problem": "Problem:", "service": "Service: repair", - "contact": "Contact:", - "date": "Date:" -} + "contact": "Contact", + "date": "Date:", + "repairi":"In repair", + "address_time": "Address and Time", + "collection": "Collection", + "collection_details": "The order was collected at {{ product?.collection_address }}-{{ product?.application_date }} at 10:00 am.", + "diagnosis": "Diagnosis", + "diagnosis_details": "The technician will perform an initial evaluation of the appliance.", + "repair": "Repair", + "repair_details": "Necessary repairs are carried out and defective parts are replaced.", + "delivery": "Delivery", + "delivery_details": "The repaired appliance is delivered to the customer's address.", + "completion": "Completion", + "completion_details": "A final inspection is carried out to ensure the appliance is functioning correctly." + } diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 849c0cc..bddfdc6 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -294,6 +294,18 @@ "productInfo": "Información del Producto", "problem": "Problema:", "service": "Servicio: reparación", - "contact": "Contacto:", - "date": "Fecha:" + "contact": "Contacto", + "date": "Fecha:", + "repairi":"En reparación ", + "repair": "Reparación", + "address_time": "Dirección y Hora", + "collection": "Recolección", + "collection_details": "A las 10:00 am se recogió el pedido en", + "diagnosis": "Diagnóstico", + "diagnosis_details": "El técnico realizará una evaluación inicial del electrodoméstico.", + "repair_details": "Se llevan a cabo las reparaciones necesarias y se reemplazan las piezas defectuosas.", + "delivery": "Entrega", + "delivery_details": "Se entrega el electrodoméstico reparado en la dirección del cliente.", + "completion": "Finalización", + "completion_details": "Se realiza una inspección final para asegurar que el electrodoméstico funciona correctamente." }