{"id":18782392,"url":"https://github.com/atk4/seat-selector","last_synced_at":"2025-10-28T09:49:54.716Z","repository":{"id":84691730,"uuid":"148758087","full_name":"atk4/seat-selector","owner":"atk4","description":"Add-on for ATK providing you with a seated ticket booking interface for Cinemas, Arenas and other Venues","archived":false,"fork":false,"pushed_at":"2018-10-10T19:50:31.000Z","size":369,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-10-28T09:49:54.255Z","etag":null,"topics":["agile","atk4","php","seat-selector"],"latest_commit_sha":null,"homepage":"https://agiletoolkit.org/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atk4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-14T08:18:38.000Z","updated_at":"2024-05-31T19:43:14.000Z","dependencies_parsed_at":"2023-03-01T19:30:10.442Z","dependency_job_id":null,"html_url":"https://github.com/atk4/seat-selector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atk4/seat-selector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Fseat-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Fseat-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Fseat-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Fseat-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atk4","download_url":"https://codeload.github.com/atk4/seat-selector/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atk4%2Fseat-selector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281418065,"owners_count":26497723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agile","atk4","php","seat-selector"],"created_at":"2024-11-07T20:35:51.489Z","updated_at":"2025-10-28T09:49:54.711Z","avatar_url":"https://github.com/atk4.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# seat-selector - Cinema, Theatre and Arena seat allocation widget for ATK\n\nIf you are building a type of website for a cinema, theatre or arena, where it's important to allocate seats on the tickets. This add-on is designed to offer you a seat allocation widget:\n\n``` php\n$seats = $app-\u003eadd([new \\atk4\\venue_tickets\\SeatSelector(), 'venue' =\u003e 'path/to/svg/file.svg, qty =\u003e 5]);\n$seats-\u003esetModel($event-\u003eref('Tickets'));\n```\n\nThis will display this widget for you (depending on your SVG):\n\n![seats-selection](docs/images/seats-demo.png)\n\nUser would have to select up to 5 seats with the widget and confirm. The JavaScript part of this add-on will communicate with ATK View object on the server site to mark those seats as \"reserved\". \n\nNext your application takes over, confirms user payment, prints tickets - it's up to you.\n\n## SVG image\n\nCreate the image using any imaging applicaiton that can output SVG. Open the file and find a corresponding object(s) for the seats:\n\n``` svg\n\u003cpath class=\"seat\" data-place=\"S1\" fill=\"#FFFFFF\" stroke=\"#000000\" stroke-linejoin=\"bevel\" stroke-miterlimit=\"10\" d=\"M128.829,281.623\n    l2.764-10.522l10.684,1.777l-0.87,11.343c0,0-3.288,1.659-7.068,0.853C130.748,284.306,128.829,281.623,128.829,281.623z\"/\u003e\n```\n\nDepending on how fancy your seat design is, the shape may be different.\n\n1. Add `class=\"seat\"` to the seat shapes.\n2. Add `\"data-place=\"9B\"` with to each seat.\n3. If you have a text-object corresponding to of seats to select, add `class=\"remaining\"` to it.\n\nStore your SVG file anywhere. It will be embedded into your page directly.\n\n## Model: Ticket\n\nThe addon comes with a Ticket model, but you can use your own model too. Here are the requirements for the model:\n\n- `\"seat\"` - will contain the corresponding place.\n- `\"status\"`- (Optional) column as a list of values: `reserved`, `unavailable` or `purchased`. You can add more statusses and they be applied to the seat objects as a class.\n\nInitially the data-set for the Ticket model would be empty. SeatSelector will create 5 (or whichever number you specify to the constructor) new ticket records and will fill-in \"place\".\n\nIt will also look a the existing ticket records and display them as \"unavailable\". If your model has a \"status\" field then the status will also be assigned to your SVG objects.\n\nI recommend you to also have a `reservation_timestamp` added to your ticket and automatically clear reservation status when it expires:\n\n``` php\n§model-\u003eaddField(\n    'reservation_timestamp', \n    ['type'=\u003e'datetime', 'default'=\u003enew \\DateTime()]\n);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatk4%2Fseat-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatk4%2Fseat-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatk4%2Fseat-selector/lists"}