-
Notifications
You must be signed in to change notification settings - Fork 2
P0072 | Orginazation details script #425
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 174 additions & 0 deletions
174
apps/proxy-auth/src/app/otp/organization-details/organization-details.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,174 @@ | ||||||||||||||
| <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> | ||||||||||||||
| </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"> | ||||||||||||||
| <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)"> | ||||||||||||||
| {{ getTimezoneLabel(tz) }} | ||||||||||||||
| </mat-option> | ||||||||||||||
| </mat-select> | ||||||||||||||
| <mat-error *ngIf="organizationForm.get('timezone')?.hasError('required')"> | ||||||||||||||
| Timezone is required. | ||||||||||||||
| </mat-error> | ||||||||||||||
|
Comment on lines
+157
to
+159
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. There's a mismatch between the form control name in the error message and the actual form control. The error checks for
Suggested change
|
||||||||||||||
| </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> | ||||||||||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This PR includes what appears to be an authentication token directly in the source code. Credentials should not be stored in the codebase, even for non-production environments. Consider using environment variables or a secure credential management system instead.