feat: Add isCancelable attribute to session model

Closes: gs
This commit is contained in:
Susmitha Girumala committed 2020-10-05 16:09:34 -04:00
1 parent 4b5f02da2a
commit 523c2f7a5a
2 files changed
+28 -1

No files matched your search

+11
View File
@@ -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
/**