Skip to content

Commit

Permalink
url ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
piguycs committed Apr 7, 2024
1 parent d3bf8b7 commit b037868
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controller/scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$id = @$_GET['id'];

if ($id === null) {
echo "Invalid ticket id";
echo "Use your camera app to scan tickets";
exit;
}

Expand Down
5 changes: 3 additions & 2 deletions app/model/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public function setNote(string $Note): void

public function getTicketUUID(): string
{
return $this->TicketUUID;
// actually, we are gonna set it to be a url
return 'http://' . getenv('HOST_ADDR') . '/?id=' . $this->TicketUUID;
}

public function setTicketUUID(string $TicketUUID): void
Expand Down Expand Up @@ -104,4 +105,4 @@ public function getVenue(): string
{
return $this->Venue;
}
}
}
5 changes: 4 additions & 1 deletion app/pages/agenda/cart.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<form id="cart" class="bg-white rounded-lg flex flex-col gap-4 w-[40%]">
<h1 class="font-serif font-semibold text-4xl whitespace-nowrap m-4">Your Cart</h1>
<span class="flex flex-row items-center">
<h1 class="font-serif font-semibold text-4xl whitespace-nowrap m-4">Your Cart</h1>
<a href="/payment" class="border-black border px-4 py-1 rounded-lg">Pay for your cart</a>
</span>
</form>
2 changes: 1 addition & 1 deletion app/pages/login/user.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class="text-center cursor-pointer inline-block bg-white border border-black roun
<div class="mx-4 text-gray-500 font-bold">Employee</div>
<div class="border-t border-gray-400 flex-grow"></div>
</div>
<a href="#" class="text-center cursor-pointer
<a href="/scan" class="text-center cursor-pointer
inline-block bg-white border border-black rounded hover:bg-gray-100 h-10 px-4 py-2">Scan Tickets</a>
@endif

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
PS_DB_PASSWORD: ${PS_DB_PASSWORD}
PS_DB_NAME: ${PS_DB_NAME}
RESEND_API: ${RESEND_API}
HOST_ADDR: ${HOST_ADDR}
STRIPE_KEY: ${STRIPE_KEY}
depends_on:
composer:
Expand Down

0 comments on commit b037868

Please sign in to comment.