feat: add relative time and context menu in flows

This commit is contained in:
Ali BARIN
2022-08-06 23:41:47 +02:00
parent 0fdbe4d39b
commit 15aaada3fe
10 changed files with 139 additions and 12 deletions
+2 -2
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);
}
}
+3 -1
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;