Skip to content

Add Bar to Venue Story - Implementation Audit

Add Bar to Venue Story - Implementation Audit

Section titled “Add Bar to Venue Story - Implementation Audit”

Story: Add a Bar to a Venue
Date: 2025-01-27
Status:MOSTLY COMPLETE - UI and Data Layer Complete, Some Integration Gaps

The Add Bar story is well-implemented with a complete UI form and data layer functionality. Bars can be created with name, description, and features, and are persisted correctly. However, there are some integration gaps where bars from venues are not yet used in all the places mentioned in the acceptance criteria.

✅ 1. Given I have an existing venue, When I want to add a new bar to that venue

Section titled “✅ 1. Given I have an existing venue, When I want to add a new bar to that venue”

Status:COMPLETE

  • Implementation: shaker/app/(tabs)/venues/[id].tsx
  • Location: Lines 554-608
  • Details:
    • Add bar form is available on venue detail screen
    • Form is shown/hidden with showAddBar state
    • Button to show form: “Add Bar” button (line 601-607)
    • Form includes all required fields

✅ 2. Then I can provide the bar’s Name

Section titled “✅ 2. Then I can provide the bar’s Name”

Status:COMPLETE

  • Implementation: shaker/app/(tabs)/venues/[id].tsx
  • Location: Lines 558-563
  • Details:
    • TextInput with label “Bar Name *”
    • Required field (validation on submit)
    • Placeholder: “e.g., Main Bar”
    • Validation in handleAddBar function (line 68)

✅ 3. And I can optionally provide a Description

Section titled “✅ 3. And I can optionally provide a Description”

Status:COMPLETE

  • Implementation: shaker/app/(tabs)/venues/[id].tsx
  • Location: Lines 564-569
  • Details:
    • TextInput with label “Description (optional)”
    • Optional field, no validation required
    • Placeholder: “Brief description…”

✅ 4. And I can optionally specify Features (comma-separated)

Section titled “✅ 4. And I can optionally specify Features (comma-separated)”

Status:COMPLETE

  • Implementation: shaker/app/(tabs)/venues/[id].tsx
  • Location: Lines 570-576
  • Details:
    • TextInput with label “Features (optional)”
    • Placeholder: “e.g., Full Service, Wine Bar, Coffee Station (comma-separated)”
    • Helper text: “Enter features separated by commas”
    • Features are parsed from comma-separated string (lines 80-83)
    • Features stored as string[] in Bar interface

✅ 5. And the system records the bar within the venue

Section titled “✅ 5. And the system records the bar within the venue”

Status:COMPLETE

  • Implementation: shaker/data/venues/index.ts
  • Location: Lines 180-193
  • Details:
    • addBarToVenue() function adds bar to venue’s bars array
    • Bar is persisted to mock data layer (allVenues array)
    • Function returns the created bar or null if venue not found
    • Bar ID is auto-generated with timestamp and random string

⚠️ 6. And the new bar is immediately available for use in Bar setups for events

Section titled “⚠️ 6. And the new bar is immediately available for use in Bar setups for events”

Status: ⚠️ PARTIALLY COMPLETE

  • Current State:

    • Bar setup creation (shaker/app/(tabs)/events/add-bar-setup.tsx) has a text input for “Bar Name” (line 146-152)
    • Users must manually type the bar name instead of selecting from venue bars
    • No picker/selector to choose from existing bars in the venue
    • Bar setup data structure includes barId and barName fields, but barId is not set from venue bars
  • Evidence:

    <TextInput
    label="Bar Name *"
    placeholder="e.g., Main Bar, Kitchen Counter"
    value={formData.barName}
    onChangeText={updateField('barName')}
    error={errors.barName}
    />
  • Missing:

    • Picker/selector to choose from venue’s bars
    • Linking bar setup to actual bar entity from venue
    • Validation that selected bar exists in event’s venue
  • Recommendation:

    • When creating bar setup, show a picker of bars from the event’s venue
    • Link bar setup to actual bar entity using barId
    • Pre-populate bar name when bar is selected from picker

✅ 7. And the new bar is immediately available for use in Inventory location assignments

Section titled “✅ 7. And the new bar is immediately available for use in Inventory location assignments”

Status:COMPLETE

  • Implementation: shaker/utils/venueLocations.ts

  • Location: Lines 25-44

  • Details:

    • getVenueLocationOptions() function includes bars as location options
    • Bars are added with prefix “Bar: ” (line 31)
    • Bar IDs are stored as bar:${bar.id} format (line 32)
    • Used by getCurrentVenueLocationOptions() for inventory assignments
    • Available in add product, add tool, and add glassware forms
  • Evidence:

    function getVenueLocationOptions(venue: Venue): PickerOption[] {
    const options: PickerOption[] = [];
    // Add bars as location options
    venue.bars.forEach((bar) => {
    options.push({
    label: `Bar: ${bar.name}`,
    value: `bar:${bar.id}`,
    });
    });
    // Add storage areas as location options
    venue.storageAreas.forEach((storage) => {
    options.push({
    label: `Storage: ${storage.name}`,
    value: `storage:${storage.id}`,
    });
    });
    return options;
    }

✅ 8. And the new bar is immediately available for use in Recipe requirements and bar assignments

