added 260907 version of worker toolkit

This commit is contained in:
2026-09-08 20:30:51 -04:00
parent cbd3f0f8ca
commit 97aca37663
1283 changed files with 142951 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import Ember from 'ember';
const {
get,
set,
computed,
Component,
Logger: { debug },
computed: { alias },
} = Ember;
export default Component.extend({
checkin: alias('parentView.checkin'),
relatedObjects: computed('checkin', function() {
return get(this, 'checkin.' + get(this, 'relationName'));
}),
actions: {
add(obj) {
get(this, 'checkin').addObj(obj, get(this, 'idsKey'), get(this, 'relationName'));
this.saveCheckin();
},
remove(obj) {
get(this, 'checkin').removeObj(obj, get(this, 'idsKey'), get(this, 'relationName'));
this.saveCheckin();
},
onBeforeAdd(name) {
this.sendAction('onBeforeAdd', name);
},
},
saveCheckin() {
if (get(this, 'checkin.hasDirtyAttributes')) {
Ember.run.next(this, function() {
get(this, 'checkin')
.save()
.then(
() => {
debug('Checkin successfully saved');
set(this, 'checkin.hasDirtyAttributes', false);
},
(error) => {
get(this, 'checkin').handleSaveError(error);
}
)
.then(() => get(this, 'chartsVisibilityService').refresh());
});
}
},
});