feat: add relative time and context menu in flows

This commit is contained in:
Ali BARIN
2022-07-31 13:36:28 +02:00
parent 0fdbe4d39b
commit 15aaada3fe
10 changed files with 139 additions and 12 deletions

View File

@@ -203,6 +203,8 @@ type Flow {
name: String
active: Boolean
steps: [Step]
createdAt: String
updatedAt: String
}
type Execution {

View File

@@ -31,9 +31,9 @@ class Base extends Model {
}
async $beforeUpdate(opt: ModelOptions, queryContext: QueryContext): Promise<void> {
await super.$beforeUpdate(opt, queryContext);
this.updatedAt = new Date().toISOString();
await super.$beforeUpdate(opt, queryContext);
}
}

View File

@@ -44,7 +44,9 @@ class Flow extends Base {
},
});
async $beforeUpdate(opt: ModelOptions): Promise<void> {
async $beforeUpdate(opt: ModelOptions, queryContext: QueryContext): Promise<void> {
await super.$beforeUpdate(opt, queryContext);
if (!this.active) return;
const oldFlow = opt.old as Flow;