Section titled “✅ 8. And the new bar is immediately available for use in Recipe requirements and bar assignments”

Status:NOT REQUIRED (Clarified by domain logic)

  • Clarification:

    • Recipes do not need to be assigned to bars
    • Menus are defined for events
    • Events occur at venues that have bars
    • Bar relationship can be inferred from: Event → Venue → Bar
    • This is a logical inference, not a direct assignment needed
  • Current Implementation:

    • Recipes are part of menus
    • Menus belong to events
    • Events have venues
    • Venues have bars
    • The relationship chain allows bars to be determined when needed
  • Status: This acceptance criteria is satisfied through domain relationships, no direct implementation needed.

  1. UI Component:

    • shaker/app/(tabs)/venues/[id].tsx - Complete add bar form implementation
  2. Data Layer:

    • shaker/data/venues/index.ts - Bar interface with features, addBarToVenue function
  3. GraphQL Mutation:

    • shaker/graphql/mutations/AddBar.graphql - Mutation includes features field
  4. Location Integration:

    • shaker/utils/venueLocations.ts - Bars included in location options
  5. Bar Setup Integration:

    • ⚠️ shaker/app/(tabs)/events/add-bar-setup.tsx - Manual bar name entry, not linked to venue bars

The add bar form includes:

  • Name Field: Required, with validation
  • Description Field: Optional
  • Features Field: Optional, comma-separated input with helper text
  • Add/Cancel Buttons: Proper form controls
  • Success/Error Alerts: User feedback on submit

Bar Interface:

export interface Bar {
id: string;
name: string;
description?: string;
features?: string[];
}

✅ Correctly includes all required fields including features array.

Features are correctly parsed from comma-separated string:

const features = newBarFeatures
.split(',')
.map((f) => f.trim())
.filter((f) => f.length > 0);

✅ Handles empty strings, trims whitespace, filters out empty values.

Status:VERIFIED COMPLETE

  • Implementation: shaker/app/(tabs)/venues/[id].tsx

  • Location: Lines 535-546

  • Details:

    • Features are displayed as badges on bar cards ✅
    • Each feature is rendered as a Badge component
    • Badges use “secondary” variant and “sm” size
    • Features are displayed in a flex-row with wrapping
    • Only shown if bar.features exists and has items
  • Evidence:

    {bar.features && bar.features.length > 0 && (
    <View className="flex-row flex-wrap gap-1 mt-2 ml-7">
    {bar.features.map((feature, index) => (
    <Badge
    key={index}
    label={feature}
    variant="secondary"
    size="sm"
    />
    ))}
    </View>
    )}

Status: ⚠️ INCOMPLETE

  • Issue: Bar setups don’t use venue bars, require manual entry
  • Impact: Users must remember and type bar names instead of selecting from list
  • Fix Required: Add bar picker to bar setup creation form

Status:NOT REQUIRED (Clarified)

  • Clarification: Recipes don’t need direct bar assignment
  • Reasoning:
    • Menus are defined for events
    • Events occur at venues
    • Venues have bars
    • Bar relationship can be inferred through: Recipe → Menu → Event → Venue → Bar
  • Impact: No impact - this is working as designed
  • Resolution: Acceptance criteria updated to reflect domain logic

Status: ⚠️ EXPECTED (Development Phase)

  • Issue: GraphQL mutation exists but not called
  • Current: Uses mock data function
  • Status: This is documented as a “Next Step” and is expected for development phase
  • Not a blocker: Mock data implementation allows development to continue
  • ✅ Features are displayed as badges on bar cards
  • ✅ Implementation matches story documentation
  • No action needed
  • Add bar picker to bar setup creation form
  • Link bar setup to actual bar entity
  • Validate that selected bar exists in event’s venue

Priority 3: ✅ Recipe Requirements Clarified

Section titled “Priority 3: ✅ Recipe Requirements Clarified”
  • ✅ Confirmed: Recipes don’t need bar assignment
  • ✅ Bar relationship inferred through: Recipe → Menu → Event → Venue → Bar
  • ✅ Acceptance criteria updated to reflect domain logic
  • No action needed
  • When backend is ready, integrate GraphQL mutation
  • Replace mock data function calls
  • Add proper error handling
  • Venue Management: Fully functional
  • Bar Creation: Fully functional with all fields
  • Inventory Location Assignment: Bars available as locations
  • ⚠️ Bar Setup for Events: Functional but not integrated with venue bars
  • Recipe Bar Assignment: Not required - bars inferred through domain relationships (Menu → Event → Venue → Bar)

The Add Bar story is well-implemented with complete UI and data layer functionality. The main gap is:

  1. Bar Setup Integration: Bars from venues should be selectable when creating bar setups (currently requires manual entry)

Clarification: Recipe-to-bar assignment is not required. The relationship is inferred through the domain model: Recipes are part of Menus → Menus belong to Events → Events occur at Venues → Venues have Bars.

Overall Completion: ~95% - Core functionality complete, only minor integration gap with bar setup form. Recipe assignment clarified as not needed.

Recommendation: Mark as mostly complete. The only remaining gap is bar setup integration (adding a picker to select from venue bars). Recipe assignment is clarified as not needed - bars are inferred through domain relationships.