Skip to content

Wrap up timeline, fix bugs on inventory list - #85

Merged
kflemin merged 1 commit into
mainfrom
punchlist
Aug 21, 2026
Merged

Wrap up timeline, fix bugs on inventory list#85
kflemin merged 1 commit into
mainfrom
punchlist

Conversation

@kflemin

@kflemin kflemin commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@kflemin
kflemin requested a lite review from Copilot August 21, 2026 04:37
@kflemin
kflemin merged commit b4760c9 into main Aug 21, 2026
3 checks passed
@kflemin
kflemin deleted the punchlist branch August 21, 2026 04:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the inventory detail “Timeline” view and includes a handful of inventory list/create fixes to stabilize behavior and align request/response shapes with the backend.

Changes:

  • Align inventory create payload fields to *_id and normalize create responses to a consistent view_id.
  • Improve inventory list grid UX by pinning selection/shortcut/access-level columns and add error-swallowing in the list fetch pipeline.
  • Build out the inventory detail timeline UI (cycle-grouped event accordion) and add new i18n entries.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/app/modules/inventory/inventory.types.ts Renames inventory create config fields to access_level_instance_id / cycle_id.
src/app/modules/inventory/create/inventory-create.component.ts Updates create payload to use the renamed *_id fields.
src/app/modules/inventory-list/list/inventory.component.ts Adds catchError(() => of(null)) so inventory loads don’t break the stream on error.
src/app/modules/inventory-list/list/grid/grid.component.ts Pins selection + shortcut + access-level columns to keep user-pinned columns positioned consistently.
src/app/modules/inventory-detail/timeline/timeline.types.ts Introduces timeline event/cycle response types.
src/app/modules/inventory-detail/timeline/timeline.component.ts Implements timeline data loading + grouping + sorting logic.
src/app/modules/inventory-detail/timeline/timeline.component.html Adds timeline UI with Material expansion panels and event detail rendering.
src/@seed/api/inventory/inventory.service.ts Switches inventory create POST URL and normalizes returned view_id across property/taxlot responses.
public/i18n/fr_CA.json Adds new translation keys/values.
public/i18n/es.json Adds new translation keys/values.
public/i18n/en_US.json Adds new translation keys/values.
Suppressed comments (1)

src/app/modules/inventory-detail/timeline/timeline.component.html:64

  • Hard-coded gray background utilities don't follow the app's semantic theme tokens, and can look inconsistent across light/dark themes. Prefer theme-aware tokens like bg-card / text-secondary, etc.
                  <div class="rounded bg-gray-50 p-3 text-sm dark:bg-gray-800">

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +54 to +57
this._organizationService.currentOrganization$.pipe().subscribe((org) => {
this.orgId = org.org_id
this.loadData()
})
Comment on lines +67 to +71
const inventoryObj = this.type === 'taxlots' ? view.taxlot : view.property
this.propertyId = inventoryObj?.id
this.cycles = cycles
this.cycleNameById = cycles.reduce<Record<number, string>>((acc, c) => ({ ...acc, [c.id]: c.name }), {})
this.orgUsers = users
Comment on lines +73 to +80
this._httpClient
.get<TimelineEventsResponse>(`/api/v3/${this.type}/${this.propertyId}/events/`, {
params: { organization_id: this.orgId },
})
.subscribe((response) => {
this.buildTimeline(response.data ?? [])
this.loading = false
})
Comment on lines +12 to +16
<div class="text-secondary text-sm">{{ timeline.length }} cycle(s)</div>
<div class="flex items-center gap-3">
<span class="text-secondary text-sm">Sort:</span>
<button class="text-sm" (click)="toggleSort()" mat-stroked-button>
{{ sortDesc ? 'Oldest to Newest' : 'Newest to Oldest' }}

<!-- NoteEvent detail -->
@if (event.event_type === 'NoteEvent' && event.note) {
<div class="rounded bg-gray-50 p-3 text-sm dark:bg-gray-800">
Comment thread public/i18n/en_US.json
"Create new data set": "Create new data set",
"Create new label": "Create new label",
"Create new sub-organization": "Create new sub-organization",
"Create new {{type}}": "Create New {{type}}",
Comment thread public/i18n/fr_CA.json
"Cycle Name Benchmark Field": "Nom du cycle Champ de référence",
"Cycle Selection": "Sélection des cycles",
"Cycle Start": "Démarrage du cycle",
"Cycle is required": "Le vélo est nécessaire",
Comment thread public/i18n/es.json
"Create new label": "Crear nueva etiqueta",
"Create new sub-organization": "Crear una nueva suborganización",
"Create new {{type}}": "Crear Nuevo {{type}}",
"Create {{ali}} {{type}} in Cycle {{cycle}}?": "Crear {{ali}} {{type}} en ciclo {{cycle}}¿",
this.buildTimeline(response.data ?? [])
this.loading = false
})
})
Comment on lines +125 to +128
if (d) return `${d} days`
if (h) return `${h} hours`
if (m) return `${m} minutes`
return `${s} seconds`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants