Skip to main content

Admin User Cases: Staffing & Assignment Management

Actors: Susanne (Admin/PM), Johan (Admin/PM + Crew) User Cases: UC-04, UC-05, UC-06


Overview

This document covers the core staffing workflows for PBS:

  • UC-04: Send Assignment Offers (Standard + Direct Booking)
  • UC-05: Review Offer Responses & Negotiate
  • UC-06: Assignment Lifecycle Management

These workflows represent the heart of the PBS system - how admins find crew, make offers, handle responses, and manage the complete assignment lifecycle from confirmation to completion.


UC-04: Send Assignment Offers

Goal: Susanne needs to fill required roles for a project by sending offers to crew members.

Actors: Susanne (Admin), Johan (Admin - can book himself directly)

Preconditions:

  • Project exists with status=draft or active
  • Project has at least one project_function defined (role needed)
  • Profiles exist in the staff directory

System: backend.pbs.com


Scenario A: Standard Offer Flow (Freelancers)

Susanne is staffing "Champions League Final 2025" and needs an EVS Operator.

UI Journey

Step 1: Navigate to Project Staffing

┌─────────────────────────────────────────────────────────────┐
│ backend.pbs.com [Susanne ▼] │
├─────────────────────────────────────────────────────────────┤
│ ← Projects │
│ │
│ Champions League Final 2025 │
│ ESC-2025-042 • Active • May 10-15, 2025 • Madrid │
│ │
│ [Overview] [Staffing] [Travel] [Documents] [Reports] │
│ │
│ ═══ STAFFING ═══════════════════════════════════════════ │
│ │
│ Required Roles │
│ │
│ EVS Operator (Instant Replay) [1/2] │
│ • Work days: 3 • Travel days: 2 │
│ • Target rate: 5,500 SEK/day (work), 2,750 SEK/day (travel)│
│ │
│ Assignments: │
│ ✓ Johan Andersson (confirmed) │
│ ○ [Empty slot] ← Fill this │
│ │
│ [+ Send Offer] [+ Book Directly] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 2: Click "+ Send Offer" → Search for Crew

