Skip to content

fix(cinema): sync seat colors and legend with provider SeatTypes - #6

Merged
hoangsvit merged 7 commits into
mainfrom
fix/seatmap-type-colors-and-legend
Nov 10, 2026
Merged

hoangsvit merged 7 commits into
mainfrom
fix/seatmap-type-colors-and-legend

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Nguyên nhân

Trong SeatMap.astro, trước đây màu được suy đoán qua regex /vip/, /(couple|sweet|...)/; WAKU WAKU và DOKI DOKI mặc định bị gộp vào ghế thường màu tím. Chú thích cũng lặp Ghế trống/Ghế Thường.

Sửa đổi

  • Ánh xạ SeatsInfo.SeatTypes[].Type → SeatTypes[].Color với khóa cinemaAreaCode (đồng nhất kiểu chuỗi). Không còn suy màu bằng tên.
  • Chuẩn hóa màu HEX/RGB từ nguồn, loại bỏ mã màu không hợp lệ trước khi đưa vào CSS; dùng palette dự phòng phân biệt các loại nếu nguồn thiếu hoặc trả màu trùng nhau; tự chọn màu chữ tương phản.
  • Cùng một màu dùng cho ghế và legend, chỉ hiện các loại ghế thực có trong suất chiếu.
  • Tách thống kê Còn trống / Đã đặt khỏi legend; trạng thái Đã đặt (xám) và Đang chọn (xanh ngọc) giữ ưu tiên. Giữ nguyên sơ đồ, số ghế, giá và không thêm tính năng mua vé.
  • Bổ sung kiểm thử có trường hợp Ghế Thường, VIP, WAKU WAKU, DOKI DOKI, màu trùng/thiếu/không hợp lệ; CI và Pages staging đều chạy kiểm thử.

QA

  • Build, smoke test, test màu ghế thành công
  • Preview publish thành công
  • Đối chiếu trực quan seat map các chuỗi rạp (khác nhau theo API và suất chiếu)

Không tự merge.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5e02d53d-3978-4ea3-be19-c5ed807f7c4b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hoangsvit
hoangsvit marked this pull request as ready for review November 10, 2026 11:07
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@hoangsvit
hoangsvit merged commit 66e62b6 into main Nov 10, 2026
3 checks passed
@hoangsvit
hoangsvit deleted the fix/seatmap-type-colors-and-legend branch November 10, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant