refactor: replace Wizard with CoopBuilder in navigation, enhance budget store structure, and streamline template components for improved user experience
This commit is contained in:
parent
eede87a273
commit
f67b138d95
33 changed files with 4970 additions and 2451 deletions
22
stores/plan.ts
Normal file
22
stores/plan.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import type { Member, Offer } from '~/types/coaching';
|
||||
import type { StreamRow } from '~/utils/offerToStream';
|
||||
import { offersToStreams } from '~/utils/offerToStream';
|
||||
|
||||
export const usePlanStore = defineStore('plan', {
|
||||
state: () => ({
|
||||
members: [] as Member[],
|
||||
streams: [] as StreamRow[]
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setMembers(m: Member[]) {
|
||||
this.members = m;
|
||||
},
|
||||
|
||||
addStreamsFromOffers(o: Offer[]) {
|
||||
const newStreams = offersToStreams(o, this.members);
|
||||
this.streams.push(...newStreams);
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue