diff --git a/docs/GLOSSARY.md b/docs/GLOSSARY.md index 8ae905562a..618641bae5 100644 --- a/docs/GLOSSARY.md +++ b/docs/GLOSSARY.md @@ -4540,6 +4540,9 @@ Since v2.9282 the Job Mode card's header counts the bids of the day so far while That count is the clock out's own, the bids the person changed with a kept list winning, read from the person's own day for the roles that work on bids, and a day with no bid yet keeps the job's header. A press on it opens **Your bids today** in a window, read when it opens, with **Keep my list · N bids** (`clock/BidDayKeepWindow.tsx`, the window *Done for the day* opens too). An empty list names a typed note only on the clock out's sheet, and everywhere else it names the next press that is there (`bidDayEmptyWords`). +Since v2.9283 the office job's row in My time's **This week detail** and **Last week detail** reads **Bids · 7** when any of its days kept a list, with the office job on hover, and counts the bids of those days (`lib/dashboard/myTimeWeekBids.ts`, `hooks/useMyTimeWeekBids.ts`, the person's answers of 2026-12-03). +Opened, that row draws one line of labels above its notes, the first three and **All 7 bids** (`dashboard/MyTimeWeekBidLabels.tsx`), and a label carries no hours, since how a day's hours fall on its bids is punch list #475's question. +Its notes leave out the list a clock out wrote into them before v2.9158 (`weekRowTypedNotes`). **Database**: `user_bid_activity`, `bid_day_entries`, `bump_user_bid_activity`, `get_my_bid_day`, `save_my_bid_day` · kernels `lib/bids/bidInFront.ts`, `lib/clock/bidDay.ts`, `lib/clock/bidDayLabels.ts` · hooks `useBidActivityBeat`, `useClockOutBidDay`, `useSessionsBidDay` · guides `/help/clock-out-with-the-bids-of-the-day`, `/help/approve-my-teams-hours` diff --git a/docs/recent-features/v2.9283.md b/docs/recent-features/v2.9283.md new file mode 100644 index 0000000000..8bc81edf3d --- /dev/null +++ b/docs/recent-features/v2.9283.md @@ -0,0 +1,53 @@ +# v2.9283 — My Time: a week at the office reads as the bids you kept (2026-12-03) + +Punch list #469, the week's office-job row. Client only. No migration, no function change, nothing owed on prod. It reads `bid_day_entries` through the read People → Hours already makes (`fetchKeptBidDays`), under the same row policies. + +## What was asked + +The owner, 2026-12-02: a day spent on bids is to look like the bids worked on, not like the office job the clock was on. The card named *the week's office-job row reading as bids* and drew nothing for it. + +## What the row is + +My time's *This week detail* and *Last week detail* are one row a job for the whole week, with that job's hours, opened to the notes typed that week with hours a note. It is not one row a session. So the office job's row is a week's row. + +## The calls, and the person's answers (2026-12-03) + +- **What the row says:** its label reads *Bids · 7* with the office job on hover. Opened, it shows the typed notes with their hours as before, and one line of labels above them. No hours on a bid. The pick. +- **A week where only some days kept a list:** the row reads as bids when any of its days kept a list, and counts the bids of those days. The pick. +- **Punch list #473's gap line on the week's list:** not drawn there. The pick. That card's line was closed in v2.9282's change. + +## What it does + +- The office job's row reads **Bids · N** in the job's place when a day it covers kept a list. Its hover reads *Bids · N, on* and the office job. +- N is the bids kept on the days the row covers: days with a session on the office job, in that week. A bid kept on two days counts once. A bid taken off a list is not counted. +- Opened, the row draws one line of labels above its notes: three at most, then **All N bids**, which turns to **Fewer**. A label is the bid's colour, its number, its name and what was done. Solid is a changed bid. Dashed is an opened or added one. +- **No label carries hours.** How a day's hours fall on its bids is punch list #475's question, and this row does not answer it. +- A week with no kept list, a row on a job in the field and the *No job or bid* row read as before. + +## How + +- New kernel `src/lib/dashboard/myTimeWeekBids.ts`: `weekOfficeRowBids` (the days the row covers, the bids kept on them, the order and what was done, the label over `bidDayJobWords`) and `weekRowTypedNotes` (a note without the list an old clock out wrote, same notes added). +- New hook `src/hooks/useMyTimeWeekBids.ts`: the office job's id once and only when a session of the two weeks sits on a job, then one read of the kept rows for both weeks and the bids' names, only when a session sits on the office job. A read that fails leaves every row as its job. +- New `src/components/dashboard/MyTimeWeekBidLabels.tsx`: the line of labels. +- `DashboardMyTimeSection.tsx`: the hook, and `renderBreakdownList` takes the office row's bids. + +## Chosen in the build, to be read by the owner + +- **A label on this row is not a press.** The bid opens from People → Hours and from the Bids page. +- **What was done** on a bid reads from the day that gave it the most time. +- **On a person's own section** the reads are made only for a role that works on bids. On another person's section the row policies decide who gets rows, as on People → Hours. +- **Old notes.** A note that a clock out filled with the list before v2.9158 shows only its typed part on this row, and notes that then read the same are one line. + +## Tests + +- `myTimeWeekBids.test.ts` (7 cases): any day kept, only the row's days and week, a bid taken off, the order and the words, no hours on a label, and the typed notes. +- `DashboardMyTimeSection.weekBids.render.test.tsx` (3 cases): the label, the hover, the labels line with its press, the notes under it, one read for the person alone, a week with no list, and no read off the office job or for a role that does not work on bids. +- Not seen in a browser: this thread signs in to nothing. + +## Words + +The guide `see-the-time-i-have-added-up` has a new section, *Read the week job by job*. The glossary's *Bids of the day*. The card `to-dos/bids-on-my-time/README.md`: built, with what the build chose and the look. + +## The look owed + +On the card under *The look owed for the week's row*. It needs a day with a kept list on the office job: the real sign-in as a ZZ Test person who works on bids that the card's other looks wait on. diff --git a/src/components/DashboardMyTimeSection.tsx b/src/components/DashboardMyTimeSection.tsx index d863fcd1d9..b18685a881 100644 --- a/src/components/DashboardMyTimeSection.tsx +++ b/src/components/DashboardMyTimeSection.tsx @@ -10,6 +10,10 @@ import { PersonalTimeOffModal } from './PersonalTimeOffModal' import { DashboardMyTimePicture } from './dashboard/DashboardMyTimePicture' import { MyTimeCanWorkLine } from './dashboard/MyTimeCanWorkLine' import { MyTimeBidDay } from './dashboard/MyTimeBidDay' +import { MyTimeWeekBidLabels } from './dashboard/MyTimeWeekBidLabels' +import { useMyTimeWeekBids } from '../hooks/useMyTimeWeekBids' +import { worksOnBids } from '../lib/clock/bidDay' +import { weekRowTypedNotes, type WeekOfficeRowBids } from '../lib/dashboard/myTimeWeekBids' import { MY_TIME_WEEKS, buildMyTimeWeeks, myTimeSessionSeconds, type MyTimeDay, type MyTimeWeek } from '../lib/dashboard/myTimeWeeks' import { payWeeksEndingAt } from '../lib/people/utilization' import { useLedgerPrefixMap } from '../contexts/LedgerDisplayPrefixContext' @@ -24,13 +28,19 @@ function formatHours(seconds: number): string { function renderBreakdownList( items: BreakdownItem[], expandedKeys: Set, - onToggleKey: (key: string) => void + onToggleKey: (key: string) => void, + /** The office job's row reading as its bids (punch list #469), or null to draw every row as its job. */ + officeBids: WeekOfficeRowBids | null = null, + /** The bids as an old clock out's list named them, left out of that row's notes. */ + listNames: readonly string[] = [], ) { return (