sifatbaho

This commit is contained in:
2026-04-05 05:31:24 +05:00
commit df3d57f503
2609 changed files with 369825 additions and 0 deletions

View File

@@ -0,0 +1,615 @@
@extends('layouts.master')
@section('title')
@lang('translation.create-auto-order')
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1')
@lang('translation.auto')
@endslot
@slot('title')
@lang('translation.create-auto-order')
@endslot
@endcomponent
<form action="{{ route('auto.store') }}" method="post" autocomplete="off" class="needs-validation" validate>
@csrf
<input type="hidden" name="status" value="{{ App\Enums\OrderStatusEnum::DRAFT->name }}">
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-header">
@lang('translation.order-information')
</div>
<div class="card-body">
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-number-input">
@lang('translation.number')
</label>
<input type="text"
class="form-control text-uppercase @error('number') is-invalid @enderror"
name="number" placeholder="@lang('translation.write-number')"
id="order-number-input" value="{{ $order->number }}"
tabindex="1">
@error('number')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.number')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-created_date-input">@lang('translation.created-date')</label>
<input type="text"
class="form-control text-uppercase flatpickr-input @error('created_at') is-invalid @enderror"
id="auto-created_date-input"
name="created_at" value="{{ $order->created_at }}"
data-provider="flatpickr" data-date-format="d.m.Y"
tabindex="2">
@error('created_at')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.created-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label for="choices-purpose-input" class="form-label">
@lang('translation.select-purpose')
</label>
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
name="purpose_id" class="form-select @error('purpose_id') is-invalid @enderror"
id="choices-purpose-input" tabindex="3">
@foreach($purposeCases as $purposeItem)
<option value="{{ $purposeItem->id }}"
@if($order->purpose_id == $purposeItem->id)selected @endif>
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
</option>
@endforeach
</select>
@error('purpose_id')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.purpose')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- order customer card -->
<div class="card">
<div class="card-header">
@lang('translation.order-customer')
</div>
<div class="card-body">
<div class="mb-3">
<!-- Inline Checkbox -->
<div class="form-check form-check-inline mb-2">
<input class="form-check-input " type="radio"
@if($order->customer_type=='physical') checked @endif
name="customer_type"
onclick="handleCustomerClick(this.value);" value="physical"
id="flexRadioDefault2">
<label class="form-check-label" for="flexRadioDefault2">
@lang('translation.physical')
</label>
</div>
<div class="form-check form-check-inline mb-2">
<input class="form-check-input is " type="radio"
@if($order->customer_type=='juridical') checked
@endif name="customer_type"
onclick="handleCustomerClick(this.value);" value="juridical"
id="flexRadioDefault1">
<label class="form-check-label" for="flexRadioDefault1">
@lang('translation.juridical')
</label>
</div>
</div>
<div class="row gy-4 @if($order->customer_type=='juridical') d-none @endif" id="customer-block">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_last_name-input">
@lang('translation.customer-last-name')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
name="customer_last_name" id="order-customer_last_name-input"
value="{{ $order->customer_last_name }}"
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
@error('customer_last_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-last-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_first_name-input">
@lang('translation.customer-first-name')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
name="customer_first_name" id="order-customer_first_name-input"
value="{{ $order->customer_first_name }}"
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
@error('customer_first_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-first-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_patronymic-input">
@lang('translation.customer-patronymic')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
name="customer_patronymic" id="order-customer_patronymic-input"
value="{{ $order->customer_patronymic }}"
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
@error('customer_patronymic')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-patronymic')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4 @if($order->customer_type=='physical') d-none @endif"
id="customer-company-block">
<div class="mb-3">
<label class="form-label" for="order-customer_company-input">
@lang('translation.customer-juridical-name')
</label>
<input type="text" class="form-control text-uppercase" name="customer_company"
id="order-customer_company-input" value="{{ $order->customer_company }}"
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
@error('customer_company')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-company')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<!-- order owner card -->
<div class="card">
<div class="card-header">
@lang('translation.order-owner')
</div>
<div class="card-body">
<div class="mb-3">
<!-- Inline Checkbox -->
<div class="form-check form-check-inline mb-2">
<input class="form-check-input" type="radio" @if($order->owner_type=='physical') checked
@endif name="owner_type"
onclick="handleOwnerClick(this.value);" value="physical"
id="flexRadioDefault3">
<label class="form-check-label" for="flexRadioDefault3">
@lang('translation.physical')
</label>
</div>
<div class="form-check form-check-inline mb-2">
<input class="form-check-input is " type="radio"
@if($order->owner_type=='juridical') checked
@endif name="owner_type"
onclick="handleOwnerClick(this.value);" value="juridical"
id="flexRadioDefault4">
<label class="form-check-label" for="flexRadioDefault4">
@lang('translation.juridical')
</label>
</div>
</div>
<div class="row gy-4 @if($order->owner_type=='juridical')d-none @endif" id="owner-block">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-owner_last_name-input">
@lang('translation.owner-last-name')
</label>
<input type="text" value="{{ $order->owner_last_name }}"
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
name="owner_last_name" id="order-owner_last_name-input"
placeholder="@lang('translation.write-auto-owner-last-name')" tabindex="7">
@error('owner_last_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-last-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6" id="owner-block">
<label class="form-label" for="order-owner_first_name-input">
@lang('translation.owner-first-name')
</label>
<input type="text"
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
name="owner_first_name" value="{{ $order->owner_first_name }}"
id="order-owner_first_name-input"
placeholder="@lang('translation.write-auto-owner-first-name')" tabindex="8">
@error('owner_first_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-first-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-owner_patronymic-input">
@lang('translation.owner-patronymic')
</label>
<input type="text" value="{{ $order->owner_patronymic }}"
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
name="owner_patronymic" id="order-owner_patronymic-input"
placeholder="@lang('translation.write-auto-owner-patronymic')" tabindex="9">
@error('owner_patronymic')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-patronymic')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4 @if($order->owner_type=='physical')d-none @endif"
id="owner-company-block">
<div class="mb-3">
<label class="form-label" for="order-owner_company-input">
@lang('translation.owner-company')
</label>
<input type="text"
class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
name="owner_company" value="{{ $order->owner_company }}"
id="order-owner_company-input"
placeholder="@lang('translation.write-auto-owner-juridical-name')" tabindex="">
@error('owner_company')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-company')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
@lang('translation.auto-information')
</div>
<div class="card-body">
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="choose-order-car-category">
@lang('translation.select-car-category')
</label>
<select data-choices data-choices-multiple-groups="false"
class="form-control @error('car_category') is-invalid @enderror"
id="choose-order-car-category" name="car_category" tabindex="10">
@foreach ($concerns as $concern)
<option value="{{ $concern->id }}"
{{ $order->car_category == $concern->id ? 'selected' : '' }}>
@lang($concern->{str_replace('_', '-', app()->getLocale())})
</option>
@endforeach
</select>
@error('car_category')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car_category')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-car_mark-input">
@lang('translation.car-mark')
</label>
<input type="text"
class="form-control text-uppercase @error('car_mark') is-invalid @enderror"
id="auto-car_mark-input" name="car_mark" value="{{ $order->car_mark }}"
placeholder="@lang('translation.write-car-mark')" tabindex="12">
@error('car_mark')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car-mark')])</strong>
</span>
@enderror
</div>
<div class=" col-xxl-4 col-md-6">
<label class="form-label" for="auto-color-input">
@lang('translation.color')
</label>
<input type="text"
class="form-control text-uppercase @error('color') is-invalid @enderror"
id="auto-color-input" name="color" value="{{ $order->color }}"
placeholder="@lang('translation.write-car-color')" tabindex="22">
@error('color')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.color')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-made_date-input">
@lang('translation.made-date')
</label>
<input type="text"
class="form-control text-uppercase @error('made_date') is-invalid @enderror"
id="auto-made_date-input" name="made_date"
data-provider="flatpickr" data-date-format="d.m.Y"
value="{{ $order->made_date }}"
placeholder="@lang('translation.write-car-made-date')"
tabindex="13">
@error('made_date')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.made-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-body-input">
@lang('translation.body')
</label>
<input type="text"
class="form-control text-uppercase @error('body') is-invalid @enderror"
id="auto-body-input" name="body" value="{{ $order->body }}"
placeholder="@lang('translation.write-car-body')" tabindex="14">
@error('body')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.body')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-engine-input">
@lang('translation.engine')
</label>
<input type="text"
class="form-control text-uppercase @error('engine') is-invalid @enderror"
id="auto-engine-input" name="engine" value="{{ $order->engine }}"
placeholder="@lang('translation.write-car-engine')" tabindex="15">
@error('engine')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.engine')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-car_number-input">
@lang('translation.car-number')
</label>
<input type="text"
class="form-control text-uppercase @error('car_number') is-invalid @enderror"
id="auto-car_number-input" name="car_number" value="{{ $order->car_number }}"
placeholder="@lang('translation.write-car-number')" tabindex="16">
@error('car_number')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car-number')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-type-input">
@lang('translation.type')
</label>
<input type="text"
class="form-control text-uppercase @error('type') is-invalid @enderror"
id="auto-type-input" name="type" value="{{ $order->type }}"
placeholder="@lang('translation.write-car-type')" tabindex="17">
@error('type')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.type')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-shassi-input">
@lang('translation.shassi')
</label>
<input type="text"
class="form-control text-uppercase @error('shassi') is-invalid @enderror"
id="auto-shassi-input" name="shassi" value="{{ $order->shassi }}"
placeholder="@lang('translation.write-car-shassi')" tabindex="18">
@error('shassi')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.shassi')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-tech_passport-input">
@lang('translation.technical-passport')
</label>
<input type="text"
class="form-control text-uppercase @error('tech_passport') is-invalid @enderror"
id="auto-tech_passport-input"
name="tech_passport" value="{{ $order->tech_passport }}"
placeholder="@lang('translation.write-car-technical-passport')" tabindex="19">
@error('tech_passport')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-tech_given_date-input">
@lang('translation.technical-passport-given-date')
</label>
<input type="text"
class="form-control flatpickr-input text-uppercase @error('tech_given_date') is-invalid @enderror"
id="auto-tech_given_date-input"
name="tech_given_date"
value="{{ $order->tech_given_date }}"
data-provider="flatpickr" data-date-format="d.m.Y"
placeholder="@lang('translation.write-car-technical-passport-given-date')"
tabindex="20">
@error('tech_given_date')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-tech_given_whom-input">
@lang('translation.technical-passport-given-by-whom')
</label>
<input type="text"
class="form-control text-uppercase @error('tech_given_whom') is-invalid @enderror"
id="auto-tech_given_whom-input"
name="tech_given_whom" value="{{ $order->tech_given_whom }}"
placeholder="@lang('translation.write-technical-passport-given-by-whom')"
tabindex="21">
@error('tech_given_whom')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-by-whom')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="col-lg-4 col-sm-4 col-md-4">
<div class="text-start mb-3 btn-block">
<button type="submit" class="btn btn-success w-sm" name="save"
tabindex="">@lang('translation.save')</button>
</div>
</div>
</div>
<!-- end col -->
<!-- end card -->
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">@lang('translation.diller')</h5>
</div>
<div class="card-body">
<label for="choices-diller-input" class="form-label">
@lang('translation.select-diller')
</label>
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
name="diller_id" class="form-select @error('diller_id') is-invalid @enderror"
id="choices-diller-input"
tabindex="23">
<option value="" selected> @lang('translation.select-diller')</option>
@foreach($dillers as $diller)
<option value="{{ $diller->id}}" @if($order->diller_id== $diller->id) selected @endif>
{{ $diller->name }}
</option>
@endforeach
</select>
@error('diller_id')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.diller')])</strong>
</span>
@enderror
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.ordered-customer')
</h5>
</div>
<div class="card-body">
<label for="auto-ordered_customer-input" class="form-label">
@lang('translation.ordered-customer-name')
</label>
<input type="text"
class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
id="auto-ordered_customer-input"
name="ordered_customer" value="{{ $order->ordered_customer }}"
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
@error('ordered_customer')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.ordered-customer')])</strong>
</span>
@enderror
</div>
<div class="card-body">
<label for="cleave-phone" class="form-label">
@lang('translation.ordered-customer-phone')
</label>
<input type="text"
class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
name="ordered_customer_phone" id="cleave-phone"
value="{{ $order->ordered_customer_phone }}"
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
@error('ordered_customer_phone')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.ordered-customer-phone')])</strong>
</span>
@enderror
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.cost')
</h5>
</div>
<div class="card-body">
<div>
<label class="form-label" for="product-cost-addon">
@lang('translation.order-cost-note')
</label>
<div class="input-group mb-3">
<span class="input-group-text" id="product-cost-addon">uzs</span>
<input type="text" class="form-control @error('cost') is-invalid @enderror" name="cost"
id="cleave-numeral" value="{{ $order->cost }}"
placeholder="123,450" aria-label="Price"
aria-describedby="product-price-addon"
tabindex="26">
@error('cost')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.cost')])</strong>
</span>
@enderror
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">@lang('translation.note')</h5>
</div>
<div class="card-body">
<label for="auto-note-input" class="text-muted mb-2">
@lang('translation.note-value')
</label>
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
id="auto-note-input" value="{{ $order->note }}"
placeholder="@lang('translation.write-cost-note')"
rows="3" tabindex="27"></textarea>
@error('note')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
</span>
@enderror
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
</div>
<!-- end row -->
</form>
@endsection
@section('script')
<script src="{{ URL::asset('assets/libs/cleave.js/cleave.js.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
{{-- <script src="{{ URL::asset('/assets/js/pages/orders/show.js') }}"></script>--}}
<script src="{{ URL::asset('/assets/js/pages/orders/create.js') }}"></script>
@endsection

View File

@@ -0,0 +1,601 @@
@extends('layouts.master')
@section('title')
@lang('translation.create-auto-order')
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1')
@lang('translation.auto')
@endslot
@slot('title')
@lang('translation.create-auto-order')
@endslot
@endcomponent
<form action="{{ route('auto.store') }}" method="post" autocomplete="off" class="needs-validation" validate>
@csrf
<input type="hidden" name="status" value="{{ App\Enums\OrderStatusEnum::DRAFT->name }}">
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-header">
@lang('translation.order-information')
</div>
<div class="card-body">
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-number-input">
@lang('translation.number')
</label>
<input type="text" class="form-control text-uppercase @error('number') is-invalid @enderror"
name="number" placeholder="@lang('translation.write-number')"
id="order-number-input" value="{{ old('number') }}"
tabindex="1">
@error('number')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.number')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-created_date-input">@lang('translation.created-date')</label>
<input type="text"
class="form-control text-uppercase flatpickr-input @error('created_at') is-invalid @enderror"
id="auto-created_date-input"
name="created_at" value="{{ old('created_at') }}"
data-provider="flatpickr" data-date-format="d.m.Y"
tabindex="2">
@error('created_at')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.created-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label for="choices-purpose-input" class="form-label">
@lang('translation.select-purpose')
</label>
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
name="purpose_id" class="form-select @error('purpose_id') is-invalid @enderror"
id="choices-purpose-input" tabindex="3">
@foreach($purposeCases as $purposeItem)
<option value="{{ $purposeItem->id }}"
@if(old('purpose_id') == $purposeItem->id)selected @endif>
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
</option>
@endforeach
</select>
@error('purpose_id')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.purpose')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- order customer card -->
<div class="card">
<div class="card-header">
@lang('translation.order-customer')
</div>
<div class="card-body">
<div class="mb-3">
<!-- Inline Checkbox -->
<div class="form-check form-check-inline mb-2">
<input class="form-check-input " type="radio"
@if(old('customer_type')=='physical') checked @endif
name="customer_type"
onclick="handleCustomerClick(this.value);" value="physical"
id="flexRadioDefault2">
<label class="form-check-label" for="flexRadioDefault2">
@lang('translation.physical')
</label>
</div>
<div class="form-check form-check-inline mb-2">
<input class="form-check-input is " type="radio"
@if(old('customer_type')=='juridical') checked
@endif name="customer_type"
onclick="handleCustomerClick(this.value);" value="juridical"
id="flexRadioDefault1">
<label class="form-check-label" for="flexRadioDefault1">
@lang('translation.juridical')
</label>
</div>
</div>
<div class="row gy-4 @if(old('customer_type')=='juridical') d-none @endif" id="customer-block">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_last_name-input">
@lang('translation.customer-last-name')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
name="customer_last_name" id="order-customer_last_name-input"
value="{{ old('customer_last_name') }}"
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
@error('customer_last_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-last-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_first_name-input">
@lang('translation.customer-first-name')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
name="customer_first_name" id="order-customer_first_name-input"
value="{{ old('customer_first_name') }}"
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
@error('customer_first_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-first-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_patronymic-input">
@lang('translation.customer-patronymic')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
name="customer_patronymic" id="order-customer_patronymic-input"
value="{{ old('customer_patronymic') }}"
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
@error('customer_patronymic')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-patronymic')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4 @if(old('customer_type')=='physical') d-none @endif"
id="customer-company-block">
<div class="mb-3">
<label class="form-label" for="order-customer_company-input">
@lang('translation.customer-juridical-name')
</label>
<input type="text" class="form-control text-uppercase" name="customer_company"
id="order-customer_company-input" value="{{ old('customer_company') }}"
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
@error('customer_company')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-company')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<!-- order owner card -->
<div class="card">
<div class="card-header">
@lang('translation.order-owner')
</div>
<div class="card-body">
<div class="mb-3">
<!-- Inline Checkbox -->
<div class="form-check form-check-inline mb-2">
<input class="form-check-input" type="radio" @if(old('owner_type')=='physical') checked
@endif name="owner_type"
onclick="handleOwnerClick(this.value);" value="physical"
id="flexRadioDefault3">
<label class="form-check-label" for="flexRadioDefault3">
@lang('translation.physical')
</label>
</div>
<div class="form-check form-check-inline mb-2">
<input class="form-check-input is " type="radio"
@if(old('owner_type')=='juridical') checked
@endif name="owner_type"
onclick="handleOwnerClick(this.value);" value="juridical"
id="flexRadioDefault4">
<label class="form-check-label" for="flexRadioDefault4">
@lang('translation.juridical')
</label>
</div>
</div>
<div class="row gy-4 @if(old('owner_type')=='juridical')d-none @endif" id="owner-block">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-owner_last_name-input">
@lang('translation.owner-last-name')
</label>
<input type="text" value="{{ old('owner_last_name') }}"
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
name="owner_last_name" id="order-owner_last_name-input"
placeholder="@lang('translation.write-auto-owner-last-name')" tabindex="7">
@error('owner_last_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-last-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6" id="owner-block">
<label class="form-label" for="order-owner_first_name-input">
@lang('translation.owner-first-name')
</label>
<input type="text"
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
name="owner_first_name" value="{{ old('owner_first_name') }}"
id="order-owner_first_name-input"
placeholder="@lang('translation.write-auto-owner-first-name')" tabindex="8">
@error('owner_first_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-first-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-owner_patronymic-input">
@lang('translation.owner-patronymic')
</label>
<input type="text" value="{{ old('owner_patronymic') }}"
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
name="owner_patronymic" id="order-owner_patronymic-input"
placeholder="@lang('translation.write-auto-owner-patronymic')" tabindex="9">
@error('owner_patronymic')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-patronymic')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4 @if(old('owner_type')=='physical')d-none @endif"
id="owner-company-block">
<div class="mb-3">
<label class="form-label" for="order-owner_company-input">
@lang('translation.owner-company')
</label>
<input type="text" class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
name="owner_company" value="{{ old('owner_company') }}"
id="order-owner_company-input"
placeholder="@lang('translation.write-auto-owner-juridical-name')" tabindex="">
@error('owner_company')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-company')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
@lang('translation.auto-information')
</div>
<div class="card-body">
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="choose-order-car-category">
@lang('translation.select-car-category')
</label>
<select data-choices data-choices-multiple-groups="false"
class="form-control @error('car_category') is-invalid @enderror"
id="choose-order-car-category" name="car_category" tabindex="10">
@foreach ($concerns as $concern)
<option value="{{ $concern->id }}"
{{ old('car_category') == $concern->id ? 'selected' : '' }}>
@lang($concern->{str_replace('_', '-', app()->getLocale())})
</option>
@endforeach
</select>
@error('car_category')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car_category')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-car_mark-input">
@lang('translation.car-mark')
</label>
<input type="text" class="form-control text-uppercase @error('car_mark') is-invalid @enderror"
id="auto-car_mark-input" name="car_mark" value="{{ old('car_mark') }}"
placeholder="@lang('translation.write-car-mark')" tabindex="12">
@error('car_mark')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car-mark')])</strong>
</span>
@enderror
</div>
<div class=" col-xxl-4 col-md-6">
<label class="form-label" for="auto-color-input">
@lang('translation.color')
</label>
<input type="text" class="form-control text-uppercase @error('color') is-invalid @enderror"
id="auto-color-input" name="color" value="{{ old('color') }}"
placeholder="@lang('translation.write-car-color')" tabindex="22">
@error('color')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.color')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-made_date-input">
@lang('translation.made-date')
</label>
<input type="text" class="form-control text-uppercase @error('made_date') is-invalid @enderror"
id="auto-made_date-input" name="made_date"
data-provider="flatpickr" data-date-format="d.m.Y" value="{{ old('made_date') }}"
placeholder="@lang('translation.write-car-made-date')"
tabindex="13">
@error('made_date')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.made-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-body-input">
@lang('translation.body')
</label>
<input type="text" class="form-control text-uppercase @error('body') is-invalid @enderror"
id="auto-body-input" name="body" value="{{ old('body') }}"
placeholder="@lang('translation.write-car-body')" tabindex="14">
@error('body')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.body')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-engine-input">
@lang('translation.engine')
</label>
<input type="text" class="form-control text-uppercase @error('engine') is-invalid @enderror"
id="auto-engine-input" name="engine" value="{{ old('engine') }}"
placeholder="@lang('translation.write-car-engine')" tabindex="15">
@error('engine')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.engine')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-car_number-input">
@lang('translation.car-number')
</label>
<input type="text" class="form-control text-uppercase @error('car_number') is-invalid @enderror"
id="auto-car_number-input" name="car_number" value="{{ old('car_number') }}"
placeholder="@lang('translation.write-car-number')" tabindex="16">
@error('car_number')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car-number')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-type-input">
@lang('translation.type')
</label>
<input type="text" class="form-control text-uppercase @error('type') is-invalid @enderror"
id="auto-type-input" name="type" value="{{ old('type') }}"
placeholder="@lang('translation.write-car-type')" tabindex="17">
@error('type')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.type')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-shassi-input">
@lang('translation.shassi')
</label>
<input type="text" class="form-control text-uppercase @error('shassi') is-invalid @enderror"
id="auto-shassi-input" name="shassi" value="{{ old('shassi') }}"
placeholder="@lang('translation.write-car-shassi')" tabindex="18">
@error('shassi')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.shassi')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-tech_passport-input">
@lang('translation.technical-passport')
</label>
<input type="text" class="form-control text-uppercase @error('tech_passport') is-invalid @enderror"
id="auto-tech_passport-input"
name="tech_passport" value="{{ old('tech_passport') }}"
placeholder="@lang('translation.write-car-technical-passport')" tabindex="19">
@error('tech_passport')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-tech_given_date-input">
@lang('translation.technical-passport-given-date')
</label>
<input type="text"
class="form-control flatpickr-input text-uppercase @error('tech_given_date') is-invalid @enderror"
id="auto-tech_given_date-input"
name="tech_given_date"
value="{{ old('tech_given_date') }}"
data-provider="flatpickr" data-date-format="d.m.Y"
placeholder="@lang('translation.write-car-technical-passport-given-date')"
tabindex="20">
@error('tech_given_date')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-tech_given_whom-input">
@lang('translation.technical-passport-given-by-whom')
</label>
<input type="text" class="form-control text-uppercase @error('tech_given_whom') is-invalid @enderror"
id="auto-tech_given_whom-input"
name="tech_given_whom" value="{{ old('tech_given_whom') }}"
placeholder="@lang('translation.write-technical-passport-given-by-whom')"
tabindex="21">
@error('tech_given_whom')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-by-whom')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="col-lg-4 col-sm-4 col-md-4">
<div class="text-start mb-3 btn-block">
<button type="submit" class="btn btn-success w-sm" name="save"
tabindex="">@lang('translation.save')</button>
</div>
</div>
</div>
<!-- end col -->
<!-- end card -->
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">@lang('translation.diller')</h5>
</div>
<div class="card-body">
<label for="choices-diller-input" class="form-label">
@lang('translation.select-diller')
</label>
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
name="diller_id" class="form-select @error('diller_id') is-invalid @enderror"
id="choices-diller-input"
tabindex="23">
<option value="" selected> @lang('translation.select-diller')</option>
@foreach($dillers as $diller)
<option value="{{ $diller->id}}" @if(old('diller_id')== $diller->id) selected @endif>
{{ $diller->name }}
</option>
@endforeach
</select>
@error('diller_id')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.diller')])</strong>
</span>
@enderror
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.ordered-customer')
</h5>
</div>
<div class="card-body">
<label for="auto-ordered_customer-input" class="form-label">
@lang('translation.ordered-customer-name')
</label>
<input type="text" class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
id="auto-ordered_customer-input"
name="ordered_customer" value="{{ old('ordered_customer') }}"
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
@error('ordered_customer')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.ordered-customer')])</strong>
</span>
@enderror
</div>
<div class="card-body">
<label for="cleave-phone" class="form-label">
@lang('translation.ordered-customer-phone')
</label>
<input type="text" class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
name="ordered_customer_phone" id="cleave-phone"
value="{{ old('ordered_customer_phone') }}"
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
@error('ordered_customer_phone')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.ordered-customer-phone')])</strong>
</span>
@enderror
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.cost')
</h5>
</div>
<div class="card-body">
<div>
<label class="form-label" for="product-cost-addon">
@lang('translation.order-cost-note')
</label>
<div class="input-group mb-3">
<span class="input-group-text" id="product-cost-addon">uzs</span>
<input type="text" class="form-control @error('cost') is-invalid @enderror" name="cost"
id="cleave-numeral" value="{{ old('cost') }}"
placeholder="123,450" aria-label="Price"
aria-describedby="product-price-addon"
tabindex="26">
@error('cost')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.cost')])</strong>
</span>
@enderror
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">@lang('translation.note')</h5>
</div>
<div class="card-body">
<label for="auto-note-input" class="text-muted mb-2">
@lang('translation.note-value')
</label>
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
id="auto-note-input" value="{{ old('note') }}"
placeholder="@lang('translation.write-cost-note')"
rows="3" tabindex="27"></textarea>
@error('note')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
</span>
@enderror
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
</div>
<!-- end row -->
</form>
@endsection
@section('script')
<script src="{{ URL::asset('assets/libs/cleave.js/cleave.js.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
{{-- <script src="{{ URL::asset('/assets/js/pages/orders/show.js') }}"></script>--}}
<script src="{{ URL::asset('/assets/js/pages/orders/create.js') }}"></script>
@endsection

View File

@@ -0,0 +1,622 @@
@extends('layouts.master')
@section('title')
@lang('translation.edit-auto-order')
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1')
@lang('translation.auto')
@endslot
@slot('title')
@lang('translation.edit-auto-order')
@endslot
@endcomponent
<form action="{{ route('auto.update',[$order->id]) }}" method="post" autocomplete="off" class="needs-validation"
validate>
@csrf
@method('put')
<input type="hidden" name="status" value="{{ App\Enums\OrderStatusEnum::DRAFT->name }}">
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-header">
@lang('translation.order-information')
</div>
<div class="card-body">
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-number-input">
@lang('translation.number')
</label>
<input type="text"
class="form-control text-uppercase @error('number') is-invalid @enderror"
name="number" placeholder="@lang('translation.write-number')"
id="order-number-input" value="{{ $order->number }}"
tabindex="1">
@error('number')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.number')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-created_date-input">@lang('translation.created-date')</label>
<input type="text"
class="form-control flatpickr-input @error('created_at') is-invalid @enderror"
id="auto-created_date-input"
name="created_at" value="{{ $order->created_at }}"
data-provider="flatpickr" data-date-format="d.m.Y"
data-maxDate="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
tabindex="2">
@error('created_at')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.created-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label for="choices-purpose-input" class="form-label">
@lang('translation.select-purpose')
</label>
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
name="purpose_id" class="form-select @error('purpose_id') is-invalid @enderror"
id="choices-purpose-input" tabindex="3">
@foreach($purposeCases as $purposeItem)
<option value="{{ $purposeItem->id }}"
@if(old('purpose_id') == $purposeItem->id)selected @endif>
{{ $purposeItem->{str_replace('_', '-', app()->getLocale())} }}
</option>
@endforeach
</select>
@error('purpose_id')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.purpose')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- order customer card -->
<div class="card">
<div class="card-header">
@lang('translation.order-customer')
</div>
<div class="card-body">
<div class="mb-3">
<!-- Inline Checkbox -->
<div class="form-check form-check-inline mb-2">
<input class="form-check-input" type="radio"
@if($order->customer_type=='physical') checked @endif
name="customer_type"
onclick="handleCustomerClick(this.value);" value="physical"
id="flexRadioDefault2">
<label class="form-check-label" for="flexRadioDefault2">
@lang('translation.physical')
</label>
</div>
<div class="form-check form-check-inline mb-2">
<input class="form-check-input is " type="radio"
@if($order->customer_type=='juridical') checked
@endif name="customer_type"
onclick="handleCustomerClick(this.value);" value="juridical"
id="flexRadioDefault1">
<label class="form-check-label" for="flexRadioDefault1">
@lang('translation.juridical')
</label>
</div>
</div>
<div class="row gy-4 @if($order->customer_type=='juridical') d-none @endif" id="customer-block">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_last_name-input">
@lang('translation.customer-last-name')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_last_name') is-invalid @enderror"
name="customer_last_name" id="order-customer_last_name-input"
value="{{ $order->customer_last_name }}"
placeholder="@lang('translation.write-customer-last-name')" tabindex="4">
@error('customer_last_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-last-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_first_name-input">
@lang('translation.customer-first-name')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_first_name') is-invalid @enderror"
name="customer_first_name" id="order-customer_first_name-input"
value="{{ $order->customer_first_name }}"
placeholder="@lang('translation.write-customer-first-name')" tabindex="5">
@error('customer_first_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-first-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-customer_patronymic-input">
@lang('translation.customer-patronymic')
</label>
<input type="text"
class="form-control text-uppercase @error('customer_patronymic') is-invalid @enderror"
name="customer_patronymic" id="order-customer_patronymic-input"
value="{{ $order->customer_patronymic }}"
placeholder="@lang('translation.write-customer-patronymic')" tabindex="6">
@error('customer_patronymic')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-patronymic')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4 @if($order->customer_type=='physical') d-none @endif"
id="customer-company-block">
<div class="mb-3">
<label class="form-label" for="order-customer_company-input">
@lang('translation.customer-juridical-name')
</label>
<input type="text" class="form-control text-uppercase" name="customer_company"
id="order-customer_company-input" value="{{ $order->customer_company }}"
placeholder="@lang('translation.write-customer-juridical-name')" tabindex="3">
@error('customer_company')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.customer-company')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<!-- order owner card -->
<div class="card">
<div class="card-header">
@lang('translation.order-owner')
</div>
<div class="card-body">
<div class="mb-3">
<!-- Inline Checkbox -->
<div class="form-check form-check-inline mb-2">
<input class="form-check-input" type="radio" @if($order->owner_type=='physical') checked
@endif name="owner_type"
onclick="handleOwnerClick(this.value);" value="physical"
id="flexRadioDefault3">
<label class="form-check-label" for="flexRadioDefault3">
@lang('translation.physical')
</label>
</div>
<div class="form-check form-check-inline mb-2">
<input class="form-check-input is " type="radio"
@if($order->owner_type=='juridical') checked
@endif name="owner_type"
onclick="handleOwnerClick(this.value);" value="juridical"
id="flexRadioDefault4">
<label class="form-check-label" for="flexRadioDefault4">
@lang('translation.juridical')
</label>
</div>
</div>
<div class="row gy-4 @if($order->owner_type=='juridical')d-none @endif" id="owner-block">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-owner_last_name-input">
@lang('translation.owner-last-name')
</label>
<input type="text" value="{{ $order->owner_last_name }}"
class="form-control text-uppercase @error('owner_last_name') is-invalid @enderror"
name="owner_last_name" id="order-owner_last_name-input"
placeholder="@lang('translation.write-owner-last-name')" tabindex="7">
@error('owner_last_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-last-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6" id="owner-block">
<label class="form-label" for="order-owner_first_name-input">
@lang('translation.owner-first-name')
</label>
<input type="text"
class="form-control text-uppercase @error('owner_first_name') is-invalid @enderror"
name="owner_first_name" value="{{ $order->owner_first_name }}"
id="order-owner_first_name-input"
placeholder="@lang('translation.write-owner-first-name')" tabindex="8">
@error('owner_first_name')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-first-name')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="order-owner_patronymic-input">
@lang('translation.owner-patronymic')
</label>
<input type="text" value="{{ $order->owner_patronymic }}"
class="form-control text-uppercase @error('owner_patronymic') is-invalid @enderror"
name="owner_patronymic" id="order-owner_patronymic-input"
placeholder="@lang('translation.write-owner-patronymic')" tabindex="9">
@error('owner_patronymic')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-patronymic')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4 @if($order->owner_type=='physical')d-none @endif"
id="owner-company-block">
<div class="mb-3">
<label class="form-label" for="order-owner_company-input">
@lang('translation.owner-company')
</label>
<input type="text"
class="form-control text-uppercase @error('owner_company') is-invalid @enderror"
name="owner_company" value="{{ $order->owner_company }}"
id="order-owner_company-input"
placeholder="@lang('translation.write-owner-juridical-name')" tabindex="">
@error('owner_company')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.owner-company')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
@lang('translation.auto-information')
</div>
<div class="card-body">
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="choose-order-car-category">
@lang('translation.select-car-category')
</label>
<select data-choices data-choices-multiple-groups="false"
class="form-control text-uppercase @error('car_category') is-invalid @enderror"
id="choose-order-car-category" name="car_category" tabindex="10">
@foreach ($concerns as $concern)
<option value="{{ $concern->id }}"
{{ $concern->car_category == $concern->id ? 'selected' : '' }}>
@lang($concern->{str_replace('_', '-', app()->getLocale())})
</option>
@endforeach
</select>
@error('car_category')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car_category')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-car_mark-input">
@lang('translation.car-mark')
</label>
<input type="text"
class="form-control text-uppercase @error('car_mark') is-invalid @enderror"
id="auto-car_mark-input" name="car_mark" value="{{ $order->car_mark }}"
placeholder="@lang('translation.write-car-mark')" tabindex="12">
@error('car_mark')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car-mark')])</strong>
</span>
@enderror
</div>
<div class=" col-xxl-4 col-md-6">
<label class="form-label" for="auto-color-input">
@lang('translation.color')
</label>
<input type="text"
class="form-control text-uppercase @error('color') is-invalid @enderror"
id="auto-color-input" name="color" value="{{ $order->color }}"
placeholder="@lang('translation.write-car-color')" tabindex="22">
@error('color')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.color')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-made_date-input">
@lang('translation.made-date')
</label>
<input type="text"
class="form-control text-uppercase @error('made_date') is-invalid @enderror"
id="auto-made_date-input" name="made_date"
data-provider="flatpickr" data-date-format="d.m.Y"
value="{{ $order->made_date }}"
data-deafult-date="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
placeholder="@lang('translation.write-car-made-date')"
tabindex="13">
@error('made_date')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.made-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-body-input">
@lang('translation.body')
</label>
<input type="text"
class="form-control text-uppercase @error('body') is-invalid @enderror"
id="auto-body-input" name="body" value="{{ $order->body }}"
placeholder="@lang('translation.write-car-body')" tabindex="14">
@error('body')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.body')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-engine-input">
@lang('translation.engine')
</label>
<input type="text"
class="form-control text-uppercase @error('engine') is-invalid @enderror"
id="auto-engine-input" name="engine" value="{{ $order->engine }}"
placeholder="@lang('translation.write-car-engine')" tabindex="15">
@error('engine')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.engine')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-car_number-input">
@lang('translation.car-number')
</label>
<input type="text"
class="form-control text-uppercase @error('car_number') is-invalid @enderror"
id="auto-car_number-input" name="car_number" value="{{ $order->car_number }}"
placeholder="@lang('translation.write-car-number')" tabindex="16">
@error('car_number')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.car-number')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-type-input">
@lang('translation.type')
</label>
<input type="text"
class="form-control text-uppercase @error('type') is-invalid @enderror"
id="auto-type-input" name="type" value="{{ $order->type }}"
placeholder="@lang('translation.write-car-type')" tabindex="17">
@error('type')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.type')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-shassi-input">
@lang('translation.shassi')
</label>
<input type="text"
class="form-control text-uppercase @error('shassi') is-invalid @enderror"
id="auto-shassi-input" name="shassi" value="{{ $order->shassi }}"
placeholder="@lang('translation.write-car-shassi')" tabindex="18">
@error('shassi')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.shassi')])</strong>
</span>
@enderror
</div>
</div>
<div class="row gy-4">
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label" for="auto-tech_passport-input">
@lang('translation.technical-passport')
</label>
<input type="text"
class="form-control text-uppercase @error('tech_passport') is-invalid @enderror"
id="auto-tech_passport-input"
name="tech_passport" value="{{ $order->tech_passport }}"
placeholder="@lang('translation.write-car-technical-passport')" tabindex="19">
@error('tech_passport')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-tech_given_date-input">
@lang('translation.technical-passport-given-date')
</label>
<input type="text"
class="form-control flatpickr-input @error('tech_given_date') is-invalid @enderror"
id="auto-tech_given_date-input"
name="tech_given_date"
value="{{ $order->tech_given_date }}"
data-provider="flatpickr" data-date-format="d.m.Y"
data-default="{{ Carbon\Carbon::now('Asia/Tashkent')->format('d.m.Y') }}"
placeholder="@lang('translation.write-car-technical-passport-given-date')"
tabindex="20">
@error('tech_given_date')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-date')])</strong>
</span>
@enderror
</div>
<div class="mb-3 col-xxl-4 col-md-6">
<label class="form-label"
for="auto-tech_given_whom-input">
@lang('translation.technical-passport-given-by-whom')
</label>
<input type="text"
class="form-control text-uppercase @error('tech_given_whom') is-invalid @enderror"
id="auto-tech_given_whom-input"
name="tech_given_whom" value="{{ $order->tech_given_whom }}"
placeholder="@lang('translation.write-technical-passport-given-by-whom')"
tabindex="21">
@error('tech_given_whom')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.technical-passport-given-by-whom')])</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="col-lg-4 col-sm-4 col-md-4">
<div class="text-start mb-3 btn-block">
<button type="submit" class="btn btn-success w-sm" name="save"
tabindex="">@lang('translation.save')</button>
</div>
</div>
</div>
<!-- end col -->
<!-- end card -->
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">@lang('translation.diller')</h5>
</div>
<div class="card-body">
<label for="choices-diller-input" class="form-label">
@lang('translation.select-diller')
</label>
<select data-choices data-choices-search-false data-choices-multiple-groups="false"
name="diller" class="form-select @error('diller') is-invalid @enderror"
id="choices-diller-input"
tabindex="23">
@foreach($dillers as $diller)
<option value="{{ $diller->id}}" @if($order->diller== $diller->id) selected @endif>
{{ $diller->name }}
</option>
@endforeach
</select>
@error('diller')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.diller')])</strong>
</span>
@enderror
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.ordered-customer')
</h5>
</div>
<div class="card-body">
<label for="auto-ordered_customer-input" class="form-label">
@lang('translation.ordered-customer-name')
</label>
<input type="text"
class="form-control text-uppercase @error('ordered_customer') is-invalid @enderror"
id="auto-ordered_customer-input"
name="ordered_customer" value="{{ $order->ordered_customer }}"
placeholder="@lang('translation.write-car-ordered-customer')" tabindex="24">
@error('ordered_customer')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.ordered-customer')])</strong>
</span>
@enderror
</div>
<div class="card-body">
<label for="cleave-phone" class="form-label">
@lang('translation.ordered-customer-phone')
</label>
<input type="text"
class="form-control text-uppercase @error('ordered_customer_phone') is-invalid @enderror"
name="ordered_customer_phone" id="cleave-phone-init"
value="{{ $order->ordered_customer_phone }}"
placeholder="@lang('translation.write-car-ordered-customer-phone')" tabindex="25">
@error('ordered_customer_phone')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.ordered-customer-phone')])</strong>
</span>
@enderror
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.cost')
</h5>
</div>
<div class="card-body">
<div>
<label class="form-label" for="product-cost-addon">
@lang('translation.order-cost-note')
</label>
<div class="input-group mb-3">
<span class="input-group-text" id="product-cost-addon">uzs</span>
<input type="text"
class="form-control text-uppercase @error('cost') is-invalid @enderror"
name="cost"
id="cleave-numeral" value="{{ $order->cost }}"
placeholder="123,450" aria-label="Price"
aria-describedby="product-price-addon"
tabindex="26">
@error('cost')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.cost')])</strong>
</span>
@enderror
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">@lang('translation.note')</h5>
</div>
<div class="card-body">
<label for="auto-note-input" class="text-muted mb-2">
@lang('translation.note-value')
</label>
<textarea class="form-control text-uppercase @error('note') is-invalid @enderror" name="note"
id="auto-note-input"
placeholder="@lang('translation.write-cost-note')"
rows="3" tabindex="27">{{ $order->note }}</textarea>
@error('note')
<span class="invalid-feedback" role="alert">
<strong>@lang($message,['attribute'=>trans('translation.note')])</strong>
</span>
@enderror
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
</div>
<!-- end row -->
</form>
@endsection
@section('script')
<script src="{{ URL::asset('assets/libs/cleave.js/cleave.js.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/order-edit.js') }}"></script>
@endsection

View File

@@ -0,0 +1,276 @@
@extends('layouts.master')
@section('title')
@lang('translation.auto')
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1')
@lang('translation.pages')
@endslot
@slot('title')
@lang('translation.auto')
@endslot
@endcomponent
<div class="row">
<div class="col-xl-12">
<div class="card">
<form action="{{ route('auto.index') }}" method="get" autocomplete="off" novalidate>
<div class="card-header border-0">
<div class="d-flex align-items-center">
<h5 class="card-title mb-0 flex-grow-1">@lang('translation.order-list')</h5>
<div class="flex-shrink-0 mx-2">
<a href="{{ route('auto.create') }}" type="button" class="btn btn-primary add-btn">
<i class="ri-add-line align-bottom me-1"></i>
@lang('translation.create-order')
</a>
</div>
<div class="flex-shrink-0">
@component('components.page-size',['size'=>$size])@endcomponent
</div>
</div>
</div>
<div class="card-body border border-dashed border-end-0 border-start-0">
<div class="row g-3">
<div class="col-xxl-3 col-sm-6">
<div class="search-box">
<input type="text" class="form-control search" name="search"
{{-- oninput="this.form.submit()"--}}
value="{{ isset($filters['search']) ? $filters['search'] : '' }}"
placeholder="@lang('translation.search-by-number-customer-owner')">
<i class="ri-search-line search-icon"></i>
</div>
</div>
<!--end col-->
<div class="col-xxl-2 col-sm-6">
<div>
<input type="text" class="form-control flatpickr-input"
data-provider="flatpickr" onchange="this.form.submit()"
name="period" value="{{ $filters['period'] ?? '' }}"
data-date-format="d.m.Y"
data-range-date="true" id="demo-datepicker"
placeholder="@lang('translation.select-period')" readonly="readonly">
</div>
</div>
<!--end col-->
<div class="col-xxl-3 col-sm-4">
<div>
<select data-choices data-choices-search-false onchange="this.form.submit()"
data-choices-multiple-groups="false" class="form-control"
name="purpose_id">
<option value="">
@lang('translation.select-purpose')
</option>
@foreach ($purposeCases as $case)
<option value="{{ $case->id }}"
{{ isset($filters['purpose_id']) && $case->id == $filters['purpose_id'] ? 'selected' : '' }}>
@lang($case->{str_replace('_', '-', app()->getLocale())})
</option>
@endforeach
</select>
</div>
</div>
<!--end col-->
<div class="col-xxl-3 col-sm-4">
<div>
<select data-choices data-choices-multiple-groups="false"
onchange="this.form.submit()"
class="form-control"
name="car_category">
@foreach ($concerns as $concern)
<option value="{{ $concern->id }}"
{{ isset($filters['car_category']) && $concern->id == $filters['car_category'] ? 'selected' : '' }}>
@lang($concern->{str_replace('_', '-', app()->getLocale())})
</option>
@endforeach
</select>
</div>
</div>
<!--end col-->
<div class="col-xxl-1 col-sm-4">
<div>
<button type="submit" class="btn btn-primary w-100">
<i class="ri-equalizer-fill me-1 align-bottom"></i>
</button>
</div>
</div>
<!--end col-->
</div>
<!--end row-->
</div>
</form>
<div class="card-body">
<ul class="nav nav-tabs nav-tabs-custom nav-success mb-3" role="tablist">
<li class="nav-item">
<a class="nav-link py-3 {{ request()->get('status') === null ? 'active' : '' }}"
id="ALL"
href="{{ route('auto.index', ['status' => null]) }}">
<i class="ri-store-2-fill me-1 align-bottom"></i>
@lang('translation.orders')
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3 {{ request()->status === \App\Enums\OrderStatusEnum::DRAFT->name ? 'active' : '' }}"
id="DRAFT"
href="{{ route('auto.index', ['status' => \App\Enums\OrderStatusEnum::DRAFT->name]) }}">
<i class="ri-checkbox-circle-line me-1 align-bottom"></i>
@lang(\App\Enums\OrderStatusEnum::DRAFT->value)
<span
class="badge bg-info align-middle ms-1">{{ $stats->get(\App\Enums\OrderStatusEnum::DRAFT->name) }}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3 {{ request()->status === \App\Enums\OrderStatusEnum::STARTED->name ? 'active' : '' }}"
href="{{ route('auto.index', ['status' => \App\Enums\OrderStatusEnum::STARTED->name]) }}">
<i class="ri-truck-line me-1 align-bottom"></i>
@lang(\App\Enums\OrderStatusEnum::STARTED->value)
<span
class="badge bg-primary align-middle ms-1">{{ $stats->get(\App\Enums\OrderStatusEnum::STARTED->name) }}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3 {{ request()->status === \App\Enums\OrderStatusEnum::FINISHED->name ? 'active' : '' }}"
id="FINISHED"
href="{{ route('auto.index', ['status' => \App\Enums\OrderStatusEnum::FINISHED->name]) }}">
<i class="ri-arrow-left-right-fill me-1 align-bottom"></i>
@lang(\App\Enums\OrderStatusEnum::FINISHED->value)
<span
class="badge bg-warning align-middle ms-1">{{ $stats->get(\App\Enums\OrderStatusEnum::FINISHED->name) }}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3 {{ request()->status === \App\Enums\OrderStatusEnum::REJECTED->name ? 'active' : '' }}"
id="REJECTED"
href="{{ route('auto.index', ['status' => \App\Enums\OrderStatusEnum::REJECTED->name]) }}">
<i class="ri-close-circle-line me-1 align-bottom"></i>
@lang(\App\Enums\OrderStatusEnum::REJECTED->value)
<span
class="badge bg-danger align-middle ms-1">{{ $stats->get(\App\Enums\OrderStatusEnum::REJECTED->name) }}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3 {{ request()->status === \App\Enums\OrderStatusEnum::APPROVED->name ? 'active' : '' }}"
id="APPROVED"
href="{{ route('auto.index', ['status' => \App\Enums\OrderStatusEnum::APPROVED->name]) }}">
<i class="ri-close-circle-line me-1 align-bottom"></i>
@lang(\App\Enums\OrderStatusEnum::APPROVED->value)
<span
class="badge bg-success align-middle ms-1">{{ $stats->get(\App\Enums\OrderStatusEnum::APPROVED->name) }}</span>
</a>
</li>
</ul>
</div>
<div class="table-responsive">
<table class="table border table-borderless align-middle table-nowrap mb-0">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">@lang('translation.order-number')</th>
<th scope="col">@lang('translation.created-date')</th>
<th scope="col">@lang('translation.object-name')</th>
<th scope="col">@lang('translation.customer')</th>
<th scope="col">@lang('translation.owner')</th>
<th scope="col">@lang('translation.purpose')</th>
<th scope="col">@lang('translation.diller')</th>
<th scope="col">@lang('translation.ordered-customer')</th>
<th scope="col">@lang('translation.status')</th>
<th scope="col">@lang('translation.actions')</th>
</tr>
</thead>
<tbody>
@foreach ($orders as $order)
<tr>
<td class="fw-medium"> {{($orders->currentPage() - 1) * $orders->perPage() + $loop->iteration}}</td>
<td class="fw-medium">
<a href="{{ route('auto.show', [$order->id]) }}">
{{ $order->number }}
</a>
</td>
<td>{{ $order->created_at }}</td>
<td>{{ $order->car_mark }}</td>
<td>{{ $order->customer }}</td>
<td>{{ $order->ownerName }}</td>
<td>{{ $order->purposeOne->{str_replace('_', '-', app()->getLocale())} }}</td>
<td>@if(isset($order->dillerUser)){{ $order->dillerUser->name }}@endif</td>
<td>
{{ $order->ordered_customer }}
<br/>{{ $order->ordered_customer_phone }}
</td>
<td>
<span class="badge badge-soft-success">
@lang(\App\Enums\OrderStatusEnum::getLabel($order->status))
</span>
</td>
<td>
<div class="dropdown">
<button
class="btn btn-link text-muted p-1 mt-n2 py-0 text-decoration-none fs-15"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="ri-more-fill align-bottom me-2 text-muted"></i>
</button>
<div class="dropdown-menu dropdown-menu-end">
<a href="{{ route('auto.show', [$order->id]) }}"
class="dropdown-item">
<i class="ri-eye-fill align-bottom me-2 text-muted"></i>
@lang('translation.view')
</a>
@if ($order->status === \App\Enums\OrderStatusEnum::DRAFT->name)
<a class="dropdown-item" href="{{ route('auto.edit', [$order->id]) }}">
<i class="ri-pencil-fill align-bottom me-2 text-muted"></i>
@lang('translation.edit')
</a>
@endif
<div class="dropdown-divider"></div>
<form action="{{ route('auto.clone', [$order->id]) }}" method="post"
novalidate>
@csrf
@method('put')
<input type="hidden" value="{{ $order->id }}" name="id">
<button type="submit" title="Start this order"
class="dropdown-item bg-white link-info">
<i class=" ri-file-copy-line align-middle"></i>
@lang('translation.clone')
</button>
</form>
@if ($order->status === \App\Enums\OrderStatusEnum::DRAFT->name)
<form action="{{ route('members.invite') }}" method="post" novalidate>
@csrf
@method('post')
<input type="checkbox" name="{{ auth()->id() }}" checked hidden>
<input type="hidden" value="{{ $order->id }}" name="order_id">
<input type="hidden"
value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}"
name="order_type">
<button type="submit" title="Start this order"
class="dropdown-item bg-white link-info">
<i class=" ri-fingerprint-line align-middle"></i>
@lang('translation.start')
</button>
</form>
@endif
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="mt-3">{{ $orders->withQueryString()->links() }}</div>
</div>
<!-- end card-body -->
</div>
<!-- end card -->
@endsection
@section('script')
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
@endsection

View File

@@ -0,0 +1,46 @@
@extends('layouts.master')
@section('title')
@lang('translation.overview')
@endsection
@section('css')
<link href="{{ URL::asset('assets/libs/dropzone/dropzone.min.css') }}" rel="stylesheet">
@endsection
@section('content')
@component('components.order-breadcrumbs', ['order' => $order, 'active' => 'activities'])
@endcomponent
<!-- end row -->
<div class="row">
<div class="col-lg-12">
<div class="tab-content text-muted">
<div class="tab-pane fade show active" id="project-activities" role="tabpanel">
<div class="card">
<div class="card-body">
<h5 class="card-title"> @lang('translation.activities') </h5>
<div class="acitivity-timeline py-3">
@foreach ($actions as $action)
@component('components.actions.order_created',['action'=>$action])@endcomponent
@component('components.actions.attachment',['action'=>$action])@endcomponent
@component('components.actions.order_updated',['action'=>$action])@endcomponent
@component('components.actions.members_added',['action'=>$action])@endcomponent
@component('components.actions.completed',['action'=>$action])@endcomponent
@component('components.actions.rejected',['action'=>$action])@endcomponent
@endforeach
</div>
</div>
<!--end card-body-->
</div>
<!--end card-->
</div>
<!-- end tab pane -->
</div>
</div>
<!-- end col -->
</div>
<!-- end row -->
@endsection
@section('script')
<script src="{{ URL::asset('assets/libs/dropzone/dropzone.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/activities.js') }}"></script>
@endsection

View File

@@ -0,0 +1,615 @@
@extends('layouts.master')
@section('title')
@lang('translation.overview')
@endsection
@section('css')
<link href="{{ URL::asset('assets/libs/dropzone/dropzone.min.css') }}" rel="stylesheet">
@endsection
@section('content')
@component('components.order-breadcrumbs', ['order' => $order, 'active' => 'documents'])
@endcomponent
<!-- end row -->
<div class="chat-wrapper d-lg-flex gap-1 mx-n4 mt-n4 p-1">
<div class="file-manager-sidebar" data-simplebar>
<div class="p-3 d-flex flex-column h-100">
<div class="mb-3">
<h5 class="mb-0 fw-semibold">
@lang('translation.documents')
</h5>
</div>
<div class="search-box my-4">
<input type="text" class="form-control bg-light border-light"
placeholder="@lang('translation.search-here')">
<i class="ri-search-2-line search-icon"></i>
</div>
<div class="mt-auto mx-n4 px-4">
<ul class="list-unstyled file-manager-menu">
<li>
<a data-bs-toggle="collapse" href="#collapseExample" role="button"
aria-expanded="{{ $type === 'ALL' ? 'true' : 'false' }}" aria-controls="collapseExample"
@if ($type === 'ALL') class="text-info" @endif>
<i class="ri-folder-2-line align-bottom me-2"></i>
<span class="file-list-link">
{{-- @lang(\App\Enums\MediaTypeEnum::ALL)--}}
</span>
</a>
<div class="collapse {{ $type === 'ALL' ? 'show' : 'false' }}" id="collapseExample">
<ul class="sub-menu list-unstyled">
@foreach (\App\Enums\MediaTypeEnum::cases() as $allList)
<li>
@if ($allList->name == 'ALL')
<a href="{{ route('auto.show-documents', [$order->id]) }}"
class="text-info">
@lang('translation.see',[__($allList->value)])
</a>
@else
@lang($allList->value)
@endif
</li>
@endforeach
</ul>
</div>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::PASSPORT_CUSTOMER->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::PASSPORT_CUSTOMER->name) class="text-info" @endif>
<i class="ri-file-list-2-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::PASSPORT_CUSTOMER->value)
</span>
</a>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::OBJECT_FILES->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::OBJECT_FILES->name) class="text-info" @endif>
<i class="ri-file-list-2-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::OBJECT_FILES->value)
</span>
</a>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::COMPARES->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::COMPARES->name) class="text-info" @endif>
<i class="ri-image-2-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::COMPARES->value)
</span>
</a>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::OBJECT_PHOTO->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::OBJECT_PHOTO->name) class="text-info" @endif>
<i class="ri-history-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::OBJECT_PHOTO->value)
</span>
</a>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::PARTICIPATE_CERTIFICATE->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::PARTICIPATE_CERTIFICATE->name) class="text-info" @endif>
<i class="ri-star-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::PARTICIPATE_CERTIFICATE->value)
</span>
</a>
</li>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::APPRAISER_CERTIFICATE->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::APPRAISER_CERTIFICATE->name) class="text-info" @endif>
<i class="ri-delete-bin-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::APPRAISER_CERTIFICATE->value)
</span>
</a>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::INSURANCE_POLICY->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::INSURANCE_POLICY->name) class="text-info" @endif>
<i class="ri-delete-bin-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::INSURANCE_POLICY->value)
</span>
</a>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::CERTIFICATE->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::CERTIFICATE->name) class="text-info" @endif>
<i class="ri-delete-bin-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::CERTIFICATE->value)
</span>
</a>
</li>
<li>
<a href="{{ route('auto.show-documents', [$order->id, 'type' => \App\Enums\MediaTypeEnum::ADDITIONAL->name]) }}"
@if ($type === \App\Enums\MediaTypeEnum::ADDITIONAL->name) class="text-info" @endif>
<i class="ri-delete-bin-line align-bottom me-2"></i>
<span class="file-list-link">
@lang(\App\Enums\MediaTypeEnum::ADDITIONAL->value)
</span>
</a>
</li>
</ul>
</div>
<div class="mt-auto mx-n4 px-4">
<form class="dropzone" id="create-file-form" action="{{ route('attach.files') }}" novalidate>
@csrf
<!-- end dropzon-preview -->
<input type="hidden" name="order_id" value="{{ $order->id }}">
<input type="hidden" name="order_type" value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}">
<input type="hidden" class="form-control" name="file_type" value="{{ $type }}">
<div class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple="multiple">
</div>
<div class="dz-message needsclick">
<div class="mb-3">
<i class="display-6 text-muted ri-upload-cloud-2-fill"></i>
</div>
<h5>Faylni bu yerga qo'ying yoki tanlang</h5>
</div>
</div>
<!-- end card body -->
</form>
</div>
{{-- @if ($type != 'ALL') --}}
<div class="mt-auto mx-n4 px-4 pt-5">
<div class="mt-auto mx-n4 px-4">
<h6 class="fs-11 text-muted text-uppercase mb-3">
@lang('translation.storage-status')
</h6>
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<i class="ri-database-2-line fs-17"></i>
</div>
<div class="flex-grow-1 ms-3 overflow-hidden">
<div class="progress mb-2 progress-sm">
<div class="progress-bar bg-success" role="progressbar" style="width: 25%"
aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<span class="text-muted fs-12 d-block text-truncate">
@lang('translation.used-of',["<b>119</b>GB","<b>".\App\Models\File::getFileSizeInMB($sizeInStorage)."</b>"])
</span>
</div>
</div>
</div>
</div>
{{-- @endif --}}
</div>
</div>
<div class="file-manager-content w-100 p-3 py-0">
<div class="mx-n3 pt-4 px-4 file-manager-content-scrollss">
<div>
<div class="d-flex align-items-center mb-3">
<h5 class="flex-grow-1 fs-16 mb-0" id="filetype-title">
@lang(\App\Enums\MediaTypeEnum::getLabel($type))
</h5>
<div class="flex-shrink-0">
<button class="btn btn-success createFile-modal" data-bs-toggle="modal"
data-bs-target="#createFileModal"><i class="ri-add-line align-bottom me-1"></i>
@lang('translation.create-file')
</button>
</div>
</div>
<div class="mb-4">
<ul class="list-unstyled mb-0" id="dropzone-preview">
<li class="mt-2" id="dropzone-preview-list">
<!-- This is used as the file preview template -->
<div class="border rounded">
<div class="d-flex p-2">
<div class="flex-shrink-0 me-3">
<div class="avatar-sm bg-light rounded">
<img data-dz-thumbnail class="img-fluid rounded d-block" src="#"
alt="Dropzone-Image"/>
</div>
</div>
<div class="flex-grow-1">
<div class="pt-1">
<h5 class="fs-14 mb-1" data-dz-name>&nbsp;</h5>
<p class="fs-13 text-muted mb-0" data-dz-size></p>
<strong class="error text-danger" data-dz-errormessage></strong>
</div>
</div>
<div class="flex-shrink-0 ms-3">
<button data-dz-remove
class="btn btn-sm btn-danger">@lang('translation.delete')</button>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="table-responsive" data-simplebar>
<table class="table align-middle table-nowrap mb-0">
<thead class="table-active">
<tr>
<th scope="col">@lang('translation.file-name')</th>
<th scope="col">@lang('translation.file-item')</th>
<th scope="col">@lang('translation.file-size')</th>
<th scope="col">@lang('translation.recent-date')</th>
<th scope="col" class="text-center">@lang('translation.actions')</th>
</tr>
</thead>
<tbody id="file-list">
@if(isset($certificates))
@foreach ($certificates as $certificate)
<tr>
<td>
<div class="d-flex align-items-center">
<div class="flex-shrink-0 fs-17 me-2 filelist-icon">
<i
class="ri-file-pdf-fill align-bottom text-success"></i>
</div>
<div class="flex-grow-1 filelist-name">
<a href="{{ Storage::url($certificate->path) }}">
@lang( \App\Enums\MediaTypeEnum::getLabel($type))
</a>
</div>
</div>
</td>
<td>
@lang( \App\Enums\MediaTypeEnum::getLabel($certificate->type) )
</td>
<td class="filelist-size">2 MB</td>
<td class="filelist-create">{{ $certificate->created_at }}</td>
<td>
<div class="d-flex gap-3 justify-content-center">
<button type="button"
class="btn btn-ghost-primary btn-icon btn-sm favourite-btn ">
<i class="ri-star-fill fs-13 align-bottom"></i>
</button>
<div class="dropdown">
<button class="btn btn-light btn-icon btn-sm dropdown" type="button"
data-bs-toggle="dropdown" aria-expanded="false">
<i class="ri-more-fill align-bottom"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li>
<a class="dropdown-item viewfile-list"
href="#">@lang('translation.view')</a>
</li>
<li>
<a class="dropdown-item edit-list" href="#createFileModal"
data-bs-toggle="modal" data-edit-id="1"
role="button">@lang('translation.rename')</a>
</li>
<li class="dropdown-divider"></li>
<li>
@component('components.delete-btn')
@slot('url')
{{ route('certificates.destroy', [$certificate->id]) }}
@endslot
@endcomponent
</li>
</ul>
</div>
</div>
</td>
</tr>
@endforeach
@else
@foreach ($files as $file)
<tr>
<td>
<div class="d-flex align-items-center">
<div class="flex-shrink-0 fs-17 me-2 filelist-icon">
<i
class="ri-file-{{ $file->extension }}-fill align-bottom text-success"></i>
</div>
<div class="flex-grow-1 filelist-name">
<a href="{{ Storage::url($file->path) }}">
{{ $file->name }}
</a>
</div>
</div>
</td>
<td>
@lang( \App\Enums\MediaTypeEnum::getLabel($file->type) )
</td>
<td class="filelist-size">{{ $file->size }}</td>
<td class="filelist-create">{{ $file->created_at }}</td>
<td>
<div class="d-flex gap-3 justify-content-center">
<button type="button"
class="btn btn-ghost-primary btn-icon btn-sm favourite-btn ">
<i class="ri-star-fill fs-13 align-bottom"></i>
</button>
<div class="dropdown">
<button class="btn btn-light btn-icon btn-sm dropdown" type="button"
data-bs-toggle="dropdown" aria-expanded="false">
<i class="ri-more-fill align-bottom"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li>
<a class="dropdown-item viewfile-list"
href="#">@lang('translation.view')</a>
</li>
<li>
<a class="dropdown-item edit-list" href="#createFileModal"
data-bs-toggle="modal" data-edit-id="1"
role="button">Rename</a>
</li>
<li class="dropdown-divider"></li>
<li>
@component('components.delete-btn')
@slot('url')
{{ route('file.delete', [$file->id]) }}
@endslot
@endcomponent
</li>
</ul>
</div>
</div>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="mt-3">{{ $files->withQueryString()->links() }}</div>
</div>
</div>
</div>
<!-- By default be open file manager detail modal-->
<div class="file-manager-detail-content p-3 py-0">
<div class="mx-n3 pt-3 px-3 file-detail-content-scroll" data-simplebar>
<div id="folder-overview">
<div class="d-flex align-items-center pb-3 border-bottom border-bottom-dashed">
<h5 class="flex-grow-1 fw-semibold mb-0">@lang('translation.overview')</h5>
<div>
<button type="button" class="btn btn-soft-danger btn-icon btn-sm fs-16 close-btn-overview">
<i class="ri-close-fill align-bottom"></i>
</button>
</div>
</div>
<div id="simple_dount_chart"
data-colors='["--vz-info", "--vz-danger", "--vz-primary", "--vz-success"]'
class="apex-charts mt-3" dir="ltr"></div>
<div class="mt-4">
<ul class="list-unstyled vstack gap-4">
<li>
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="avatar-xs">
<div class="avatar-title rounded bg-soft-secondary text-secondary">
<i class="ri-file-text-line fs-17"></i>
</div>
</div>
</div>
<div class="flex-grow-1 ms-3">
<h5 class="mb-1 fs-15">Documents</h5>
<p class="mb-0 fs-12 text-muted">{{ $countDocs }} files</p>
</div>
<b>27.01 GB</b>
</div>
</li>
<li>
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="avatar-xs">
<div class="avatar-title rounded bg-soft-success text-success">
<i class="ri-gallery-line fs-17"></i>
</div>
</div>
</div>
<div class="flex-grow-1 ms-3">
<h5 class="mb-1 fs-15">Media</h5>
<p class="mb-0 fs-12 text-muted">{{ $countMediaFiles }} files</p>
</div>
<b>20.87 GB</b>
</div>
</li>
<li>
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="avatar-xs">
<div class="avatar-title rounded bg-soft-warning text-warning">
<i class="ri-folder-2-line fs-17"></i>
</div>
</div>
</div>
<div class="flex-grow-1 ms-3">
<h5 class="mb-1 fs-15">Projects</h5>
<p class="mb-0 fs-12 text-muted">7 files</p>
</div>
<b>4.10 GB</b>
</div>
</li>
<li>
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="avatar-xs">
<div class="avatar-title rounded bg-soft-primary text-primary">
<i class="ri-error-warning-line fs-17"></i>
</div>
</div>
</div>
<div class="flex-grow-1 ms-3">
<h5 class="mb-1 fs-15">Others</h5>
<p class="mb-0 fs-12 text-muted">{{ $otherFiles }} files</p>
</div>
<b>33.54 GB</b>
</div>
</li>
</ul>
</div>
<div class="pb-3 mt-auto">
<div class="alert alert-danger d-flex align-items-center mb-0">
<div class="flex-shrink-0">
<i class="ri-cloud-line text-danger align-bottom display-5"></i>
</div>
<div class="flex-grow-1 ms-3">
<h5 class="text-danger fs-14">Upgrade to Pro</h5>
<p class="text-muted mb-2">Get more space for your...</p>
<button class="btn btn-sm btn-danger"><i class="ri-upload-cloud-line align-bottom"></i>
Upgrade Now
</button>
</div>
</div>
</div>
</div>
<div id="file-overview" class="h-100">
<div class="d-flex h-100 flex-column">
<div class="d-flex align-items-center pb-3 border-bottom border-bottom-dashed mb-3 gap-2">
<h5 class="flex-grow-1 fw-semibold mb-0">File Preview</h5>
<div>
<button type="button" class="btn btn-ghost-primary btn-icon btn-sm fs-16 favourite-btn">
<i class="ri-star-fill align-bottom"></i>
</button>
<button type="button"
class="btn btn-soft-danger btn-icon btn-sm fs-16 close-btn-overview">
<i class="ri-close-fill align-bottom"></i>
</button>
</div>
</div>
<div class="pb-3 border-bottom border-bottom-dashed mb-3">
<div class="file-details-box bg-light p-3 text-center rounded-3 border border-light mb-3">
<div class="display-4 file-icon">
<i class="ri-file-text-fill text-secondary"></i>
</div>
</div>
<button type="button" class="btn btn-icon btn-sm btn-ghost-success float-end fs-16"><i
class="ri-share-forward-line"></i></button>
<h5 class="fs-16 mb-1 file-name">html.docx</h5>
<p class="text-muted mb-0 fs-12"><span class="file-size">0.3 KB</span>, <span
class="create-date">19 Apr, 2022</span></p>
</div>
<div>
<h5 class="fs-12 text-uppercase text-muted mb-3">File Description :</h5>
<div class="table-responsive">
<table class="table table-borderless table-nowrap table-sm">
<tbody>
<tr>
<th scope="row" style="width: 35%;">File Name :</th>
<td class="file-name">html.docx</td>
</tr>
<tr>
<th scope="row">File Type :</th>
<td class="file-type">Documents</td>
</tr>
<tr>
<th scope="row">Size :</th>
<td class="file-size">0.3 KB</td>
</tr>
<tr>
<th scope="row">Created :</th>
<td class="create-date">19 Apr, 2022</td>
</tr>
<tr>
<th scope="row">Path :</th>
<td class="file-path">
<div class="user-select-all text-truncate">*:\projects\src\assets\images
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h5 class="fs-12 text-uppercase text-muted mb-3">Share Information:</h5>
<div class="table-responsive">
<table class="table table-borderless table-nowrap table-sm">
<tbody>
<tr>
<th scope="row" style="width: 35%;">Share Name :</th>
<td class="share-name">\\*\Projects</td>
</tr>
<tr>
<th scope="row">Share Path :</th>
<td class="share-path">velzon:\Documents\</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="mt-auto border-top border-top-dashed py-3">
<div class="hstack gap-2">
<button type="button" class="btn btn-soft-primary w-100">
<i class="ri-download-2-line align-bottom me-1"></i>
@lang('translation.download')
</button>
<button type="button" class="btn btn-soft-danger w-100 remove-file-overview"
data-remove-id="" data-bs-toggle="modal" data-bs-target="#removeFileItemModal">
<i class="ri-close-fill align-bottom me-1"></i>
@lang('translation.delete')
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- START CREATE FILE MODAL -->
<div class="modal fade zoomIn" id="createFileModal" tabindex="-1" aria-labelledby="createFileModalLabel"
aria-hidden="true" validate>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0">
<div class="modal-header p-3 bg-soft-success">
<h5 class="modal-title" id="createFileModalLabel">
@lang('translation.create-file')
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" id="addFileBtn-close"
aria-label="Close">
</button>
</div>
<div class="modal-body">
<form class="dropzone needs-validation" id="create-file-modal-form"
action="{{ route('attach.files') }}" validate>
@csrf
<!-- end dropzon-preview -->
<input type="hidden" name="order_id" value="{{ $order->id }}">
<input type="hidden" name="order_type" value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}">
<div class="mb-4">
<label for="">
<p class="text-muted">
Eslatma ! Faylni yuklashdan oldin iltimos fayl turini tanlang
</p>
</label>
<select class="form-control" name="file_type" id="file_type" required>
@foreach (App\Enums\MediaTypeEnum::cases() as $case)
<option value="{{ $case->name }}" {{ $case->name === $type ? 'selected' : '' }}>
@lang($case->value)
</option>
@endforeach
</select>
</div>
<div class="mb-4">
<div class="card-body">
<div class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple="multiple">
</div>
<div class="dz-message needsclick">
<div class="mb-3">
<i class="display-4 text-muted ri-upload-cloud-2-fill"></i>
</div>
<h4>Faylni bu yerga qo'ying yoki tanlang</h4>
</div>
</div>
</div>
<!-- end card body -->
</div>
</form>
</div>
</div>
</div>
</div>
<!-- END CREATE FILE MODAL -->
@endsection
@section('script')
<script src="{{ URL::asset('/assets/libs/dropzone/dropzone.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/show-documents.js') }}"></script>
@endsection

