-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65dbe67
commit 7ecbdcd
Showing
21 changed files
with
601 additions
and
504 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
<div> | ||
<div *ngIf="(this.hideSidebar == false)"> | ||
<app-sidebar></app-sidebar> | ||
</div> | ||
<div *ngIf="(this.hideSidebar == true)"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
@if ((this.hideSidebar == false)) { | ||
<div> | ||
<app-sidebar></app-sidebar> | ||
</div> | ||
} | ||
@if ((this.hideSidebar == true)) { | ||
<div> | ||
<router-outlet></router-outlet> | ||
</div> | ||
} | ||
</div> |
This file contains 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 |
---|---|---|
|
@@ -12,23 +12,33 @@ <h2 class="page-name">Sign In</h2> | |
<mat-form-field class="form-field field"> | ||
<mat-label>Email</mat-label> | ||
<input matInput [errorStateMatcher]="matcher" type="email" placeholder="[email protected]" formControlName="email"> | ||
<mat-error *ngIf="form.hasError('wrongCredentials') && !email?.hasError('required') && !email?.hasError('email')"> | ||
Wrong credentials | ||
</mat-error> | ||
<mat-error *ngIf="email?.hasError('email') && !email?.hasError('required')"> | ||
Please enter a valid email address | ||
</mat-error> | ||
<mat-error *ngIf="email?.hasError('required')"> | ||
Email is <strong>required</strong> | ||
</mat-error> | ||
@if (form.hasError('wrongCredentials') && !email?.hasError('required') && !email?.hasError('email')) { | ||
<mat-error> | ||
Wrong credentials | ||
</mat-error> | ||
} | ||
@if (email?.hasError('email') && !email?.hasError('required')) { | ||
<mat-error> | ||
Please enter a valid email address | ||
</mat-error> | ||
} | ||
@if (email?.hasError('required')) { | ||
<mat-error> | ||
Email is <strong>required</strong> | ||
</mat-error> | ||
} | ||
</mat-form-field> | ||
<mat-form-field class="form-field field"> | ||
<mat-error *ngIf="form.hasError('wrongCredentials') && !form.hasError('required')"> | ||
Wrong credentials | ||
</mat-error> | ||
<mat-error *ngIf="password?.hasError('required')"> | ||
Password is <strong>required</strong> | ||
</mat-error> | ||
@if (form.hasError('wrongCredentials') && !form.hasError('required')) { | ||
<mat-error> | ||
Wrong credentials | ||
</mat-error> | ||
} | ||
@if (password?.hasError('required')) { | ||
<mat-error> | ||
Password is <strong>required</strong> | ||
</mat-error> | ||
} | ||
<input matInput [errorStateMatcher]="matcher" placeholder="Password" formControlName="password" type="password" /> | ||
</mat-form-field> | ||
<div class="button-container"> | ||
|
This file contains 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
51 changes: 27 additions & 24 deletions
51
src/app/components/dialogs/add-question/add-question.component.html
This file contains 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 |
---|---|---|
@@ -1,26 +1,29 @@ | ||
<div mat-dialog-title class="title"> | ||
<h1 class="mat-h1">Set Policy</h1> | ||
<h1 class="mat-h1">Set Policy</h1> | ||
</div> | ||
<div mat-dialog-content class="content"> | ||
<mat-form-field class="form-select"> | ||
<mat-label>Question Type</mat-label> | ||
<mat-select [formControl]="questionTypeControl"> | ||
<mat-option *ngFor="let type of question_types" [value]="type"> | ||
{{ type.name }} | ||
</mat-option> | ||
</mat-select> | ||
<mat-error *ngIf="questionTypeControl.hasError('required')">Please choose the question type</mat-error> | ||
<!-- <mat-hint>{{ questionTypeControl.value?.name }}</mat-hint> --> | ||
|
||
</mat-form-field> | ||
<p> | ||
{{ questionTypeControl.value?.description }} | ||
</p> | ||
</div> | ||
<!-- Submit Button --> | ||
<div mat-dialog-actions class="action"> | ||
<button mat-flat-button [mat-dialog-close] class="button">Cancel</button> | ||
<button mat-flat-button color="primary" [mat-dialog-close]="questionTypeControl.value?.returnValue" class="button"> | ||
Update | ||
</button> | ||
</div> | ||
<div mat-dialog-content class="content"> | ||
<mat-form-field class="form-select"> | ||
<mat-label>Question Type</mat-label> | ||
<mat-select [formControl]="questionTypeControl"> | ||
@for (type of question_types; track type) { | ||
<mat-option [value]="type"> | ||
{{ type.name }} | ||
</mat-option> | ||
} | ||
</mat-select> | ||
@if (questionTypeControl.hasError('required')) { | ||
<mat-error>Please choose the question type</mat-error> | ||
} | ||
<!-- <mat-hint>{{ questionTypeControl.value?.name }}</mat-hint> --> | ||
</mat-form-field> | ||
<p> | ||
{{ questionTypeControl.value?.description }} | ||
</p> | ||
</div> | ||
<!-- Submit Button --> | ||
<div mat-dialog-actions class="action"> | ||
<button mat-flat-button [mat-dialog-close] class="button">Cancel</button> | ||
<button mat-flat-button color="primary" [mat-dialog-close]="questionTypeControl.value?.returnValue" class="button"> | ||
Update | ||
</button> | ||
</div> |
This file contains 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
This file contains 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
53 changes: 28 additions & 25 deletions
53
src/app/components/dialogs/dialog-set-policy/dialog-set-policy.component.html
This file contains 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 |
---|---|---|
@@ -1,33 +1,36 @@ | ||
<div mat-dialog-title class="title"> | ||
<h1 class="mat-h1">Set Policy</h1> | ||
</div> | ||
<!-- <form [formGroup]="form" (ngSubmit)="onFormSubmit()"> --> | ||
<form> | ||
<div mat-dialog-content class="content"> | ||
<mat-form-field class="chip-list"> | ||
<mat-label>Allowed actions</mat-label> | ||
<mat-chip-grid #chipGrid aria-label="Permission selection"> | ||
<mat-chip-row *ngFor="let permission of permissions" (removed)="remove(permission)" highlighted> | ||
<h1 class="mat-h1">Set Policy</h1> | ||
</div> | ||
<!-- <form [formGroup]="form" (ngSubmit)="onFormSubmit()"> --> | ||
<form> | ||
<div mat-dialog-content class="content"> | ||
<mat-form-field class="chip-list"> | ||
<mat-label>Allowed actions</mat-label> | ||
<mat-chip-grid #chipGrid aria-label="Permission selection"> | ||
@for (permission of permissions; track permission) { | ||
<mat-chip-row (removed)="remove(permission)" highlighted> | ||
{{ permission.replaceAll('_', ' ') | titlecase }} | ||
<button matChipRemove [attr.aria-label]="'remove ' + permission"> | ||
<mat-icon>cancel</mat-icon> | ||
</button> | ||
</mat-chip-row> | ||
</mat-chip-grid> | ||
<input placeholder="Select Permission..." #permissionInput [formControl]="permissionCtrl" | ||
[matChipInputFor]="chipGrid" [matAutocomplete]="auto" [matChipInputSeparatorKeyCodes]="separatorKeysCodes" /> | ||
<!-- (matChipInputTokenEnd)="add($event)"/> --> | ||
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)"> | ||
<mat-option *ngFor="let permission of filteredPermissions | async" [value]="permission"> | ||
} | ||
</mat-chip-grid> | ||
<input placeholder="Select Permission..." #permissionInput [formControl]="permissionCtrl" | ||
[matChipInputFor]="chipGrid" [matAutocomplete]="auto" [matChipInputSeparatorKeyCodes]="separatorKeysCodes" /> | ||
<!-- (matChipInputTokenEnd)="add($event)"/> --> | ||
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)"> | ||
@for (permission of filteredPermissions | async; track permission) { | ||
<mat-option [value]="permission"> | ||
{{ permission.replaceAll('_', ' ') | titlecase }} | ||
</mat-option> | ||
</mat-autocomplete> | ||
</mat-form-field> | ||
</div> | ||
|
||
<!-- Submit Button --> | ||
<div mat-dialog-actions class="action"> | ||
<button mat-flat-button type="button" [mat-dialog-close]="false" class="button">Cancel</button> | ||
<button mat-flat-button color="primary" type="submit" class="button" (click)="onFormSubmit()">Update</button> | ||
</div> | ||
</form> | ||
} | ||
</mat-autocomplete> | ||
</mat-form-field> | ||
</div> | ||
<!-- Submit Button --> | ||
<div mat-dialog-actions class="action"> | ||
<button mat-flat-button type="button" [mat-dialog-close]="false" class="button">Cancel</button> | ||
<button mat-flat-button color="primary" type="submit" class="button" (click)="onFormSubmit()">Update</button> | ||
</div> | ||
</form> |
This file contains 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
This file contains 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
Oops, something went wrong.