feat: the staff, cancellations/discounts, technical, prep zones and expenses reports on v2; reports all on v2 (platform-v2 step 6.12c)

- Reports -> Staff (src/pages/reports/staff): shifts (pay, collected, to hand
  over, the counted difference, cancellations; a shift opens the overview's
  shift dialog; the owner deletes one), cash handover (starting cash, cash,
  card, refunds, to hand over, counted), sales by person (orders, units,
  cancellations, hours, sales net of refunds, per hour, share; ranked) - the
  v1 activity and leaderboard views merged into it
- Reports -> Cancellations and discounts (src/pages/reports/misc), with totals
  per person; Technical (printing: tickets, failed, printed first time, per
  printer, every ticket with its error, the receipt-printer summary; logs for
  the owner) - v1 printer history + printer health merged
- Prep zones report (per zone: items, value, products, orders; per-zone Excel
  downloads built in the browser with the server's Excel rules; print a zone)
  and Expenses report (period, status, category; split by category or
  supplier; payments) - its categories now match what Finance saves (the v1
  report listed categories that never existed)
- kit: csvText() / download(); PrintDialog modes for the printer summary
- v1 report kit (reports/shared) and every v1 report view deleted;
  src/pages/reports is v2 (all but LogsPanel strict)
- tests: reports.test.mjs (+1), e2e manager.mjs (every report opens, a shift's
  details, the ranking)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 09:19:49 +02:00
co-authored by Claude Opus 5.5
parent 7767bdb728
commit 6bdf0bdd79
35 changed files with 919 additions and 4230 deletions
+142 -2
View File
@@ -2799,11 +2799,17 @@
"kind": "What to print",
"modes": {
"smart": "Summary",
"full": "Full"
"full": "Full",
"quick": "Quick summary",
"orders": "Every order",
"detailed": "Every order and item"
},
"modesHint": {
"smart": "Only what sold, most first.",
"full": "Every product, unsold ones too."
"full": "Every product, unsold ones too.",
"quick": "Totals only: little paper.",
"orders": "Each order with its total.",
"detailed": "Each order with every item: a lot of paper."
},
"printer": "Printer",
"noPrinters": "No printers (Settings → Printing).",
@@ -2922,6 +2928,140 @@
"all_one": "{{count}} product",
"all_other": "{{count}} products",
"shareTitle": "Revenue by category"
},
"staff": {
"title": "Staff",
"tabs": {
"shifts": "Shifts",
"cash": "Cash handover",
"people": "Sales by person"
},
"shiftsCount_one": "{{count}} shift",
"shiftsCount_other": "{{count}} shifts",
"payTotal": "Pay for these shifts: {{amount}}",
"pay": "Pay",
"payTip": "Hours × the hourly pay at the time of the shift.",
"handOver": "To hand over",
"handOverTip": "Starting cash + cash taken − cash refunded: what should be in the drawer.",
"difference": "Difference",
"differenceTip": "What was counted at the end minus what should have been there (− short, + over).",
"shift": "Shift",
"starting": "Starting cash",
"cash": "Cash taken",
"card": "Card taken",
"counted": "Counted",
"open": "Open",
"ended": "Ended",
"cashTitle": "Cash per shift",
"hours": "Hours",
"sales": "Sales",
"salesTip": "What each person sent (products, net of refunds; the delivery fee apart), whoever was paid.",
"perHour": "Per hour",
"ranking": "Who sold most",
"people_one": "{{count}} person",
"people_other": "{{count}} people"
},
"misc": {
"title": "Cancellations and discounts",
"cancellations": "Cancellations",
"discounts": "Discounts",
"when": "When",
"value": "Value",
"sentBy": "Sent by",
"cancelledBy": "Cancelled by",
"reason": "Why",
"cancelledLines": "Lines cancelled",
"cancelledValue": "Their value",
"notSales": "not counted as sales",
"byWhom": "By person",
"lines_one": "{{count}} line",
"lines_other": "{{count}} lines",
"discount": "Discount",
"amount": "Amount off",
"before": "Order before",
"givenBy": "Given by",
"discountsGiven": "Discounts given",
"onOrders_one": "on {{count}} order",
"onOrders_other": "on {{count}} orders",
"discountTotal": "Total off",
"alreadyOff": "already taken off the revenue",
"times_one": "{{count}} time",
"times_other": "{{count}} times"
},
"tech": {
"title": "Technical",
"printing": "Printing",
"allPrinters": "All printers",
"items": "On the ticket",
"result": "Result",
"printed": "Printed",
"failed": "Failed",
"tickets": "Tickets sent",
"failedN": "Failed",
"checkPrinter": "check the printer",
"allGood": "all printed",
"reliability": "Printed first time",
"reliabilityTip": "The share of attempts that printed. Failed tickets are tried again until they print (Settings → Printing).",
"ordersValue": "Orders' value",
"ordersValueTip": "The value of the orders these tickets belong to, each order once.",
"perPrinter": "Tickets per printer",
"failedSome_one": "{{count}} failed",
"failedSome_other": "{{count}} failed",
"noneFailed": "none failed",
"jobs_one": "{{count}} ticket",
"jobs_other": "{{count}} tickets"
},
"zones": {
"title": "Prep zones",
"which": "Zones shown",
"all": "All zones",
"load": "What each zone prepared",
"loadTip": "Items made by each zone in the period (a product in two zones counts in both).",
"items": "Items",
"value": "Their value",
"valueTip": "What those items were sold for.",
"nothing": "Nothing prepared here in this period.",
"orders_one": "{{count}} order",
"orders_other": "{{count}} orders",
"productsCsv": "Products (Excel)",
"ordersCsv": "Orders (Excel)"
},
"exp": {
"title": "Expenses",
"spent": "Spent",
"count_one": "{{count}} expense",
"count_other": "{{count}} expenses",
"paid": "Paid",
"due": "Still due",
"split": "Where it went",
"by": {
"category": "By category",
"supplier": "By supplier"
},
"dueSub": "{{amount}} due",
"noSupplier": "No supplier",
"list": "Every expense",
"date": "Entered",
"what": "What",
"supplier": "Supplier",
"total": "Total",
"status": {
"due": "Due",
"partial": "Partly paid",
"paid": "Paid"
},
"categories": {
"supplier": "Supplies",
"utilities": "Utilities",
"rent": "Rent",
"maintenance": "Maintenance",
"staff": "Staff",
"equipment": "Equipment",
"other": "Other"
},
"dueDate": "Due by {{date}}",
"payments": "Payments",
"noPayments": "Nothing paid yet."
}
}
}