Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Multivenue WISK

Introduction

The objective is to simplify the Wisk architecture by supporting a group of venues to share the same items and pos items. A single venue will become an exception, having the items and pos items used only by that venue.

Only a venue can have inventories/movements/purchase orders and so on. The existing parent_id will be transformed into a venue_core_id.

Proposal:

erDiagram
    Organization ||--|{ Venue : has
    Organization ||--|{ Organization : has
    Organization {
        int id
        int parent_organization_id
        string title
    }
    Venue {
        int id
        string title
        int venue_group_id
        int venue_core_id
    }
    Venue_core ||--|{ Venue : has
    Venue_core {
        int id
        string title
    }
  • Every venue has a organization_id, which is the id of the organization it belongs to.
  • The roles are created in the Organization.
  • A user can be assigned only to a Organization
  • When searching for items, all items in the same organization will be returned
  • All items from the organization will be available offline for search
  • The user will be able to see the data for a organization, including all the items of all the venues in the organization
  • The roles are defined at the Organization level
  • If an organization has a parent, that organization cannot have the roles defined at that level

Questions:

  • How do we move roles from a organization to the parent one?
    • Answer: the roles will be automatically moved up when a parent is added
  • When a parent organization is created, who become the owners of the organization
    • Answer: The existing Admins will be upgraded to have access to the new parent, this means by default they will have access to all new venues attached to the same Organization
  • What do we do with the default item variation when we have excluded at at the distributor level

Venue hierarcy for a Complex Structure

graph LR
    Foodtastic --> Benny(Rotisserie Benny)
    Foodtastic --> Belle(Belle et la Bouef -  Beb)
    Foodtastic --> Monza
    Benny --> Benny_LaPrarie(Rotisserie Benny La Prarie)
    Benny --> Benny_LaSalle(Rotisserie Benny La Salle)
    Benny_LaPrarie --> Benny_LaPrairieCore(Benny La Praire Core Items and POS Items)
    Benny_LaSalle --> Benny_LaSalleCore(Benny La Salle Core Items and POS Items)
    Belle --> Belle_St-Bruno(BeB St-Bruno)
    Belle --> Belle_Dix30(BeB Dix30)
    Belle --> Belle_Ste-Catherine(BeB Ste-Catherine)
    Belle_St-Bruno --> Belle_St-Bruno_Food(BeB St-Bruno Food)
    Belle_St-Bruno --> Belle_St-Bruno_Beverage(BeB St-Bruno Beverage)
    Belle_Dix30 --> Belle_Dix30_Food(BeB Dix30 Food)
    Belle_Dix30 --> Belle_Dix30_Beverage(BeB Dix30 Beverage)
    Belle_Ste-Catherine --> Belle_Ste-Catherine_Food(BeB Ste-Catherine Food)
    Belle_Ste-Catherine --> Belle_Ste-Catherine_Beverage(BeB Ste-Catherine Beverage)
    Belle_St-Bruno_Beverage --> Belle_Core(BeB Core Items and POS Items for St-Bruno and Dix30)
    Belle_Dix30_Beverage --> Belle_Core
    Belle_Dix30_Food --> Belle_Core
    Belle_St-Bruno_Food --> Belle_Core
    Belle_Ste-Catherine_Food --> Belle_Ste-Catherine_Core(BeB Core Items and POS Items for Ste-Catherine)
    Belle_Ste-Catherine_Beverage --> Belle_Ste-Catherine_Core

    Monza --> Monza_LaPrarie(Monza La Prarie)
    Monza --> Monza_Brossard(Monza La Brossard)
    Monza_LaPrarie --> Monza_Core
    Monza --> Monza_LaSalle(Monza La Salle)
    Monza_Brossard --> Monza_Core
    Monza --> Monza_Kitchen_SouthShore(Monza Kitchen South Shore)
    Monza --> Monza_Kitchen_Montreal(Monza Kitchen Montreal)
    Monza_Kitchen_SouthShore --> Monza_Core
    Monza_Kitchen_Montreal --> Monza_Core
    Monza_LaSalle --> Monza_Core

Questions:

  • do we need an approved list of items at an organization level?
    • Answer: we will notify the users when new items are created so they can take action if needed
  • should we be able to soft merge two items at the organization level?
  • do we allow the soft merge of POS Items in a shared POS Item setup? It might happen that the POS Codes (plu numbers) are not centralized.

Desired outcome

  • Ability to view a dashboard for all the venue in the Organization Belle et la Bouef
    • The dashboard will show the total sales for all the venues in the Organization
    • Should be able to see the sales for BeB St-Bruno regardless of Food or Beverage
  • All the BeB venues will share the same items and pos items
  • At the BeB level we should be able to the POS Item cost for each venue.

Diagram for the Organization

erDiagram
    Organization ||--o{ User : has  
    Organization ||--o{ Role : has  
    Role ||--o{ Permission : has

Diagram for the Venue_core

erDiagram
    Venue_core ||--|{ Venue : has
    Venue_core ||--o{ Family : has  
    Family ||--o{ Category : has  
    Venue_core ||--o{ Distributor : has
    Distributor ||--o{ Contact : has
    Venue_core ||--o{ Item : has
    Item ||--o{ Item_variation : has
    Item ||--|| Batch : "can be linked with"
    Venue_core ||--o{ Pos_item : has
    Venue_core ||--o{ Batch : has
    Batch ||--o{ Batch : has
    Pos_item ||--o{ Batch : has

High level diagram for the Venue

erDiagram
    Venue ||--|{ Area : has
    Venue {
        string title
        int parent_id
    }
    Venue ||--O{ User : has  
    Venue ||--o{ Purchase_order : has
    Purchase_order ||--o{ Purchase_order_line : has
    Venue ||--o{ Draft_invoice : has
    Venue ||--o{ Pos_data : has
    Draft_invoice ||--o{ Draft_invoice_line : has
    Draft_invoice ||--o{ Draft_invoice_extra_line : has
    Venue ||--o{ Movement : has
    Movement ||--o{ Movement_line : has
    Movement ||--o{ Movement_extra_line : has
    Venue ||--o{ Inventory : has
    Inventory ||--|{ Inventory_area : has
    Inventory_area ||--o{ Inventory_areas_measurement : has
    Venue ||--o{ Area : has

Commissary Kitchens with different core

  • It should be required to have the same Core with the restaurant ordering
  • The restaurant should be able to see and order items from the Commissary Kitchen
  • The Commissary Kitchen should be able to define the items that can be ordered by the restaurant

Commissary Kitchens with the same core

  • Batches should be able to be shared between the Commissary Kitchen and the restaurant but not the ingredients
  • The in the restaurant the Batches should be seen as regular items

User access

A user can be attached to a venue or a Venue_core:

  • If a user is attached to a venue, they can only access that venue
  • If a user is attached to a Venue_core, they can access all venues in that Venue_core

A user can have access to multiple venue and venue parents.

erDiagram
    User {
        string title
    }
    User ||--o{ Users_venues_pivot: has
    Users_venues_pivot ||--o{ Venue: has
    Users_venues_pivot ||--o{ Venue_core: has
    Venue_core ||--o{ Venue: has
    Users_venues_pivot ||--|| Role: one
    Role ||--|{ Permission: has

User invitation flow

sequenceDiagram
    actor Alice
    actor Bob
    Alice->>Bob: Hi Bob, I'd like to invite you to Wisk
    Alice->>User_invitation: Create a user invitation for the chosen role
    Bob->>User_invitation: Accept invitation, set password
    User_invitation->>Wisk: Invitation accepted
    Wisk->>Alice: Bob has accepted the invitation

Active Items and Pos items in a parent child relationship

  • An Item and POS Item has the list of venues it is available in. If a venue is not in the list, it is not active in that venue. But it can still be searched and used in that venue.
  • We’ll have the ability to soft group POS Items (if they are the different buttons in teh POS, this usually happens in groups that don’t have a central POS code)

Item measurement example:

{
  "quantity": 1,
  "type": "weight",
  "unit_of_measurement": "kg"
}

the possible type of measurement are:

    enum UnitOfMeasurement {
        case oz
        case ml
        case cup
        case tbsp
        case tsp
        case l
        case gal
        case qt
        case pt

        case unit
        case each
        
        case dryOz
        case g
        case kg
        case lb
    }