rates/frontend
jtricerolph 493e87b2dc Rate parity: expected-markup config, alert writer job, alerts UI + direct-link UI
Parity was read-only — the alerts table had no producer, so the Market
View badge could never fire. Now:
- jobs/check_rate_parity.py: daily 06:45 job comparing own Booking.com
  lead-in rate vs cheapest Newbook rate per date, measured against an
  EXPECTED markup (we deliberately price Booking.com higher to cover
  commission): alert when deviation from newbook*(1+markup%) exceeds the
  tolerance. Creates/updates active alerts, auto-resolves dates back in
  line, leaves acknowledged dates alone.
- config keys: parity_check_enabled, parity_expected_markup_pct,
  parity_tolerance_pct (system_config)
- POST /competitors/parity/check manual trigger; GET /parity now uses the
  same markup/tolerance and cheapest-across-categories Newbook rate
- Settings -> Rate Parity tab: markup %, tolerance %, enable toggle,
  run-now with result summary
- Market View -> Parity Alerts tab: status-filtered list w/ acknowledge
- Market View -> Hotels: direct-link dropdown per competitor (new PUT
  /competitors/hotels/{id}/direct-link) — closes the never-written
  direct_hotel_id gap so the matrix direct-rates sub-row can populate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 07:30:41 +00:00
..
src Rate parity: expected-markup config, alert writer job, alerts UI + direct-link UI 2026-07-06 07:30:41 +00:00
Dockerfile Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
index.html Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
nginx.conf Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
package-lock.json Fix require_cap TypeError, rewrite /analysis/comparison, add room category sync 2026-07-05 13:47:10 +00:00
package.json Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00
tsconfig.json fix: add missing tsconfig.json to frontend 2026-07-05 12:15:51 +00:00
vite.config.ts Add Rate Monitor app — Booking.com + direct booking engine competitor rates 2026-07-05 12:06:30 +00:00