inventory items added to table

This commit is contained in:
BackwardsUser 2025-03-24 23:45:43 -04:00
parent 77baed770b
commit 8f7cb87812

View File

@ -14,7 +14,9 @@
@include('components.header') @include('components.header')
<div class="d-flex flex-row justify-content-evenly my-4" style="width: 100vw;"> <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 @csrf
<div class="mb-3 w-100"> <div class="mb-3 w-100">
<label for="token" class="form-label">Token Name</label> <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> <button type="submit" class="btn btn-primary" onclick="tokenIntercepter()">Create Token</button>
@if (session('token')) @if (session('token'))
<p class="m-0 mt-2 p-0">Token:</p> <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 @endif
</form> </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 @csrf
<div class="mb-3 w-100"> <div class="mb-3 w-100">
<label for="name" class="form-label">Name</label> <label for="name" class="form-label">Name</label>
@ -41,7 +47,7 @@
</div> </div>
<div class="mb-3 w-100"> <div class="mb-3 w-100">
<label for="price" class="form-label">Price</label> <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> </div>
<button type="submit" class="btn btn-primary">Create Item</button> <button type="submit" class="btn btn-primary">Create Item</button>
</form> </form>
@ -57,12 +63,14 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach ($items as $item)
<tr> <tr>
<td>1</td> <td>{{ $item->id }}</td>
<td>Potion</td> <td>{{ $item->name }}</td>
<td>Just a Simple Potion</td> <td>{{ $item->description }}</td>
<td>$360</td> <td>{{ $item->cost }}</td>
</tr> </tr>
@endforeach
</tbody> </tbody>
</table> </table>
</div> </div>