feat: add relative time and context menu in flows
This commit is contained in:
@@ -203,6 +203,8 @@ type Flow {
|
||||
name: String
|
||||
active: Boolean
|
||||
steps: [Step]
|
||||
createdAt: String
|
||||
updatedAt: String
|
||||
}
|
||||
|
||||
type Execution {
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user