Skip to content

Commit 58eff48

Browse files
Merge pull request #368 from icefoganalytics/issue-314/normalize-travel-desk-hotels-components
Issue 314: Normalize Travel Desk Hotels Component Architecture
2 parents 8a686f7 + 86c4aa7 commit 58eff48

40 files changed

+1743
-1901
lines changed

agents/workflows/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
This directory contains reusable AI workflows for the Travel Authorization system.
44

5+
## Intent
6+
7+
These workflows exist to ensure consistent, high-quality output from AI agents. Each workflow:
8+
- Defines a specific transformation or task with clear inputs and outputs
9+
- Provides exact patterns to follow (not guidelines to interpret)
10+
- Includes decision rules for edge cases
11+
12+
**For AI Agents:** Follow steps literally. When unsure, prefer the explicit example over inference.
13+
514
## Available Workflows
615

716
### [pull-request-management.md](pull-request-management.md)
@@ -119,4 +128,4 @@ Complete workflow for converting legacy dialog-based request tables to modern pa
119128

120129
---
121130

122-
**Last Updated:** 2026-01-14
131+
**Last Updated:** 2026-01-15

agents/workflows/convert-dialog-table-to-page-pattern.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,32 @@ auto_execution_mode: 1
55

66
# Convert Dialog-Based Table to Page Pattern Workflow
77

8-
**Purpose:** Convert legacy dialog-based request tables (like `RentalCarRequestTable.vue`) to a modern page-based edit pattern.
8+
## Intent
99

10-
**Scope:** Frontend Vue component refactoring
10+
**WHY this workflow exists:** Legacy components use inline dialogs for create/edit which causes:
11+
- Complex state management (dialog open/close, form data, validation)
12+
- Poor URL navigation (no bookmarkable edit links)
13+
- Mixed concerns (table + forms in one component)
14+
- Difficult testing (can't navigate directly to edit state)
1115

12-
**Reference Files:**
13-
- `TravelDeskFlightRequestsEditCard.vue` (EditTableCard pattern)
14-
- `TravelDeskFlightRequestsEditTable.vue` (EditTable pattern)
16+
The page-based pattern separates concerns: tables display data, pages handle forms.
17+
18+
**WHAT this workflow produces:** Four components that work together:
19+
1. **EditCard** - Wrapper with title and "New" button (navigates to NewPage)
20+
2. **EditDataTable** - Server-paginated table with edit/delete actions (edit navigates to EditPage)
21+
3. **NewPage** - Standalone page for creating new items
22+
4. **EditPage** - Standalone page for editing existing items
23+
24+
**Decision Rules:**
25+
- **Props from router are strings:** Route params are always strings. Create `...AsNumber` computed for API calls.
26+
- **Where to put components:** EditCard/EditDataTable go in `components/{model-plural}/`. NewPage/EditPage go in `pages/{parent-path}/{model-plural}/`.
27+
- **Parent ID handling:** For child entities, NewPage receives parentId. EditPage may only need the modelId (depends on whether you need parent context).
28+
- **returnTo vs fallbackRoute:** Use returnTo prop when the caller specifies where to go back. Use fallbackRoute when determining from route history.
29+
30+
## Reference Files
31+
32+
- `TravelDeskFlightRequestsEditCard.vue` (EditCard pattern)
33+
- `TravelDeskFlightRequestsEditDataTable.vue` (EditDataTable pattern)
1534
- `TravelPreApprovalEditPage.vue` (EditPage pattern)
1635
- `TravelPreApprovalNewPage.vue` (NewPage pattern)
1736

@@ -763,6 +782,6 @@ When the model belongs to a parent entity, nest routes under the parent's path:
763782

764783
---
765784

766-
**Workflow Version:** 1.0
767-
**Last Updated:** 2026-01-12
785+
**Workflow Version:** 1.1
786+
**Last Updated:** 2026-01-15
768787
**Reference Files:** `TravelDeskFlightRequestsEditCard.vue`, `TravelDeskFlightRequestsEditTable.vue`, `TravelPreApprovalEditPage.vue`, `TravelPreApprovalNewPage.vue`

0 commit comments

Comments
 (0)