feat: Add isCancelable attribute to session model
Closes: gs
This commit is contained in:
2 files changed
+28
-1
No files matched your search
@@ -1,7 +1,18 @@
|
||||
import GeneratedSessionModel from '../generated/models/session';
|
||||
import { computed } from '@ember/object';
|
||||
|
||||
export default class SessionModel extends GeneratedSessionModel {
|
||||
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
@computed('status')
|
||||
get isCancelable() {
|
||||
return this.status?.match(/(active)|(pending)/i);
|
||||
}
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user