Improve ondobarding steps
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user