Improve ondobarding steps

This commit is contained in:
Urtzi Alfaro
2025-09-02 08:38:49 +02:00
parent 6346c4bcb9
commit b55da883c5
23 changed files with 1469 additions and 4725 deletions

View File

@@ -2,7 +2,7 @@ import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
export type BakeryType = 'individual' | 'central' | 'hybrid';
export type BakeryType = 'artisan' | 'dependent';
export type BusinessModel = 'production' | 'retail' | 'hybrid';
interface BakeryState {
@@ -40,7 +40,7 @@ interface Tenant {
const initialState = {
currentTenant: null,
bakeryType: 'individual' as BakeryType,
bakeryType: 'artisan' as BakeryType,
businessModel: 'production' as BusinessModel,
operatingHours: {
start: '04:00',
@@ -70,10 +70,10 @@ export const useBakeryStore = create<BakeryState>()(
set((state) => {
state.bakeryType = type;
// Adjust features based on bakery type
if (type === 'individual') {
if (type === 'artisan') {
state.features.pos = false;
state.businessModel = 'production';
} else if (type === 'central') {
} else if (type === 'dependent') {
state.features.pos = true;
state.businessModel = 'retail';
}