update restore icon
This commit is contained in:
parent
421d9d734a
commit
3e0fd5872f
@ -29,7 +29,7 @@
|
||||
<redaction-circle-button
|
||||
(action)="bulkRestore()"
|
||||
*ngIf="areSomeEntitiesSelected$ | async"
|
||||
icon="red:undo"
|
||||
icon="red:put-back"
|
||||
[tooltip]="'trash.bulk.restore' | translate"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
@ -154,7 +154,7 @@
|
||||
<div class="action-buttons">
|
||||
<redaction-circle-button
|
||||
(action)="bulkRestore([entity.dossierId])"
|
||||
icon="red:undo"
|
||||
icon="red:put-back"
|
||||
[tooltip]="'trash.action.restore' | translate"
|
||||
type="dark-bg"
|
||||
></redaction-circle-button>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
.header-item {
|
||||
padding: 0 24px 0 10px;
|
||||
|
||||
redaction-circle-button:not(:last-child) {
|
||||
margin-right: 4px !important;
|
||||
}
|
||||
}
|
||||
|
||||
redaction-table-col-name::ng-deep {
|
||||
|
||||
@ -54,9 +54,9 @@
|
||||
<redaction-circle-button
|
||||
(action)="bulkDelete()"
|
||||
*ngIf="areSomeEntitiesSelected$ | async"
|
||||
[disabled]="!canDeleteSelected"
|
||||
[disabled]="(canDeleteSelected$ | async) === false"
|
||||
[tooltip]="
|
||||
canDeleteSelected
|
||||
(canDeleteSelected$ | async)
|
||||
? 'user-listing.bulk.delete'
|
||||
: 'user-listing.bulk.delete-disabled'
|
||||
"
|
||||
@ -148,7 +148,7 @@
|
||||
|
||||
<div [class.collapsed]="collapsedDetails" class="right-container" redactionHasScrollbar>
|
||||
<redaction-users-stats
|
||||
(toggleCollapse)="toggleCollapsedDetails()"
|
||||
(toggleCollapse)="collapsedDetails = !collapsedDetails"
|
||||
[chartData]="chartData"
|
||||
></redaction-users-stats>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
import { Component, Injector, OnInit, QueryList, ViewChildren } from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Injector,
|
||||
OnInit,
|
||||
QueryList,
|
||||
ViewChildren
|
||||
} from '@angular/core';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { User, UserControllerService } from '@redaction/red-ui-http';
|
||||
@ -13,10 +20,13 @@ import { SearchService } from '../../../shared/services/search.service';
|
||||
import { ScreenStateService } from '../../../shared/services/screen-state.service';
|
||||
import { SortingService } from '../../../../services/sorting.service';
|
||||
import { NewBaseListingComponent } from '../../../shared/base/new-base-listing.component';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
templateUrl: './user-listing-screen.component.html',
|
||||
styleUrls: ['./user-listing-screen.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
providers: [FilterService, SearchService, ScreenStateService, SortingService]
|
||||
})
|
||||
export class UserListingScreenComponent extends NewBaseListingComponent<User> implements OnInit {
|
||||
@ -39,8 +49,9 @@ export class UserListingScreenComponent extends NewBaseListingComponent<User> im
|
||||
this._screenStateService.setIdKey('userId');
|
||||
}
|
||||
|
||||
get canDeleteSelected(): boolean {
|
||||
return this._screenStateService.selectedEntitiesIds.indexOf(this.userService.userId) === -1;
|
||||
get canDeleteSelected$(): Observable<boolean> {
|
||||
const entities$ = this._screenStateService.selectedEntitiesIds$;
|
||||
return entities$.pipe(map(all => all.indexOf(this.userService.userId) === -1));
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
@ -74,11 +85,7 @@ export class UserListingScreenComponent extends NewBaseListingComponent<User> im
|
||||
this._avatars.find(item => item.userId === user.userId).detectChanges();
|
||||
}
|
||||
|
||||
toggleCollapsedDetails() {
|
||||
this.collapsedDetails = !this.collapsedDetails;
|
||||
}
|
||||
|
||||
async bulkDelete() {
|
||||
bulkDelete() {
|
||||
this.openDeleteUsersDialog(
|
||||
this._screenStateService.entities.filter(u => this.isSelected(u))
|
||||
);
|
||||
@ -88,10 +95,6 @@ export class UserListingScreenComponent extends NewBaseListingComponent<User> im
|
||||
return user.userId;
|
||||
}
|
||||
|
||||
protected _searchField(user: any): string {
|
||||
return this.userService.getName(user);
|
||||
}
|
||||
|
||||
private async _loadData() {
|
||||
this._screenStateService.setEntities(
|
||||
await this._userControllerService.getAllUsers().toPromise()
|
||||
|
||||
@ -62,6 +62,7 @@ export class IconsModule {
|
||||
'pages',
|
||||
'plus',
|
||||
'preview',
|
||||
'put-back',
|
||||
'radio-indeterminate',
|
||||
'radio-selected',
|
||||
'read-only',
|
||||
|
||||
20
apps/red-ui/src/assets/icons/general/put-back.svg
Normal file
20
apps/red-ui/src/assets/icons/general/put-back.svg
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<title>711C9D82-CAA8-47BE-954A-A9DA22CE85E6</title>
|
||||
<g id="Trash" stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd">
|
||||
<g id="05.-Trash-bulk-actions" transform="translate(-133.000000, -130.000000)">
|
||||
<g id="Group-36" transform="translate(0.000000, 112.000000)">
|
||||
<g id="Group-9" transform="translate(123.000000, 0.000000)">
|
||||
<g id="Group-21" transform="translate(0.000000, 8.000000)" fill="currentColor"
|
||||
fill-rule="nonzero">
|
||||
<g id="Put-back" transform="translate(10.000000, 10.000000)">
|
||||
<path
|
||||
d="M5,4.42 L3.8,4.42 L6.5,1.72 L5,0.42 L0,5.42 L5.1,10.52 L6.5,9.12 L3.8,6.42 L5,6.42 C8.9,6.42 12,9.52 12,13.42 L14,13.42 C14,8.52 10,4.42 5,4.42 Z"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user