-
Notifications
You must be signed in to change notification settings - Fork 2
P0072 | Orginazation details script #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ export class OrganizationDetailsComponent extends BaseComponent implements OnIni | |
| } | ||
|
|
||
| ngOnInit(): void { | ||
| this.organizationForm.get('timeZoneName')?.disable(); | ||
| // this.organizationForm.get('timeZoneName')?.disable(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uncommenting this line makes the 'timeZoneName' field directly editable by users, which could lead to inconsistencies with the 'timezone' field. The component has logic that updates 'timezone' based on 'timeZoneName' changes, but not vice versa. If users can directly edit 'timeZoneName', they might enter values that don't correspond to any valid timezone offset. Consider either:
|
||
| if (this.authToken) { | ||
| this.otpService | ||
| .getOrganizationDetails(this.authToken) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { DOCUMENT } from '@angular/common'; | ||
| import { Inject, Injectable } from '@angular/core'; | ||
| import { OverlayContainer } from '@angular/cdk/overlay'; | ||
| import { Platform } from '@angular/cdk/platform'; | ||
|
|
||
| const CONTAINER_CLASS = 'cdk-overlay-container'; | ||
| /** Full-viewport overlay container style so positioning is viewport-based when in shadow root */ | ||
| const OVERLAY_CONTAINER_STYLE = | ||
| 'position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;pointer-events:none!important;z-index:1000!important;'; | ||
| /** | ||
| * OverlayContainer that: | ||
| * - When proxy-auth with shadow root exists (script load): attaches the overlay as the | ||
| * **first** child of the shadow root with full-viewport fixed style, so it is NOT | ||
| * inside the fixed .container and positioning is correct (dropdown below the right field). | ||
| * - Otherwise: attaches to document.body (default behaviour). | ||
| */ | ||
| @Injectable() | ||
| export class ShadowDomOverlayContainer extends OverlayContainer { | ||
| constructor(@Inject(DOCUMENT) document: Document, _platform: Platform) { | ||
| super(document, _platform); | ||
| } | ||
|
|
||
| protected override _createContainer(): void { | ||
| if (!this._platform.isBrowser) { | ||
| return; | ||
| } | ||
|
|
||
| const container = this._document.createElement('div'); | ||
| container.classList.add(CONTAINER_CLASS); | ||
|
|
||
| const parent = this._getOverlayParent(); | ||
| if (parent !== this._document.body) { | ||
| container.setAttribute('style', OVERLAY_CONTAINER_STYLE); | ||
| const first = parent.firstChild; | ||
| if (first) { | ||
| parent.insertBefore(container, first); | ||
| } else { | ||
| parent.appendChild(container); | ||
| } | ||
| } else { | ||
| parent.appendChild(container); | ||
| } | ||
| this._containerElement = container; | ||
| } | ||
|
|
||
| private _getOverlayParent(): HTMLElement { | ||
| const host = | ||
| (this._document.querySelector('proxy-auth:not([data-master])') as HTMLElement | null) ?? | ||
| (this._document.querySelector('proxy-auth') as HTMLElement | null); | ||
|
|
||
| if (host?.shadowRoot) { | ||
| return host.shadowRoot as unknown as HTMLElement; | ||
| } | ||
| return this._document.body; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The disabled form field styles are being commented out in both light and dark themes. If these styles aren't being replaced elsewhere, this could cause accessibility issues as users may not be able to visually distinguish between enabled and disabled form fields. Consider either keeping these styles or providing alternative styling for disabled fields.