2018-01-25 17:31:48 +00:00
|
|
|
import Component from '@ember/component';
|
2018-07-12 19:06:42 +00:00
|
|
|
import { computed } from '@ember/object';
|
2020-06-10 13:49:16 +00:00
|
|
|
import { classNames } from '@ember-decorators/component';
|
|
|
|
import classic from 'ember-classic-decorator';
|
2018-01-25 17:31:48 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@classic
|
|
|
|
@classNames('boxed-section')
|
|
|
|
export default class Summary extends Component {
|
|
|
|
job = null;
|
2018-01-25 17:31:48 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@computed
|
|
|
|
get isExpanded() {
|
2018-07-12 19:06:42 +00:00
|
|
|
const storageValue = window.localStorage.nomadExpandJobSummary;
|
|
|
|
return storageValue != null ? JSON.parse(storageValue) : true;
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
2018-03-23 01:59:53 +00:00
|
|
|
|
2018-07-12 19:06:42 +00:00
|
|
|
persist(item, isOpen) {
|
|
|
|
window.localStorage.nomadExpandJobSummary = isOpen;
|
|
|
|
this.notifyPropertyChange('isExpanded');
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
|
|
|
}
|