You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/resources/views/partials/packing-slips/create-modal.blade.php

115 lines
5.6 KiB
PHTML

3 months ago
<div class="modal modal-lg fade" id="createPackingSlipModal" tabindex="-1" aria-labelledby="createPackingSlipModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="createPackingSlipModalLabel">Create Packing Slip</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="{{route('packing-slips.store')}}" method="post">
@csrf
<div class="modal-body">
<div class="row mb-3">
<label for="date_received" class="col-md-4 col-form-label text-md-end">Date received</label>
<div class="col-md-6">
<input id="date_received" type="date"
class="form-control @error('date_received') is-invalid @enderror"
name="date_received" value="{{ old('date_received') ?? $today }}" required
autocomplete="date_received" max="{{$today}}"
autofocus>
@error('date_received')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="customer_id" class="col-md-4 col-form-label text-md-end">Customer</label>
<div class="col-md-6">
<input type="hidden" name="from_customer" value="0">
@if(isset($customer))
<input type="hidden" name="customer_id" value="{{$customer->id}}">
<input type="hidden" name="from_customer" value="1">
<select name="customer_id" id="customer_id" class="form-select" disabled>
<option value="{{ $customer->id }}">
{{ $customer->company_name }}
</option>
</select>
@endif
@error('customer_id')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="order_id" class="col-md-4 col-form-label text-md-end">Product Order</label>
<div class="col-md-6">
<input id="order_id" type="text"
class="form-control @error('order_id') is-invalid @enderror"
name="order_id" value="{{ old('order_id') }}"
autocomplete="order_id">
@error('order_id')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="amount"
class="col-md-4 col-form-label text-md-end">Amount</label>
<div class="col-md-6">
<input id="amount" type="text"
class="form-control @error('amount') is-invalid @enderror"
name="amount" placeholder="For example: 2 boxes"
value="{{ old('amount') }}" required autocomplete="amount">
@error('amount')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="row mb-3">
<label for="contents" class="col-md-4 col-form-label text-md-end">Contents</label>
<div class="col-md-6">
<textarea name="contents" id="contents" cols="30" rows="3" class="form-control"
autocomplete="contents" placeholder="For example: 30 shirts, 25 jackets"
required>{{ old('contents') }}</textarea>
@error('contents')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">Create</button>
</div>
</div>
</form>
</div>
</div>
</div>