From ce541cde67318b278d9fc88b230176ac49ff332c Mon Sep 17 00:00:00 2001 From: Katrin Yordanova Date: Tue, 27 Jun 2023 10:52:42 +0300 Subject: [PATCH] Fix updatedAt and deletedAt labels not shown in admin applications --- client/web/admin/src/views/System/Application/Editor.vue | 7 ++++++- lib/js/src/system/types/application.ts | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/web/admin/src/views/System/Application/Editor.vue b/client/web/admin/src/views/System/Application/Editor.vue index f961150f8..add11bfd4 100644 --- a/client/web/admin/src/views/System/Application/Editor.vue +++ b/client/web/admin/src/views/System/Application/Editor.vue @@ -187,12 +187,17 @@ export default { } this.$SystemAPI.applicationUpdate(application) - .then(() => { + .then(application => { this.initialApplicationState = new system.Application({ ...application, unify: this.initialApplicationState.unify, }) + this.application = new system.Application({ + ...application, + unify: this.application.unify, + }) + this.animateSuccess('info') this.toastSuccess(this.$t('notification:application.update.success')) }) diff --git a/lib/js/src/system/types/application.ts b/lib/js/src/system/types/application.ts index 518aaf136..0414fe422 100644 --- a/lib/js/src/system/types/application.ts +++ b/lib/js/src/system/types/application.ts @@ -4,6 +4,7 @@ import { IsOf } from '../../guards' interface PartialApplication extends Partial> { createdAt?: string|number|Date; updatedAt?: string|number|Date; + deletedAt?: string|number|Date; } interface Unify { @@ -34,6 +35,9 @@ export class Application { public canGrant: boolean = true; public canUpdateApplication: boolean = true; public canDeleteApplication: boolean = true; + public createdAt?: Date = undefined + public updatedAt?: Date = undefined + public deletedAt?: Date = undefined constructor (r?: PartialApplication) { this.apply(r) @@ -42,6 +46,7 @@ export class Application { apply (r?: PartialApplication): void { Apply(this, r, CortezaID, 'applicationID') Apply(this, r, String, 'name') + Apply(this, r, ISO8601Date, 'createdAt', 'updatedAt', 'deletedAt') Apply(this, r, Number, 'weight', 'ownerID') Apply(this, r, Boolean, 'enabled', 'canGrant', 'canUpdateApplication', 'canDeleteApplication')