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
8 changes: 4 additions & 4 deletions apps/proxy-auth/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export class AppComponent extends BaseComponent implements OnInit, OnDestroy {
public initOtpProvider() {
if (!environment.production) {
const sendOTPConfig = {
referenceId: '4512365m176216342869087ae458e09',
type: 'authorization',
// referenceId: '4512365m176216342869087ae458e09',
type: 'organization-details',
// loginRedirectUrl: 'https://www.google.com',
// showCompanyDetails: false,
authToken:
'clV0YUt4UURVbzJYZTRwMHdBNkZ6QjZoay9qMmRRcjZhMGVXMGtCT1ZtdGNaelFxMmlNaGdNcEJuRy9UWmFSZHQvMHc0YnJYUHExakh5NDNGVjZMOEdXVmg3OG82R094Yk5tdE9XckxjUTV1dlNzUERXRWxaOWIwWm5JRmlMVHl5UmpZUHVDK2piOURJUi9IdytncFZBRWc5QnRyRDRVeUFOZlBCY1FST0FOZStISUVtK055VWNxaGduZWpGeUZxVWxYWjd6YXI2YTF0aGxHZTNka1BlQT09',
'ZVlWU2U4cnlOVUh5M1lYcTZLUUVaczZGdFlHN2lKOXNIU24rTWx3WWpnQzE5YXJVaTF0R215UkEvNGpIS2tJVC83Q01EQlk2QWZ6Z1UxYlQvZCtSeThxdDdiUHVuNm9RbVhPNDVnTFFUN3dKZkRIT294a3BvWFFNSGIxUFV6Wk5yZkpmYXk0MzVmUzlrTXp1bkRYTkRUdzBKMW9yRi8vTDgrak9ESzlKblVXU1hvWCtHSytkaW9nemYxTTFwNEVPSThlNk9ZRXd0YTJUanJqRk1sZUdGUT09',
// type: 'user-management',
isHidden: true,
theme: 'light',
theme: 'dark',
// isPreview: true,
isLogin: true,
target: '_self',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
<div class="container" [ngClass]="theme === 'dark' ? 'dark-theme' : 'light-theme'">
<div class="organization-details-container">
<!-- ── Header ── -->
<div class="page-header">
<h2 class="page-title">Organization Details</h2>

<div class="header-actions" *ngIf="!isEditing">
<button type="button" class="edit-btn" (click)="startEdit()">
<svg
class="btn-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7" />
<path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z" />
</svg>
Edit
</button>
</div>
</div>

<!-- ── View Mode ── -->
<div *ngIf="!isEditing" class="view-container">
<div class="field-row">
<div class="field-label">
<!-- building icon -->
<svg
class="field-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="3" y="3" width="18" height="18" rx="2" />
<path d="M9 9h1m5 0h1M9 13h1m5 0h1M9 17h1m5 0h1" />
</svg>
Company Name
</div>
<div class="field-value">{{ organizationForm.get('companyName')?.value || '—' }}</div>
</div>

<div class="field-row">
<div class="field-label">
<!-- email icon -->
<svg
class="field-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="2" y="4" width="20" height="16" rx="2" />
<path d="M2 7l10 7 10-7" />
</svg>
Email
</div>
<div class="field-value">{{ organizationForm.get('email')?.value || '—' }}</div>
</div>

<div class="field-row">
<div class="field-label">
<!-- phone icon -->
<svg
class="field-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<path
d="M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 8.81 19.79 19.79 0 012 4.18 2 2 0 014 2h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z"
/>
</svg>
Phone Number
</div>
<div class="field-value">{{ organizationForm.get('phoneNumber')?.value || '—' }}</div>
</div>

<div class="field-row">
<div class="field-label">
<!-- clock icon -->
<svg
class="field-icon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="12" cy="12" r="10" />
<path d="M12 6v6l4 2" />
</svg>
Timezone
</div>
<div class="field-value">{{ organizationForm.get('timeZoneName')?.value || '—' }}</div>
</div>
</div>

<!-- ── Edit Mode ── -->
<form
*ngIf="isEditing"
[formGroup]="organizationForm"
(ngSubmit)="onSubmit()"
class="organization-form d-flex flex-column align-items-center"
>
<mat-form-field appearance="outline" class="full-width">
<mat-label>Company Name </mat-label>
<input matInput formControlName="companyName" placeholder="Enter company name" />
<mat-error *ngIf="organizationForm.get('companyName')?.hasError('required')">
Company name is required.
</mat-error>
<mat-error *ngIf="organizationForm.get('companyName')?.hasError('minlength')">
Company name must be at least 3 characters.
</mat-error>
</mat-form-field>

<mat-form-field appearance="outline" class="full-width">
<mat-label>Email </mat-label>
<input matInput type="email" formControlName="email" placeholder="Enter email" />
<mat-error *ngIf="organizationForm.get('email')?.hasError('required')"> Email is required. </mat-error>
<mat-error *ngIf="organizationForm.get('email')?.hasError('email')">
Please enter a valid email.
</mat-error>
</mat-form-field>

<mat-form-field appearance="outline" class="full-width">
<mat-label>Phone Number</mat-label>
<input matInput type="tel" formControlName="phoneNumber" placeholder="Enter phone number" />
<mat-error *ngIf="organizationForm.get('phoneNumber')?.hasError('pattern')">
Phone number must be 10–15 digits.
</mat-error>
</mat-form-field>

<mat-form-field appearance="outline" class="full-width timezone-field">
<mat-label>Timezone</mat-label>
<mat-select
formControlName="timeZoneName"
placeholder="Select timezone"
[panelClass]="theme === 'dark' ? 'org-dark-select-panel' : 'org-light-select-panel'"
>
<mat-option *ngFor="let tz of timezones" [value]="getTimezoneValue(tz)">
{{ getTimezoneLabel(tz) }}
</mat-option>
</mat-select>
<mat-error *ngIf="organizationForm.get('timezone')?.hasError('required')">
Timezone is required.
</mat-error>
Comment on lines +156 to +158
Copy link

Choose a reason for hiding this comment

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

There's a mismatch between the form control name and error check for timezone. The form control is named 'timeZoneName' but the error check is using 'timezone'.

Suggested change
<mat-error *ngIf="organizationForm.get('timezone')?.hasError('required')">
Timezone is required.
</mat-error>
<mat-error *ngIf="organizationForm.get('timeZoneName')?.hasError('required')">
Timezone is required.
</mat-error>

</mat-form-field>

<!-- ── Single action row at bottom ── -->
<div class="form-actions">
<button type="button" class="cancel-btn" [disabled]="updateInProgress" (click)="cancelEdit()">
Cancel
</button>
<button type="submit" class="save-btn" [disabled]="updateInProgress">
<mat-spinner *ngIf="updateInProgress" diameter="16" class="btn-spinner"></mat-spinner>
<span *ngIf="!updateInProgress">Save Changes</span>
</button>
</div>
</form>
</div>
</div>
Loading
Loading