N NoBullshit.wiki 中文

Guesthouse scheduling supervisor: roster hours-compliance and labor-cost tool - a single-file offline web page that computes each person's monthly hours, longest consecutive-day run, and night-shift spread from the names and roster you enter, flags facts against limits you set yourself, offers no optimization advice, and ships with zero statutory defaults

Works with:Claude / GPT-4 classCategories:Guesthouse & HotelLevel:Advanced Updated

Build me a directly usable single-file web tool (HTML with
inline CSS/JS, opens on double-click, runs offline, no
dependencies, no accounts) for guesthouse roster hours
checking and labor-cost accounting.

Input, in three blocks:

1. Staff list
- Fields: name / effective hourly rate / can work nights /
  note
- The rate is user-entered (salaried staff: divide by
  standard monthly hours yourself; the tool performs no
  conversion and embeds no conversion formula)

2. Roster
- Entries of "date | name | shift start-end", with
  paste-to-import: one line per entry, parsed as
  "date|name|start-end"; failed lines show in red with
  the original text, never silently dropped
- Shifts may cross midnight (e.g. 22:00-06:00); they
  belong to the start date
- Two records for one person on one day (split shift or
  cover) are summed

3. Threshold settings (user-entered, editable, persisted)
- Monthly hours cap per person
- Consecutive-days cap
- Night-shift definition (shifts ending after what time
  count as nights)
- Night-shift balance warning gap (in shifts)

Computation and results:

1. Per-person check table: name / monthly hours / cap /
   over? (red with the excess when over) / longest
   consecutive run / cap / over? / night shifts / rest
   days
2. Night-shift balance: most night shifts minus fewest;
   if the gap exceeds the warning value, flag the row
   amber and list each person's count
3. Labor cost: monthly total from per-person
   "hours x rate", spread onto calendar days by shift
   date, drawn as a per-day text bar chart, with
   weekends and user-marked holidays in a separate color
4. Every red and amber flag states facts only - the words
   "suggest" and "optimize" must not appear anywhere

Hard requirements:
- No default values for any threshold; while empty, that
  whole feature stays greyed out with "set limits first".
  No statutory or industry-typical numbers preloaded -
  regions and employment types differ, and this tool does
  not shoulder that interpretation for the user
- Data lives only in page memory and local storage;
  export to CSV (staff + roster + per-person results);
  no network requests of any kind
- A print view: full-month roster plus per-person check
  table in a compact layout that fits one A4 page
- The hourly-rate column is excluded from the exported
  CSV (wage data; leave the column blank with a notice)

Why it is written this way

Hours violations never show up in the total - they show up in the distribution. The property-wide monthly hours can look healthy while the price is one person's twenty-day run and another's half-empty month. So the tool's core view is not a grand total; it is those four per-person numbers: hours, longest run, nights, rest days. Any one of them red means the roster goes back to the drafting table, however flawless the grid looked.

Shipping zero statutory defaults is the tool's most important decision. Preloading "monthly cap 176" would be convenient, but it silently makes a judgment the user never asked for: employment types differ (standard hours, averaged hours arrangements, contractors, part-timers), and the same number means different things to different properties. If the tool holds that interpretation, any dispute quietly transfers blame from the scheduler to the toolmaker. The limits must be typed by hand - and typing them forces the scheduler to actually learn his own situation, which is worth more than the tool itself.

The night-shift balance check uses a crude "most minus fewest" gap on purpose. A fancier Gini coefficient is overkill on a six- or seven-person team: with so few people, any elaborate formula breaks the moment one of them takes annual leave. The crude gap maps to an obvious action - when the gap trips, point next month's nights at whoever has the fewest - which is exactly what a scheduling supervisor needs: a number that tells her what to do.

Keeping hourly rates out of the export is a concession to reality: the check table gets printed and pinned in the office. If wage figures ride along in the CSV, that printout can never go up. Visible in the tool, blank in the export - both needs survive.

working hoursschedulingsingle-file tool