From 43b9909a09c08e3247adbacba1f653b886d4e0fe Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 7 Dec 2022 14:55:40 -0800 Subject: [PATCH] add share to c/dt/t/sp, refactor share input, ifOwner directive --- src-ui/src/app/app.module.ts | 4 ++ .../correspondent-edit-dialog.component.html | 10 ++++ .../correspondent-edit-dialog.component.ts | 4 ++ .../document-type-edit-dialog.component.html | 8 ++++ .../document-type-edit-dialog.component.ts | 4 ++ .../edit-dialog/edit-dialog.component.ts | 16 ++++++- .../storage-path-edit-dialog.component.html | 8 ++++ .../storage-path-edit-dialog.component.ts | 4 ++ .../tag-edit-dialog.component.html | 9 ++++ .../tag-edit-dialog.component.ts | 4 ++ .../share-user/share-user.component.html | 15 ++++++ .../share-user/share-user.component.scss | 0 .../input/share-user/share-user.component.ts | 47 +++++++++++++++++++ .../document-detail.component.html | 6 +-- .../document-detail.component.ts | 10 +--- .../src/app/data/object-with-permissions.ts | 2 +- .../src/app/directives/if-owner.directive.ts | 42 +++++++++++++++++ src-ui/src/app/services/settings.service.ts | 17 +++++-- 18 files changed, 192 insertions(+), 18 deletions(-) create mode 100644 src-ui/src/app/components/common/input/share-user/share-user.component.html create mode 100644 src-ui/src/app/components/common/input/share-user/share-user.component.scss create mode 100644 src-ui/src/app/components/common/input/share-user/share-user.component.ts create mode 100644 src-ui/src/app/directives/if-owner.directive.ts diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 65a7cda14..183a6ad25 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -104,6 +104,8 @@ import localeSr from '@angular/common/locales/sr' import localeSv from '@angular/common/locales/sv' import localeTr from '@angular/common/locales/tr' import localeZh from '@angular/common/locales/zh' +import { ShareUserComponent } from './components/common/input/share-user/share-user.component' +import { IfOwnerDirective } from './directives/if-owner.directive' registerLocaleData(localeBe) registerLocaleData(localeCs) @@ -195,6 +197,8 @@ function initializeApp(settings: SettingsService) { PermissionsSelectComponent, MailAccountEditDialogComponent, MailRuleEditDialogComponent, + ShareUserComponent, + IfOwnerDirective, ], imports: [ BrowserModule, diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html index a11b6363e..857bd2f1c 100644 --- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html +++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html @@ -5,10 +5,20 @@