From 08751a47c308d269d63dc447f17c0b722ad12564 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 3 Feb 2026 14:32:05 -0500 Subject: [PATCH 1/9] Refine demo plan terminology and steps for clarity; update client and staff onboarding processes --- apps/demo plans/MILESTONE 3_DEMO_PLAN.md | 61 +++++++++++------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/apps/demo plans/MILESTONE 3_DEMO_PLAN.md b/apps/demo plans/MILESTONE 3_DEMO_PLAN.md index 228e0637..68477192 100644 --- a/apps/demo plans/MILESTONE 3_DEMO_PLAN.md +++ b/apps/demo plans/MILESTONE 3_DEMO_PLAN.md @@ -69,11 +69,11 @@ To start the demo you should clean the database running the next command: --- -### Demo 1: Register Business & Show Empty States (Client App) +### Demo 1: Register Client & Show Empty States (Client App) **Purpose:** Show the client onboarding experience and empty states **Steps:** -1. Open Client App → Tap "Register" -2. Enter business email, and password. +1. Open Client App → Tap "Create Account" +2. Enter business name, email, and password. 3. Navigate to home page 4. **Point out:** Empty dashboard, no orders, no workers, clean slate @@ -82,9 +82,10 @@ To start the demo you should clean the database running the next command: ### Demo 2: Register Staff & Show Empty States (Staff App) **Purpose:** Show the worker onboarding experience and empty states **Steps:** -1. Open Staff App → Tap "Register" +1. Open Staff App → Tap "Sign Up" 2. Enter phone number and verify with OTP code -3. Navigate to home page +3. Follow the steps to add the personal details. +3. Navigate to home page. 4. **Point out:** Empty shifts list, no available work yet --- @@ -117,6 +118,7 @@ To start the demo you should clean the database running the next command: - Home: Coverage stats, upcoming shifts - Orders: Posted shifts with workers assigned - Coverage: Real-time worker status + - Payments: Recent invoices and payment history **What to Notice:** - Coverage percentage for today's shifts @@ -127,9 +129,9 @@ To start the demo you should clean the database running the next command: --- ### Demo 5: Client Creates a New Hub -**Screen:** Hubs Tab → "Add Hub" button +**Screen:** Home page top right hand corner settings → "Add Hub" button **Steps:** -1. Navigate to Hubs tab in bottom navigation +1. Navigate to Hubs page 2. Tap the "+" or "Add Hub" button 3. Fill in hub details: - Hub name: "Downtown Convention Center" @@ -149,7 +151,7 @@ To start the demo you should clean the database running the next command: > ↓ >Worker Applies [O4] > ↓ ->Confirmation (This Part is missing for now, for now is confirmed)*[O5] +>Confirmation [O5] > ↓ >Worker Checks In [O6] > ↓ @@ -160,26 +162,26 @@ To start the demo you should clean the database running the next command: ### Demo 6: Client Creates New Order - [O1] **Purpose:** Walk through the shift creation process -**Screen:** Orders Tab → "Post" button -**Action:** Create a new shift for upcoming event +**Screen:** Orders Tab → "Post an Order" button or "+ Order" +**Action:** Create a new order for upcoming event **What to Fill:** - Order name: "Spring Gala 2026" - Date: [Select upcoming date] +- Vendor: [Select existing vendor] - Location: [Select existing hub] - Add position: Server, Count: 3, Hours: 5PM-9PM --- ### Demo 7: Client Views Order Details -**Purpose:** Show detailed shift information and worker assignments (this second part is missing for now) +**Purpose:** Show detailed order information and worker assignments **Screen:** Orders Tab → Tap on any order card **Action:** Expand order to see full details **What to Notice:** - Event name and location - Roles needed (e.g., "2 Servers") -- Clock in/out times - Estimated cost - Coverage percentage bar @@ -202,12 +204,13 @@ To start the demo you should clean the database running the next command: **What to Notice:** - Today's Shifts section (confirmed shifts for today) - Tomorrow's Shifts section +- Recommended Shifts section (available shifts to apply for) --- ### Demo 10: Staff Browses Available Shifts - [O3] **Purpose:** Show how workers discover and view available work -**Screen:** Shifts → "Find Work" +**Screen:** Shifts → "Find Shifts" tab **Action:** Browse the list of available shifts **What to Notice:** @@ -220,11 +223,11 @@ To start the demo you should clean the database running the next command: ### Demo 11: Staff Applies for Shift - [O4] **Purpose:** Show the application process from worker side -**Screen:** Shift Details → "Apply Now" button +**Screen:** Shift Details → "Book" Shift button **Steps:** 1. Tap on an available shift to view details 2. Review business name, location, pay, requirements -3. Tap "Book Shift" +3. Tap "Book" Shift button 4. See instant confirmation --- @@ -248,15 +251,14 @@ To start the demo you should clean the database running the next command: **What to Notice:** - Live worker status (Checked In, En Route, Late, Not Arrived) -- Color-coded status badges (green, yellow, red) -- Worker contact information -- Real-time updates as workers check in +- Color-coded status badges +- Worker information --- -### Demo 14: Staff Checks In to Shift (Day of Event) [O6] +### Demo 14: Staff Clock In to Shift (Day of Event) [O6] **Purpose:** Demonstrate the check-in process -**Screen:** Home or My Shifts → Shift Card → "Check In" button +**Screen:** Home -> Clockin page -> Clock-in slider **Action:** Simulate checking in to an active shift **What to Notice:** @@ -265,9 +267,9 @@ To start the demo you should clean the database running the next command: --- -### Demo 15: Client Sees Check-In Update - [O6] +### Demo 15: Client Sees Clock-In Update - [O6] **Purpose:** Show cross-app interaction and real-time updates -**Screen:** Client App → Coverage Tab +**Screen:** Client App → Coverage Page **Action:** Press the update button on the top right to refresh worker statuses **What to Notice:** @@ -277,15 +279,13 @@ To start the demo you should clean the database running the next command: --- -### Demo 16: Staff Checks Out of Shift - - (this is under fixing)[O7] -**Purpose:** Demonstrate the check-out process and shift completion -**Screen:** Home or My Shifts → Shift Card → "Check Out" button +### Demo 16: Staff Clock-Out of Shift - [O7] +**Purpose:** Demonstrate the clock-out process and shift completion +**Screen:** Home -> Clockin page -> Clock-out slider **What to Notice:** - Check-out timestamp automatically recorded - Status changes to "Completed" -- Total hours worked calculated automatically -- Shift moves from active to history --- @@ -298,7 +298,6 @@ To start the demo you should clean the database running the next command: - Worker status changes to "Completed" - Check-out time displayed alongside check-in time - Total hours worked visible -- Shift marked as complete in orders list - Cost finalized based on actual hours --- @@ -309,11 +308,9 @@ To start the demo you should clean the database running the next command: **Steps:** 1. Navigate to Profile tab in bottom navigation 2. Review profile sections: - - **Profile Info:** Name, photo, contact details, date of birth - - **Statistics:** Total shifts worked, average rating, reliability score + - **Profile Info:** + - **Emergency Contact:** Contact details for emergencies - **Bank Account:** Linked payment account for direct deposit - - **Certificates:** Food Handler, ServSafe, Background Check status - - **Documents:** ID verification, work authorization - **Tax Forms:** W-9, I-9 compliance documents - **Time Card:** Historical shift records with hours and earnings --- From c9b65c3def8cbd21b4d582360a9ec47585a932df Mon Sep 17 00:00:00 2001 From: bwnyasse <5323628+bwnyasse@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:01:58 -0500 Subject: [PATCH 2/9] docs: add m3 demo documentation This commit adds two new markdown files: - `demos/m3-notes.md`: This file contains notes and feedback from the M3 demo. - `demos/m3.md`: This file contains the feature demo plan for Milestone 3 of the KROW Workforce Platform. It includes information on the demo overview, environment setup, demo flows, and customer handover checklist. --- demos/m3-notes.md | 60 ++++++++ demos/m3.md | 356 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 416 insertions(+) create mode 100644 demos/m3-notes.md create mode 100644 demos/m3.md diff --git a/demos/m3-notes.md b/demos/m3-notes.md new file mode 100644 index 00000000..a9a7a265 --- /dev/null +++ b/demos/m3-notes.md @@ -0,0 +1,60 @@ +# KROW M3 Demo — Test Feedback + +**Date:** February 3, 2026 + +--- + +## Demo 1: Register Business & Show Empty States (Client App) + +- **Flickering company name:** Every time I navigate to the home screen, I see "your company" for a moment before it changes to the real name. +- Creating a One-Time Order shows "No Vendors Available" — this is expected, OK. + +--- + +## Demo 2: Register Staff & Show Empty States (Staff App) + +**Onboarding — Add preferred work locations:** +- Suggestion: Use Google Maps to suggest only city names. Currently users can type anything, which will cause misspellings and inconsistent data. Important for the max distance feature. + +**Home page:** +- Same flickering issue — shows "Krower" briefly before displaying the real name. + +**Profile page:** +- Phone number should be read-only, or require re-verification if changed. +- Emergency contact: "Save & Continue" works, but shouldn't we navigate to the profile page after? Other flows do this. +- Tax Documents: Would be great to add a file uploader where our AI could identify documents and prefill fields. +- Bank Account: Need to plan real bank verification (KYC)? Ensure the account is real and belongs to the user. Also, I can list banks but I don't see how to change/switch bank. + +**Home (empty state):** +- Clicking "Find shifts →" does nothing. But "Find Shifts" with the search icon works. + +**My Availability:** +- Working. Some latency, but OK for now. + +--- + +## Demo 5: Client Creates a New Hub + +- Hub editing feature seems missing — we'll need this for NFC configuration later. +- No confirmation before deleting a hub. + +--- + +## Demo 6: Client Creates New Order + +- "Up Next (x)" counter is confusing. I created 2 orders but it shows "Up Next (1)". Sometimes shows 0 when navigating, then back to 1. + +--- + +## Demo 8: Staff Logs In with Existing Account + +- If you accidentally click "Sign Up" with an existing phone number, you get stuck: + 1. OTP screen shows error: "This user already has a staff profile. Please log in" + 2. Clicking back → login → same OTP error loop + 3. Only fix: kill and restart the app + +--- + +## Demo 10: Staff Browses Available Shifts + +- **Blocker:** I don't see the shift I created as the Client. \ No newline at end of file diff --git a/demos/m3.md b/demos/m3.md new file mode 100644 index 00000000..329549cd --- /dev/null +++ b/demos/m3.md @@ -0,0 +1,356 @@ +# KROW Workforce Platform — Feature Demo Plan for Milestone 3 + +**Version:** Milestone 3 (v3.0) +**Date:** February 3, 2026 +**Audience:** Business Stakeholders, Customer Engineers, Sales Teams +**Duration:** 25-30 minutes + +--- + +## 1️⃣ Demo Overview + +### Purpose + +This demo showcases the progress of the milestone 3. + +- **For Businesses (Client App):** One-time shift creation, worker management, real-time coverage tracking +- **For Workers (Staff App):** Easy access to available shifts, clock-in and profile management +- **Complete Workflow:** From shift posting and worker check-in and completion + +### Estimated Demo Duration + +**25-30 minutes** + +--- + +## 2️⃣ Demo Environment Setup + +### Required Test Accounts + +**Client Account (Business User):** +- Email: `legendary@krowd.com` +- Password: `Demo2026!` +- Client Name: "Krow" + +**Staff Account (Worker):** +- Phone: `+15557654321` +- OTP Code: `123456` (demo mode) +- Name: "Mariana Torres" + +### Prerequisites +1. ✅ Both apps installed on demo devices (or simulators) +2. ✅ Network connection stable +3. ✅ Seed data is ready to be populated (the database should be empty at start) + +### Make Commands Reference + +| Command | Purpose | +|---------|---------| +| `make dataconnect-clean` | Clean the database before seeding | +| `make dataconnect-seed` | Populate the database with seed data for demo | + +### Recent Fixes Applied +- ✅ Fixed 2 bugs on TaxForm: marital status and Citizenship Status now properly saved +- ✅ Fixed update screen after create or update TaxForm +- ✅ Created seed data script +- ✅ Created make commands to create and delete information in DataConnect + +--- + +## 3️⃣ Demo Flows + +### Demo 0: Show Empty Database +**Purpose:** Demonstrate the starting point before any data exists + +**Steps:** +1. Run `make dataconnect-clean` to ensure database is empty +2. Show the empty database in Firebase console + +--- + +### Demo 1: Register Business & Show Empty States (Client App) +**Purpose:** Show the client onboarding experience and empty states + +**Steps:** +1. Open Client App → Tap "Create Account" +2. Enter business email, and password +3. Navigate to home page +4. **Point out:** Empty dashboard, no orders, no workers, clean slate + +--- + +### Demo 2: Register Staff & Show Empty States (Staff App) +**Purpose:** Show the worker onboarding experience and empty states + +**Steps:** +1. Open Staff App → Tap "Sign Up" +2. Enter phone number and verify with OTP code +3. Follow the onboarding process +4. Navigate to home page +5. **Point out:** Empty shifts list, no available work yet + +--- + +### 🔄 PAUSE: Populate Database + +Run the seeding command: +```bash +make dataconnect-seed +``` + +--- + +### Demo 3: Client Logs In with Existing Account +**Purpose:** Show the sign-in experience for returning users + +**Screen:** Get Started → Sign In + +**Steps:** +1. Restart Client App +2. Tap "Sign In" button +3. Enter credentials: + - Email: `legendary@krowd.com` + - Password: `Demo2026!` +4. Tap "Sign In" + +--- + +### Demo 4: Client Views Populated Dashboard +**Purpose:** Show how the client app displays active operations + +**Steps:** +1. After signing in, observe the home screen +2. Navigate through populated sections: + - Home: Coverage stats, upcoming shifts + - Orders: Posted shifts with workers assigned + - Coverage: Real-time worker status + +**What to Notice:** +- Coverage percentage for today's shifts +- Workers checked in vs. needed +- Late workers alerts +- Today's estimated labor cost + +--- + +### Demo 5: Client Creates a New Hub +**Screen:** Hubs Tab → "Add Hub" button + +**Steps:** +1. Navigate to Hubs tab in bottom navigation +2. Tap the "+" or "Add Hub" button +3. Fill in hub details: + - Hub name: "Downtown Convention Center" + - Address: Start typing and select from Google Places autocomplete +4. Tap "Create Hub" +5. See the new hub appear in the hubs list + +--- + +### 📋 Main Demo Flow Explanation + +``` +Client Posts Shift [O1] + ↓ +*Vendor Accepts the Shift (Missing for now) / Vendor is selected by client* [O2] + ↓ +Worker Searches for a Shift [O3] + ↓ +Worker Applies [O4] + ↓ +Confirmation (Missing for now, auto-confirmed)* [O5] + ↓ +Worker Checks In [O6] + ↓ +Shift Completed [O7] +``` + +--- + +### Demo 6: Client Creates New Order - [O1] +**Purpose:** Walk through the shift creation process + +**Screen:** Orders Tab → "Post" button + +**What to Fill:** +- Order name: "Spring Gala 2026" +- Date: [Select upcoming date] +- Location: [Select existing hub] +- Add position: Server, Count: 3, Hours: 5PM-9PM + +--- + +### Demo 7: Client Views Order Details +**Purpose:** Show detailed shift information and worker assignments (second part is missing for now) + +**Screen:** Orders Tab → Tap on any order card + +**What to Notice:** +- Event name and location +- Roles needed (e.g., "2 Servers") +- Clock in/out times +- Estimated cost +- Coverage percentage bar + +--- + +### Demo 8: Staff Logs In with Existing Account +**Purpose:** Show the worker sign-in experience + +**Screen:** Get Started → Sign In with Phone + +**Steps:** +1. Restart the staff app +2. Enter phone number: `5557654321` +3. Tap "Send Code" +4. Enter OTP: `123456` + +--- + +### Demo 9: Staff Views Home Dashboard +**Purpose:** Show worker's personalized dashboard + +**What to Notice:** +- Today's Shifts section (confirmed shifts for today) +- Tomorrow's Shifts section + +--- + +### Demo 10: Staff Browses Available Shifts - [O3] +**Purpose:** Show how workers discover and view available work + +**Screen:** Shifts → "Find Work" + +**What to Notice:** +- List of shifts matching worker skills +- Hourly rate prominently displayed +- Role requirements (e.g., "Bartender - Spring Gala") +- Date, time, and duration + +--- + +### Demo 11: Staff Applies for Shift - [O4] +**Purpose:** Show the application process from worker side + +**Screen:** Shift Details → "Apply Now" button + +**Steps:** +1. Tap on an available shift to view details +2. Review business name, location, pay, requirements +3. Tap "Book Shift" +4. See instant confirmation + +--- + +### Demo 12: Staff Views Confirmed Shifts - [O5] +**Purpose:** Show worker's shift management interface + +**Screen:** Shifts Tab → "My Shifts" + +**What to Notice:** +- Week-by-week calendar navigation +- Color-coded status (Confirmed, Pending, Completed) +- Quick access to shift details and directions + +--- + +### Demo 13: Client Monitors Coverage Dashboard - [O5] +**Purpose:** Show real-time worker tracking capabilities + +**Screen:** Client App → Coverage Tab + +**What to Notice:** +- Live worker status (Checked In, En Route, Late, Not Arrived) +- Color-coded status badges (green, yellow, red) +- Worker contact information +- Real-time updates as workers check in + +--- + +### Demo 14: Staff Checks In to Shift (Day of Event) - [O6] +**Purpose:** Demonstrate the check-in process + +**Screen:** Home or My Shifts → Shift Card → "Check In" button + +**What to Notice:** +- Timestamp automatically recorded +- Status changes to "Checked In" with green indicator + +--- + +### Demo 15: Client Sees Check-In Update - [O6] +**Purpose:** Show cross-app interaction and real-time updates + +**Screen:** Client App → Coverage Tab + +**Action:** Press the update button on the top right to refresh worker statuses + +**What to Notice:** +- Status update +- Green "Checked In" badge appears +- Check-in time displayed + +--- + +### Demo 16: Staff Checks Out of Shift - [O7] +**Purpose:** Demonstrate the check-out process and shift completion + +**Screen:** Home or My Shifts → Shift Card → "Check Out" button + +⚠️ **Note:** This feature is currently under fixing. + +**What to Notice:** +- Check-out timestamp automatically recorded +- Status changes to "Completed" +- Total hours worked calculated automatically +- Shift moves from active to history + +--- + +### Demo 17: Client Views Completed Shift in Coverage - [O7] +**Purpose:** Show how completed shifts appear in the client app + +**Screen:** Client App → Coverage Tab + +**Action:** Press the refresh button to update worker statuses + +**What to Notice:** +- Worker status changes to "Completed" +- Check-out time displayed alongside check-in time +- Total hours worked visible +- Shift marked as complete in orders list +- Cost finalized based on actual hours + +--- + +### Demo 18: Staff Profile Management +**Purpose:** Demonstrate worker profile features and compliance management + +**Screen:** Staff App → Profile Tab + +**Steps:** +1. Navigate to Profile tab in bottom navigation +2. Review profile sections: + - **Profile Info:** Name, photo, contact details, date of birth + - **Statistics:** Total shifts worked, average rating, reliability score + - **Bank Account:** Linked payment account for direct deposit + - **Certificates:** Food Handler, ServSafe, Background Check status + - **Documents:** ID verification, work authorization + - **Tax Forms:** W-9, I-9 compliance documents *(bugs fixed: marital status and Citizenship Status now work properly)* + - **Time Card:** Historical shift records with hours and earnings + +--- + +## 4️⃣ Customer Handover Checklist + +### Deliverables + +- [ ] Android apps (Client and Staff) +- [ ] Demo account credentials (see below) + +### Demo Accounts + +| Account | Credentials | +|---------|-------------| +| **Client** | Email: `legendary@krowd.com` / Password: `Demo2026!` | +| **Staff** | Phone: `+15557654321` / OTP: `123456` (demo mode) | \ No newline at end of file From cfbf622d9e2bfbc97a7d1ab9594ba3fe2c993ea0 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 3 Feb 2026 15:45:37 -0500 Subject: [PATCH 3/9] chore: remove outdated demo plans and notes for Milestone 3 --- apps/demo plans/MILESTONE 3_DEMO_PLAN.md | 327 ----------------------- demos/{ => m3}/m3-notes.md | 0 demos/{ => m3}/m3.md | 40 ++- 3 files changed, 16 insertions(+), 351 deletions(-) delete mode 100644 apps/demo plans/MILESTONE 3_DEMO_PLAN.md rename demos/{ => m3}/m3-notes.md (100%) rename demos/{ => m3}/m3.md (89%) diff --git a/apps/demo plans/MILESTONE 3_DEMO_PLAN.md b/apps/demo plans/MILESTONE 3_DEMO_PLAN.md deleted file mode 100644 index 68477192..00000000 --- a/apps/demo plans/MILESTONE 3_DEMO_PLAN.md +++ /dev/null @@ -1,327 +0,0 @@ -# KROW Workforce Platform — Feature Demo Plan for Milestone 3 - -**Version:** Milestone 3 (v3.0) -**Date:** February 3, 2026 -**Audience:** Business Stakeholders, Customer Engineers, Sales Teams -**Duration:** 25-30 minutes - ---- - -## 1️⃣ Demo Overview - -### Purpose - -This demo showcases the progress of the milestone 3. - -- **For Businesses (Client App):** One-time shift creation, worker management, real-time coverage tracking -- **For Workers (Staff App):** Easy access to available shifts, clock-in and profile management -- **Complete Workflow:** From shift posting and worker check-in and completion/ - -### Estimated Demo Duration - -**25-30 minutes** - ---- - -## 2️⃣ Demo Environment Setup - -### Required Test Accounts - -**Client Account (Business User):** -- Email: `legendary@krowd.com` -- Password: `Demo2026!` -- Client Name: "Krow" - -**Staff Account (Worker):** -- Phone: `+1 (555) 765-4321` -- OTP Code: `123456` (demo mode) -- Name: "Mariana Torres" - -### Prerequisites -1. ✅ Both apps installed on demo devices (or simulators) -2. ✅ Network connection stable -3. ✅ Seed data is ready to be populated - - the database should be empty. - -### Pre-Demo Data Seeding - -Tracked in : -- https://github.com/Oloodi/krow-workforce/issues/345 - -- At the start the database should be empty. -- Commands to use: - - `make dataconnect-clean` - - To clean the database before seeding. - - `make dataconnect-seed` - - To populate the database with seed data for demo. - ---- - -## 3️⃣ Demo Flows - -**Note:** -To start the demo you should clean the database running the next command: - - make dataconnect-clean - -### Demo 0: Show Empty Database -**Purpose:** Demonstrate the starting point before any data exists -**Action:** Show the empty database in Firebase console - ---- - -### Demo 1: Register Client & Show Empty States (Client App) -**Purpose:** Show the client onboarding experience and empty states -**Steps:** -1. Open Client App → Tap "Create Account" -2. Enter business name, email, and password. -3. Navigate to home page -4. **Point out:** Empty dashboard, no orders, no workers, clean slate - ---- - -### Demo 2: Register Staff & Show Empty States (Staff App) -**Purpose:** Show the worker onboarding experience and empty states -**Steps:** -1. Open Staff App → Tap "Sign Up" -2. Enter phone number and verify with OTP code -3. Follow the steps to add the personal details. -3. Navigate to home page. -4. **Point out:** Empty shifts list, no available work yet - ---- - -> **🔄 PAUSE HERE:** Populate the database with seed data (run seeding script) - -- Potulate database with the next comand : - - make dataconnect-seed - ---- - -### Demo 3: Client Logs In with Existing Account -**Purpose:** Show the sign-in experience for returning users -**Screen:** Get Started → Sign In -**Steps:** -1. Restart Client App -2. Tap "Sign In" button -3. Enter credentials: - - Email: `legendary@krowd.com` - - Password: `Demo2026!` -4. Tap "Sign In" - ---- - -### Demo 4: Client Views Populated Dashboard -**Purpose:** Show how the client app displays active operations -**Steps:** -1. After signing in, observe the home screen -2. Navigate through populated sections: - - Home: Coverage stats, upcoming shifts - - Orders: Posted shifts with workers assigned - - Coverage: Real-time worker status - - Payments: Recent invoices and payment history - -**What to Notice:** -- Coverage percentage for today's shifts -- Workers checked in vs. needed -- Late workers alerts -- Today's estimated labor cost - ---- - -### Demo 5: Client Creates a New Hub -**Screen:** Home page top right hand corner settings → "Add Hub" button -**Steps:** -1. Navigate to Hubs page -2. Tap the "+" or "Add Hub" button -3. Fill in hub details: - - Hub name: "Downtown Convention Center" - - Address: Start typing and select from Google Places autocomplete -4. Tap "Create Hub" -5. See the new hub appear in the hubs list - ---- - -> **EXPLAIN**: The main demo flow which is the order creation and acceptance flow. -> ``` ->Client Posts Shift [O1] -> ↓ ->*Vendor Accepts the Shift (This Part is missing for now)/ Vendor is selected by client* [O2] -> ↓ ->Worker Searches for a Shift [O3] -> ↓ ->Worker Applies [O4] -> ↓ ->Confirmation [O5] -> ↓ ->Worker Checks In [O6] -> ↓ ->Shift Completed [O7] ->``` - ---- - -### Demo 6: Client Creates New Order - [O1] -**Purpose:** Walk through the shift creation process -**Screen:** Orders Tab → "Post an Order" button or "+ Order" -**Action:** Create a new order for upcoming event - -**What to Fill:** -- Order name: "Spring Gala 2026" -- Date: [Select upcoming date] -- Vendor: [Select existing vendor] -- Location: [Select existing hub] -- Add position: Server, Count: 3, Hours: 5PM-9PM - ---- - -### Demo 7: Client Views Order Details -**Purpose:** Show detailed order information and worker assignments -**Screen:** Orders Tab → Tap on any order card -**Action:** Expand order to see full details - -**What to Notice:** -- Event name and location -- Roles needed (e.g., "2 Servers") -- Estimated cost -- Coverage percentage bar - ---- - -### Demo 8: Staff Logs In with Existing Account -**Purpose:** Show the worker sign-in experience -**Screen:** Get Started → Sign In with Phone -**Steps:** -1. Restart the staff app. -2. Enter phone number: `5551234567` -3. Tap "Send Code" -4. Enter OTP: `123456` - ---- - -### Demo 9: Staff Views Home Dashboard -**Purpose:** Show worker's personalized dashboard - -**What to Notice:** -- Today's Shifts section (confirmed shifts for today) -- Tomorrow's Shifts section -- Recommended Shifts section (available shifts to apply for) - ---- - -### Demo 10: Staff Browses Available Shifts - [O3] -**Purpose:** Show how workers discover and view available work -**Screen:** Shifts → "Find Shifts" tab -**Action:** Browse the list of available shifts - -**What to Notice:** -- List of shifts matching worker skills -- Hourly rate prominently displayed -- Role requirements (e.g., "Bartender - Spring Gala") -- Date, time, and duration - ---- - -### Demo 11: Staff Applies for Shift - [O4] -**Purpose:** Show the application process from worker side -**Screen:** Shift Details → "Book" Shift button -**Steps:** -1. Tap on an available shift to view details -2. Review business name, location, pay, requirements -3. Tap "Book" Shift button -4. See instant confirmation - ---- - -### Demo 12: Staff Views Confirmed Shifts - [O5] -**Purpose:** Show worker's shift management interface -**Screen:** Shifts Tab → "My Shifts" -**Action:** Review calendar view of confirmed shifts - -**What to Notice:** -- Week-by-week calendar navigation -- Color-coded status (Confirmed, Pending, Completed) -- Quick access to shift details and directions - ---- - -### Demo 13: Client Monitors Coverage Dashboard - [O5] -**Purpose:** Show real-time worker tracking capabilities -**Screen:** Client App → Coverage Tab -**Action:** Navigate to Coverage, select today's date - -**What to Notice:** -- Live worker status (Checked In, En Route, Late, Not Arrived) -- Color-coded status badges -- Worker information - ---- - -### Demo 14: Staff Clock In to Shift (Day of Event) [O6] -**Purpose:** Demonstrate the check-in process -**Screen:** Home -> Clockin page -> Clock-in slider -**Action:** Simulate checking in to an active shift - -**What to Notice:** -- Timestamp automatically recorded -- Status changes to "Checked In" with green indicator - ---- - -### Demo 15: Client Sees Clock-In Update - [O6] -**Purpose:** Show cross-app interaction and real-time updates -**Screen:** Client App → Coverage Page -**Action:** Press the update button on the top right to refresh worker statuses - -**What to Notice:** -- Status update -- Green "Checked In" badge appears -- Check-in time displayed - ---- - -### Demo 16: Staff Clock-Out of Shift - [O7] -**Purpose:** Demonstrate the clock-out process and shift completion -**Screen:** Home -> Clockin page -> Clock-out slider - -**What to Notice:** -- Check-out timestamp automatically recorded -- Status changes to "Completed" - ---- - -### Demo 17: Client Views Completed Shift in Coverage - [O7] -**Purpose:** Show how completed shifts appear in the client app -**Screen:** Client App → Coverage Tab -**Action:** Press the refresh button to update worker statuses - -**What to Notice:** -- Worker status changes to "Completed" -- Check-out time displayed alongside check-in time -- Total hours worked visible -- Cost finalized based on actual hours - ---- - -### Demo 18: Staff Profile Management -**Purpose:** Demonstrate worker profile features and compliance management -**Screen:** Staff App → Profile Tab -**Steps:** -1. Navigate to Profile tab in bottom navigation -2. Review profile sections: - - **Profile Info:** - - **Emergency Contact:** Contact details for emergencies - - **Bank Account:** Linked payment account for direct deposit - - **Tax Forms:** W-9, I-9 compliance documents - - **Time Card:** Historical shift records with hours and earnings ---- - -## Things we need to handover to the customer - -- Android apps of the client and staff. -- Demo accounts credentials: - - Client Account: - - Email: `legendary@krowd.com` - - Password: `Demo2026!` - - Staff Account: - - Phone: `+15557654321` - - OTP Code: `123456` (demo mode) diff --git a/demos/m3-notes.md b/demos/m3/m3-notes.md similarity index 100% rename from demos/m3-notes.md rename to demos/m3/m3-notes.md diff --git a/demos/m3.md b/demos/m3/m3.md similarity index 89% rename from demos/m3.md rename to demos/m3/m3.md index 329549cd..31b86d29 100644 --- a/demos/m3.md +++ b/demos/m3/m3.md @@ -232,13 +232,13 @@ Shift Completed [O7] ### Demo 11: Staff Applies for Shift - [O4] **Purpose:** Show the application process from worker side -**Screen:** Shift Details → "Apply Now" button +**Screen:** Shift Details → "Book" Shift button **Steps:** 1. Tap on an available shift to view details 2. Review business name, location, pay, requirements -3. Tap "Book Shift" -4. See instant confirmation +3. Tap "Book" Shift button +4. See confirmation --- @@ -262,15 +262,13 @@ Shift Completed [O7] **What to Notice:** - Live worker status (Checked In, En Route, Late, Not Arrived) - Color-coded status badges (green, yellow, red) -- Worker contact information -- Real-time updates as workers check in +- Worker information --- -### Demo 14: Staff Checks In to Shift (Day of Event) - [O6] -**Purpose:** Demonstrate the check-in process - -**Screen:** Home or My Shifts → Shift Card → "Check In" button +### Demo 14: Staff Clock-In to Shift (Day of Event) - [O6] +**Purpose:** Demonstrate the clock-in process +**Screen:** Clockin page → "Clock In" slider **What to Notice:** - Timestamp automatically recorded @@ -278,7 +276,7 @@ Shift Completed [O7] --- -### Demo 15: Client Sees Check-In Update - [O6] +### Demo 15: Client Sees Clock-In Update - [O6] **Purpose:** Show cross-app interaction and real-time updates **Screen:** Client App → Coverage Tab @@ -287,23 +285,19 @@ Shift Completed [O7] **What to Notice:** - Status update -- Green "Checked In" badge appears +- User status changes to "Checked In" - Check-in time displayed --- -### Demo 16: Staff Checks Out of Shift - [O7] -**Purpose:** Demonstrate the check-out process and shift completion - -**Screen:** Home or My Shifts → Shift Card → "Check Out" button - -⚠️ **Note:** This feature is currently under fixing. +### Demo 16: Staff Clocks-Out of Shift - [O7] +**Purpose:** Demonstrate the clocks-out process and shift completion +**Screen:** Clockin page -> Clock-out slider **What to Notice:** -- Check-out timestamp automatically recorded +- Clock-out timestamp automatically recorded - Status changes to "Completed" - Total hours worked calculated automatically -- Shift moves from active to history --- @@ -331,11 +325,9 @@ Shift Completed [O7] **Steps:** 1. Navigate to Profile tab in bottom navigation 2. Review profile sections: - - **Profile Info:** Name, photo, contact details, date of birth - - **Statistics:** Total shifts worked, average rating, reliability score + - **Profile Info:** + - **Emergency Contact:** Name, relationship, phone number - **Bank Account:** Linked payment account for direct deposit - - **Certificates:** Food Handler, ServSafe, Background Check status - - **Documents:** ID verification, work authorization - **Tax Forms:** W-9, I-9 compliance documents *(bugs fixed: marital status and Citizenship Status now work properly)* - **Time Card:** Historical shift records with hours and earnings @@ -353,4 +345,4 @@ Shift Completed [O7] | Account | Credentials | |---------|-------------| | **Client** | Email: `legendary@krowd.com` / Password: `Demo2026!` | -| **Staff** | Phone: `+15557654321` / OTP: `123456` (demo mode) | \ No newline at end of file +| **Staff** | Phone: `+15557654321` / OTP: `123456` (demo mode) | From 24d346d9a98ec1618757d0643ede13fceda8a0fa Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 3 Feb 2026 16:21:15 -0500 Subject: [PATCH 4/9] feat: update next sprint tasks and demo notes with new tracking and UI suggestions --- apps/mobile/NEXT_SPRINT_TASKS.md | 2 ++ demos/m3/m3-notes.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/apps/mobile/NEXT_SPRINT_TASKS.md b/apps/mobile/NEXT_SPRINT_TASKS.md index babe1f19..d35afb90 100644 --- a/apps/mobile/NEXT_SPRINT_TASKS.md +++ b/apps/mobile/NEXT_SPRINT_TASKS.md @@ -14,3 +14,5 @@ - line 125 remove redundant location values. - Need to clarify the difference b/w `case dc.ApplicationStatus.ACCEPTED` and `case dc.ApplicationStatus.CONFIRMED`. - Update the dataconnect docs. +- Track `lat` and `lng` in the staff preferred work locations (for now we are only storing the name). +- Remove "Up Next (x)" counter from orders list in client app as it is confusing, becase the tab already has a badge showing the number of the upcoming orders. diff --git a/demos/m3/m3-notes.md b/demos/m3/m3-notes.md index a9a7a265..e4111452 100644 --- a/demos/m3/m3-notes.md +++ b/demos/m3/m3-notes.md @@ -9,6 +9,9 @@ - **Flickering company name:** Every time I navigate to the home screen, I see "your company" for a moment before it changes to the real name. - Creating a One-Time Order shows "No Vendors Available" — this is expected, OK. +**Suggestions: Achintha:** +- We need to have a shimmer loading state while fetching data, to avoid flickering and empty states. + --- ## Demo 2: Register Staff & Show Empty States (Staff App) From 4e4a9aff80bfc6f0971f4adc682dc738b876fc87 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 3 Feb 2026 16:42:25 -0500 Subject: [PATCH 5/9] feat: add sync-prototypes dependency to launchpad-dev and deploy-launchpad-hosting targets --- makefiles/launchpad.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefiles/launchpad.mk b/makefiles/launchpad.mk index 8dbe860f..87050e19 100644 --- a/makefiles/launchpad.mk +++ b/makefiles/launchpad.mk @@ -2,13 +2,13 @@ .PHONY: launchpad-dev deploy-launchpad-hosting -launchpad-dev: +launchpad-dev: sync-prototypes @echo "--> Starting local Launchpad server using Firebase Hosting emulator..." @echo " - Generating secure email hashes..." @node scripts/generate-allowed-hashes.js @firebase serve --only hosting:launchpad --project=$(FIREBASE_ALIAS) -deploy-launchpad-hosting: +deploy-launchpad-hosting: sync-prototypes @echo "--> Deploying Internal Launchpad to Firebase Hosting..." @echo " - Generating secure email hashes..." @node scripts/generate-allowed-hashes.js From cf2433774dcd8f928474a8e0b5a6e01163abc4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:37:12 +0900 Subject: [PATCH 6/9] solving problem to move to search from home --- .../navigation/home_navigator.dart | 6 +- .../presentation/pages/worker_home_page.dart | 3 +- .../blocs/shifts/shifts_bloc.dart | 60 +++++++++++++++++++ .../blocs/shifts/shifts_event.dart | 2 + .../src/presentation/pages/shifts_page.dart | 21 +++++-- .../widgets/tabs/find_shifts_tab.dart | 6 ++ backend/dataconnect/functions/seed.gql | 4 +- 7 files changed, 92 insertions(+), 10 deletions(-) diff --git a/apps/mobile/packages/features/staff/home/lib/src/presentation/navigation/home_navigator.dart b/apps/mobile/packages/features/staff/home/lib/src/presentation/navigation/home_navigator.dart index 9774cb07..cd9da6f6 100644 --- a/apps/mobile/packages/features/staff/home/lib/src/presentation/navigation/home_navigator.dart +++ b/apps/mobile/packages/features/staff/home/lib/src/presentation/navigation/home_navigator.dart @@ -31,9 +31,11 @@ extension HomeNavigator on IModularNavigator { /// Optionally provide a [tab] query param (e.g. `find`). void pushShifts({String? tab}) { if (tab == null) { - pushNamed('/worker-main/shifts'); + navigate('/worker-main/shifts'); } else { - pushNamed('/worker-main/shifts?tab=$tab'); + navigate('/worker-main/shifts', arguments: { + 'initialTab': tab, + }); } } diff --git a/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart b/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart index a9b3f169..777cbf14 100644 --- a/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart +++ b/apps/mobile/packages/features/staff/home/lib/src/presentation/pages/worker_home_page.dart @@ -132,8 +132,7 @@ class WorkerHomePage extends StatelessWidget { EmptyStateWidget( message: emptyI18n.no_shifts_today, actionLink: emptyI18n.find_shifts_cta, - onAction: () => - Modular.to.pushShifts(tab: 'find'), + onAction: () => Modular.to.pushShifts(tab: 'find'), ) else Column( diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart index 40ab4f4d..7e3ded00 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart @@ -31,6 +31,7 @@ class ShiftsBloc extends Bloc { on(_onLoadShifts); on(_onLoadHistoryShifts); on(_onLoadAvailableShifts); + on(_onLoadFindFirst); on(_onLoadShiftsForRange); on(_onFilterAvailableShifts); } @@ -113,6 +114,65 @@ class ShiftsBloc extends Bloc { } } + Future _onLoadFindFirst( + LoadFindFirstEvent event, + Emitter emit, + ) async { + if (state is! ShiftsLoaded) { + emit(const ShiftsLoaded( + myShifts: [], + pendingShifts: [], + cancelledShifts: [], + availableShifts: [], + historyShifts: [], + availableLoading: false, + availableLoaded: false, + historyLoading: false, + historyLoaded: false, + searchQuery: '', + jobType: 'all', + )); + } + + final currentState = + state is ShiftsLoaded ? state as ShiftsLoaded : null; + if (currentState != null && currentState.availableLoaded) return; + + if (currentState != null) { + emit(currentState.copyWith(availableLoading: true)); + } + + try { + final availableResult = + await getAvailableShifts(const GetAvailableShiftsArguments()); + final loadedState = state is ShiftsLoaded + ? state as ShiftsLoaded + : const ShiftsLoaded( + myShifts: [], + pendingShifts: [], + cancelledShifts: [], + availableShifts: [], + historyShifts: [], + availableLoading: true, + availableLoaded: false, + historyLoading: false, + historyLoaded: false, + searchQuery: '', + jobType: 'all', + ); + emit(loadedState.copyWith( + availableShifts: _filterPastShifts(availableResult), + availableLoading: false, + availableLoaded: true, + )); + } catch (_) { + if (state is ShiftsLoaded) { + final current = state as ShiftsLoaded; + emit(current.copyWith(availableLoading: false)); + } + } + } + Future _onLoadShiftsForRange( LoadShiftsForRangeEvent event, Emitter emit, diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_event.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_event.dart index 7822a249..d25866e0 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_event.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_event.dart @@ -14,6 +14,8 @@ class LoadHistoryShiftsEvent extends ShiftsEvent {} class LoadAvailableShiftsEvent extends ShiftsEvent {} +class LoadFindFirstEvent extends ShiftsEvent {} + class LoadShiftsForRangeEvent extends ShiftsEvent { final DateTime start; final DateTime end; diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart index f42e6d65..052b5f0c 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart @@ -21,6 +21,7 @@ class ShiftsPage extends StatefulWidget { class _ShiftsPageState extends State { late String _activeTab; DateTime? _selectedDate; + bool _prioritizeFind = false; final ShiftsBloc _bloc = Modular.get(); @override @@ -28,12 +29,22 @@ class _ShiftsPageState extends State { super.initState(); _activeTab = widget.initialTab ?? 'myshifts'; _selectedDate = widget.selectedDate; - _bloc.add(LoadShiftsEvent()); + print('ShiftsPage init: initialTab=$_activeTab'); + _prioritizeFind = widget.initialTab == 'find'; + if (_prioritizeFind) { + _bloc.add(LoadFindFirstEvent()); + } else { + _bloc.add(LoadShiftsEvent()); + } if (_activeTab == 'history') { + print('ShiftsPage init: loading history tab'); _bloc.add(LoadHistoryShiftsEvent()); } if (_activeTab == 'find') { - _bloc.add(LoadAvailableShiftsEvent()); + print('ShiftsPage init: entering find tab (not loaded yet)'); + if (!_prioritizeFind) { + _bloc.add(LoadAvailableShiftsEvent()); + } } } @@ -43,6 +54,7 @@ class _ShiftsPageState extends State { if (widget.initialTab != null && widget.initialTab != _activeTab) { setState(() { _activeTab = widget.initialTab!; + _prioritizeFind = widget.initialTab == 'find'; }); } if (widget.selectedDate != null && widget.selectedDate != _selectedDate) { @@ -86,6 +98,7 @@ class _ShiftsPageState extends State { final bool historyLoaded = (state is ShiftsLoaded) ? state.historyLoaded : false; + final bool blockTabsForFind = _prioritizeFind && !availableLoaded; // Note: "filteredJobs" logic moved to FindShiftsTab // Note: Calendar logic moved to MyShiftsTab @@ -124,7 +137,7 @@ class _ShiftsPageState extends State { "My Shifts", UiIcons.calendar, myShifts.length, - enabled: true, + enabled: !blockTabsForFind, ), const SizedBox(width: 8), _buildTab( @@ -143,7 +156,7 @@ class _ShiftsPageState extends State { UiIcons.clock, historyShifts.length, showCount: historyLoaded, - enabled: baseLoaded, + enabled: !blockTabsForFind && baseLoaded, ), ], ), diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/find_shifts_tab.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/find_shifts_tab.dart index 3bb8c278..4e914b84 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/find_shifts_tab.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/find_shifts_tab.dart @@ -22,6 +22,12 @@ class _FindShiftsTabState extends State { String _searchQuery = ''; String _jobType = 'all'; + @override + void initState() { + super.initState(); + print('FindShiftsTab init: tab entered, data pending'); + } + Widget _buildFilterTab(String id, String label) { final isSelected = _jobType == id; return GestureDetector( diff --git a/backend/dataconnect/functions/seed.gql b/backend/dataconnect/functions/seed.gql index f59eda6f..073861ae 100644 --- a/backend/dataconnect/functions/seed.gql +++ b/backend/dataconnect/functions/seed.gql @@ -5,7 +5,7 @@ mutation seedAll @transaction { data: { id: "dvpWnaBjT6UksS5lo04hfMTyq1q1" email: "legendary@krowd.com" - fullName: "Krow" + fullName: "Krow Payements" role: USER userRole: "BUSINESS" } @@ -26,7 +26,7 @@ mutation seedAll @transaction { id: "ef69e942-d6e5-48e5-a8bc-69d3faa63b2f" businessName: "Krow" userId: "dvpWnaBjT6UksS5lo04hfMTyq1q1" - contactName: "Krow Ops" + contactName: "Krow Payements" email: "legendary@krowd.com" phone: "+1-818-555-0148" address: "5000 San Jose Street, Granada Hills, CA, USA" From 0c44ec4a3940050dc867a00cb00a0ccb383e94d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:44:07 +0900 Subject: [PATCH 7/9] fixing bug of count my shift --- .../lib/src/presentation/blocs/shifts/shifts_bloc.dart | 10 +++++++++- .../src/presentation/blocs/shifts/shifts_state.dart | 5 +++++ .../shifts/lib/src/presentation/pages/shifts_page.dart | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart index 7e3ded00..ff8dd4fd 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_bloc.dart @@ -63,6 +63,7 @@ class ShiftsBloc extends Bloc { availableLoaded: false, historyLoading: false, historyLoaded: false, + myShiftsLoaded: true, searchQuery: '', jobType: 'all', )); @@ -83,6 +84,7 @@ class ShiftsBloc extends Bloc { try { final historyResult = await getHistoryShifts(); emit(currentState.copyWith( + myShiftsLoaded: true, historyShifts: historyResult, historyLoading: false, historyLoaded: true, @@ -129,6 +131,7 @@ class ShiftsBloc extends Bloc { availableLoaded: false, historyLoading: false, historyLoaded: false, + myShiftsLoaded: false, searchQuery: '', jobType: 'all', )); @@ -157,6 +160,7 @@ class ShiftsBloc extends Bloc { availableLoaded: false, historyLoading: false, historyLoaded: false, + myShiftsLoaded: false, searchQuery: '', jobType: 'all', ); @@ -184,7 +188,10 @@ class ShiftsBloc extends Bloc { if (state is ShiftsLoaded) { final currentState = state as ShiftsLoaded; - emit(currentState.copyWith(myShifts: myShiftsResult)); + emit(currentState.copyWith( + myShifts: myShiftsResult, + myShiftsLoaded: true, + )); return; } @@ -198,6 +205,7 @@ class ShiftsBloc extends Bloc { availableLoaded: false, historyLoading: false, historyLoaded: false, + myShiftsLoaded: true, searchQuery: '', jobType: 'all', )); diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_state.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_state.dart index dc670b52..d32e3fba 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_state.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/blocs/shifts/shifts_state.dart @@ -22,6 +22,7 @@ class ShiftsLoaded extends ShiftsState { final bool availableLoaded; final bool historyLoading; final bool historyLoaded; + final bool myShiftsLoaded; final String searchQuery; final String jobType; @@ -35,6 +36,7 @@ class ShiftsLoaded extends ShiftsState { required this.availableLoaded, required this.historyLoading, required this.historyLoaded, + required this.myShiftsLoaded, required this.searchQuery, required this.jobType, }); @@ -49,6 +51,7 @@ class ShiftsLoaded extends ShiftsState { bool? availableLoaded, bool? historyLoading, bool? historyLoaded, + bool? myShiftsLoaded, String? searchQuery, String? jobType, }) { @@ -62,6 +65,7 @@ class ShiftsLoaded extends ShiftsState { availableLoaded: availableLoaded ?? this.availableLoaded, historyLoading: historyLoading ?? this.historyLoading, historyLoaded: historyLoaded ?? this.historyLoaded, + myShiftsLoaded: myShiftsLoaded ?? this.myShiftsLoaded, searchQuery: searchQuery ?? this.searchQuery, jobType: jobType ?? this.jobType, ); @@ -78,6 +82,7 @@ class ShiftsLoaded extends ShiftsState { availableLoaded, historyLoading, historyLoaded, + myShiftsLoaded, searchQuery, jobType, ]; diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart index 052b5f0c..3d86039d 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/pages/shifts_page.dart @@ -98,6 +98,9 @@ class _ShiftsPageState extends State { final bool historyLoaded = (state is ShiftsLoaded) ? state.historyLoaded : false; + final bool myShiftsLoaded = (state is ShiftsLoaded) + ? state.myShiftsLoaded + : false; final bool blockTabsForFind = _prioritizeFind && !availableLoaded; // Note: "filteredJobs" logic moved to FindShiftsTab @@ -137,6 +140,7 @@ class _ShiftsPageState extends State { "My Shifts", UiIcons.calendar, myShifts.length, + showCount: myShiftsLoaded, enabled: !blockTabsForFind, ), const SizedBox(width: 8), From 90bacf6695bb3e843b330b10288d9237b50cbfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Salazar?= <73718835+joshrs23@users.noreply.github.com> Date: Wed, 4 Feb 2026 11:16:54 +0900 Subject: [PATCH 8/9] adding dialog box before delete a hub --- .../presentation/pages/client_hubs_page.dart | 55 +++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart index 85f60930..ab56e3ae 100644 --- a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart +++ b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart @@ -95,10 +95,10 @@ class ClientHubsPage extends StatelessWidget { ).add( ClientHubsIdentifyDialogToggled(hub: hub), ), - onDeletePressed: () => - BlocProvider.of( - context, - ).add(ClientHubsDeleteRequested(hub.id)), + onDeletePressed: () => _confirmDeleteHub( + context, + hub, + ), ), ), ], @@ -221,4 +221,51 @@ class ClientHubsPage extends StatelessWidget { ), ); } + + Future _confirmDeleteHub(BuildContext context, Hub hub) async { + final String hubName = hub.name.isEmpty ? 'this hub' : hub.name; + return showDialog( + context: context, + barrierDismissible: false, + builder: (BuildContext dialogContext) { + return AlertDialog( + title: const Text('Confirm Hub Deletion'), + content: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Are you sure you want to delete "$hubName"?'), + const SizedBox(height: UiConstants.space2), + const Text('This action cannot be undone.'), + const SizedBox(height: UiConstants.space2), + Text( + 'Note that if there are any shifts/orders assigned to this hub we shouldn\'t be able to delete the hub.', + style: UiTypography.footnote1r.copyWith( + color: UiColors.textSecondary, + ), + ), + ], + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(dialogContext).pop(), + child: const Text('Cancel'), + ), + TextButton( + onPressed: () { + Navigator.of(dialogContext).pop(); + BlocProvider.of( + context, + ).add(ClientHubsDeleteRequested(hub.id)); + }, + style: TextButton.styleFrom( + foregroundColor: UiColors.destructive, + ), + child: const Text('Delete'), + ), + ], + ); + }, + ); + } } From 2083b5dbff43fc93485714ab4b9b5f7213343b6f Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 3 Feb 2026 22:59:00 -0500 Subject: [PATCH 9/9] refactor: replace Navigator with Modular for dialog dismissal in client hubs and settings actions --- .../hubs/lib/src/presentation/pages/client_hubs_page.dart | 4 ++-- .../widgets/client_settings_page/settings_actions.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart index ab56e3ae..aa3de3e2 100644 --- a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart +++ b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart @@ -248,15 +248,15 @@ class ClientHubsPage extends StatelessWidget { ), actions: [ TextButton( - onPressed: () => Navigator.of(dialogContext).pop(), + onPressed: () => Modular.to.pop(), child: const Text('Cancel'), ), TextButton( onPressed: () { - Navigator.of(dialogContext).pop(); BlocProvider.of( context, ).add(ClientHubsDeleteRequested(hub.id)); + Modular.to.pop(); }, style: TextButton.styleFrom( foregroundColor: UiColors.destructive, diff --git a/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart b/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart index e3e99090..e044d1ec 100644 --- a/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart +++ b/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart @@ -83,7 +83,7 @@ class SettingsActions extends StatelessWidget { // Cancel button UiButton.secondary( text: t.common.cancel, - onPressed: () => Navigator.of(dialogContext).pop(), + onPressed: () => Modular.to.pop(), ), ], ),