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/orders/create.blade.php

218 lines
10 KiB
PHTML

3 months ago
@extends('layouts.app')
3 months ago
@section('header')
<div class="container-fluid bg-light pt-3">
<!-- name row -->
<div class="row justify-content-center pb-2">
</div>
<!-- Tabs row -->
<div class="row justify-content-center mb-2">
<div class="col-3 border-bottom"></div>
<div class="col-6 p-0">
<ul class="nav nav-fill nav-tabs" id="management-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link link-dark active" id="order-tab"
href="#" type="button" role="tab"
aria-controls="order" aria-selected="true">
<x-bi-box/>
Create Order
</a>
</li>
</ul>
</div>
<div class="col border-bottom"></div>
</div>
</div>
@endsection
3 months ago
@section('content')
3 months ago
<div class="container-fluid mt-3" style="max-width: 1800px">
3 months ago
3 months ago
<form action="{{route('orders.store') }}" method="post">
@csrf
3 months ago
3 months ago
<div class="row justify-content-center">
<div class="col-11 col-xl-4 border-end" style="height: 730px">
3 months ago
3 months ago
<livewire:customer-and-contact-select :customers="$customers"/>
3 months ago
3 months ago
<hr class="border-secondary-subtle px-0">
<div class="row mb-2">
<label for="order_type" class="col-md-4 col-form-label text-md-end">Order Type</label>
<div class="col-md-6">
<select name="order_type" class="form-select form-select-sm" id="order_type">
@foreach($order_types as $case)
<option value="{{$case->name}}">{{$case->value}}</option>
@endforeach()
</select>
@error('order_type')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
3 months ago
</div>
3 months ago
</div>
<div class="row mb-2">
<label for="order_status" class="col-md-4 col-form-label text-md-end">Order
Status</label>
<div class="col-md-6">
<select name="status" class="form-select form-select-sm" id="order_status">
@foreach($order_status as $case)
<option value="{{$case->value}}" {{ $case->name === 'APPROVED' ? 'selected' : '' }}>
{{$case->value}}
</option>
@endforeach()
</select>
@error('status')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
3 months ago
</div>
</div>
3 months ago
<hr class="border-secondary-subtle px-0">
<div class="row mb-2">
<label class="col-md-4 col-form-label text-md-end">Customer PO</label>
<div class="col-md-6">
<input id="customer_po" type="text"
class="form-control form-control-sm @error('customer_po') is-invalid @enderror"
name="customer_po" value="{{@old('customer_po')}}" required>
@error('customer_po')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
3 months ago
</div>
3 months ago
</div>
<hr class="border-secondary-subtle px-0">
<div class="row mb-2">
<label class="col-md-4 col-form-label text-md-end">Attributes</label>
<div class="col-md-3">
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="new_art" name="new_art"
value="1">
<label class="form-check-label" for="new_art">New art</label>
</div>
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="rush" name="rush" value="1">
<label class="form-check-label" for="rush">Rush</label>
</div>
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="digitizing"
name="digitizing" value="1">
<label class="form-check-label" for="digitizing">Digitizing</label>
</div>
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="supplied_file"
name="customer_supplied_file" value="1">
<label class="form-check-label" for="supplied_file">
Customer Supplied File
</label>
</div>
3 months ago
</div>
3 months ago
<div class="col-md-3">
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="repeat" name="repeat"
value="1">
<label class="form-check-label" for="repeat">Repeat</label>
</div>
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="event" name="event"
value="1">
<label class="form-check-label" for="event">Event</label>
</div>
<div class="form-check ">
<input class="form-check-input" type="checkbox" id="purchased_garments"
value="1"
name="purchased_garment">
<label class="form-check-label" for="purchased_garments">
Purchased
garments</label>
</div>
3 months ago
</div>
</div>
3 months ago
<hr class="border-secondary-subtle px-0">
3 months ago
3 months ago
<div class="row mb-2">
<label for="order_date" class="col-md-4 col-form-label text-md-end">Order date</label>
3 months ago
3 months ago
<div class="col-md-6">
<input id="order_date" type="date"
class="form-control form-control-sm @error('order_date') is-invalid @enderror"
name="order_date" value="{{ old('order_date') ?? $today }}" required
>
3 months ago
3 months ago
@error('order_date')
<span class="invalid-feedback" role="alert">
3 months ago
<strong>{{ $message }}</strong>
</span>
3 months ago
@enderror
</div>
3 months ago
</div>
3 months ago
<div class="row mb-2">
<label for="due_date" class="col-md-4 col-form-label text-md-end">Due date</label>
<div class="col-md-6">
<input id="due_date" type="date"
class="form-control form-control-sm @error('due_date') is-invalid @enderror"
name="due_date" value="{{ old('due_date') ?? $due_default }}" required
>
3 months ago
3 months ago
@error('due_date')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<hr class="border-secondary-subtle px-0">
<div class="row mb-2">
<label for="notes" class="col-md-4 col-form-label text-md-end">Notes</label>
3 months ago
3 months ago
<div class="col-md-6">
<textarea name="notes" id="notes" cols="30" rows="4" class="form-control form-control-sm"
>{{ old('notes') }}</textarea>
@error('notes')
<span class="invalid-feedback" role="alert">
3 months ago
<strong>{{ $message }}</strong>
</span>
3 months ago
@enderror
</div>
3 months ago
</div>
</div>
3 months ago
<div class="col-11 col-xl-7">
<livewire:order-products-create/>
</div>
<hr class="border-secondary-subtle px-0">
3 months ago
3 months ago
<div class="row">
<div class="col text-end">
<button type="submit" class="btn btn-primary">
Save Order
</button>
3 months ago
</div>
</div>
</div>
3 months ago
</form>
3 months ago
</div>
@endsection