|
@@ -49,33 +49,21 @@
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="col-xl-3 border-end">
|
|
<div class="col-xl-3 border-end">
|
|
|
<h4>Общая информация об объекте</h4>
|
|
<h4>Общая информация об объекте</h4>
|
|
|
- <div>Название: {{ $order->name }}</div>
|
|
|
|
|
<div>ID площадки: {{ $order->id }}</div>
|
|
<div>ID площадки: {{ $order->id }}</div>
|
|
|
- <div>
|
|
|
|
|
- Адрес: {{ $order->common_name }}
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div>Тип объекта: {{ $order->objectType->name }}</div>
|
|
|
|
|
- <div class="text-{{ Order::STATUS_COLOR[$order->order_status_id] }}">Статус
|
|
|
|
|
- объекта: {{ $order->orderStatus->name }}</div>
|
|
|
|
|
- <div>Комментарий: {{ $order->comment }}</div>
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="col-md-8">Дата выхода на монтаж:</div>
|
|
|
|
|
- <div class="col-md-4">
|
|
|
|
|
- <input type="date" name="installation_date" id="installation_date" @disabled(!hasRole('admin')) value="{{ $order->installation_date }}" class="form-control form-control-sm">
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="col-md-8">Дней на монтаж:</div>
|
|
|
|
|
- <div class="col-md-4">
|
|
|
|
|
- <input type="number" min="1" name="install_days" id="install_days" @disabled(!hasRole('admin')) value="{{ $order->install_days }}" class="form-control form-control-sm">
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>Дата готовности площадки: {{ $order->ready_date }}</div>
|
|
|
|
|
- <div>Бригадир: {{ $order?->brigadier?->name }}, тел. {{ $order?->brigadier?->phone }}</div>
|
|
|
|
|
- <div>Менеджер: {{ $order->user->name }}, тел. {{ $order->user->phone }}</div>
|
|
|
|
|
- <div>Название группы в ТГ: {{ $order->tg_group_name }}</div>
|
|
|
|
|
- <div>Ссылка на группу в ТГ: {{ $order->tg_group_link }}</div>
|
|
|
|
|
|
|
+ @include('partials.input', ['name' => 'name', 'title' => 'Название', 'value' => $order->name ?? old('name'), 'required' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.input', ['name' => 'object_address', 'title' => 'Адрес объекта', 'value' => $order->object_address ?? old('object_address'), 'required' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.select', ['name' => 'object_type_id', 'title' => 'Тип объекта', 'options' => $objectTypes, 'value' => $order->object_type_id ?? old('object_type_id'), 'required' => true, 'first_empty' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.select', ['name' => 'order_status_id', 'title' => 'Статус', 'options' => $orderStatuses, 'value' => $order->order_status_id ?? old('order_status_id'), 'required' => true, 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.textarea', ['name' => 'comment', 'title' => 'Комментарий', 'value' => $order->comment ?? old('comment'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.input', ['name' => 'installation_date', 'title' => 'Дата выхода на монтаж', 'type' => 'date', 'value' => $order->installation_date ?? old('installation_date'), 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.input', ['name' => 'install_days', 'title' => 'Дней на монтаж', 'type' => 'number', 'min' => 1, 'value' => $order->install_days ?? old('install_days'), 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.input', ['name' => 'ready_date', 'title' => 'Дата готовности площадки', 'type' => 'date', 'value' => $order->ready_date ?? old('ready_date'), 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.select', ['name' => 'brigadier_id', 'title' => 'Бригадир', 'options' => $brigadiers, 'value' => $order->brigadier_id ?? old('brigadier_id'), 'first_empty' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.select', ['name' => 'user_id', 'title' => 'Менеджер', 'options' => $users, 'value' => $order->user_id ?? old('user_id') ?? auth()->user()->id, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.input', ['name' => 'tg_group_name', 'title' => 'Название группы в ТГ', 'value' => $order->tg_group_name ?? old('tg_group_name'), 'classes' => ['update-once']])
|
|
|
|
|
+ @include('partials.input', ['name' => 'tg_group_link', 'title' => 'Ссылка на группу в ТГ', 'value' => $order->tg_group_link ?? old('tg_group_link'), 'classes' => ['update-once']])
|
|
|
|
|
+
|
|
|
<hr>
|
|
<hr>
|
|
|
<div class="reclamations">
|
|
<div class="reclamations">
|
|
|
Рекламации
|
|
Рекламации
|
|
@@ -483,18 +471,19 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- $('#installation_date').on('change', function () {
|
|
|
|
|
- let installationDate = $(this).val();
|
|
|
|
|
|
|
+ $('.update-once').on('change', function () {
|
|
|
|
|
+ let v = $(this).val();
|
|
|
|
|
+ let n = $(this).attr('name');
|
|
|
$.post(
|
|
$.post(
|
|
|
'{{ route('order.update', $order->id) }}',
|
|
'{{ route('order.update', $order->id) }}',
|
|
|
{
|
|
{
|
|
|
'_token': '{{ csrf_token() }}',
|
|
'_token': '{{ csrf_token() }}',
|
|
|
id: '{{ $order->id }}',
|
|
id: '{{ $order->id }}',
|
|
|
- installation_date: installationDate
|
|
|
|
|
|
|
+ [n]: v
|
|
|
},
|
|
},
|
|
|
function () {
|
|
function () {
|
|
|
$('.alerts').append(
|
|
$('.alerts').append(
|
|
|
- '<div class="main-alert alert alert-success" role="alert">Обновлена дата выхода на монтаж!</div>'
|
|
|
|
|
|
|
+ '<div class="main-alert alert alert-success" role="alert">Площадка обновлена!</div>'
|
|
|
);
|
|
);
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
|
$('.main-alert').fadeTo(2000, 500).slideUp(500, function () {
|
|
$('.main-alert').fadeTo(2000, 500).slideUp(500, function () {
|
|
@@ -505,27 +494,72 @@
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- $('#install_days').on('change', function () {
|
|
|
|
|
- let installDays = $(this).val();
|
|
|
|
|
- $.post(
|
|
|
|
|
- '{{ route('order.update', $order->id) }}',
|
|
|
|
|
- {
|
|
|
|
|
- '_token' : '{{ csrf_token() }}',
|
|
|
|
|
- id: '{{ $order->id }}',
|
|
|
|
|
- install_days: installDays
|
|
|
|
|
- },
|
|
|
|
|
- function () {
|
|
|
|
|
- $('.alerts').append(
|
|
|
|
|
- '<div class="main-alert alert alert-success" role="alert">Обновлено количество дней на монтаж!</div>'
|
|
|
|
|
- );
|
|
|
|
|
- setTimeout(function () {
|
|
|
|
|
- $('.main-alert').fadeTo(2000, 500).slideUp(500, function () {
|
|
|
|
|
- $(".main-alert").slideUp(500);
|
|
|
|
|
- })
|
|
|
|
|
- }, 3000);
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {{--$('#installation_date').on('change', function () {--}}
|
|
|
|
|
+ {{-- let installationDate = $(this).val();--}}
|
|
|
|
|
+ {{-- $.post(--}}
|
|
|
|
|
+ {{-- '{{ route('order.update', $order->id) }}',--}}
|
|
|
|
|
+ {{-- {--}}
|
|
|
|
|
+ {{-- '_token': '{{ csrf_token() }}',--}}
|
|
|
|
|
+ {{-- id: '{{ $order->id }}',--}}
|
|
|
|
|
+ {{-- installation_date: installationDate--}}
|
|
|
|
|
+ {{-- },--}}
|
|
|
|
|
+ {{-- function () {--}}
|
|
|
|
|
+ {{-- $('.alerts').append(--}}
|
|
|
|
|
+ {{-- '<div class="main-alert alert alert-success" role="alert">Обновлена дата выхода на монтаж!</div>'--}}
|
|
|
|
|
+ {{-- );--}}
|
|
|
|
|
+ {{-- setTimeout(function () {--}}
|
|
|
|
|
+ {{-- $('.main-alert').fadeTo(2000, 500).slideUp(500, function () {--}}
|
|
|
|
|
+ {{-- $(".main-alert").slideUp(500);--}}
|
|
|
|
|
+ {{-- })--}}
|
|
|
|
|
+ {{-- }, 3000);--}}
|
|
|
|
|
+ {{-- }--}}
|
|
|
|
|
+ {{-- );--}}
|
|
|
|
|
+ {{--});--}}
|
|
|
|
|
+
|
|
|
|
|
+ {{--$('#install_days').on('change', function () {--}}
|
|
|
|
|
+ {{-- let installDays = $(this).val();--}}
|
|
|
|
|
+ {{-- $.post(--}}
|
|
|
|
|
+ {{-- '{{ route('order.update', $order->id) }}',--}}
|
|
|
|
|
+ {{-- {--}}
|
|
|
|
|
+ {{-- '_token' : '{{ csrf_token() }}',--}}
|
|
|
|
|
+ {{-- id: '{{ $order->id }}',--}}
|
|
|
|
|
+ {{-- install_days: installDays--}}
|
|
|
|
|
+ {{-- },--}}
|
|
|
|
|
+ {{-- function () {--}}
|
|
|
|
|
+ {{-- $('.alerts').append(--}}
|
|
|
|
|
+ {{-- '<div class="main-alert alert alert-success" role="alert">Обновлено количество дней на монтаж!</div>'--}}
|
|
|
|
|
+ {{-- );--}}
|
|
|
|
|
+ {{-- setTimeout(function () {--}}
|
|
|
|
|
+ {{-- $('.main-alert').fadeTo(2000, 500).slideUp(500, function () {--}}
|
|
|
|
|
+ {{-- $(".main-alert").slideUp(500);--}}
|
|
|
|
|
+ {{-- })--}}
|
|
|
|
|
+ {{-- }, 3000);--}}
|
|
|
|
|
+ {{-- }--}}
|
|
|
|
|
+ {{-- );--}}
|
|
|
|
|
+ {{--});--}}
|
|
|
|
|
+
|
|
|
|
|
+ {{--$('#name').on('change', function () {--}}
|
|
|
|
|
+ {{-- let name = $(this).val();--}}
|
|
|
|
|
+ {{-- $.post(--}}
|
|
|
|
|
+ {{-- '{{ route('order.update', $order->id) }}',--}}
|
|
|
|
|
+ {{-- {--}}
|
|
|
|
|
+ {{-- '_token' : '{{ csrf_token() }}',--}}
|
|
|
|
|
+ {{-- id: '{{ $order->id }}',--}}
|
|
|
|
|
+ {{-- name: name--}}
|
|
|
|
|
+ {{-- },--}}
|
|
|
|
|
+ {{-- function () {--}}
|
|
|
|
|
+ {{-- $('.alerts').append(--}}
|
|
|
|
|
+ {{-- '<div class="main-alert alert alert-success" role="alert">Обновлено название!</div>'--}}
|
|
|
|
|
+ {{-- );--}}
|
|
|
|
|
+ {{-- setTimeout(function () {--}}
|
|
|
|
|
+ {{-- $('.main-alert').fadeTo(2000, 500).slideUp(500, function () {--}}
|
|
|
|
|
+ {{-- $(".main-alert").slideUp(500);--}}
|
|
|
|
|
+ {{-- })--}}
|
|
|
|
|
+ {{-- }, 3000);--}}
|
|
|
|
|
+ {{-- }--}}
|
|
|
|
|
+ {{-- );--}}
|
|
|
|
|
+ {{--});--}}
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
@endpush
|
|
@endpush
|