2022-01-21 22:25:47 +03:00
|
|
|
import EmberObject, {computed} from '@ember/object';
|
2021-06-21 11:34:33 +03:00
|
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
|
|
|
import {isBlank} from '@ember/utils';
|
|
|
|
|
|
|
|
export default EmberObject.extend(ValidationEngine, {
|
2021-06-28 12:49:54 +03:00
|
|
|
name: '',
|
2021-06-21 11:34:33 +03:00
|
|
|
isNew: false,
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
validationType: 'tierBenefitItem',
|
2021-06-21 11:34:33 +03:00
|
|
|
|
2021-06-28 12:49:54 +03:00
|
|
|
isComplete: computed('name', function () {
|
|
|
|
let {name} = this;
|
2021-06-21 11:34:33 +03:00
|
|
|
|
2021-06-28 12:49:54 +03:00
|
|
|
return !isBlank(name);
|
2021-06-21 11:34:33 +03:00
|
|
|
}),
|
|
|
|
|
2021-06-28 12:49:54 +03:00
|
|
|
isBlank: computed('name', function () {
|
|
|
|
let {name} = this;
|
2021-06-21 11:34:33 +03:00
|
|
|
|
2021-06-28 12:49:54 +03:00
|
|
|
return isBlank(name);
|
2021-06-21 11:34:33 +03:00
|
|
|
})
|
|
|
|
});
|