operations/owner-onboarding.md

Owner Onboarding — Data Checklist

Reference document cho phần onboarding wizard. Liệt kê toàn bộ data cần setup khi owner đăng ký salon mới.

Hiện tại (auto-created khi signup)

Data Auto-created? Default value Notes
Tenant name từ businessName, slug auto-gen industryType hardcoded 'beauty'
Settings getDefaultSettings(industryType) currency, timezone, businessHours, bookingMode...
Branding DEFAULT_BRANDING (#6366f1) logo + cover = null
Owner user email/phone + password role = OWNER
Tax (MVA 25%) name='MVA', rate=25, isDefault=true Hardcoded Na Uy
Accounting account code='3000', name='Salgsinntekt', taxId=MVA isDefault=true

Cần setup thêm (onboarding wizard steps)

Step 1: Salon Info

  • Tên salon (đã có từ signup)
  • Industry type → ảnh hưởng settings defaults, labels, tax defaults
  • Địa chỉ (street, city, postalCode, country, lat/lng)
  • Mô tả salon (rich text)
  • Logo + Cover image upload

Step 2: Business Hours

  • Chọn giờ mở cửa cho từng ngày trong tuần
  • Multi-slot per day (ví dụ: 09:00-12:00, 13:00-17:00)
  • Default: Mon-Sat 09:00-17:00, Sun off

Step 3: Staff

  • Thêm ít nhất 1 staff (name, email/phone)
  • Tạo user account STAFF role
  • Tạo Resource linked to user
  • Set schedule (copy from business hours hoặc custom)
  • Chọn màu hiển thị

Step 4: Services

  • Tạo categories (hoặc dùng template theo industry)
  • Thêm services (name, duration, price, category)
  • Auto-assign default accounting account
  • Assign skills (staff nào làm service nào)

Step 5: Tax & Accounting

  • Review default tax (MVA 25% cho Na Uy)
  • Thêm tax rates nếu cần (0%, 15%)
  • Tạo accounting accounts (link to tax)
  • Set default accounting account cho services

Step 6: Booking Settings

  • Booking mode: assigned_only vs allow_unassigned
  • Auto-confirm: on/off
  • Walk-in: enabled/disabled
  • Cancellation window (hours)
  • Currency
  • Timezone

Step 7: Branding

  • Primary + secondary color
  • Logo upload
  • Cover image upload

Seed Data Reference

Seed tạo demo salon "Studio Nordic" với data đầy đủ cho testing:

Data Count Details
Tenant 1 Studio Nordic, beauty, Oslo
Users 6 1 admin + 1 owner + 4 staff
Staff/Resources 4 Anna, Linh, Erik, Sofia — mỗi người có schedule riêng
Schedules 21 Anna/Linh: Mon-Fri, Erik: Mon-Sat, Sofia: Tue-Sat (late shift)
Schedule Overrides 1 Erik: special hours tomorrow
Time Off 2 Sofia: vacation next week, Linh: half-day tomorrow
Tax rates 3 25% (default), 15%, 0%
Accounting accounts 3 Sales taxable (25%), reduced rate (15%), exempt (0%)
Categories 6 Haircuts, Color, Styling, Treatments, Beard, Extensions
Services 25 Prices in øre, all linked to default accounting
Skills 51 Each staff assigned to 12-13 services
Customers 8 Norwegian names with phone/email
Bookings 11 8 today + 3 tomorrow, multi-service, mixed statuses
BookingItems 12 1 per booking + 1 multi-service booking has 2 items
AuditLog 11 CREATED entry per booking

Tax Defaults per Industry (TODO — onboarding)

Khi onboarding, dựa theo industryType + country để set default tax:

Country Industry Default Tax Rate
Norway beauty/nail/hair/barbershop MVA 25%
Norway food/cafe MVA (mat) 15%
Sweden beauty Moms 25%
Sweden food Moms (mat) 12%

Hiện tại hardcoded MVA 25% cho tất cả. Khi làm onboarding, cần dynamic theo country + industry.

Login Credentials (Seed)

Role Email Password
Admin admin@booking.no admin123
Owner owner1@gmail.com 123456
Staff anna@studionordic.no 123456
Staff linh@studionordic.no 123456
Staff erik@studionordic.no 123456
Staff sofia@studionordic.no 123456