Travel list: adhyayan session + round-trip#153
Conversation
…list Replaces the self-reported "Attending Adhyayan" Yes/No column with the real study-session registration (name + date range) returned by the backend, adds a Round Trip badge column, and removes the now-ignored leaving_post_adhyayan edit control from the transaction edit modal.
|
Claude finished @vendz's task in 3m 1s —— View job Review of PR #153 — Travel list: adhyayan session + round-trip
SummaryReviewed the diff against One issue found, posted as an inline comment:
Everything else (badge markup for "Round trip", modal payload changes, en-dash date range formatting) looked correct and consistent with the rest of the file. |
| <td> | ||
| ${b.leaving_post_adhyayan == 1 | ||
| ? 'Yes' | ||
| : 'No'} | ||
| ${b.adhyayan | ||
| ? `${b.adhyayan.name} (${formatDate(b.adhyayan.start_date)}–${formatDate(b.adhyayan.end_date)})` | ||
| : '—'} | ||
| </td> | ||
|
|
||
| <td> | ||
| ${b.trip_group_id | ||
| ? '<span class="badge bg-info">Round trip</span>' | ||
| : '—'} | ||
| </td> |
There was a problem hiding this comment.
Excel export will show [object Object] for the new Adhyayan column.
The "Download Excel" button (setupDownloadButton, line ~416) exports the raw travelReport objects using data-key as the field name:
formattedRow[label] = row[key] ?? '';Since data-key="adhyayan" now points at b.adhyayan, which is an object ({name, start_date, end_date}) rather than a scalar, XLSX.utils.json_to_sheet will stringify it as "[object Object]" in the exported spreadsheet. Previously leaving_post_adhyayan was a plain 0/1 value, so this regression is specific to this change.
Similarly, the "Round Trip" column will export the raw trip_group_id value instead of the "Round trip"/"—" text shown in the UI — a smaller inconsistency, but still a mismatch between what's displayed and what's exported.
Suggested fix: precompute display-friendly string fields (e.g. adhyayan_label, trip_group_label) on each booking when travelReport is populated, and point the data-key attributes at those instead of the raw nested/id fields, so the export mirrors what's rendered on screen.
…s display strings, not [object Object]/raw id
|
Claude finished @vendz's task in 1m 30s —— View job Review of PR #153 — Travel list: adhyayan session + round-trip (updated after new commit)
SummaryCommit
No new bugs introduced by the fix. One very minor, non-blocking observation: the |
|
Claude finished @vendz's task in 1m 20s —— View job Review of PR #153 — Travel list: adhyayan session + round-trip (re-review after commit
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @vendz's task in 1m 3s —— View job Review of PR #153 — Travel list: adhyayan session + round-trip
SummaryRe-reviewed after the latest commit
All previously-flagged issues remain resolved:
No other issues found in this round. |
| <option value="Friend">Friend</option> | ||
| <option value="Driver">Driver</option> | ||
| <option value="VIP">VIP</option> | ||
| <option value="Vendor">Vendor</option> |
There was a problem hiding this comment.
This <option value="Vendor">Vendor</option> is added inside an HTML comment block — the surrounding guestType select (lines 189-200) is entirely wrapped in ``, so this change has no effect on the rendered page. The equivalent addition in admin/card/createCard.html:194 is live since that file's `guest_type` select isn't commented out.
If Vendor should actually be selectable on the update-card form, the whole commented-out block needs to be uncommented first (which is a bigger change than adding one option) — otherwise this edit can be dropped since it's a no-op.
Travel list: adhyayan session + round-trip
Staff dashboard changes for the travel feature (pairs with the aashray-backend PR).
What's included
—.leaving_post_adhyayanedit control from the booking edit modal.Requires the aashray-backend PR (returns
adhyayan+trip_group_idon the travel list). Header/row column counts kept in sync.🤖 Generated with Claude Code