inventory items added to table
This commit is contained in:
parent
77baed770b
commit
8f7cb87812
@ -14,7 +14,9 @@
|
||||
|
||||
@include('components.header')
|
||||
<div class="d-flex flex-row justify-content-evenly my-4" style="width: 100vw;">
|
||||
<form action="/tokens/create" method="post" class="d-flex flex-column justify-content-center align-items-center bg-dark-subtle w-25 p-5 rounded-4" style="width: max-content;">
|
||||
<form action="/tokens/create" method="post"
|
||||
class="d-flex flex-column justify-content-center align-items-center bg-dark-subtle w-25 p-5 rounded-4"
|
||||
style="width: max-content;">
|
||||
@csrf
|
||||
<div class="mb-3 w-100">
|
||||
<label for="token" class="form-label">Token Name</label>
|
||||
@ -26,10 +28,14 @@
|
||||
<button type="submit" class="btn btn-primary" onclick="tokenIntercepter()">Create Token</button>
|
||||
@if (session('token'))
|
||||
<p class="m-0 mt-2 p-0">Token:</p>
|
||||
<p id="token" style="width: max-content; cursor: pointer;" class="text-primary text-decoration-underline m-0 mb-2 p-0" onclick="copyToken({{ session('token') }})">{{ session('token') }}</p>
|
||||
<p id="token" style="width: max-content; cursor: pointer;"
|
||||
class="text-primary text-decoration-underline m-0 mb-2 p-0"
|
||||
onclick="copyToken({{ session('token') }})">{{ session('token') }}</p>
|
||||
@endif
|
||||
</form>
|
||||
<form action="/inventory/add" method="post" class="d-flex flex-column justify-content-center align-items-center bg-dark-subtle w-25 p-5 rounded-4" style="width: max-content;">
|
||||
<form action="/inventory/add" method="post"
|
||||
class="d-flex flex-column justify-content-center align-items-center bg-dark-subtle w-25 p-5 rounded-4"
|
||||
style="width: max-content;">
|
||||
@csrf
|
||||
<div class="mb-3 w-100">
|
||||
<label for="name" class="form-label">Name</label>
|
||||
@ -41,7 +47,7 @@
|
||||
</div>
|
||||
<div class="mb-3 w-100">
|
||||
<label for="price" class="form-label">Price</label>
|
||||
<input type="number" class="form-control" id="price" name="price">
|
||||
<input type="number" step="0.01" class="form-control" id="price" name="cost">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Create Item</button>
|
||||
</form>
|
||||
@ -49,22 +55,24 @@
|
||||
<div id="content" class="w-100 d-flex justify-content-center align-items-center">
|
||||
<table class="w-50 table table-striped border">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col">Price</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Potion</td>
|
||||
<td>Just a Simple Potion</td>
|
||||
<td>$360</td>
|
||||
</tr>
|
||||
@foreach ($items as $item)
|
||||
<tr>
|
||||
<td>{{ $item->id }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>{{ $item->cost }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user