Daily Logs¶
| Status | Shipped |
|---|---|
| Linear | PIN-27 ↗ PIN-469 ↗ PIN-470 ↗ |
| Module | Daily Logs ↗ |
One log per project per date, filled by field staff: who was on site (manpower), what got done (work performed), deliveries, delays, safety, photos. Completing a log locks it; only senior roles can reopen. This is the core Field workflow for the July pilot.
Prerequisites¶
- Role: Field User or higher. To test the full lifecycle you also need a reopen-capable login (Superintendent, PM, or Executive).
- Project state: any active project you can access.
- Test data: a few photos from
daily-log-photos/in the test-app-files Drive folder (.jpg/.png — the gallery picker only accepts these). - Permissions cached? Stale
accountpermissionslocalStorage can hide buttons — force a relogin if something you expect is missing.
1. Open Daily Logs¶
Two equivalent entry points:
- Sidebar → Daily Logs (
/daily-logs) — the cross-project board. Pick a project with the project selector button at the top (it shows the project name + a Logged / Partial / Not Logged chip); the dropdown has a Search projects... input. - Projects → open a project → Field tab → Daily Logs sub-tab — same editor scoped to that project (no project selector). The Field tab also holds Progress, Punch List, and Reports sub-tabs.
2. Pick a date and start a log¶
The header has a date navigator: ‹ / current date / ›. There is no free-typed date field in Entry view — step days with the chevrons, or switch the Entry | Calendar toggle and tap a day in the month grid.
A date with no log shows an empty tile grid headed New Daily Log with a Draft chip — there is no explicit "New" button. Click Create draft to persist it; the heading becomes Daily Log {number} and the button becomes Save draft. Work Performed and Notes also auto-save on blur.
Duplicate guard: open the same project+date in two tabs, create the draft in both — the second must toast "A log already exists for this date" and load the existing log instead of creating a duplicate.
3. Fill the sections (tiles)¶
The editor is a grid of tiles, each opening an inline panel (desktop) or bottom sheet (mobile) with a Done button. No per-section save — edits write through automatically. Required tiles are marked *:
| Tile | What to enter |
|---|---|
| Manpower * | Add crew (or Same crew as last log / Copy Previous Day to pull yesterday's crews). Columns: Company (autocomplete), Trade, Workers, Hours (0.25 steps), Work Description, Location. Footer totals workers/man-hours live. |
| Work Performed * | Free-text summary of the day. |
| Weather | Read-only, auto-filled from project location. Most test projects have no location set — "No location set — weather auto-fill disabled." is expected, not a bug. |
| Photos | See step 4. |
| Materials | Add delivery: Time, Vendor, Contents, Qty, Unit, Tracking, Condition (a non-received condition flags a delivery issue), Comments. |
| Delays | Add delay: Type, Hours lost, Trade, CO? checkbox (change-order potential), Description. |
| Safety | Log-level checkboxes Toolbox talk completed / No incidents reported, optional safety notes, plus per-row entries (inspection/incident/violation, Inspector, Result, Severity). |
| Notes | Free text. |
4. Upload photos¶
Open the Photos tile. Two drop targets: Take photo (opens device camera on mobile) and Upload from gallery (.jpg/.jpeg/.png, multi-select). Use the files from daily-log-photos/.
- Uploading into a not-yet-saved log auto-creates the draft first — no "save first" dead-end.
- Photos render as a thumbnail grid; click one → full-screen lightbox; the X overlay removes a photo (draft only).
5. Complete the work day¶
A readiness tile appears on draft logs showing N of 2 required with tappable unmet items (Work performed, Add a crew). When both are met it flips to Ready to complete and enables Complete Work Day.
The confirm modal ("Complete this work day?") locks the log. After completing: chip turns Completed, a green banner names who completed it and when, and every field goes read-only.
- Try to complete an empty log — the button is disabled; forcing via a second tab must toast Cannot complete with the reasons.
- Calendar bulk-complete: in Calendar view, draft days get checkboxes → Complete Selected. Days failing the two-item gate stay draft and are reported in the result toast.
6. Reopen (role-gated)¶
On a completed log, the Reopen button appears only for reopen-capable roles (Owner, Executive, PM, Assistant PM, Superintendent). Log in as plain Field User → no Reopen button; as Superintendent → Reopen returns the log to Draft.
7. Export¶
Two separate surfaces:
- Single log: the Export button on the log's action row renders the log as HTML in a new tab (popup blocker → warning toast).
- Reports (Project → Field → Reports sub-tab): From/To date range, a Category (CSV) dropdown (Manpower, Materials / Deliveries, Delays, Safety Inspections, Photos), and two buttons — PDF Report (full multi-section report, category ignored) and CSV — {Category}. A live "N logs in range" list previews what will export. An empty range is a valid export, not an error.
Verification Checklist¶
- Creating a log for a date that already has one loads the existing log with a warning toast (no duplicate)
- Manpower totals (workers / man-hours) update live as rows change
- Photos upload from
daily-log-photos/, show as thumbnails, open in lightbox, and can be removed while draft - Complete Work Day is disabled until ≥1 crew (with company) + non-empty Work Performed
- Completed log is fully read-only with the green locked banner
- Field User sees no Reopen; Superintendent/PM does, and Reopen returns the log to Draft
- PDF Report downloads a multi-section report for the date range; CSV — Manpower contains only manpower rows in range
- No console errors during the whole flow (DevTools console open throughout)
Known Issues / Current Gaps¶
A past data-loss bug (Work Performed "Done" wiping Manpower) was fixed in PIN-467 — watch for regressions in exactly that sequence.
Photo Album under Projects → Documents (aggregating daily-log photos + metadata viewer) is September scope, PIN-487.
Progress markup card is a placeholder until the Progress tab lands (PIN-56).
Weather auto-fill needs a project location (Google Place); most seeded projects have none — the "no location" message is intended behavior.
Related docs¶
- Takeoff — preconstruction counterpart of the field flow
- QA scope + severity rules: QA Onboarding 02 — Module Test Charter
Updating this walkthrough
Run the full flow yourself end-to-end. If it passes, bump last_verified: in the frontmatter to today's date. If any step fails, fix the doc or the code in the same PR — drift is the enemy.