[Issue]: Add a PO line items units entry for months and year #44
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#44
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Raised by
Hardik Singh(admin) (admin@pelagiamarine.com, ADMIN) — via portal Report Issue button
Description
Currently the units dropdown only has days, need months and year(s) also as an option
Priority
P0 — Critical (broken / blocking)
Context
/dashboardClaude triage
Triage — Issue #44: Add PO line-item unit options for months and year(s)
Interpretation
The PO line-items editor exposes a fixed Unit of Measure (UoM) dropdown. The reporter
(admin) wants time-based duration units beyond the existing
day— specifically month(s)and year(s) — to be selectable. (The issue says "only has days", but the dropdown actually
carries many units, e.g. pc/kg/L/hr/day; the real ask is simply that the time/duration units
are incomplete —
hranddayexist, butweek/month/yeardo not.) This is an enhancementto an existing list, not a broken behaviour.
Action items
App/components/po/po-line-items-editor.tsx, append new entries to theUOM_OPTIONSarray (around lines 10–27), e.g.:
{ value: "month", label: "month — Month" }{ value: "year", label: "year — Year" }(Optionally add
weekfor completeness, but stick to the requestedmonth/yearunlessproduct confirms otherwise.)
directly into the
<select>at lines 396–398.Files / areas involved
App/components/po/po-line-items-editor.tsx— the only definition and only consumer ofUOM_OPTIONS(confirmed via repo-wide grep; no duplicate list elsewhere).Why this is safe / verifiable
unitfield is validated as a free-form string only —lib/validations/po.ts:7(
unit: z.string().min(1, "Unit is required")). There is no Zod enum, no Prisma enum, andno DB migration tied to UoM values, so new options are accepted by validation and persistence
with no schema work.
POLineItem; display (po-detail.tsxshowsitem.unitverbatim)and exports are unaffected.
pnpm type-checkandpnpm lint. A unit testasserting the new options appear in the dropdown could be added (
tests/unit/po-line-items-editor.test.tsxexists per CLAUDE.md command examples).
Open questions (non-blocking)
month/year(consistent with existing singularday,hr) — assumed. Reporter wrote "year(s)"/"months"; recommend keeping values singular.week. Default: add only what was requested (month,year).Routing rationale: Single-file append to a free-string UoM list with no enum/migration/permission/money impact and type-check + lint verifiability — safe for an unattended claude-queue run.
Routing:
claude-queue| Type:feature[Claude] Started working on this issue on branch
claude/issue-44.[Claude] Opened PR #45 with a proposed fix. Review and merge it, then create a release tag to deploy.