2021-06-21 11:34:33 +03:00
|
|
|
import EmberObject from '@ember/object';
|
|
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
|
|
|
import {computed} from '@ember/object';
|
|
|
|
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,
|
|
|
|
|
|
|
|
validationType: 'productBenefitItem',
|
|
|
|
|
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
|
|
|
})
|
|
|
|
});
|