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

202 lines
9.6 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-3">
<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')
<div class="container">
<div class="row justify-content-center">
3 months ago
<div class="col-8 pt-3">
<form action="{{route('orders.store') }}" method="post">
@csrf
3 months ago
3 months ago
<livewire:customer-and-contact-select :customers="$customers"/>
3 months ago
3 months ago
<hr class="border-secondary-subtle mx-4 px-0">
<div class="row mb-3">
<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" 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-3">
<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" 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 mx-4 px-0">
<div class="row mb-3">
<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 @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 mx-4 px-0">
<div class="row mb-3">
<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 mx-4 px-0">
3 months ago
3 months ago
<div class="row mb-3">
<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 @error('order_date') is-invalid @enderror"
name="order_date" value="{{ old('order_date') ?? $today }}" required
autocomplete="order_date">
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-3">
<label for="due_date" class="col-md-4 col-form-label text-md-end">Due date</label>
3 months ago
3 months ago
<div class="col-md-6">
<input id="due_date" type="date"
class="form-control @error('due_date') is-invalid @enderror"
name="due_date" value="{{ old('due_date') ?? $due_default }}" required
autocomplete="due_date">
3 months ago
3 months ago
@error('due_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
<hr class="border-secondary-subtle mx-4 px-0">
<div class="row mb-3">
<label for="notes" class="col-md-4 col-form-label text-md-end">Notes</label>
<div class="col-md-6">
<textarea name="notes" id="notes" cols="30" rows="3" class="form-control"
autocomplete="notes">{{ old('notes') }}</textarea>
3 months ago
3 months ago
@error('notes')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
3 months ago
</div>
3 months ago
<hr class="border-secondary-subtle mx-4 px-0">
<div class="row mb-3">
<div class="col-4"></div>
<div class="col-6">
<button class="btn btn-primary" type="submit">Continue</button>
</div>
</div>
</form>
3 months ago
</div>
</div>
</div>
@endsection