refactor: enhance routing and state management in CoopBuilder, add migration checks on startup, and update Tailwind configuration for improved component styling
This commit is contained in:
parent
848386e3dd
commit
4cea1f71fe
55 changed files with 4053 additions and 1486 deletions
|
|
@ -11,6 +11,13 @@ export const usePoliciesStore = defineStore(
|
|||
const payrollOncostPct = ref(0);
|
||||
const savingsTargetMonths = ref(0);
|
||||
const minCashCushionAmount = ref(0);
|
||||
const operatingMode = ref<'minimum' | 'target'>('minimum');
|
||||
|
||||
// Pay policy for member needs coverage
|
||||
const payPolicy = ref({
|
||||
relationship: 'equal-pay' as 'equal-pay' | 'needs-weighted' | 'role-banded' | 'hours-weighted',
|
||||
roleBands: [] as Array<{ role: string; hourlyWage: number }>
|
||||
});
|
||||
|
||||
// Deferred pay limits
|
||||
const deferredCapHoursPerQtr = ref(0);
|
||||
|
|
@ -95,6 +102,13 @@ export const usePoliciesStore = defineStore(
|
|||
function setPaymentPriority(priority) {
|
||||
paymentPriority.value = [...priority];
|
||||
}
|
||||
|
||||
function setPayPolicy(relationship, roleBands = []) {
|
||||
payPolicy.value = {
|
||||
relationship,
|
||||
roleBands: [...roleBands]
|
||||
};
|
||||
}
|
||||
|
||||
// Legacy actions
|
||||
function updatePolicy(key, value) {
|
||||
|
|
@ -120,6 +134,8 @@ export const usePoliciesStore = defineStore(
|
|||
payrollOncostPct.value = 0;
|
||||
savingsTargetMonths.value = 0;
|
||||
minCashCushionAmount.value = 0;
|
||||
operatingMode.value = 'minimum';
|
||||
payPolicy.value = { relationship: 'equal-pay', roleBands: [] };
|
||||
deferredCapHoursPerQtr.value = 0;
|
||||
deferredSunsetMonths.value = 0;
|
||||
surplusOrder.value = [
|
||||
|
|
@ -139,6 +155,8 @@ export const usePoliciesStore = defineStore(
|
|||
payrollOncostPct,
|
||||
savingsTargetMonths,
|
||||
minCashCushionAmount,
|
||||
operatingMode,
|
||||
payPolicy,
|
||||
deferredCapHoursPerQtr,
|
||||
deferredSunsetMonths,
|
||||
surplusOrder,
|
||||
|
|
@ -151,6 +169,7 @@ export const usePoliciesStore = defineStore(
|
|||
setOncostPct,
|
||||
setSavingsTargetMonths,
|
||||
setMinCashCushion,
|
||||
setPayPolicy,
|
||||
setDeferredCap,
|
||||
setDeferredSunset,
|
||||
setVolunteerScope,
|
||||
|
|
@ -171,6 +190,8 @@ export const usePoliciesStore = defineStore(
|
|||
"payrollOncostPct",
|
||||
"savingsTargetMonths",
|
||||
"minCashCushionAmount",
|
||||
"operatingMode",
|
||||
"payPolicy",
|
||||
"deferredCapHoursPerQtr",
|
||||
"deferredSunsetMonths",
|
||||
"surplusOrder",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue