feat: Add discount order component to manage order discounts with authorization logic.
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 13m59s

This commit is contained in:
Luis Eduardo Estevao
2026-03-16 14:47:57 -03:00
parent 1c5652dae6
commit 47945c9b54

View File

@@ -84,15 +84,9 @@ export class DiscountOrderComponent implements OnInit, OnDestroy {
} }
confirmDiscount() { confirmDiscount() {
const domain = '@jurunense.com.br';
let email = this.formDiscount.get('formUser.email').value; let email = this.formDiscount.get('formUser.email').value;
// Remover domínio se já estiver presente const emailUpperCase = email.toUpperCase();
if (email.toLowerCase().endsWith(domain)) {
email = email.substring(0, email.length - domain.length);
}
const emailUpperCase = (email + domain).toUpperCase();
const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase(); const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase();
if (this.discountAuthorization < this.percent) { if (this.discountAuthorization < this.percent) {