From d6d54b3740ce59b4cc5a97543ec6298dd826a39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Sun, 20 Dec 2020 22:31:55 +0200 Subject: [PATCH] Added project templates --- apps/red-ui/src/app/app.module.ts | 89 +++++-- .../file-actions/file-actions.component.scss | 2 +- .../app/common/filter/filter.component.scss | 2 +- .../admin-breadcrumbs.component.html | 40 +-- .../admin-breadcrumbs.component.scss | 2 +- .../admin-breadcrumbs.component.ts | 25 +- .../comments/comments.component.scss | 8 +- .../needs-work-badge.component.scss | 2 +- .../project-template-actions.component.html | 19 ++ .../project-template-actions.component.scss | 7 + .../project-template-actions.component.ts | 37 +++ ...roject-template-view-switch.component.html | 8 + ...roject-template-view-switch.component.scss | 0 .../project-template-view-switch.component.ts | 27 ++ .../simple-doughnut-chart.component.scss | 6 +- .../status-bar/status-bar.component.scss | 2 +- .../add-edit-project-dialog.component.ts | 2 +- apps/red-ui/src/app/dialogs/dialog.service.ts | 30 ++- apps/red-ui/src/app/icons/icons.module.ts | 1 + .../add-edit-dictionary-dialog.component.scss | 14 +- .../dictionary-listing-screen.component.html | 246 ++++++++++-------- .../dictionary-listing-screen.component.scss | 24 +- .../dictionary-listing-screen.component.ts | 11 +- .../dictionary-overview-screen.component.html | 2 +- ...dit-project-template-dialog.component.html | 59 +++++ ...dit-project-template-dialog.component.scss | 19 ++ ...-edit-project-template-dialog.component.ts | 55 ++++ ...ct-templates-listing-screen.component.html | 142 ++++++++++ ...ct-templates-listing-screen.component.scss | 56 ++++ ...ject-templates-listing-screen.component.ts | 94 +++++++ .../rules-screen/rules-screen.component.html | 59 +++-- .../rules-screen/rules-screen.component.scss | 5 + .../rules-screen/rules-screen.component.ts | 12 +- .../users/user-listing-screen.component.html | 2 +- .../watermark-screen.component.html | 2 +- .../file-preview-screen.component.scss | 2 +- .../bulk-actions/bulk-actions.component.scss | 2 +- .../red-ui/src/app/state/app-state.service.ts | 43 +++ apps/red-ui/src/app/utils/sorting.service.ts | 5 +- apps/red-ui/src/assets/i18n/en.json | 41 ++- .../src/assets/icons/general/dictionary.svg | 16 ++ .../src/assets/styles/red-breadcrumbs.scss | 2 +- apps/red-ui/src/assets/styles/red-button.scss | 2 +- .../src/assets/styles/red-checkbox.scss | 2 +- .../src/assets/styles/red-components.scss | 2 +- apps/red-ui/src/assets/styles/red-editor.scss | 2 +- apps/red-ui/src/assets/styles/red-grid.scss | 4 +- apps/red-ui/src/assets/styles/red-input.scss | 12 + apps/red-ui/src/assets/styles/red-menu.scss | 2 +- .../src/assets/styles/red-page-layout.scss | 6 +- apps/red-ui/src/assets/styles/red-toasts.scss | 4 +- 51 files changed, 1009 insertions(+), 249 deletions(-) create mode 100644 apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.html create mode 100644 apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.scss create mode 100644 apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.ts create mode 100644 apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.html create mode 100644 apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.scss create mode 100644 apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.ts create mode 100644 apps/red-ui/src/app/screens/admin/project-templates-listing-screen/add-edit-project-template-dialog/add-edit-project-template-dialog.component.html create mode 100644 apps/red-ui/src/app/screens/admin/project-templates-listing-screen/add-edit-project-template-dialog/add-edit-project-template-dialog.component.scss create mode 100644 apps/red-ui/src/app/screens/admin/project-templates-listing-screen/add-edit-project-template-dialog/add-edit-project-template-dialog.component.ts create mode 100644 apps/red-ui/src/app/screens/admin/project-templates-listing-screen/project-templates-listing-screen.component.html create mode 100644 apps/red-ui/src/app/screens/admin/project-templates-listing-screen/project-templates-listing-screen.component.scss create mode 100644 apps/red-ui/src/app/screens/admin/project-templates-listing-screen/project-templates-listing-screen.component.ts create mode 100644 apps/red-ui/src/assets/icons/general/dictionary.svg diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 86300bf6b..b46078f62 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -98,6 +98,10 @@ import { HtmlDebugScreenComponent } from './screens/html-debug-screen/html-debug import { ReportDownloadBtnComponent } from './components/buttons/report-download-btn/report-download-btn.component'; import { ProjectListingActionsComponent } from './screens/project-listing-screen/project-listing-actions/project-listing-actions.component'; import { HasScrollbarDirective } from './utils/has-scrollbar.directive'; +import { ProjectTemplatesListingScreenComponent } from './screens/admin/project-templates-listing-screen/project-templates-listing-screen.component'; +import { AddEditProjectTemplateDialogComponent } from './screens/admin/project-templates-listing-screen/add-edit-project-template-dialog/add-edit-project-template-dialog.component'; +import { ProjectTemplateActionsComponent } from './components/project-template-actions/project-template-actions.component'; +import { ProjectTemplateViewSwitchComponent } from './components/project-template-view-switch/project-template-view-switch.component'; import { MatSliderModule } from '@angular/material/slider'; import { PendingChangesGuard } from './utils/can-deactivate.guard'; @@ -168,23 +172,56 @@ const routes = [ { path: 'admin', children: [ - { path: '', redirectTo: 'dictionaries', pathMatch: 'full' }, + { path: '', redirectTo: 'project-templates', pathMatch: 'full' }, { - path: 'dictionaries', - component: DictionaryListingScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } - }, - { - path: 'dictionaries/:type', - component: DictionaryOverviewScreenComponent, - canActivate: [CompositeRouteGuard], - canDeactivate: [PendingChangesGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } + path: 'project-templates', + children: [ + { + path: '', + component: ProjectTemplatesListingScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] + } + }, + { + path: ':templateId', + children: [ + { + path: 'dictionaries', + children: [ + { + path: '', + component: DictionaryListingScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] + } + }, + { + path: ':type', + component: DictionaryOverviewScreenComponent, + canActivate: [CompositeRouteGuard], + canDeactivate: [PendingChangesGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] + } + } + ] + }, + { + path: 'rules', + component: RulesScreenComponent, + canActivate: [CompositeRouteGuard], + canDeactivate: [PendingChangesGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] + } + }, + { path: '', redirectTo: 'dictionaries', pathMatch: 'full' } + ] + } + ] }, { path: 'users', @@ -194,15 +231,6 @@ const routes = [ routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] } }, - { - path: 'rules', - component: RulesScreenComponent, - canActivate: [CompositeRouteGuard], - canDeactivate: [PendingChangesGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] - } - }, { path: 'watermark', component: WatermarkScreenComponent, @@ -285,6 +313,8 @@ const matImports = [ CircleButtonComponent, ChevronButtonComponent, DictionaryListingScreenComponent, + ProjectTemplatesListingScreenComponent, + AddEditProjectTemplateDialogComponent, SyncWidthDirective, HasScrollbarDirective, AddEditDictionaryDialogComponent, @@ -298,7 +328,9 @@ const matImports = [ PdfViewerScreenComponent, HtmlDebugScreenComponent, ReportDownloadBtnComponent, - ProjectListingActionsComponent + ProjectListingActionsComponent, + ProjectTemplateActionsComponent, + ProjectTemplateViewSwitchComponent ], imports: [ BrowserModule, @@ -351,7 +383,10 @@ const matImports = [ provide: MAT_DATE_FORMATS, useValue: { display: { - dateInput: 'DD/MM/YY' + dateInput: 'DD/MM/YY', + monthYearLabel: 'YYYY', + dateA11yLabel: 'LL', + monthYearA11yLabel: 'YYYY' } } } diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.scss b/apps/red-ui/src/app/common/file-actions/file-actions.component.scss index a530de5f5..4a9497c79 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.scss +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.scss @@ -1,7 +1,7 @@ .file-actions { display: flex; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 2px; } } diff --git a/apps/red-ui/src/app/common/filter/filter.component.scss b/apps/red-ui/src/app/common/filter/filter.component.scss index 962f176f3..02a600d80 100644 --- a/apps/red-ui/src/app/common/filter/filter.component.scss +++ b/apps/red-ui/src/app/common/filter/filter.component.scss @@ -9,7 +9,7 @@ .actions { display: flex; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 8px; } } diff --git a/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.html b/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.html index 2bedc5574..5549ff5ea 100644 --- a/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.html +++ b/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.html @@ -1,44 +1,46 @@ diff --git a/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.scss b/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.scss index b2f445392..87b0ab315 100644 --- a/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.scss +++ b/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.scss @@ -1,3 +1,3 @@ -.ml-32 { +.breadcrumb:not(:first-child):not(.ml-0) { margin-left: 32px; } diff --git a/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.ts b/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.ts index afd0adb8f..b4931d79d 100644 --- a/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.ts +++ b/apps/red-ui/src/app/components/admin-page-header/admin-breadcrumbs.component.ts @@ -1,7 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { TypeValue } from '@redaction/red-ui-http'; -import { AppStateService } from '../../state/app-state.service'; +import { AppStateService, ProjectTemplate } from '../../state/app-state.service'; import { UserPreferenceService } from '../../common/service/user-preference.service'; import { PermissionsService } from '../../common/service/permissions.service'; @@ -12,24 +12,25 @@ import { PermissionsService } from '../../common/service/permissions.service'; }) export class AdminBreadcrumbsComponent implements OnInit { public dictionary: TypeValue; - public root: boolean; - public screen: string; + public projectTemplate: ProjectTemplate; + @Input() + public root = false; constructor( public readonly userPreferenceService: UserPreferenceService, public readonly permissionService: PermissionsService, private readonly _activatedRoute: ActivatedRoute, private readonly _appStateService: AppStateService - ) { + ) {} + + ngOnInit(): void { this._activatedRoute.params.subscribe((params) => { - const url = this._activatedRoute.snapshot.url; - this.root = url.length === 1; - this.screen = url[0].path; - if (this.screen === 'dictionaries' && url.length === 2) { - this.dictionary = this._appStateService.dictionaryData[params.type]; + if (params.templateId) { + this.projectTemplate = this._appStateService.getProjectTemplateById(params.templateId); + } + if (params.type) { + this.dictionary = this._appStateService.getDictionaryTypeValue(params.type); } }); } - - ngOnInit(): void {} } diff --git a/apps/red-ui/src/app/components/comments/comments.component.scss b/apps/red-ui/src/app/components/comments/comments.component.scss index 06f5254bd..127df2bed 100644 --- a/apps/red-ui/src/app/components/comments/comments.component.scss +++ b/apps/red-ui/src/app/components/comments/comments.component.scss @@ -5,14 +5,14 @@ flex-direction: column; margin-top: 10px; - > *:not(last-child) { + > *:not(:last-child) { margin-bottom: 10px; } .comment { display: flex; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 12px; } @@ -53,7 +53,7 @@ display: flex; align-items: center; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 15px; } } @@ -61,7 +61,7 @@ .actions-container { margin-left: 26px; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 5px; } diff --git a/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.scss b/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.scss index a741c5bc3..a69d6a7f5 100644 --- a/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.scss +++ b/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.scss @@ -4,7 +4,7 @@ align-items: center; justify-content: flex-start; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 4px; } } diff --git a/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.html b/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.html new file mode 100644 index 000000000..9b0edb1f4 --- /dev/null +++ b/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.html @@ -0,0 +1,19 @@ +
+ + + + + +
diff --git a/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.scss b/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.scss new file mode 100644 index 000000000..eeb99fae7 --- /dev/null +++ b/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.scss @@ -0,0 +1,7 @@ +.action-buttons { + display: flex; + + redaction-circle-button:not(:last-child) { + margin-right: 2px; + } +} diff --git a/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.ts b/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.ts new file mode 100644 index 000000000..7316bdd35 --- /dev/null +++ b/apps/red-ui/src/app/components/project-template-actions/project-template-actions.component.ts @@ -0,0 +1,37 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { ProjectTemplate } from '../../state/app-state.service'; +import { DialogService } from '../../dialogs/dialog.service'; +import { PermissionsService } from '../../common/service/permissions.service'; + +@Component({ + selector: 'redaction-project-template-actions', + templateUrl: './project-template-actions.component.html', + styleUrls: ['./project-template-actions.component.scss'] +}) +export class ProjectTemplateActionsComponent implements OnInit { + @Input() template: ProjectTemplate; + @Output() loadTemplatesData = new EventEmitter(); + + constructor(private readonly _dialogService: DialogService, public readonly permissionsService: PermissionsService) {} + + ngOnInit(): void {} + + openAddEditTemplateDialog(template?: ProjectTemplate) { + this._dialogService.openAddEditTemplateDialog(template, async (newTemplate) => { + if (newTemplate) { + this.loadTemplatesData.emit(); + } + }); + } + + openEditTemplateDialog($event: any, pt: ProjectTemplate) { + $event.stopPropagation(); + this.openAddEditTemplateDialog(pt); + } + + openDeleteTemplateDialog($event: any, template: ProjectTemplate) { + this._dialogService.openDeleteProjectTemplateDialog($event, template, async () => { + this.loadTemplatesData.emit(); + }); + } +} diff --git a/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.html b/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.html new file mode 100644 index 000000000..a1d64e213 --- /dev/null +++ b/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.html @@ -0,0 +1,8 @@ +
+
+ + {{ 'dictionaries' | translate }} + {{ 'rule-editor' | translate }} + +
+
diff --git a/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.scss b/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.ts b/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.ts new file mode 100644 index 000000000..170a27221 --- /dev/null +++ b/apps/red-ui/src/app/components/project-template-view-switch/project-template-view-switch.component.ts @@ -0,0 +1,27 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +@Component({ + selector: 'redaction-project-template-view-switch', + templateUrl: './project-template-view-switch.component.html', + styleUrls: ['./project-template-view-switch.component.scss'] +}) +export class ProjectTemplateViewSwitchComponent implements OnInit { + @Input() public screen: 'rules' | 'dictionaries'; + + private readonly _projectTemplateId: string; + + constructor(private readonly _actr: ActivatedRoute, private _router: Router) { + this._projectTemplateId = this._actr.snapshot.params.templateId; + } + + ngOnInit(): void {} + + public switchView($event) { + if ($event.value === 'dictionaries') { + this._router.navigate(['ui/admin/project-templates/' + this._projectTemplateId + '/dictionaries']); + } else { + this._router.navigate(['ui/admin/project-templates/' + this._projectTemplateId + '/rules']); + } + } +} diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss index 70e1687a7..c87f58a0a 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.scss @@ -10,7 +10,7 @@ align-items: center; &:not(.column) { - > *:not(last-child) { + > *:not(:last-child) { margin-right: 20px; } } @@ -18,7 +18,7 @@ &.column { flex-direction: column; - > *:not(last-child) { + > *:not(:last-child) { margin-bottom: 20px; } } @@ -51,7 +51,7 @@ border-radius: 4px; padding: 3px 8px; - &:not(last-child) { + &:not(:last-child) { margin-bottom: 8px; } diff --git a/apps/red-ui/src/app/components/status-bar/status-bar.component.scss b/apps/red-ui/src/app/components/status-bar/status-bar.component.scss index 18c247fe1..92523436c 100644 --- a/apps/red-ui/src/app/components/status-bar/status-bar.component.scss +++ b/apps/red-ui/src/app/components/status-bar/status-bar.component.scss @@ -15,7 +15,7 @@ display: flex; align-items: center; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 10px; } } diff --git a/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.ts b/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.ts index f5e3ab52e..2fa878326 100644 --- a/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.ts +++ b/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.ts @@ -13,7 +13,7 @@ import * as moment from 'moment'; }) export class AddEditProjectDialogComponent { public projectForm: FormGroup; - public hasDueDate = true; + public hasDueDate: boolean; constructor( private readonly _appStateService: AppStateService, diff --git a/apps/red-ui/src/app/dialogs/dialog.service.ts b/apps/red-ui/src/app/dialogs/dialog.service.ts index 8458e8a21..1dff8b33a 100644 --- a/apps/red-ui/src/app/dialogs/dialog.service.ts +++ b/apps/red-ui/src/app/dialogs/dialog.service.ts @@ -4,7 +4,7 @@ import { DictionaryControllerService, FileManagementControllerService, FileStatu import { ConfirmationDialogComponent, ConfirmationDialogInput } from './confirmation-dialog/confirmation-dialog.component'; import { NotificationService, NotificationType } from '../notification/notification.service'; import { TranslateService } from '@ngx-translate/core'; -import { AppStateService } from '../state/app-state.service'; +import { AppStateService, ProjectTemplate } from '../state/app-state.service'; import { AddEditProjectDialogComponent } from './add-edit-project-dialog/add-edit-project-dialog.component'; import { AssignOwnerDialogComponent } from './assign-owner-dialog/assign-owner-dialog.component'; import { ManualRedactionEntryWrapper } from '../screens/file/model/manual-redaction-entry.wrapper'; @@ -13,6 +13,7 @@ import { ManualAnnotationDialogComponent } from './manual-redaction-dialog/manua import { ManualAnnotationService } from '../screens/file/service/manual-annotation.service'; import { ProjectWrapper } from '../state/model/project.wrapper'; import { AddEditDictionaryDialogComponent } from '../screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component'; +import { AddEditProjectTemplateDialogComponent } from '../screens/admin/project-templates-listing-screen/add-edit-project-template-dialog/add-edit-project-template-dialog.component'; import { DEFAULT_RUL_SET_UUID } from '../utils/rule-set-default'; const dialogConfig = { @@ -174,6 +175,17 @@ export class DialogService { return ref; } + public openDeleteProjectTemplateDialog($event: MouseEvent, projectTemplate: ProjectTemplate, cb?: Function): MatDialogRef { + $event.stopPropagation(); + const ref = this._dialog.open(ConfirmationDialogComponent, dialogConfig); + ref.afterClosed().subscribe(async (result) => { + if (result) { + if (cb) cb(); + } + }); + return ref; + } + public openDeleteProjectDialog($event: MouseEvent, project: ProjectWrapper, cb?: Function): MatDialogRef { $event.stopPropagation(); const ref = this._dialog.open(ConfirmationDialogComponent, { @@ -273,6 +285,22 @@ export class DialogService { return ref; } + public openAddEditTemplateDialog(template: ProjectTemplate, cb?: Function): MatDialogRef { + const ref = this._dialog.open(AddEditProjectTemplateDialogComponent, { + ...dialogConfig, + data: template, + autoFocus: true + }); + + ref.afterClosed().subscribe((result) => { + if (result && cb) { + cb(result); + } + }); + + return ref; + } + openRemoveAnnotationModal($event: MouseEvent, annotation: AnnotationWrapper, callback: () => void) { $event?.stopPropagation(); diff --git a/apps/red-ui/src/app/icons/icons.module.ts b/apps/red-ui/src/app/icons/icons.module.ts index 79a1d8474..824319edd 100644 --- a/apps/red-ui/src/app/icons/icons.module.ts +++ b/apps/red-ui/src/app/icons/icons.module.ts @@ -27,6 +27,7 @@ export class IconsModule { 'comment', 'case-sensitive', 'comment-fill', + 'dictionary', 'document', 'double-chevron-right', 'download', diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.scss b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.scss index 176922a86..c5eefa9a6 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.scss +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.scss @@ -3,7 +3,7 @@ .first-row { display: flex; - > *:not(last-child) { + > *:not(:last-child) { margin-right: 16px; } @@ -12,18 +12,6 @@ } } -.slider-row { - display: flex; - flex-direction: row; - align-items: center; -} - -.mat-button-toggle-checked { - background: $primary; - transition: background-color 0.25s ease; - color: $white; -} - .mb-14 { margin-bottom: 14px; } diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html index 14ab60446..f67bc5685 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html @@ -2,130 +2,162 @@