Skip to content

Commit

Permalink
Fix updatedAt and deletedAt labels not shown in admin applications
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinDY committed Jun 28, 2023
1 parent 5cf5e7a commit ce541cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/web/admin/src/views/System/Application/Editor.vue
Expand Up @@ -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'))
})
Expand Down
5 changes: 5 additions & 0 deletions lib/js/src/system/types/application.ts
Expand Up @@ -4,6 +4,7 @@ import { IsOf } from '../../guards'
interface PartialApplication extends Partial<Omit<Application, 'createdAt' | 'updatedAt' | 'deletedAt' | 'lastUsedAt'>> {
createdAt?: string|number|Date;
updatedAt?: string|number|Date;
deletedAt?: string|number|Date;
}

interface Unify {
Expand Down Expand Up @@ -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)
Expand All @@ -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')

Expand Down

0 comments on commit ce541cd

Please sign in to comment.