From 85be21acb349f7de5e591a1db0bb732d86e7b5f8 Mon Sep 17 00:00:00 2001 From: Chandan-walker Date: Mon, 23 Feb 2026 16:22:42 +0530 Subject: [PATCH] fixed test bugs --- .../organization-details.component.html | 3 +- .../organization-details.component.scss | 51 ++++++++++++++++++- .../organization-details.component.ts | 27 +++++----- 3 files changed, 65 insertions(+), 16 deletions(-) diff --git a/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.html b/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.html index ba4f5f1e..6e1c71b6 100644 --- a/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.html +++ b/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.html @@ -142,12 +142,11 @@

Organization Details

- + Timezone diff --git a/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.scss b/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.scss index dae0ddf1..2c124447 100644 --- a/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.scss +++ b/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.scss @@ -7,7 +7,6 @@ height: 100vh; width: 100%; z-index: 10; - max-width: 2000px; background: transparent; } @@ -229,6 +228,31 @@ background: #1976d2; color: #ffffff; } + + // Disabled mat-form-field (e.g. Timezone when not editing) + .mat-form-field-disabled.timezone-field, + .mat-form-field .mdc-text-field--disabled { + opacity: 0.7; + + .mat-select-value, + .mat-select-value-text, + .mat-input-element, + mat-label, + .mat-form-field-label { + color: rgba(0, 0, 0, 0.38) !important; + } + .mat-select-arrow, + .mat-select-arrow svg { + color: rgba(0, 0, 0, 0.38) !important; + fill: rgba(0, 0, 0, 0.38) !important; + } + .mdc-notched-outline__leading, + .mdc-notched-outline__notch, + .mdc-notched-outline__trailing, + .mat-form-field-outline { + border-color: rgba(0, 0, 0, 0.12) !important; + } + } } // ── Dark theme ──────────────────────────────────────────────────────── @@ -358,6 +382,31 @@ .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing { border-color: rgba(255, 255, 255, 0.3) !important; } + + // Disabled mat-form-field (e.g. Timezone when not editing) + .mat-form-field-disabled.timezone-field, + .mat-form-field .mdc-text-field--disabled { + opacity: 0.7; + + .mat-select-value, + .mat-select-value-text, + .mat-select-value-text span, + .mat-input-element, + mat-label, + .mat-form-field-label { + color: rgba(255, 255, 255, 0.38) !important; + } + .mat-select-arrow, + .mat-select-arrow svg { + color: rgba(255, 255, 255, 0.38) !important; + fill: rgba(255, 255, 255, 0.38) !important; + } + .mdc-notched-outline__leading, + .mdc-notched-outline__notch, + .mdc-notched-outline__trailing { + border-color: rgba(255, 255, 255, 0.12) !important; + } + } } // ── Snackbars ───────────────────────────────────────────────────────── diff --git a/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.ts b/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.ts index 35d57d65..ffe35e6f 100644 --- a/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.ts +++ b/apps/proxy-auth/src/app/otp/organization-details/organization-details.component.ts @@ -50,6 +50,7 @@ export class OrganizationDetailsComponent extends BaseComponent implements OnIni } ngOnInit(): void { + this.organizationForm.get('timeZoneName')?.disable(); if (this.authToken) { this.otpService .getOrganizationDetails(this.authToken) @@ -134,7 +135,7 @@ export class OrganizationDetailsComponent extends BaseComponent implements OnIni return; } - const organizationDetails = this.organizationForm.value; + const organizationDetails = this.organizationForm.getRawValue(); const current = { companyName: organizationDetails.companyName ?? '', email: organizationDetails.email ?? '', @@ -173,21 +174,21 @@ export class OrganizationDetailsComponent extends BaseComponent implements OnIni next: (res) => { this.initialFormValue = { ...current }; this.isEditing = false; // ← close edit mode on success - this.snackBar.open(res?.data?.message ?? 'Information successfully updated', '✕', { - duration: 3000, - horizontalPosition: 'center', - verticalPosition: 'top', - panelClass: ['success-snackbar'], - }); + // this.snackBar.open(res?.data?.message ?? 'Information successfully updated', '✕', { + // duration: 3000, + // horizontalPosition: 'center', + // verticalPosition: 'top', + // panelClass: ['success-snackbar'], + // }); }, error: () => { // Stay in edit mode so user can retry - this.snackBar.open('Something went wrong', '✕', { - duration: 3000, - horizontalPosition: 'center', - verticalPosition: 'top', - panelClass: ['error-snackbar'], - }); + // this.snackBar.open('Something went wrong', '✕', { + // duration: 3000, + // horizontalPosition: 'center', + // verticalPosition: 'top', + // panelClass: ['error-snackbar'], + // }); }, }); }