[ACS-7373] ng15 permissions page fixes

This commit is contained in:
Mykyta Maliarchuk 2024-04-04 15:52:15 +02:00 committed by VitoAlbano
parent 4c37aac14b
commit 04bc571f00
6 changed files with 35 additions and 21 deletions

View File

@ -49,6 +49,10 @@
}
}
.adf-datatable-cell .adf-cell-value adf-user-role-column {
position: unset;
}
.adf {
&-search-user-button {
width: 100%;

View File

@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
$search-result-height: calc(100% - 75px);
.adf {
@ -7,7 +9,7 @@ $search-result-height: calc(100% - 75px);
overflow: auto;
border: 2px solid var(--adf-theme-foreground-text-color-007);
mat-pseudo-checkbox {
#{$mat-list-item-end} {
display: none;
}

View File

@ -1,4 +1,4 @@
<mat-card appearance="outlined" class="adf-permission-card" id="adf-permission-manager-card">
<mat-card class="adf-permission-card" id="adf-permission-manager-card">
<div *ngIf="(permissionList.data$ | async) === null && permissionList.loading$ | async" class="adf-permission-loader">
<mat-progress-spinner [color]="'primary'"
[mode]="'indeterminate'">
@ -40,15 +40,15 @@
</div>
<button
mat-button
mat-flat-button
data-automation-id="permission-info-button"
[adf-pop-over]="inheritedPermission"
[target]="target"
#popOver="adfPopOver"
*ngIf="model.node.permissions.isInheritanceEnabled">
{{ (popOver.open ? 'PERMISSION_MANAGER.LABELS.HIDE' : 'PERMISSION_MANAGER.LABELS.SHOW') | translate }}
<mat-icon *ngIf="popOver.open"> keyboard_arrow_up </mat-icon>
<mat-icon *ngIf="!popOver.open"> keyboard_arrow_down </mat-icon>
<mat-icon *ngIf="popOver.open" iconPositionEnd> keyboard_arrow_up </mat-icon>
<mat-icon *ngIf="!popOver.open" iconPositionEnd> keyboard_arrow_down </mat-icon>
</button>
</div>

View File

@ -1,3 +1,5 @@
@import 'styles/mat-selectors';
.adf {
&-permission-card {
height: 100%;
@ -5,6 +7,7 @@
display: flex;
flex-direction: column;
overflow: hidden;
padding: 16px;
}
&-permission-loader {
@ -66,9 +69,10 @@
height: calc(100% - 63px);
}
&-local-permission-container {
&-local-permission-container#{$mat-card-content} {
overflow: hidden;
flex: 1 1 auto;
padding: 0;
}
}

View File

@ -28,7 +28,8 @@ import { RoleModel } from '../../models/role.model';
[value]="value"
(selectionChange)="onRoleChanged($event.value)"
(keyup.arrowdown)="$event.stopPropagation()"
(keyup.arrowup)="$event.stopPropagation()">
(keyup.arrowup)="$event.stopPropagation()"
>
<mat-option *ngFor="let role of roles" [value]="role.role">
{{ role.label | adfLocalizedRole }}
</mat-option>
@ -36,28 +37,29 @@ import { RoleModel } from '../../models/role.model';
</mat-form-field>
<span class="adf-datatable-cell-value adf-readonly-role" [title]="value | adfLocalizedRole" *ngIf="readonly">
{{value | adfLocalizedRole}}
</span>
{{ value | adfLocalizedRole }}
</span>
`,
host: { class: 'adf-user-role-column adf-datatable-content-cell adf-expand-cell-4' },
styles: [
`.adf-role-selector-field {
width: 100%;
}
`
.adf-role-selector-field.mat-mdc-form-field {
width: 100%;
height: 40px;
max-width: 200px;
.adf-role-selector-field .mat-mdc-form-field {
width: 100%;
max-width: 200px;
}
.mat-mdc-form-field-infix {
padding-top: 8px;
}
.adf-readonly-role {
padding-left: 0 !important;
}
`
.mat-mdc-form-field-subscript-wrapper {
display: none;
}
}
`
]
})
export class UserRoleColumnComponent {
@Input()
roles: RoleModel[];

View File

@ -63,8 +63,10 @@ $mat-card: '.mat-mdc-card';
$mat-card-actions: '.mat-mdc-card-actions';
$mat-card-header-text: '.mat-mdc-card-header-text';
$mat-card-title: '.mat-mdc-card-title';
$mat-card-content: '.mat-mdc-card-content';
$mat-mini-fab: '.mat-mdc-mini-fab';
$mat-list-item-primary-text: '.mdc-list-item__primary-text';
$mat-list-item-end: '.mdc-list-item__end';
$mat-table: '.mat-mdc-table';
$mat-header-row: '.mat-mdc-header-row';
$mat-row: '.mat-mdc-row';