View File

@@ -0,0 +1,233 @@
@extends('layouts.master')
@section('title')
@lang('translation.overview')
@endsection
@section('content')
@component('components.order-breadcrumbs', ['order' => $order, 'active' => 'team'])
@endcomponent
<!-- end row -->
<div class="row">
<div class="col-lg-12">
<div class="tab-content text-muted">
<div class="tab-pane fade show active" id="project-team" role="tabpanel">
<div class="row g-4 mb-3">
<div class="col-sm">
<div class="d-flex">
<div class="search-box me-2">
<input type="text" class="form-control"
placeholder="@lang('translation.search-here')">
<i class="ri-search-line search-icon"></i>
</div>
</div>
</div>
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<div class="col-sm-auto">
<div>
<button type="button" class="btn btn-danger" data-bs-toggle="modal"
data-bs-target="#inviteMembersModal"><i
class="ri-share-line me-1 align-bottom"></i>
@lang('translation.invite-member')
</button>
</div>
</div>
@endif
</div>
<!-- end row -->
<div class="team-list list-view-filter">
@foreach ($members as $teamMember)
<div class="card team-box">
<div class="card-body px-4">
<div class="row align-items-center team-row">
<div class="col team-settings">
<div class="row align-items-center">
<div class="col">
<div class="flex-shrink-0 me-2">
<button type="button" class="btn fs-16 p-0 favourite-btn">
<i class="ri-star-fill"></i>
</button>
</div>
</div>
<div class="col text-end dropdown">
<a href="javascript:void(0);" data-bs-toggle="dropdown"
aria-expanded="false">
<i class="ri-more-fill fs-17"></i>
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item"
href="{{ route('user.show', [$teamMember->id]) }}"><i
class="ri-eye-fill text-muted me-2 align-bottom"></i>@lang('translation.view')
</a>
</li>
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<li>
<form name="order-member{{ $teamMember->id }}"
action="{{ route('member.remove') }}"
method="post"
novalidate>
@csrf
@method('post')
<input type="hidden" value="{{ $teamMember->id }}"
name="id">
<input type="hidden" value="{{ $order->id }}"
name="order_id">
<input type="hidden"
value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}"
name="order_type">
<button type="submit" class="dropdown-item ">
<i
class="ri-delete-bin-5-fill text-muted me-2 align-bottom"></i>
{{ __('translation.delete') }}
</button>
</form>
</li>
@endif
</ul>
</div>
</div>
</div>
<div class="col-lg-3 col">
<div class="team-profile-img">
<div class="avatar-lg img-thumbnail rounded-circle">
<img src="{{ URL::asset($teamMember->avatar) }}" alt=""
class="img-fluid d-block rounded-circle"/>
</div>
<div class="team-content">
<a href="{{ route('user.show', [$teamMember->id]) }}"
class="d-block">
<h5 class="fs-16 mb-1">
{{ $teamMember->name }}
</h5>
</a>
<p class="text-muted text-uppercase mb-0">
{{ $teamMember->role }}
</p>
</div>
</div>
</div>
<div class="col-lg-5 col">
<div class="row text-muted text-center">
<div class="col-3 border-end border-end-dashed">
<h5 class="mb-1">{{ $teamMember->started }}</h5>
<p class="text-muted mb-0">@lang('translation.tasks-started')</p>
</div>
<div class="col-3 border-end border-end-dashed">
<h5 class="mb-1">{{ $teamMember->finished }}</h5>
<p class="text-muted mb-0">@lang('translation.projects-finished')</p>
</div>
<div class="col-3 border-end border-end-dashed">
<h5 class="mb-1">{{ $teamMember->approved }}</h5>
<p class="text-muted mb-0">@lang('translation.orders-approved')</p>
</div>
<div class="col-3">
<h5 class="mb-1">{{ $teamMember->rejected }}</h5>
<p class="text-muted mb-0">@lang('translation.orders-rejected')</p>
</div>
</div>
</div>
<div class="col-lg-2 col">
<div class="text-end">
<a href="{{ route('user.show', [$teamMember->id]) }}"
class="btn btn-light view-btn">@lang('translation.view-profile')</a>
</div>
</div>
</div>
</div>
</div>
<!--end card-->
@endforeach
</div>
<!-- end team list -->
</div>
<!-- end tab pane -->
</div>
</div>
<!-- end col -->
</div>
<!-- end row -->
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<!-- Modal -->
<div class="modal fade" id="inviteMembersModal" tabindex="-1" aria-labelledby="inviteMembersModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0">
<div class="modal-header p-3 ps-4 bg-soft-success">
<h5 class="modal-title" id="inviteMembersModalLabel">@lang('translation.members')</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form name="members-invite" action="{{ route('members.invite') }}" method="post">
@csrf
<div class="modal-body p-4">
<input type="hidden" value="{{ $order->id }}" name="order_id">
<input type="hidden" value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}" name="order_type">
<div class="search-box mb-3">
<input type="text" class="form-control bg-light border-light"
placeholder="@lang('translation.search-here')">
<i class="ri-search-line search-icon"></i>
</div>
<div class="mb-4 d-flex align-items-center">
<div class="me-2">
<h5 class="mb-0 fs-13">@lang('translation.members') :</h5>
</div>
<div class="avatar-group justify-content-center">
@foreach ($members as $member)
<a href="{{ route('user.show', [$teamMember->id]) }}" class="avatar-group-item"
data-bs-toggle="tooltip"
data-bs-trigger="hover" data-bs-placement="top" title="{{ $member->name }}">
<div class="avatar-xs">
<img src="{{ URL::asset($member->avatar) }}" alt=""
class="rounded-circle img-fluid">
</div>
</a>
@endforeach
</div>
</div>
<div class="mx-n4 px-4" data-simplebar style="max-height: 225px;">
<div class="vstack gap-3">
@foreach ($appraisers as $appraiser)
<div class="d-flex align-items-center">
<div class="avatar-xs flex-shrink-0 me-3">
<img src="{{ URL::asset("{$appraiser->avatar}") }}"
alt="{{ $appraiser->name }}" class="img-fluid rounded-circle">
</div>
<div class="flex-grow-1">
<h5 class="fs-13 mb-0">
<a href="#" class="text-body d-block">
{{ $appraiser->name }}
</a>
</h5>
</div>
<!-- Outlined Styles -->
<div class="flex-shrink-0">
<div class="hstack gap-2 flex-wrap">
<input type="checkbox" name="{{ $appraiser->id }}" class="btn-check"
id="btn-check-outlined-{{ $appraiser->id }}">
<label class="btn btn-sm btn-outline-primary"
for="btn-check-outlined-{{ $appraiser->id }}">@lang('translation.add')</label>
</div>
</div>
</div>
<!-- end member item -->
@endforeach
</div>
<!-- end list -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light w-xs"
data-bs-dismiss="modal">@lang('translation.cancel')</button>
<button type="submit" class="btn btn-success w-xs">@lang('translation.invite')</button>
</div>
</form>
</div>
<!-- end modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- end modal -->
@endif
@endsection
@section('script')
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
@endsection

