Users on template editor
This commit is contained in:
parent
d8a2ad281c
commit
501a7175e8
|
@ -76,7 +76,7 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
|
||||||
}));
|
}));
|
||||||
const initializerSub = this.initializer
|
const initializerSub = this.initializer
|
||||||
.pipe(
|
.pipe(
|
||||||
debounceTime(200)
|
debounceTime(100)
|
||||||
)
|
)
|
||||||
.subscribe(() =>{
|
.subscribe(() =>{
|
||||||
this.initialize();
|
this.initialize();
|
||||||
|
|
|
@ -181,58 +181,61 @@
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
</div>
|
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
|
||||||
|
<div class="full-width basic-info-input">
|
||||||
<!-- <div class="col-12">
|
<table class="col-12 user-table">
|
||||||
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
|
<thead class="user-table-header">
|
||||||
<div class="full-width basic-info-input">
|
<tr>
|
||||||
<table class="col-12 user-table">
|
<th>{{'USERS.LISTING.NAME' | translate}}</th>
|
||||||
<tr class="row user-table-header">
|
<th>{{'USERS.LISTING.EMAIL' | translate}}</th>
|
||||||
<th>{{'USERS.LISTING.NAME' | translate}}</th>
|
<th></th>
|
||||||
<th>{{'USERS.LISTING.EMAIL' | translate}}</th>
|
</tr>
|
||||||
<th></th>
|
</thead>
|
||||||
</tr>
|
<tbody class="user-table-body">
|
||||||
<tbody class="user-table-body">
|
<tr *ngFor="let user of userChipList" class="user-table-row">
|
||||||
<tr *ngFor="let user of userChipList" class="user-table-row">
|
<td>{{user.name}}</td>
|
||||||
<td>{{user.name}}</td>
|
<td >{{user.email}}</td>
|
||||||
<td >{{user.email}}</td>
|
<td>
|
||||||
<td>
|
<button mat-button class="delete-btn" (click)="verifyAndRemoveUser(user)" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"><mat-icon>person_remove</mat-icon></button>
|
||||||
<button mat-button class="delete-btn" (click)="verifyAndRemoveUser(user)" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"><mat-icon>person_remove</mat-icon></button>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr *ngIf="!userChipList || !userChipList.length">
|
||||||
<tr *ngIf="!userChipList || !userChipList.length">
|
<td style="text-align: end; line-height: 3em;" colspan="2" >
|
||||||
<td style="text-align: end; line-height: 3em;" colspan="2" >
|
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NO-USERS-YET' | translate}}
|
||||||
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NO-USERS-YET' | translate}}
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row justify-content-end">
|
<div class="row justify-content-end">
|
||||||
<div class="col d-flex justify-content-end" style="overflow: hidden;">
|
<div class="col d-flex justify-content-end" style="overflow: hidden;">
|
||||||
<div style="min-width: 20em;max-width: 25em;" [@add-new-user-field]="inputUserState">
|
<div style="min-width: 20em;max-width: 25em;" [@add-new-user-field]="inputUserState">
|
||||||
<mat-form-field appearance="legacy">
|
<mat-form-field appearance="legacy">
|
||||||
<input matInput #email placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}" (focus)="onUserFieldFocus()" (blur)="onUserFieldBlur()" (keyup.enter)="addUser(email)">
|
<input matInput #email placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}" (focus)="onUserFieldFocus()" (blur)="onUserFieldBlur()" (keyup.enter)="addUser(email)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-auto">
|
||||||
|
<button mat-mini-fab color="primary" (click)="addUser(email)" (focus)="onUserButtonFocus()" (blur)="onUserButtonBlur()" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-VALIDATE-AND-ADD-USER'| translate" [disabled]="userFormDisabled">
|
||||||
|
<ng-container *ngIf="inputUserState === 'untriggered' else triggericon">
|
||||||
|
<mat-icon>add</mat-icon>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #triggericon>
|
||||||
|
<mat-icon>person_add</mat-icon>
|
||||||
|
</ng-template>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-auto">
|
|
||||||
<button mat-mini-fab color="primary" (click)="addUser(email)" (focus)="onUserButtonFocus()" (blur)="onUserButtonBlur()" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-VALIDATE-AND-ADD-USER'| translate" [disabled]="userFormDisabled">
|
|
||||||
<ng-container *ngIf="inputUserState === 'untriggered' else triggericon">
|
|
||||||
<mat-icon>add</mat-icon>
|
|
||||||
</ng-container>
|
|
||||||
<ng-template #triggericon>
|
|
||||||
<mat-icon>person_add</mat-icon>
|
|
||||||
</ng-template>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="col-12">
|
<!-- <div class="col-12">
|
||||||
<button mat-button class="full-width" (click)="addPage()"
|
<button mat-button class="full-width" (click)="addPage()"
|
||||||
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.NEXT' | translate}}</button>
|
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.NEXT' | translate}}</button>
|
||||||
|
|
|
@ -277,16 +277,18 @@ $blue-color-light: #5cf7f2;
|
||||||
|
|
||||||
.user-table {
|
.user-table {
|
||||||
// border: thin solid rgb(179, 173, 173);
|
// border: thin solid rgb(179, 173, 173);
|
||||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
// border: 1px solid rgba(0, 0, 0, 0.12);
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
|
box-shadow: -1px 1px 11px -3px #00000017;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-table-header {
|
.user-table-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: revert;
|
display: revert;
|
||||||
background-color: rgb(243 245 248);
|
background-color: rgb(243 245 248);
|
||||||
|
// background-color: #129d9811;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-table-header th {
|
.user-table-header th {
|
||||||
|
|
|
@ -1951,7 +1951,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
|
||||||
},
|
},
|
||||||
error=>{
|
error=>{
|
||||||
// console.log(error.message);
|
// console.log(error.message);
|
||||||
this.uiNotificationService.snackBarNotification(error.message, SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.ERRORS.USER-NOT-FOUND'), SnackBarNotificationLevel.Error);
|
||||||
this.userFormDisabled = false;
|
this.userFormDisabled = false;
|
||||||
// this.inputUserState = 'triggered';//when it loses focus(when disabled) it becomes untriggered
|
// this.inputUserState = 'triggered';//when it loses focus(when disabled) it becomes untriggered
|
||||||
// email.focus();
|
// email.focus();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<form class="row user-role-editor" [formGroup]="formGroup" (ngSubmit)="formSubmit()">
|
<form class="row user-role-editor" [formGroup]="formGroup" (ngSubmit)="formSubmit()">
|
||||||
<div *ngIf="!this.nowEditing"class="roles col">
|
<div *ngIf="!this.nowEditing"class="roles col">
|
||||||
<ng-container *ngFor="let role of this.formGroup.get('appRoles').value">
|
<ng-container *ngFor="let role of this.formGroup.get('appRoles').value">
|
||||||
<div *ngIf="role!=3">
|
<div>
|
||||||
<span class="user-role" [ngClass]="{'user': role == 0, 'manager': role == 1, 'admin': role == 2, 'dataset-template-editor': role == 3}">
|
<span class="user-role" [ngClass]="{'user': role == 0, 'manager': role == 1, 'admin': role == 2, 'dataset-template-editor': role == 3}">
|
||||||
{{getPrincipalAppRoleWithLanguage(role)}}
|
{{getPrincipalAppRoleWithLanguage(role)}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<mat-form-field *ngIf="this.nowEditing" class="select-role roles-width-180 col-auto">
|
<mat-form-field *ngIf="this.nowEditing" class="select-role roles-width-180 col-auto">
|
||||||
<mat-select formControlName="appRoles" multiple required>
|
<mat-select formControlName="appRoles" multiple required>
|
||||||
<ng-container *ngFor="let role of getPrincipalAppRoleValues()">
|
<ng-container *ngFor="let role of getPrincipalAppRoleValues()">
|
||||||
<mat-option [value]="role" *ngIf="role!=3">{{getPrincipalAppRoleWithLanguage(role)}}</mat-option>
|
<mat-option [value]="role">{{getPrincipalAppRoleWithLanguage(role)}}</mat-option>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="getFormControl('appRoles').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-error *ngIf="getFormControl('appRoles').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"User not found."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"User not found."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"User not found."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"Ο χρήστης δεν βρέθηκε."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Descrição do modelo de dados",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Descrição do modelo de dados",
|
||||||
"UNTITLED": "Sem título",
|
"UNTITLED": "Sem título",
|
||||||
"QUESTION": "Questão",
|
"QUESTION": "Questão",
|
||||||
"TEMPLATE-OUTLINE": "Esquema do modelo"
|
"TEMPLATE-OUTLINE": "Esquema do modelo",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"Usuário não encontrado."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Nome do capítulo",
|
"PAGE-NAME": "Nome do capítulo",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"User not found."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"User not found."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
|
@ -296,7 +296,10 @@
|
||||||
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
|
||||||
"UNTITLED": "Untitled",
|
"UNTITLED": "Untitled",
|
||||||
"QUESTION": "Question",
|
"QUESTION": "Question",
|
||||||
"TEMPLATE-OUTLINE": "Template outline"
|
"TEMPLATE-OUTLINE": "Template outline",
|
||||||
|
"ERRORS":{
|
||||||
|
"USER-NOT-FOUND":"User not found."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"PAGE-INFO": {
|
"PAGE-INFO": {
|
||||||
"PAGE-NAME": "Chapter Name",
|
"PAGE-NAME": "Chapter Name",
|
||||||
|
|
Loading…
Reference in New Issue