From 6173f088edc46184420a817831027d571fc47c7c Mon Sep 17 00:00:00 2001 From: amentis Date: Tue, 16 Jul 2024 11:40:36 +0300 Subject: [PATCH] admin pages ui fixes on deleted state --- .../java/org/opencdmp/query/UsageLimitQuery.java | 2 +- .../editor/language-editor.component.html | 4 ++-- .../editor/prefilling-source-editor.model.ts | 13 +++++++++---- .../editor/reference-type-editor.model.ts | 9 ++++++--- .../reference/editor/reference-editor.model.ts | 6 ++++-- .../editor/usage-limit-editor.component.html | 2 +- .../editor/usage-limit-editor.component.ts | 6 +++--- .../listing/usage-limit-listing.component.ts | 3 ++- .../external-fetcher-source-editor.model.ts | 16 +++++++++++----- .../notification-template-editor.component.html | 6 +++--- .../notification-template-editor.component.ts | 4 ++-- .../editor/notification-template-editor.model.ts | 12 ++++++++---- 12 files changed, 52 insertions(+), 31 deletions(-) diff --git a/backend/core/src/main/java/org/opencdmp/query/UsageLimitQuery.java b/backend/core/src/main/java/org/opencdmp/query/UsageLimitQuery.java index fc5a4e88f..d80ab910f 100644 --- a/backend/core/src/main/java/org/opencdmp/query/UsageLimitQuery.java +++ b/backend/core/src/main/java/org/opencdmp/query/UsageLimitQuery.java @@ -218,7 +218,7 @@ public class UsageLimitQuery extends QueryBase { return UsageLimitEntity._updatedAt; else if (item.match(UsageLimit._isActive)) return UsageLimitEntity._isActive; - else if (item.prefix(UsageLimit._belongsToCurrentTenant)) + else if (item.match(UsageLimit._belongsToCurrentTenant)) return UsageLimitEntity._tenantId; else return null; diff --git a/frontend/src/app/ui/admin/language/editor/language-editor.component.html b/frontend/src/app/ui/admin/language/editor/language-editor.component.html index ba5828636..da542476c 100644 --- a/frontend/src/app/ui/admin/language/editor/language-editor.component.html +++ b/frontend/src/app/ui/admin/language/editor/language-editor.component.html @@ -8,7 +8,7 @@
-
+
diff --git a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.model.ts b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.model.ts index 4ac23f4a5..124542488 100644 --- a/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.model.ts +++ b/frontend/src/app/ui/admin/prefilling-source/editor/prefilling-source-editor.model.ts @@ -37,6 +37,7 @@ export class PrefillingSourceEditorModel extends BaseEditorModel implements Pref code: [{ value: this.code, disabled: disabled }, context.getValidation('code').validators], definition: this.definition.buildForm({ rootPath: `definition.`, + disabled: disabled }), hash: [{ value: this.hash, disabled: disabled }, context.getValidation('hash').validators] }); @@ -123,26 +124,30 @@ export class PrefillingSourceDefinitionEditorModel implements PrefillingSourceDe fields: this.formBuilder.array( (this.fields ?? []).map( (item, index) => item.buildForm({ - rootPath: `${rootPath}fields[${index}].` + rootPath: `${rootPath}fields[${index}].`, + disabled: disabled }) ), context.getValidation('fields') ), fixedValueFields: this.formBuilder.array( (this.fixedValueFields ?? []).map( (item, index) => item.buildForm({ - rootPath: `${rootPath}fixedValueFields[${index}].` + rootPath: `${rootPath}fixedValueFields[${index}].`, + disabled: disabled }) ), context.getValidation('fixedValueFields') ), searchConfiguration: this.searchConfiguration.buildForm({ - rootPath: `${rootPath}searchConfiguration.` + rootPath: `${rootPath}searchConfiguration.`, + disabled: disabled }), getEnabled: [{ value: this.getEnabled, disabled: disabled }, context.getValidation('getEnabled').validators], }); if (this.getEnabled == true) { form.addControl('getConfiguration', this.getConfiguration.buildForm({ - rootPath: `${rootPath}getConfiguration.` + rootPath: `${rootPath}getConfiguration.`, + disabled: disabled })); } return form; diff --git a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts index 4bf506d99..5e0063bc1 100644 --- a/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts +++ b/frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.model.ts @@ -41,7 +41,8 @@ export class ReferenceTypeEditorModel extends BaseEditorModel implements Referen name: [{ value: this.name, disabled: disabled }, context.getValidation('name').validators], code: [{ value: this.code, disabled: disabled }, context.getValidation('code').validators], definition: this.definition.buildForm({ - rootPath: `definition.` + rootPath: `definition.`, + disabled: disabled }), hash: [{ value: this.hash, disabled: disabled }, context.getValidation('hash').validators] }); @@ -138,14 +139,16 @@ export class ReferenceTypeDefinitionEditorModel implements ReferenceTypeDefiniti fields: this.formBuilder.array( (this.fields ?? []).map( (item, index) => item.buildForm({ - rootPath: `${rootPath}fields[${index}].` + rootPath: `${rootPath}fields[${index}].`, + disabled: disabled }) ), context.getValidation('fields').validators ), sources: this.formBuilder.array( (this.sources ?? []).map( (item, index) =>item.buildForm({ - rootPath: `${rootPath}sources[${index}].` + rootPath: `${rootPath}sources[${index}].`, + disabled: disabled }) ), context.getValidation('sources').validators ) diff --git a/frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts b/frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts index 27506bc83..c9401689a 100644 --- a/frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts +++ b/frontend/src/app/ui/admin/reference/editor/reference-editor.model.ts @@ -49,7 +49,8 @@ export class ReferenceEditorModel extends BaseEditorModel implements ReferencePe typeId: [{ value: this.typeId, disabled: disabled }, context.getValidation('typeId').validators], description: [{ value: this.description, disabled: disabled }, context.getValidation('description').validators], definition: this.definition.buildForm({ - rootPath: `definition.` + rootPath: `definition.`, + disabled: disabled }), reference: [{ value: this.reference, disabled: disabled }, context.getValidation('reference').validators], abbreviation: [{ value: this.abbreviation, disabled: disabled }, context.getValidation('abbreviation').validators], @@ -130,7 +131,8 @@ export class DefinitionEditorModel implements DefinitionPersist { fields: this.formBuilder.array( (this.fields ?? []).map( (item, index) => item.buildForm({ - rootPath: `${rootPath}fields[${index}].` + rootPath: `${rootPath}fields[${index}].`, + disabled: disabled }) ), context.getValidation('fields').validators ), diff --git a/frontend/src/app/ui/admin/usage-limit/editor/usage-limit-editor.component.html b/frontend/src/app/ui/admin/usage-limit/editor/usage-limit-editor.component.html index 1ad115a2a..9ba56fa5c 100644 --- a/frontend/src/app/ui/admin/usage-limit/editor/usage-limit-editor.component.html +++ b/frontend/src/app/ui/admin/usage-limit/editor/usage-limit-editor.component.html @@ -8,7 +8,7 @@
-
+
-
+