diff --git a/src/app/features/store/pages/checkout-page/checkout-payment-step.component.html b/src/app/features/store/pages/checkout-page/checkout-payment-step.component.html
index 9713457..0b7ae5a 100644
--- a/src/app/features/store/pages/checkout-page/checkout-payment-step.component.html
+++ b/src/app/features/store/pages/checkout-page/checkout-payment-step.component.html
@@ -47,33 +47,12 @@
[copiedTransferField]="copiedTransferField()"
(copyTransferValue)="requestCopy($event.field, $event.value)"
(submitDni)="generateTransferIntent.emit($event)"
+ (completePurchase)="complete.emit()"
/>
} @else {
}
-
-
- @if (transferAccount()) {
-
Transferi a la siguiente cuenta desde cualquier billetera
-
-
-
-
DATOS DE CUENTA:
-
-
- Titular:
- {{ transferAccount()!.titular }}
-
-
-
- Entidad:
- {{ transferAccount()!.entidad }}
-
-
-
-
CVU:
-
{{ transferAccount()!.cvu }}
-
+
+
- } @else {
-
+
+ @if (transferAccount()) {
+
+
+
DATOS DE CUENTA:
+
+
+ Titular:
+ {{ transferAccount()?.titular }}
+
+
+
+ Entidad:
+ {{ transferAccount()?.entidad }}
+
+
+
+
CVU:
+
{{ transferAccount()?.cvu }}
+
+ @if (copiedTransferField() === 'cvu') {
+
¡Copiado!
+ }
+
+
+
+
Alias:
+
{{ transferAccount()?.alias }}
+
+ @if (copiedTransferField() === 'alias') {
+
¡Copiado!
+ }
+
+
+
+
}
diff --git a/src/app/features/store/pages/checkout-page/components/checkout-payment-transfer/checkout-payment-transfer.component.ts b/src/app/features/store/pages/checkout-page/components/checkout-payment-transfer/checkout-payment-transfer.component.ts
index 1321c7d..e18283d 100644
--- a/src/app/features/store/pages/checkout-page/components/checkout-payment-transfer/checkout-payment-transfer.component.ts
+++ b/src/app/features/store/pages/checkout-page/components/checkout-payment-transfer/checkout-payment-transfer.component.ts
@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
+import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';
import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
import { IconButtonComponent } from '../../../../../../shared/components/icon-button/icon-button.component';
import { ButtonComponent } from '../../../../../../shared/components/button/button.component';
@@ -19,19 +19,28 @@ export class CheckoutPaymentTransferComponent {
readonly copyTransferValue = output<{ field: TransferField; value: string }>();
readonly submitDni = output
();
+ readonly completePurchase = output();
protected readonly dniControl = new FormControl('', {
nonNullable: true,
validators: [Validators.required, Validators.pattern(/^\d{7,8}$/)]
});
+ protected readonly isEditing = signal(false);
+ protected readonly isDniDisabled = computed(() => !!this.transferAccount() && !this.isEditing());
+
protected requestCopy(field: TransferField, value: string): void {
this.copyTransferValue.emit({ field, value });
}
protected onSubmitDni(): void {
if (this.dniControl.valid) {
+ this.isEditing.set(false);
this.submitDni.emit(this.dniControl.value);
}
}
+
+ protected enableEditing(): void {
+ this.isEditing.set(true);
+ }
}