┌─────────────────────────────────────────────────────────────┐
│ Send Offer: EVS Operator [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Search crew: [Lisa Berg ____________] 🔍 │
│ │
│ Filter by: │
│ ☑ Function: EVS Operator │
│ ☐ Location: Any │
│ ☐ Available May 10-15 │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Results (3): │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 📷 Lisa Berg 🟢 Available │ │
│ │ Senior EVS Operator │ │
│ │ Stockholm • 6 years experience │ │
│ │ Last worked: Ice Hockey Finals (Feb 2025) │ │
│ │ │ │
│ │ ⚠️ Conflict: May 12-14 (Football Match) │ │
│ │ │ │
│ │ [Select Lisa] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 📷 Anders Nilsson 🟢 Available │ │
│ │ Mid EVS Operator │ │
│ │ Gothenburg • 4 years experience │ │
│ │ [Select Anders] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

Conflict Warning: Lisa shows conflict (May 12-14), but Susanne decides she can still ask.

Step 3: Click "Select Lisa" → Offer Details Form

┌─────────────────────────────────────────────────────────────┐
│ Create Offer for Lisa Berg [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ⚠️ Conflict Warning │
│ Lisa has an existing assignment May 12-14 (Football Match). │
│ Continue anyway? [Yes, send offer] [Cancel] │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Role: EVS Operator │
│ Project: Champions League Final 2025 │
│ Dates: May 10-15, 2025 (3 work + 2 travel = 5 days) │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ RATES │
│ │
│ Work day rate: [5500] SEK/day (3 days) │
│ Travel day rate: [2750] SEK/day (2 days) │
│ │
│ Total estimate: 22,000 SEK │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ TRAVEL │
│ │
│ Departure city: [Stockholm ▼] (from Lisa's profile) │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ PERSONAL MESSAGE (shown to Lisa) │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Hi Lisa! │ │
│ │ │ │
│ │ We'd love to have you as EVS Operator for the │ │
│ │ Champions League Final in Madrid, May 10-15. │ │
│ │ │ │
│ │ I know you have the Football Match May 12-14, but │ │
│ │ could you make it work? This is a big one! │ │
│ │ │ │
│ │ Let me know! │ │
│ │ - Susanne │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ INTERNAL NOTES (not visible to Lisa) │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Lisa is our best EVS op. Worth asking despite conflict.│ │
│ │ If she declines, go with Anders. │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Offer valid until: [May 5, 2025 ▼] (soft deadline) │
│ │
│ [Create Offer] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 4: Click "Create Offer" → Offer Created

┌─────────────────────────────────────────────────────────────┐
│ ✓ Offer created successfully │
│ │
│ Next step: Send offer email to Lisa │
│ │
│ [Send Email Now] [Send Later] │
│ │
└─────────────────────────────────────────────────────────────┘

Susanne clicks "Send Email Now" → System sends email to Lisa with link to crew.pbs.com

Step 5: Offers Dashboard Updated

┌─────────────────────────────────────────────────────────────┐
│ backend.pbs.com - Offers Dashboard │
├─────────────────────────────────────────────────────────────┤
│ │
│ Pending Offers (4) │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Lisa Berg • EVS Operator │ │
│ │ Champions League Final • May 10-15 │ │
│ │ 22,000 SEK • Sent today • Expires May 5 │ │
│ │ Status: Pending │ │
│ │ │ │
│ │ [View Details] [Withdraw Offer] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

System Actions (Standard Offer)

  1. Conflict Detection Query:
SELECT * FROM assignments
WHERE profile_id = {lisa_id}
AND (start_date, end_date) OVERLAPS ('2025-05-10', '2025-05-15')
AND current_status NOT IN ('cancelled')
  1. Create Offer:
INSERT INTO assignment_offers (
id, project_function_id, profile_id,
is_direct_booking, -- false
work_day_rate_cents, travel_day_rate_cents, rate_currency,
departure_city, status,
personal_message, pm_notes,
expires_at,
created_by_user_id
) VALUES (
uuid_generate_v4(),
{project_function_id},
{lisa_profile_id},
false, -- Standard offer flow
550000, -- 5,500 SEK in cents
275000, -- 2,750 SEK in cents
'SEK',
'Stockholm',
'pending',
'Hi Lisa! We'd love to have you...',
'Lisa is our best EVS op...',
'2025-05-05',
{susanne_user_id}
)
  1. Send Email (manual trigger):
UPDATE assignment_offers
SET sent_at = NOW()
WHERE id = {offer_id}

Email to Lisa contains:

  • Project name, dates, location
  • Role description
  • Rate breakdown (work/travel days)
  • Total estimate
  • Personal message from Susanne
  • Link: crew.pbs.com/offers/{offer_id}
  • Expires: May 5, 2025 (soft deadline)

Scenario B: Direct Booking (No Offer Flow)

Johan needs to book himself for a project he's managing.

UI Journey

Step 1: Same staffing view, but clicks "+ Book Directly"

┌─────────────────────────────────────────────────────────────┐
│ Direct Booking: Multi-Camera Producer [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Search crew: [Johan ____________] 🔍 │
│ │
│ Results: │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 📷 Johan Andersson (You) 🟢 Available │ │
│ │ Multi-Camera Producer │ │
│ │ Stockholm • 15 years experience │ │
│ │ [Select Johan] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

Step 2: Select Johan → Direct Booking Form

┌─────────────────────────────────────────────────────────────┐
│ Direct Booking: Johan Andersson [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ℹ️ Direct booking - No offer/approval needed │
│ Assignment will be created immediately. │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Role: Multi-Camera Producer │
│ Project: Sports Gala 2025 │
│ Dates: June 1-5, 2025 (3 work + 2 travel = 5 days) │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ RATES │
│ │
│ Work day rate: [7500] SEK/day (3 days) │
│ Travel day rate: [3750] SEK/day (2 days) │
│ │
│ Total: 30,000 SEK │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ JOB DETAILS │
│ │
│ Meals included: ☑ Yes │
│ Parking: [On-site parking available] │
│ Dress code: [Smart casual] │
│ Equipment needed: [Headset will be provided] │
│ Special instructions: [____________________________] │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ [Book Now] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 3: Click "Book Now" → Assignment Created Immediately

┌─────────────────────────────────────────────────────────────┐
│ ✓ Assignment created successfully │
│ │
│ Johan Andersson booked as Multi-Camera Producer │
│ Confirmation email sent to johan@example.com │
│ │
│ [View Assignment] [Close] │
│ │
└─────────────────────────────────────────────────────────────┘

System Actions (Direct Booking)

  1. Create Offer (marked as direct booking):
INSERT INTO assignment_offers (
id, project_function_id, profile_id,
is_direct_booking, -- true
work_day_rate_cents, travel_day_rate_cents, rate_currency,
status, -- will be 'converted' immediately
created_by_user_id
) VALUES (
uuid_generate_v4(),
{project_function_id},
{johan_profile_id},
true, -- Direct booking flag
750000, 375000, 'SEK',
'converted',
{johan_user_id}
)
  1. Create Assignment Immediately:
INSERT INTO assignments (
id, project_function_id, profile_id,
work_day_rate_cents, travel_day_rate_cents, rate_currency,
planned_work_days, planned_travel_days,
meals_included, parking_info, dress_code, equipment_needed,
start_date, end_date,
current_status
) VALUES (
uuid_generate_v4(),
{project_function_id},
{johan_profile_id},
750000, 375000, 'SEK',
3, 2, -- planned days
true, 'On-site parking available', 'Smart casual', 'Headset will be provided',
'2025-06-01', '2025-06-05',
'confirmed'
)
  1. Link Offer to Assignment:
UPDATE assignment_offers
SET assignment_id = {new_assignment_id},
status = 'converted'
WHERE id = {offer_id}
  1. Create Status Log:
INSERT INTO assignment_status_logs (
assignment_id, status, note, changed_by_user_id
) VALUES (
{assignment_id},
'confirmed',
'Direct booking (no offer flow)',
{johan_user_id}
)
  1. Send Confirmation Email to Johan (crew@example.com):
  • "You've been booked for Sports Gala 2025"
  • Dates, role, rate breakdown
  • Job details (meals, parking, etc.)
  • Link to view assignment in crew.pbs.com

Entities Created/Updated

Standard Offer Flow:

  • assignment_offers (1 row): status=pending, is_direct_booking=false
  • Email sent (external system)

Direct Booking Flow:

  • assignment_offers (1 row): status=converted, is_direct_booking=true
  • assignments (1 row): status=confirmed
  • assignment_status_logs (1 row): status=confirmed
  • Confirmation email sent

UC-05: Review Offer Responses & Negotiate

Goal: Susanne reviews staff responses to offers, handles negotiations, and confirms assignments.

Actors: Susanne (Admin)

Preconditions:

  • Offers have been sent (UC-04)
  • Staff have responded via crew.pbs.com

System: backend.pbs.com


Scenario A: Simple Acceptance (v4.7 - Manual PM Confirmation)

Lisa accepted Susanne's offer (one-click from crew portal). PM must now manually confirm the booking before assignment is created.

UI Journey

Step 1: Dashboard Shows Notification

┌─────────────────────────────────────────────────────────────┐
│ backend.pbs.com [Susanne ▼] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Dashboard │
│ │
│ ═══ RECENT ACTIVITY ════════════════════════════════════ │
│ │
│ Needs Confirmation - 2 ⚠️ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ⚠️ Lisa Berg ACCEPTED (needs confirmation) │ │
│ │ EVS Operator • Champions League Final │ │
│ │ 22,000 SEK • Accepted 2 hours ago │ │
│ │ │ │
│ │ [Confirm Booking] [View Details] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ⚠️ Anders Svensson ACCEPTED (needs confirmation) │ │
│ │ Camera Operator • Corporate Event │ │
│ │ 18,500 SEK • Accepted yesterday │ │
│ │ │ │
│ │ [Confirm Booking] [View Details] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Negotiating - 1 │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ 💬 Erik Johansson wants to negotiate │ │
│ │ Sound Mixer • Ice Hockey Finals │ │
│ │ Original: 4,500 SEK • Requested: 5,000 SEK │ │
│ │ │ │
│ │ [Review Request] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Declined - 1 │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ✗ Maria Lindqvist declined │ │
│ │ Graphics Operator • Summer Festival │ │
│ │ Reason: "Unavailable those dates" │ │
│ │ │ │
│ │ [Send to Someone Else] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

Step 2: Click "Confirm Booking" or "View Details"

┌─────────────────────────────────────────────────────────────┐
│ Confirm Booking: Lisa Berg [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ⚠️ CREW ACCEPTED - NEEDS YOUR CONFIRMATION │
│ Lisa accepted this offer: May 3, 2025 14:30 │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ PROJECT: Champions League Final 2025 │
│ ROLE: EVS Operator │
│ DATES: May 10-15, 2025 (3 work + 2 travel days) │
│ │
│ RATES: │
│ • Work day: 5,500 SEK × 3 days = 16,500 SEK │
│ • Travel day: 2,750 SEK × 2 days = 5,500 SEK │
│ • Total: 22,000 SEK │
│ │
│ DEPARTURE: Stockholm │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ ⚠️ CONFLICT WARNING: │
│ Lisa has an existing assignment May 12-14 (Football Match). │
│ Review before confirming. │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ INTERNAL NOTE (optional): │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Verified with Lisa - she can do both projects. │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ [✓ Confirm & Create Assignment] [Edit Offer] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 3: Click "Confirm & Create Assignment" → Assignment Created

┌─────────────────────────────────────────────────────────────┐
│ ✓ Booking Confirmed Successfully │
│ │
│ Lisa Berg confirmed as EVS Operator │
│ Assignment created • Confirmation email sent │
│ │
│ NEXT STEPS: │
│ ☐ Book travel │
│ ☐ Book hotel │
│ ☐ Send road book │
│ │
│ [View Assignment] [Book Travel] [Close] │
│ │
└─────────────────────────────────────────────────────────────┘

System Actions (Manual Confirmation - v4.7)

When Lisa clicked "Accept" in crew.pbs.com, the system:

-- 1. Update offer status to 'accepted' (NOT confirmed yet!)
UPDATE assignment_offers
SET status = 'accepted',
responded_at = NOW()
WHERE id = {offer_id};

-- 2. Log activity
INSERT INTO project_activity_logs (
project_id, event_type, entity_type, entity_id,
description, crew_profile_id
) VALUES (
{project_id},
'offer_accepted',
'assignment_offer',
{offer_id},
'Lisa Berg accepted offer for EVS Operator - PM confirmation needed',
{lisa_profile_id}
);

-- 3. Send notifications
-- - Email to Lisa: "We received your acceptance - PM will confirm shortly"
-- - Email/notification to Susanne: "Lisa accepted your offer - confirm booking"

When PM clicks "Confirm & Create Assignment", the system:

-- 1. Update offer status to 'confirmed'
UPDATE assignment_offers
SET status = 'confirmed'
WHERE id = {offer_id};

-- 2. Create assignment
INSERT INTO assignments (
id, project_function_id, crew_profile_id,
work_day_rate_cents, travel_day_rate_cents, rate_currency,
planned_work_days, planned_travel_days,
departure_city,
start_date, end_date,
current_status
) VALUES (
uuid_generate_v4(),
{project_function_id},
{lisa_profile_id},
550000, 275000, 'SEK',
3, 2,
'Stockholm',
'2025-05-10', '2025-05-15',
'confirmed'
);

-- 3. Link assignment back to project function
UPDATE project_functions
SET assignment_id = {new_assignment_id}
WHERE id = {project_function_id};

-- 4. Link offer to assignment
UPDATE assignment_offers
SET assignment_id = {new_assignment_id}
WHERE id = {offer_id};

-- 5. Create status log
INSERT INTO assignment_status_logs (
assignment_id, status, note, changed_by_user_id
) VALUES (
{assignment_id},
'confirmed',
'PM confirmed crew acceptance',
{susanne_user_id}
);

-- 6. Log activity
INSERT INTO project_activity_logs (
project_id, event_type, entity_type, entity_id,
description, crew_profile_id
) VALUES (
{project_id},
'assignment_confirmed',
'assignment',
{new_assignment_id},
'Susanne confirmed Lisa Berg for EVS Operator',
{lisa_profile_id}
);

Then automatically:

  • Send confirmation email to Lisa: "Your booking is confirmed!"
  • Update project grid view (shows status='confirmed', ✅ Green)

Scenario B: Negotiation

Erik wants to negotiate his rate from 4,500 SEK to 5,000 SEK/day.

UI Journey

Step 1: Dashboard Shows "Negotiating" Status

(See previous dashboard view - Erik shows as "wants to negotiate")

Step 2: Click "Review Request" for Erik

┌─────────────────────────────────────────────────────────────┐
│ Negotiation Request: Erik Johansson [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ 💬 Erik wants to negotiate the rate │
│ │
│ PROJECT: Ice Hockey Finals 2025 │
│ ROLE: Sound Mixer │
│ DATES: March 15-20, 2025 (4 work + 2 travel days) │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ YOUR ORIGINAL OFFER: │
│ • Work day: 4,500 SEK × 4 days = 18,000 SEK │
│ • Travel day: 2,250 SEK × 2 days = 4,500 SEK │
│ • Total: 22,500 SEK │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ ERIK'S MESSAGE: │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Hi Susanne, │ │
│ │ │ │
│ │ Thanks for the offer! I'd love to work on this │ │
│ │ project, but my current rate for finals is 5,000 SEK. │ │
│ │ │ │
│ │ Can we match that? │ │
│ │ │ │
│ │ Thanks, │ │
│ │ Erik │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ ERIK'S COUNTER-OFFER: │
│ • Work day: 5,000 SEK × 4 days = 20,000 SEK │
│ • Travel day: 2,500 SEK × 2 days = 5,000 SEK │
│ • Total: 25,000 SEK (+2,500 SEK) │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ YOUR OPTIONS: │
│ │
│ [Accept Erik's Rate] [Update Offer] [Decline] │
│ │
└─────────────────────────────────────────────────────────────┘

Susanne's Decision: She'll meet him halfway at 4,750 SEK.

Step 3: Click "Update Offer" → Edit Rates

┌─────────────────────────────────────────────────────────────┐
│ Update Offer: Erik Johansson [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Update your offer and discuss with Erik outside the system │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ NEW RATES │
│ │
│ Work day rate: [4750] SEK/day (4 days) │
│ Travel day rate: [2375] SEK/day (2 days) │
│ │
│ New total: 23,750 SEK │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ INTERNAL NOTE │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Agreed 4,750 SEK via phone call. Erik accepted. │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ ℹ️ Note: Have the rate discussion with Erik via phone/email │
│ Then update the offer here with the agreed rate. │
│ │
│ [Save Updated Offer] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 4: After External Discussion, Update Status

After Susanne calls Erik and they agree on 4,750 SEK:

┌─────────────────────────────────────────────────────────────┐
│ Update Offer Status: Erik Johansson [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Offer updated to 4,750 SEK/day │
│ │
│ Did Erik accept the updated rate? │
│ │
│ [Yes, Erik Accepted] [Still Negotiating] [Erik Declined] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 5: Click "Yes, Erik Accepted" → Same Confirmation Flow as Scenario A


System Actions (Negotiation)

  1. When Erik clicked "Negotiate" (in crew.pbs.com):
UPDATE assignment_offers
SET status = 'negotiating',
staff_response = 'Thanks for the offer! I'd love to work...',
counter_work_rate_cents = 500000, -- 5,000 SEK
counter_travel_rate_cents = 250000, -- 2,500 SEK
responded_at = NOW()
WHERE id = {offer_id}
  1. When Susanne updates the offer:
UPDATE assignment_offers
SET work_day_rate_cents = 475000, -- 4,750 SEK (new agreed rate)
travel_day_rate_cents = 237500, -- 2,375 SEK
pm_notes = CONCAT(pm_notes, '\n\nAgreed 4,750 SEK via phone call.')
WHERE id = {offer_id}
  1. When Susanne marks "Erik Accepted":
UPDATE assignment_offers
SET status = 'accepted'
WHERE id = {offer_id}
  1. Then same confirmation flow as Scenario A

Entities Created/Updated

Acceptance Flow:

  • assignment_offers: status=accepted → status=converted
  • assignments: New row created (status=confirmed)
  • assignment_status_logs: First entry (status=confirmed)

Negotiation Flow:

  • assignment_offers: status=negotiating → rates updated → status=accepted → status=converted
  • assignments: New row created (status=confirmed)
  • assignment_status_logs: First entry (status=confirmed)

UC-06: Assignment Lifecycle Management

Goal: Susanne manages an assignment through its complete lifecycle from confirmation to project completion and financial finalization.

Actors: Susanne (Admin)

Preconditions:

  • Assignment exists (created via UC-05)
  • Project is active

System: backend.pbs.com


Lifecycle Stages

confirmed → contract_sent → contract_signed → travel_booked →
hotel_booked → active → completed → [financial finalization]

Stage 1: Post-Confirmation Tasks

After Lisa's assignment is confirmed, Susanne needs to handle travel, contract, hotel.

UI Journey

Step 1: View Assignment Details

┌─────────────────────────────────────────────────────────────┐
│ Assignment: Lisa Berg │
│ EVS Operator • Champions League Final 2025 │
├─────────────────────────────────────────────────────────────┤
│ │
│ [Overview] [Travel] [Hotel] [Documents] [Status] │
│ │
│ ═══ OVERVIEW ═══════════════════════════════════════════ │
│ │
│ STATUS: ✓ Confirmed │
│ │
│ Timeline: │
│ ✓ Confirmed May 3, 14:45 (by Susanne) │
│ ○ Contract sent │
│ ○ Travel booked │
│ ○ Hotel booked │
│ ○ Active │
│ ○ Completed │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ ASSIGNMENT DETAILS │
│ │
│ Dates: May 10-15, 2025 │
│ Work days: 3 days @ 5,500 SEK = 16,500 SEK │
│ Travel days: 2 days @ 2,750 SEK = 5,500 SEK │
│ Total: 22,000 SEK │
│ │
│ Departure: Stockholm │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ NEXT ACTIONS │
│ │
│ ☐ Generate contract │
│ ☐ Book travel from Stockholm │
│ ☐ Book hotel in Madrid │
│ │
│ [Generate Contract] [Book Travel] [Book Hotel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 2: Generate Contract

Click "Generate Contract" → System generates PDF from template

┌─────────────────────────────────────────────────────────────┐
│ Generate Contract [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Contract preview: │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ SERVICE AGREEMENT │ │
│ │ │ │
│ │ Between: NCP (New Century Production) │ │
│ │ And: Lisa Berg (personnummer: XXX) │ │
│ │ │ │
│ │ Project: Champions League Final 2025 │ │
│ │ Role: EVS Operator │ │
│ │ Dates: May 10-15, 2025 │ │
│ │ │ │
│ │ Compensation: │ │
│ │ - Work days: 3 × 5,500 SEK = 16,500 SEK │ │
│ │ - Travel days: 2 × 2,750 SEK = 5,500 SEK │ │
│ │ - Total: 22,000 SEK │ │
│ │ │ │
│ │ [Standard terms and conditions...] │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ [Edit Contract] [Download PDF] [Send to Lisa] │
│ │
└─────────────────────────────────────────────────────────────┘

Click "Send to Lisa" → PDF sent via email + stored in documents table


Stage 2: Book Travel

Step 1: Click "Travel" Tab

┌─────────────────────────────────────────────────────────────┐
│ Assignment: Lisa Berg - Travel │
├─────────────────────────────────────────────────────────────┤
│ │
│ ═══ TRAVEL BOOKINGS ═════════════════════════════════════ │
│ │
│ No travel booked yet. │
│ │
│ [+ Add Outbound Travel] [+ Add Return Travel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 2: Click "+ Add Outbound Travel"

┌─────────────────────────────────────────────────────────────┐
│ Add Travel Booking [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ TYPE: [Flight ▼] │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ FROM │
│ City: [Stockholm] │
│ Airport: [ARN - Arlanda ▼] │
│ Terminal: [5] │
│ │
│ TO │
│ City: [Madrid] │
│ Airport: [MAD - Barajas ▼] │
│ Terminal: [4] │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ FLIGHT DETAILS │
│ │
│ Departure: [May 10, 2025] [08:30] │
│ Arrival: [May 10, 2025] [12:45] │
│ │
│ Flight number: [SK1234] │
│ Carrier: [SAS] │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ BOOKING │
│ │
│ Reference: [ABC123] │
│ Cost: [3500] SEK │
│ │
│ Notes: │
│ [_____________________________________________] │
│ │
│ [Save Travel Booking] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

After saving, same form for return flight.


Stage 3: Book Hotel

Similar structured form for hotel booking (hotel name, address, check-in/out dates + times, booking reference, cost).


Stage 4: Generate Road Book

After travel + hotel are entered, Susanne can generate road book.

┌─────────────────────────────────────────────────────────────┐
│ Generate Road Book [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Road book will include: │
│ │
│ ✓ Project details (Champions League Final, Madrid) │
│ ✓ Venue address (Estadio Santiago Bernabéu) │
│ ✓ Outbound flight (SAS SK1234, May 10, 08:30) │
│ ✓ Return flight (SAS SK1235, May 15, 18:00) │
│ ✓ Hotel (Hotel Princesa Plaza, check-in May 10 15:00) │
│ ✓ Contact numbers (Susanne, venue coordinator) │
│ │
│ Preview: │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ ROAD BOOK │ │
│ │ Champions League Final 2025 │ │
│ │ │ │
│ │ CREW MEMBER │ │
│ │ Lisa Berg • EVS Operator │ │
│ │ [Photo] │ │
│ │ │ │
│ │ OUTBOUND TRAVEL - May 10, 2025 │ │
│ │ Flight: SAS SK1234 │ │
│ │ Stockholm ARN Terminal 5 → Madrid MAD Terminal 4 │ │
│ │ Departure: 08:30 | Arrival: 12:45 │ │
│ │ Booking ref: ABC123 │ │
│ │ │ │
│ │ HOTEL │ │
│ │ Hotel Princesa Plaza │ │
│ │ Address: Calle de la Princesa 40, Madrid │ │
│ │ Check-in: May 10, 15:00 | Check-out: May 15, 11:00 │ │
│ │ Booking ref: HTL789 │ │
│ │ │ │
│ │ VENUE │ │
│ │ Estadio Santiago Bernabéu │ │
│ │ Av. de Concha Espina 1, Madrid │ │
│ │ │ │
│ │ CONTACTS │ │
│ │ Susanne (PM): +46 70 123 4567 │ │
│ │ Venue coordinator: +34 91 234 5678 │ │
│ │ │ │
│ │ RETURN TRAVEL - May 15, 2025 │ │
│ │ Flight: SAS SK1235 │ │
│ │ Madrid MAD Terminal 4 → Stockholm ARN Terminal 5 │ │
│ │ Departure: 18:00 | Arrival: 22:15 │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
│ [Generate PDF] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

Road book generated from structured data + stored in documents table + sent to Lisa.


Stage 5: During Project (Active Status)

When project start date arrives, Susanne can mark assignment as "active".

Simple status update: Assignment details → "Mark as Active" button


Stage 6: Project Completion & Financial Finalization

Most critical for MVP invoicing foundation.

UI Journey

Step 1: Mark Project as Completed

┌─────────────────────────────────────────────────────────────┐
│ Project: Champions League Final 2025 │
│ Status: Active │
├─────────────────────────────────────────────────────────────┤
│ │
│ Project finished? Mark as completed to review assignments │
│ and finalize financials. │
│ │
│ [Mark Project as Completed] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 2: Click "Mark as Completed" → Completion Review Screen

┌─────────────────────────────────────────────────────────────┐
│ Complete Project: Champions League Final 2025 │
├─────────────────────────────────────────────────────────────┤
│ │
│ Review each assignment and adjust actual days/rates │
│ │
│ ═══ ASSIGNMENTS (5 total) ═══════════════════════════════ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Lisa Berg • EVS Operator │ │
│ │ │ │
│ │ ORIGINAL BOOKING: │ │
│ │ • 3 work days @ 5,500 SEK = 16,500 SEK │ │
│ │ • 2 travel days @ 2,750 SEK = 5,500 SEK │ │
│ │ • Total: 22,000 SEK │ │
│ │ │ │
│ │ ACTUAL COMPLETION: │ │
│ │ Work days: [2] (Lisa left 1 day early) │ │
│ │ Travel days: [2] │ │
│ │ Work rate: [5500] SEK/day │ │
│ │ Travel rate: [2750] SEK/day │ │
│ │ │ │
│ │ Adjustment: [0] SEK │ │
│ │ Reason: [Left May 14 due to family emergency] │ │
│ │ │ │
│ │ NEW TOTAL: 16,500 SEK │ │
│ │ │ │
│ │ [Save] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Johan Andersson • Multi-Camera Producer │ │
│ │ │ │
│ │ ORIGINAL BOOKING: │ │
│ │ • 3 work days @ 7,500 SEK = 22,500 SEK │ │
│ │ • 2 travel days @ 3,750 SEK = 7,500 SEK │ │
│ │ • Total: 30,000 SEK │ │
│ │ │ │
│ │ ACTUAL COMPLETION: │ │
│ │ Work days: [5] (arrived 2 days early for prep) │ │
│ │ Travel days: [2] │ │
│ │ Work rate: [7500] SEK/day │ │
│ │ Travel rate: [3750] SEK/day │ │
│ │ │ │
│ │ Adjustment: [+5000] SEK (bonus) │ │
│ │ Reason: [Extra prep days + excellent work] │ │
│ │ │ │
│ │ NEW TOTAL: 50,000 SEK │ │
│ │ │ │
│ │ [Save] │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ [Continue with 3 more assignments...] │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ After reviewing all assignments: │
│ │
│ [Finalize Financials] (locks all assignments) │
│ │
└─────────────────────────────────────────────────────────────┘

Step 3: Click "Finalize Financials"

┌─────────────────────────────────────────────────────────────┐
│ Finalize Financials [✕ Close] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ⚠️ Are you sure? │
│ │
│ Finalizing will: │
│ • Lock all assignment amounts │
│ • Prevent further edits to days/rates/adjustments │
│ • Prepare data for future invoicing │
│ │
│ Original project budget: 150,000 SEK │
│ Final actual cost: 148,500 SEK │
│ Under budget: 1,500 SEK ✓ │
│ │
│ [Yes, Finalize] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────┘

Step 4: Click "Yes, Finalize" → Project Locked

┌─────────────────────────────────────────────────────────────┐
│ ✓ Financials finalized │
│ │
│ All assignments locked. Ready for invoicing. │
│ │
│ [View Final Budget Report] [Close] │
│ │
└─────────────────────────────────────────────────────────────┘

System Actions (Lifecycle Management)

Contract Sent:

-- Generate contract PDF (external service)
-- Store in documents table
INSERT INTO documents (
documentable_type, documentable_id,
doc_type, file_url, file_name,
uploaded_by_user_id
) VALUES (
'Assignment', {assignment_id},
'contract', 's3://contracts/lisa-berg-cl-final.pdf', 'Contract - Lisa Berg.pdf',
{susanne_user_id}
)

-- Update status
INSERT INTO assignment_status_logs (
assignment_id, status, changed_by_user_id
) VALUES ({assignment_id}, 'contract_sent', {susanne_user_id})

UPDATE assignments SET current_status = 'contract_sent' WHERE id = {assignment_id}

Travel Booked:

INSERT INTO travel_bookings (
assignment_id, type,
from_city, from_airport_code, from_terminal,
to_city, to_airport_code, to_terminal,
departure_at, arrival_at,
flight_number, carrier,
booking_reference, cost_cents, cost_currency
) VALUES (
{assignment_id}, 'flight',
'Stockholm', 'ARN', '5',
'Madrid', 'MAD', '4',
'2025-05-10 08:30', '2025-05-10 12:45',
'SK1234', 'SAS',
'ABC123', 350000, 'SEK'
)

-- Same for return flight

-- Update status
INSERT INTO assignment_status_logs (
assignment_id, status, changed_by_user_id
) VALUES ({assignment_id}, 'travel_booked', {susanne_user_id})

UPDATE assignments SET current_status = 'travel_booked' WHERE id = {assignment_id}

Hotel Booked:

INSERT INTO hotel_bookings (
assignment_id,
hotel_name, hotel_address, hotel_phone,
check_in_date, check_in_time, check_out_date, check_out_time,
nights, booking_reference,
total_cost_cents, cost_currency
) VALUES (
{assignment_id},
'Hotel Princesa Plaza', 'Calle de la Princesa 40, Madrid', '+34 91 234 5678',
'2025-05-10', '15:00', '2025-05-15', '11:00',
5, 'HTL789',
500000, 'SEK'
)

-- Update status
INSERT INTO assignment_status_logs (
assignment_id, status, changed_by_user_id
) VALUES ({assignment_id}, 'hotel_booked', {susanne_user_id})

UPDATE assignments SET current_status = 'hotel_booked' WHERE id = {assignment_id}

Road Book Generated:

-- Generate PDF from:
-- - projects table (venue name, address)
-- - travel_bookings (flight details)
-- - hotel_bookings (hotel details)
-- - crew_profiles.photo_url (Lisa's photo)

-- Store in documents
INSERT INTO documents (
documentable_type, documentable_id,
doc_type, file_url, file_name,
uploaded_by_user_id
) VALUES (
'Assignment', {assignment_id},
'road_book', 's3://roadbooks/lisa-berg-cl-final.pdf', 'Road Book - Lisa Berg.pdf',
{susanne_user_id}
)

Project Completion & Financial Finalization:

-- Mark project as completed
UPDATE projects
SET status = 'completed'
WHERE id = {project_id}

-- Update Lisa's assignment (left early)
UPDATE assignments
SET actual_work_days = 2, -- Was 3, now 2
actual_travel_days = 2, -- Same
actual_work_rate_cents = 550000, -- Same rate
actual_travel_rate_cents = 275000, -- Same rate
adjustment_amount_cents = 0,
adjustment_reason = 'Left May 14 due to family emergency'
WHERE id = {lisa_assignment_id}

-- Update Johan's assignment (worked extra days + bonus)
UPDATE assignments
SET actual_work_days = 5, -- Was 3, now 5
actual_travel_days = 2, -- Same
actual_work_rate_cents = 750000, -- Same rate
actual_travel_rate_cents = 375000, -- Same rate
adjustment_amount_cents = 500000, -- +5,000 SEK bonus
adjustment_reason = 'Extra prep days + excellent work'
WHERE id = {johan_assignment_id}

-- Finalize project financials (LOCK)
UPDATE projects
SET financials_finalized = true,
financials_finalized_at = NOW(),
financials_finalized_by_user_id = {susanne_user_id}
WHERE id = {project_id}

-- Mark all assignments as completed
INSERT INTO assignment_status_logs (
assignment_id, status, note, changed_by_user_id
)
SELECT id, 'completed', 'Project completed and financials finalized', {susanne_user_id}
FROM assignments
WHERE project_function_id IN (
SELECT id FROM project_functions WHERE project_id = {project_id}
)

UPDATE assignments
SET current_status = 'completed'
WHERE project_function_id IN (
SELECT id FROM project_functions WHERE project_id = {project_id}
)

Entities Created/Updated (Complete Lifecycle)

Contract Phase:

  • documents (1 row): type=contract
  • assignment_status_logs (1 row): status=contract_sent
  • assignments: current_status updated

Travel Phase:

  • travel_bookings (2 rows): outbound + return flights
  • assignment_status_logs (1 row): status=travel_booked
  • assignments: current_status updated

Hotel Phase:

  • hotel_bookings (1 row)
  • assignment_status_logs (1 row): status=hotel_booked
  • assignments: current_status updated

Road Book Phase:

  • documents (1 row): type=road_book

Active Phase:

  • assignment_status_logs (1 row): status=active
  • assignments: current_status updated

Completion Phase:

  • projects: status=completed, financials_finalized=true
  • assignments: actual_* fields updated, adjustment_* fields set
  • assignment_status_logs (1 row per assignment): status=completed
  • assignments: current_status=completed

Summary: Complete Staffing Flow

UC-04: Send Offers
├─→ Standard Offer: Create offer → Manual email → Wait for response
└─→ Direct Booking: Create offer + assignment immediately

UC-05: Review Responses
├─→ Accepted: Susanne confirms → Assignment created
├─→ Negotiating: Discuss externally → Update rate → Confirm
└─→ Declined: Send offer to someone else

UC-06: Manage Assignment
├─→ Contract: Generate → Send → Mark as sent
├─→ Travel: Book flights → Mark as booked
├─→ Hotel: Book hotel → Mark as booked
├─→ Road Book: Generate from structured data
├─→ Active: Project starts
└─→ Completed: Review actual days/rates → Adjust → Finalize financials (LOCK)

Key MVP Features Demonstrated

  1. Dual workflow: Standard offers + Direct booking
  2. Conflict detection: Soft warnings with override
  3. Negotiation: External discussion, system tracks final agreed rate
  4. Structured travel/hotel data: Powers road book generation
  5. Financial completion: Track actual vs planned, adjustments, lock mechanism
  6. Status tracking: Complete audit trail via assignment_status_logs


Database Tables Used

  • assignment_offers - Offers sent to staff
  • assignments - Confirmed bookings
  • assignment_status_logs - Lifecycle tracking
  • travel_bookings - Flight/train details
  • hotel_bookings - Hotel details
  • documents - Contracts, road books
  • projects - Financial finalization
  • profiles - Staff directory
  • project_functions - Required roles