View File

@@ -0,0 +1,811 @@
@extends('layouts.master')
@section('title')
@lang('translation.overview')
@endsection
@section('css')
<link href="{{ URL::asset('assets/libs/dropzone/dropzone.min.css') }}" rel="stylesheet">
@endsection
@section('content')
@component('components.order-breadcrumbs', ['order' => $order, 'active' => 'index'])
@endcomponent
<!-- Page content row -->
<div class="row">
<div class="col-lg-12">
<div class="tab-content text-muted ">
<div class="tab-pane fade show active" id="project-overview" role="tabpanel">
<div class="row">
<div class="col-xl-9 col-lg-8">
<div class="card">
<div class="card-body">
<div class="text-muted ">
<h6 class="mb-3 fw-semibold text-uppercase">@lang('translation.summary')</h6>
<p>{{ $order->note }}</p>
<div class="col-lg-12">
<div class="row">
<div class="col-lg-6">
<ul class="ps-4 vstack gap-2">
<li>
@lang('translation.car_category') :
{{ $order->concernOne->{str_replace('_', '-', app()->getLocale())} }}
</li>
<li>@lang('translation.car-mark') :
{{ $order->car_mark }}
</li>
<li>@lang('translation.car-number') :
{{ $order->car_number }}
</li>
<li>@lang('translation.made-date') :
{{ $order->made_date }}
</li>
<li>@lang('translation.color') :
{{ $order->color }}
</li>
<li>@lang('translation.body') :
{{ $order->body }}
</li>
<li>@lang('translation.engine') :
{{ $order->engine }}
</li>
<li>@lang('translation.technical-passport') :
{{ $order->tech_passport }}
</li>
<li>@lang('translation.technical-passport-given-date') :
{{ $order->tech_given_date }}
</li>
<li>@lang('translation.technical-passport-given-by-whom') :
{{ $order->tech_given_whom }}
</li>
<li>@lang('translation.type') :
{{ $order->type }}
</li>
<li>@lang('translation.shassi') :
{{ $order->shassi }}
</li>
</ul>
</div>
<div class="col-lg-6">
<ul class="ps-4 vstack gap-2">
<li>@lang('translation.customer')
: {{ $order->customer }}</li>
<li>@lang('translation.owner') : {{ $order->ownerName }}</li>
<li>@lang('translation.ordered-customer-name')
: {{ $order->ordered_customer }}</li>
<li>@lang('translation.ordered-customer-phone')
: {{ $order->ordered_customer_phone }}</li>
<li>@lang('translation.purpose') : <span
class="text-uppercase">{{ $order->purposeOne->{str_replace('_', '-', app()->getLocale())} }} </span>
</li>
<li>@lang('translation.diller') : {{ $order->diller }}</li>
<li>@lang('translation.cost')
: @component('components.price',['balance'=>$order->cost]) @endcomponent</li>
<li>@lang('translation.price')
: @component('components.price',['balance'=>$order->price]) @endcomponent</li>
</ul>
</div>
</div>
</div>
<div class="pt-3 border-top border-top-dashed mt-4">
<div class="row">
<div class="col-lg-3 col-sm-6">
<div>
<p class="mb-2 text-uppercase fw-medium">@lang('translation.created-date') :</p>
<h5 class="fs-15 mb-0">{{ $order->created_at }}</h5>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div>
<p class="mb-2 text-uppercase fw-medium">@lang('translation.updated-date') :</p>
<h5 class="fs-15 mb-0">{{ $order->created_at }}</h5>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div>
<p class="mb-2 text-uppercase fw-medium">
@lang('translation.status')
</p>
<div class="badge bg-warning fs-12">
@lang(\App\Enums\OrderStatusEnum::getLabel($order->status))
</div>
</div>
</div>
</div>
</div>
<div class="pt-3 border-top border-top-dashed mt-4">
<div class="card-header align-items-center d-flex">
<h4 class="card-title mb-0 flex-grow-1">
{{ __('translation.conclusions') }}
</h4>
<div class="flex-shrink-0">
@if(in_array($order->status,[\App\Enums\OrderStatusEnum::STARTED->name,\App\Enums\OrderStatusEnum::REJECTED->name])&& $isAppraisers)
<a href="{{ route('conclusion.add', ['id' => $order->id,'type'=>\App\Enums\OrderTypeEnum::AUTO->name]) }}"
type="button" class="btn btn-soft-info btn-sm">
<i class="ri-upload-2-fill me-1 align-bottom"></i>
{{ __('translation.upload') }}
</a>
@endif
@if($order->status == \App\Enums\OrderStatusEnum::FINISHED->name && in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<button type="button" class="btn btn-soft-info btn-sm"
data-bs-toggle="modal"
data-bs-target="#givingBonusModal">
<i class="ri-upload-2-fill me-1 align-bottom"></i>
{{ __('translation.give-bonus') }}
</button>
<button type="button" class="btn btn-danger btn-sm"
data-bs-toggle="modal"
data-bs-target="#rejectConclusionModal">
<i class="ri-upload-2-fill me-1 align-bottom"></i>
{{ __('translation.conclusion-reject') }}
</button>
@endif
</div>
</div>
<div class="row pt-3 g-3">
@foreach ($conclusions as $conclusion)
<div class="col-xxl-4 col-lg-6">
<div class="border rounded border-dashed p-2">
<div class="d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<div class="avatar-sm">
<div
class="avatar-title bg-light text-secondary rounded fs-24">
<i class="ri-file-{{ $conclusion->extension }}-line"></i>
</div>
</div>
</div>
<div class="flex-grow-1 overflow-hidden">
<h5 class="fs-13 mb-1">
<a data-bs-file="{{ Storage::url($conclusion->path) }}"
data-bs-file-name="{{ $conclusion->name }}"
data-bs-toggle="modal"
data-bs-target="#conclusionViewModal"
href="#"
class="text-body text-truncate d-block">
{{ $conclusion->name }}
</a>
</h5>
<div>{{ $conclusion->size }}MB</div>
</div>
<div class="flex-shrink-0 ms-2">
<div class="d-flex gap-1">
<a href="{{ route('download', ['file' => $conclusion->id]) }}"
class="text-body text-truncate d-block btn btn-icon text-muted btn-sm fs-18">
<i class="ri-download-2-line"></i>
</a>
<div class="dropdown">
<button
class="btn btn-icon text-muted btn-sm fs-18 dropdown"
type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<i class="ri-more-fill"></i>
</button>
<ul class="dropdown-menu">
<li>
<a data-bs-file="{{ Storage::url($conclusion->path) }}"
data-bs-file-name="{{ $conclusion->name }}"
data-bs-toggle="modal"
data-bs-target="#conclusionViewModal"
class="dropdown-item">
<i class="ri-fullscreen-line align-bottom me-2 text-muted"></i>
@lang('translation.view')
</a>
</li>
<li>
@component('components.delete-btn')
@slot('url')
{{ route('file.delete', [$conclusion->id]) }}
@endslot
@endcomponent
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
@endforeach
<!-- end col -->
</div>
<!-- end row -->
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
<!-- ene col -->
<div class="col-xl-3 col-lg-4">
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.ordered-customer')
</h5>
</div>
<div class="card-body">
<label for="auto-ordered_customer-input" class="form-label">
@lang('translation.ordered-customer-name')
</label>
<div class="badge fw-medium badge-soft-secondary">
{{ $order->ordered_customer }}
</div>
<br />
<label for="cleave-phone" class="form-label">
@lang('translation.ordered-customer-phone')
</label>
<div class="badge fw-medium badge-soft-secondary">
{{ $order->ordered_customer_phone }}
</div>
<br />
@component('components.tg-link',['phone'=>$order->ordered_customer_phone])@endcomponent
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">
@lang('translation.diller')
</h5>
</div>
<div class="card-body">
<label for="auto-ordered_customer-input" class="form-label">
@lang('translation.diller-name')
</label>
<div class="badge fw-medium badge-soft-secondary">
{{ $order->diller }}
</div>
@if(isset($order->dillerUser))<br/>
<label for="cleave-phone" class="form-label">
@lang('translation.phone')
</label>
<div class="badge fw-medium badge-soft-secondary">
{{ $order->dillerUser->phone }}
</div>
<br/>
@component('components.tg-link',['phone'=>$order->dillerUser->phone])@endcomponent
@endif
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-header align-items-center d-flex border-bottom-dashed">
<h4 class="card-title mb-0 flex-grow-1">@lang('translation.cost')</h4>
</div>
<div class="card-body">
<label for="auto-ordered_customer-input" class="form-label">
@lang('translation.cost')
</label>
<div class="badge fw-medium badge-soft-secondary">
@component('components.price',['balance'=>$order->cost]) @endcomponent
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
@if ($order->status === \App\Enums\OrderStatusEnum::FINISHED->name)
<div class="card">
<div class="card-header align-items-center d-flex border-bottom-dashed">
<h4 class="card-title mb-0 flex-grow-1">@lang('translation.object-price') </h4>
</div>
<div class="card-body">
<div class="d-flex flex-wrap gap-2 fs-16">
<div class="badge fw-medium badge-soft-secondary">
@lang('translation.object-price')
</div>
<div class="badge fw-medium badge-soft-secondary">
@component('components.price',['balance'=>$order->object_price]) @endcomponent
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
@endif
<div class="card">
<div class="card-header align-items-center d-flex border-bottom-dashed">
<h4 class="card-title mb-0 flex-grow-1"> @lang('translation.member-appraisers')</h4>
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<div class="flex-shrink-0">
<button type="button" class="btn btn-soft-danger btn-sm"
data-bs-toggle="modal"
data-bs-target="#inviteMembersModal"><i
class="ri-share-line me-1 align-bottom"></i>
@lang('translation.invite-member')
</button>
</div>
@endif
</div>
<div class="card-body">
<div class="mx-n3 px-3">
<div class="vstacks gap-3">
@foreach ($members as $member)
<div class="d-flex align-items-center">
<div class="avatar-xs flex-shrink-0 me-3">
<!-- member avatar assets/images/users/avatar-2.jpg -->
<img src="{{ URL::asset("{$member->avatar}") }}" alt=""
class="img-fluid rounded-circle">
</div>
<div class="flex-grow-1">
<h5 class="fs-13 mb-0">
<a href="{{ route('user.show', [$member->id]) }}"
class="text-body d-block">
{{ $member->name }}
</a>
</h5>
</div>
<div class="flex-shrink-0">
<div class="d-flex align-items-center gap-1">
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<form name="order-member{{ $member->id }}"
action="{{ route('member.remove') }}"
method="post"
novalidate>
@csrf
@method('post')
<input type="hidden" value="{{ $member->id }}"
name="id">
<input type="hidden" value="{{ $order->id }}"
name="order_id">
<input type="hidden"
value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}"
name="order_type">
<button type="submit" class="btn btn-light btn-sm">
<i
class="ri-delete-bin-5-fill text-muted me-2 align-bottom"></i>
@lang('translation.delete')
</button>
</form>
@endif
<div class="dropdown">
<button
class="btn btn-icon btn-sm fs-16 text-muted dropdown"
type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<i class="ri-more-fill"></i>
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item"
href="{{ route('user.show', [$member->id]) }}">
<i
class="ri-eye-fill text-muted me-2 align-bottom"></i>
@lang('translation.account')
</a>
</li>
<li><a class="dropdown-item"
href="{{ route('user.favourite', ['id' => $member->id]) }}">
<i
class="ri-star-fill text-muted me-2 align-bottom"></i>
@lang('translation.favourite')
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
@endforeach
<!-- end member item -->
</div>
<!-- end list -->
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
<div class="card">
<div class="card-header align-items-center d-flex border-bottom-dashed">
<h4 class="card-title mb-0 flex-grow-1">@lang('translation.attachments')</h4>
<div class="flex-shrink-0">
{{-- @if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))--}}
<button type="button" class="btn btn-soft-info btn-sm" data-bs-toggle="modal"
data-bs-target="#attachModal"><i
class="ri-upload-2-fill me-1 align-bottom"></i>
@lang('translation.upload')
</button>
{{-- @endif--}}
</div>
</div>
<div class="card-body">
<div class="vstack gap-2">
@foreach ($files as $attachment)
<div class="border rounded border-dashed p-2">
<div class="d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<div class="avatar-sm">
<div
class="avatar-title bg-light text-secondary rounded fs-24">
@if (in_array($attachment->extension, ['jpg', 'jpg', 'png']))
{{-- <img src="{{ URL::asset("{$attachment->path}") }}" alt="" class="rounded avatar-sm"> --}}
<i class="ri-image-2-line"></i>
@else
<i
class="ri-file-{{ $attachment->extension }}-line"></i>
@endif
</div>
</div>
</div>
<div class="flex-grow-1 overflow-hidden">
<h5 class="fs-13 mb-1">
<a href="{{ Storage::url($attachment->path) }}"
class="text-body text-truncate d-block">
{{ $attachment->name }}
</a>
</h5>
<div> {{ $attachment->size }} MB</div>
</div>
<div class="flex-shrink-0 ms-2">
<div class="d-flex gap-1">
<div class="dropdown">
<a href="{{ route('download', ['file' => $attachment->id]) }}"
class="text-body text-truncate d-block btn btn-icon text-muted btn-sm fs-18">
<i class="ri-download-2-line"></i>
</a>
<button
class="btn btn-icon text-muted btn-sm fs-18 dropdown"
type="button" data-bs-toggle="dropdown"
aria-expanded="false">
<i class="ri-more-fill"></i>
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item"
href="{{ Storage::url($attachment->path) }}"><i
class="ri-eye-line align-bottom me-2 text-muted"></i>
@lang('translation.view')
</a>
</li>
<li>
@component('components.delete-btn')
@slot('url')
{{ route('file.delete', [$attachment->id]) }}
@endslot
@endcomponent
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
@endforeach
<div class="mt-2 text-center">
<a href="{{ route('auto.show-documents',[$order->id]) }}" type="button"
class="btn btn-success">
@lang('translation.view-more')
</a>
</div>
</div>
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
<!-- end col -->
</div>
<!-- end row -->
</div>
<!-- end tab pane -->
</div>
</div>
<!-- end col -->
</div>
<!-- Page content end row -->
@if(Auth::user()->role!=\App\Enums\RoleEnum::USER->name)
<!-- Attachment adding Modal -->
<div class="modal fade" id="attachModal" tabindex="-1" aria-labelledby="attachModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0">
<div class="modal-header p-3 ps-4 bg-soft-success">
<h5 class="modal-title" id="attachModalLabel">@lang('translation.attachments')</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body p-4">
<div class="card">
<div class="card-body">
<form class="dropzone" id="createfile-form" action='{{ route('attach.files') }}'
novalidate>
@csrf
<input type="hidden" name="order_id" value="{{ $order->id }}">
<input type="hidden" name="order_type"
value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}">
<input type="hidden" name="file_type"
value="{{ \App\Enums\MediaTypeEnum::ADDITIONAL->name }}">
<p class="text-muted"></p>
<div class="dropzone">
<div class="fallback">
<input name="file" type="file" multiple="multiple">
</div>
<div class="dz-message needsclick">
<div class="mb-3">
<i class="display-4 text-muted ri-upload-cloud-2-fill"></i>
</div>
<h4>Faylni bu yerga qo'ying yoki tanlang.</h4>
</div>
</div>
<ul class="list-unstyled mb-0" id="dropzone-preview">
<li class="mt-2" id="dropzone-preview-list">
<!-- This is used as the file preview template -->
<div class="border rounded">
<div class="d-flex p-2">
<div class="flex-shrink-0 me-3">
<div class="avatar-sm bg-light rounded">
<img data-dz-thumbnail class="img-fluid rounded d-block"
src="#" alt="Dropzone-Image"/>
</div>
</div>
<div class="flex-grow-1">
<div class="pt-1">
<h5 class="fs-14 mb-1" data-dz-name>&nbsp;</h5>
<p class="fs-13 text-muted mb-0" data-dz-size></p>
<strong class="error text-danger" data-dz-errormessage></strong>
</div>
</div>
<div class="flex-shrink-0 ms-3">
<button data-dz-remove
class="btn btn-sm btn-danger">@lang('translation.delete')</button>
</div>
</div>
</div>
</li>
</ul>
<!-- end dropzon-preview -->
</form>
</div>
<!-- end card body -->
</div>
<!-- end card -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light w-xs" data-bs-dismiss="modal">
@lang('translation.cancel')
</button>
<button type="button" class="btn btn-success w-xs" data-bs-dismiss="modal">
@lang('translation.save')
</button>
</div>
</div>
<!-- end modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- Attachment adding end modal -->
@endif
@if(in_array(Auth::user()->role,['admin',\App\Enums\RoleEnum::MANAGER->name]))
<!-- Invite members Modal -->
<div class="modal fade" id="inviteMembersModal" tabindex="-1" aria-labelledby="inviteMembersModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0">
<div class="modal-header p-3 ps-4 bg-soft-success">
<h5 class="modal-title" id="inviteMembersModalLabel">@lang('translation.member-appraisers')</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form name="members-invite" action="{{ route('members.invite') }}" method="post">
@csrf
<div class="modal-body p-4">
<input type="hidden" value="{{ $order->id }}" name="order_id">
<input type="hidden" value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}" name="order_type">
<div class="search-box mb-3">
<input type="text" class="form-control bg-light border-light"
placeholder="@lang('translation.search-here')">
<i class="ri-search-line search-icon"></i>
</div>
<div class="mb-4 d-flex align-items-center">
<div class="me-2">
<h5 class="mb-0 fs-13">@lang('translation.member-appraisers')</h5>
</div>
<div class="avatar-group justify-content-center">
@foreach ($members as $member)
<a href="{{ route('user.show', [$member->id]) }}" class="avatar-group-item"
data-bs-toggle="tooltip"
data-bs-trigger="hover" data-bs-placement="top" title="{{ $member->name }}">
<div class="avatar-xs">
<img src="{{ URL::asset($member->avatar) }}" alt=""
class="rounded-circle img-fluid">
</div>
</a>
@endforeach
</div>
</div>
<div class="mx-n4 px-4" data-simplebar style="max-height: 225px;">
<div class="vstack gap-3">
@foreach ($appraisers as $appraiser)
<div class="d-flex align-items-center">
<div class="avatar-xs flex-shrink-0 me-3">
<img src="{{ URL::asset("{$appraiser->avatar}") }}"
alt="{{ $appraiser->name }}" class="img-fluid rounded-circle">
</div>
<div class="flex-grow-1">
<h5 class="fs-13 mb-0">
<a href="#" class="text-body d-block">
{{ $appraiser->name }}
</a>
</h5>
</div>
<!-- Outlined Styles -->
<div class="flex-shrink-0">
<div class="hstack gap-2 flex-wrap">
<input type="checkbox" name="{{ $appraiser->id }}" class="btn-check"
id="btn-check-outlined-{{ $appraiser->id }}">
<label class="btn btn-sm btn-outline-primary"
for="btn-check-outlined-{{ $appraiser->id }}">@lang('translation.add')</label>
</div>
</div>
</div>
<!-- end member item -->
@endforeach
</div>
<!-- end list -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light w-xs"
data-bs-dismiss="modal">@lang('translation.cancel')</button>
<button type="submit" class="btn btn-success w-xs">@lang('translation.invite')</button>
</div>
</form>
</div>
<!-- end modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- Invite members end modal -->
<!-- Give bonus to Appraiser Modal -->
<div class="modal fade" id="givingBonusModal" tabindex="-1" aria-labelledby="givingBonusModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0">
<div class="modal-header p-3 ps-4 bg-soft-success">
<h5 class="modal-title" id="givingBonusModalLabel">@lang('translation.set-price')</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="{{ route('bonus.store') }}" method="POST">
<div class="modal-body p-4">
<div class="card-body">
@csrf
<input type="hidden" value="{{ $order->id }}" name="order_id" id="order_id">
<!-- Input with Label -->
<div class="m-3">
<select class="form-select mb-3" name="appraiser_id"
aria-label="Select appraiser or many appraisers" data-choices
data-choices-search-false
data-choices-removeItem required
@error('appraiser_id') is-invalid @enderror>
@foreach ($members as $appraiser)
<option class="text-uppercase" value="{{ $appraiser->id }}">
{{ $appraiser->name }}
</option>
@endforeach
</select>
@error('appraiser_id')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<!-- Input with Label -->
<div class="m-3">
<label for="cleave-numeral"
class="form-label">@lang('translation.setting-bonus')</label>
<input type="text" name="amount" class="form-control " id="cleave-numeral" required
@error('amount') is-invalid @enderror>
@error('amount')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<!-- end card body -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light w-xs" data-bs-dismiss="modal">
@lang('translation.cancel')
</button>
<button type="submit" class="btn btn-success w-xs">
@lang('translation.save')
</button>
</div>
</form>
</div>
<!-- end modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- Give bonus to Appraiser end modal -->
<!-- Reject conclusion Modal -->
<div class="modal fade" id="rejectConclusionModal" tabindex="-1" aria-labelledby="rejectConclusionModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content border-0">
<div class="modal-header p-3 ps-4 bg-soft-success">
<h5 class="modal-title" id="rejectConclusionModalLabel">
@lang('translation.conclusion-reject')
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="{{ route('conclusion.reject') }}" method="POST">
@csrf
@method('put')
<div class="modal-body p-4">
<div class="card-body">
<input type="hidden" value="{{ $order->id }}" name="order_id" id="order_id">
<input type="hidden" value="{{ \App\Enums\OrderTypeEnum::AUTO->name }}"
name="order_type" id="order_type">
<!-- Input with Label -->
<div class="m-3">
<div class="form-group">
<label for="reject-node">@lang('translation.reject-note-comment')</label>
<textarea class="form-control form-control-lg" name="note"
id="reject-node"></textarea>
</div>
</div>
</div>
<!-- end card body -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light w-xs"
data-bs-dismiss="modal">@lang('translation.cancel')</button>
<button type="submit" class="btn btn-success w-xs">
@lang('translation.save')
</button>
</div>
</form>
</div>
<!-- end modal-content -->
</div>
<!-- modal-dialog -->
</div>
<!-- Reject conclusion end modal -->
@endif
<!-- View conclusion Scrollable Modal -->
<div class="modal-dialog">
<div id="conclusionViewModal" class="modal fade" tabindex="-1" aria-labelledby="conclusionViewModalLabel"
aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="conclusionViewModalLabel">Modal Heading</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<object data="" type="application/pdf" style="height: 100vh;border: none;"
standby="loading" width="100%"></object>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- View conclusion end Modal-->
@endsection
@section('script')
<script src="{{ URL::asset('assets/libs/dropzone/dropzone.min.js') }}"></script>
<script src="{{ URL::asset('assets/libs/cleave.js/cleave.js.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/app.min.js') }}"></script>
<script src="{{ URL::asset('/assets/js/pages/orders/show.js') }}"></script>
@endsection