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,52 @@
import Ember from 'ember';
const {
get,
set,
Mixin,
computed,
} = Ember;
export default Mixin.create({
step: computed('model.stepId', 'stepsService.steps', function() {
return get(this, `stepsService.steps.${get(this, 'model.stepId')}`);
}),
actions: {
moveToNextStep() {
const step = get(this, 'step');
if (!get(step, 'nextId')) {
this.router.transitionTo(this.routeAfterCompleted);
} else {
const nextStep = get(this, `stepsService.steps.${step.nextId}`);
if (get(this, 'isOnboarding')) {
let profile = get(this, 'model.profile');
const savedStepId = get(profile, 'onboardingStepId');
if (nextStep.prevId === savedStepId) {
set(profile, 'onboardingStep', nextStep);
profile.save().then(() => this.transitionTo(nextStep));
} else {
this.transitionTo(nextStep);
}
} else {
this.transitionTo(nextStep);
}
}
},
moveToPrevStep() {
const step = get(this, 'step');
const prevStep = get(this, `stepsService.steps.${step.prevId}`);
this.transitionTo(prevStep);
}
},
transitionTo: function(step) {
this.router.transitionTo(step.prefix, step.stepName);
}
});