fix: address ask-user findings from review

- Move unit loading to use real /api/tickets/units endpoint
- Match unit code format to backend seed (0101E style)
- Send unit_id in create ticket payload
- Fix tech IDs to match seed order (9-15 for Prosper-Afful)
- Add customer_name and phone fields to TicketCreate schema
- Map form customer_name/phone into API payload
This commit is contained in:
root
2026-07-23 19:08:49 +00:00
parent 3dc383e62d
commit 7fab1ede51
4 changed files with 48 additions and 17 deletions
+7 -6
View File
@@ -334,12 +334,13 @@
// Users list not exposed via API directly, so use a known list
// In a real system we'd have GET /api/users
this.technicians = [
{ id: 8, full_name: 'Prosper' },
{ id: 9, full_name: 'Sam' },
{ id: 10, full_name: 'Steven' },
{ id: 11, full_name: 'Junior (Samuel)' },
{ id: 12, full_name: 'Francis' },
{ id: 13, full_name: 'Desmond Afful' },
{ id: 9, full_name: 'Prosper' },
{ id: 10, full_name: 'Sam' },
{ id: 11, full_name: 'Steven' },
{ id: 12, full_name: 'Junior (Samuel)' },
{ id: 13, full_name: 'Francis' },
{ id: 14, full_name: 'Desmond Afful' },
{ id: 15, full_name: 'Afful' },
];
} catch (e) { console.error('Tech load error', e); }
},