Feat/SeatMap-component_BookingCalendar-component_Resource-Credits_test suite_and_Token_Validator#1045
Merged
yusuftomilola merged 8 commits intoMay 30, 2026
Conversation
- Create SeatMap.tsx with CSS grid layout and color-coded seats - Green (available), Red (booked), Blue (selected) - Proper aria-labels and disabled state for booked seats - Add SeatMap.test.tsx with 8 comprehensive tests - Setup vitest testing infrastructure
…ection - Create BookingCalendar.tsx with month grid, navigation, range selection - No external date-picker library - pure React state + native Date API - Past dates visually disabled and not clickable - disabledDates prop greys out specific dates - Range selection: first click sets start, second click sets end - Add BookingCalendar.test.tsx with 7 comprehensive tests
- Create contracts/cntr/ crate with credit_deduction.rs and credit_topup.rs modules - Implement deduct_credits and topup_credits pure functions - Add 12 integration tests in tests/resource_credits_tests.rs - Tests cover: full balance deduction, exact-zero deduction, insufficient balance, zero deduction, topup from zero, exact max topup, exceeding max, zero topup, large balance accumulation - All tests pass with cargo test
… Validator - Create contracts/cntr/token_validator.rs with is_valid_token_id and is_token_owner - is_valid_token_id validates UUID v4 format using regex - Rejects UUID v1, v3, v5, uppercase, malformed strings, empty strings - is_token_owner checks claimed ownership against a registry - 15 unit tests: 10 for is_valid_token_id, 5 for is_token_owner - All tests pass with cargo test
|
@Mkalbani is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Mkalbani Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
yusuftomilola
approved these changes
May 30, 2026
Collaborator
yusuftomilola
left a comment
There was a problem hiding this comment.
Perfect implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements four issues: SeatMap component, BookingCalendar component, Resource Credits test suite, and Token Validator.
Changes
FE-01: Workspace Seat Map (#980)
frontend/cntr/SeatMap/SeatMap.tsx— CSS grid layout, color-coded seats (green/red/blue), aria-labelsfrontend/cntr/SeatMap/SeatMap.test.tsx— 8 testsFE-02: Booking Calendar (#981)
frontend/cntr/BookingCalendar/BookingCalendar.tsx— Custom calendar with range selection, no external libsfrontend/cntr/BookingCalendar/BookingCalendar.test.tsx— 7 testsCT-21: Resource Credits Tests (#1038)
contracts/cntr/src/credit_deduction.rs+credit_topup.rs— Pure logic modulescontracts/cntr/tests/resource_credits_tests.rs— 12 testsCT-22: Token Validator (#1039)
contracts/cntr/src/token_validator.rs— UUID v4 validation + ownership check, 15 inline testsCloses #980
Closes #981
Closes #1038
Closes #1039