From b8c618abbeb086508a24497fb47c5f5ec9dc9191 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:24:39 -0800 Subject: [PATCH] Make frontend list a generic management list --- src-ui/src/app/app-routing.module.ts | 4 +- .../custom-field-edit-dialog.component.html | 10 +- .../custom-field-edit-dialog.component.ts | 4 + .../custom-fields-list.component.ts | 72 +++++++++ .../custom-fields.component.spec.ts | 2 +- .../custom-fields.component.html | 72 --------- .../custom-fields.component.scss | 4 - .../custom-fields/custom-fields.component.ts | 148 ------------------ .../management-list.component.html | 2 +- .../management-list.component.ts | 4 +- src-ui/src/app/data/custom-field.ts | 6 +- .../services/rest/custom-fields.service.ts | 4 +- 12 files changed, 96 insertions(+), 236 deletions(-) create mode 100644 src-ui/src/app/components/manage/custom-fields-list/custom-fields-list.component.ts rename src-ui/src/app/components/manage/{custom-fields => custom-fields-list}/custom-fields.component.spec.ts (98%) delete mode 100644 src-ui/src/app/components/manage/custom-fields/custom-fields.component.html delete mode 100644 src-ui/src/app/components/manage/custom-fields/custom-fields.component.scss delete mode 100644 src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts diff --git a/src-ui/src/app/app-routing.module.ts b/src-ui/src/app/app-routing.module.ts index f65514f74..9d97bcde3 100644 --- a/src-ui/src/app/app-routing.module.ts +++ b/src-ui/src/app/app-routing.module.ts @@ -12,7 +12,7 @@ import { DocumentAsnComponent } from './components/document-asn/document-asn.com import { DocumentDetailComponent } from './components/document-detail/document-detail.component' import { DocumentListComponent } from './components/document-list/document-list.component' import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component' -import { CustomFieldsComponent } from './components/manage/custom-fields/custom-fields.component' +import { CustomFieldsListComponent } from './components/manage/custom-fields-list/custom-fields-list.component' import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component' import { MailComponent } from './components/manage/mail/mail.component' import { SavedViewsComponent } from './components/manage/saved-views/saved-views.component' @@ -239,7 +239,7 @@ export const routes: Routes = [ }, { path: 'customfields', - component: CustomFieldsComponent, + component: CustomFieldsListComponent, canActivate: [PermissionsGuard], data: { requiredPermission: { diff --git a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html index b4216e41c..af194c015 100644 --- a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html +++ b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.html @@ -11,7 +11,7 @@ @if (typeFieldDisabled) { - Data type cannot be changed after a field is created + Data type cannot be changed after a field is created }
@switch (objectForm.get('data_type').value) { @@ -39,6 +39,14 @@ } }
+
+ + @if (patternRequired) { + + } + @if (patternRequired) { + + }