Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,11 @@ <h2 class="page-title">Organization Details</h2>
</mat-error>
</mat-form-field>

<mat-form-field appearance="outline" class="full-width">
<mat-form-field appearance="outline" class="full-width timezone-field">
<mat-label>Timezone</mat-label>
<mat-select
formControlName="timeZoneName"
placeholder="Select timezone"
disableOptionCentering
[panelClass]="theme === 'dark' ? 'org-dark-select-panel' : 'org-light-select-panel'"
>
<mat-option *ngFor="let tz of timezones" [value]="getTimezoneValue(tz)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
height: 100vh;
width: 100%;
z-index: 10;
max-width: 2000px;
background: transparent;
}

Expand Down Expand Up @@ -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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The light theme includes .mat-form-field-outline on line 253 in the disabled styles, but this selector is missing from the dark theme version. This could cause inconsistent styling between themes.

}
}
}

// ── Dark theme ────────────────────────────────────────────────────────
Expand Down Expand Up @@ -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,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dark theme disabled styles include .mat-select-value-text span on line 394 that's missing from the equivalent light theme section. This could cause inconsistent styling between themes.

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 ─────────────────────────────────────────────────────────
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 ?? '',
Expand Down Expand Up @@ -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'],
// });
Comment on lines +177 to +182
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snackbar notifications have been commented out for both success and error cases. Without these notifications, users won't receive any feedback when their organization details are updated or when an error occurs. Was this intentional? If so, is there an alternative feedback mechanism being implemented?

},
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'],
// });
},
});
}
Expand Down
Loading