{{-- |--------------------------------------------------------------------------- * _ _ __ _ _ _ __ * | | ___ ___ __| | ___| _| | ___ __| | ___ _ __| |__ ___ __|_ | * / __)/ __/ _ \ / _` |/ _ \ || | / _ \/ _` |/ _ \ '__| '_ \ / _ \/ __| | * \__ \ (_| (_) | (_| | __/ || |__| __/ (_| | __/ | | | | | (_) \__ \ | * ( /\___\___/ \__,_|\___| ||_____\___|\__,_|\___|_| |_| |_|\___/|___/ | * |_| |__| |__| ? @date: 2023-05-25 @version 1.0 @project: Okis 3.0 ? @author: Code[Lederhos] ? Stanislaw Lederhos ? mail: codelederhos@gmail.com * $web_development_with_passion = { 'Programmed for the future' }; |--------------------------------------------------------------------------> --}} @php use Carbon\Carbon; use App\Enums\OrderTypeDefinition; use App\Models\Orders_calculation_table; use App\Http\Controllers\OrderController; $order_controller = new OrderController; $all_options_calculation_table = $order_controller->get_all_options_calculation_table(); @endphp @isset ($timeline_items)
@includeIf('layouts.components.cycle_timeline2', [ 'timeline_items' => $timeline_items, ])
@foreach ($timeline_items as $key => $item) @php $show = ($key === array_key_first($timeline_items)) ? 'show' : ''; $disabled = ($key !== array_key_first($timeline_items)); $cycle = $item['cycle_class']; @endphp
@empty($disabled)
@csrf @method('PUT') @endempty @includeIf('orders._form_cycle_state_timeline_v2')
@includeIf('layouts.components.card_header', [ 'title' => 'Wunschtermin' ])
@includeIf('layouts.components.datetimepicker', [ 'input_id' => 'desired_date_' .$cycle->id, 'input_name' => 'wunschtermin', // 'label' => 'Wunschtermin', 'date' => true, 'time' => true, 'disabled' => $disabled, 'value' => !empty($cycle->wunschtermin) ? date("d.m.Y H:i",(int)$cycle->wunschtermin) : '', ])
@php $shipping_state = $cycle->states()->where('state_type', 'v')->first(); $calc_shipping_date = Orders_calculation_table::where('type', $cycle->type)->where('name', $cycle->kind)->first(); $calc_shipping_date = !empty($calc_shipping_date) ? ( Carbon::parse($cycle->created_at)->addDays( $calc_shipping_date->completed )->format('d.m.Y') ) : ''; $warning_shipping_date = !empty($cycle->wunschtermin) && !empty($calc_shipping_date) ? ( Carbon::parse(date('d.m.Y', strtotime($calc_shipping_date)))->diffInDays(date('d.m.Y', (int)$cycle->wunschtermin), false) ) : ''; if (!empty($warning_shipping_date) && $warning_shipping_date <= 0) { $warning_shipping_date = 'danger'; } elseif (!empty($warning_shipping_date) && $warning_shipping_date > 0) { $warning_shipping_date = 'success'; } @endphp @includeIf('layouts.components.card_header', [ 'title' => 'Versand', 'label_pill' => !empty($calc_shipping_date) ? 'Berechnet: ' .$calc_shipping_date : '', 'label_pill_color' => !empty($warning_shipping_date) ? $warning_shipping_date : '', 'label_pill_attr' => ' data-calc_shipping_date="' .$calc_shipping_date .'" data-wunschtermin="' .$cycle->wunschtermin .'"', ])
@includeIf('layouts.components.datetimepicker', [ 'input_id' => 'shipping_date', 'input_name' => 'v', 'clear_title' => 'Versand-datum', 'date' => true, 'time' => false, 'disabled' => $disabled || !empty($shipping_state) ? true : false, 'value' => !empty($shipping_state) ? $shipping_state->updated_at : '', ])
@includeIf('layouts.components.inputs', [ 'input_id' => 'tracking_nr', 'placeholder' => 'Tracking Number', 'disabled' => $disabled, ])
@includeIf('layouts.components.inputs', [ 'input_type' => 'select', 'input_id' => 'shipping_company', 'placeholder' => 'Dienstleister', 'disabled' => $disabled, 'options' => [ [ 'option_label' => 'Dienstleister...', 'option_value' => '', 'option_attr' => "disabled", ], [ 'option_label' => 'DHL', 'option_value' => 'dhl' ], [ 'option_label' => 'DPD', 'option_value' => 'dpd' ], ], ])
@php $is_transformed['rating'] = []; if ( empty($cycle->states()->where('state_type', 'um')->first()) ) { $is_transformed['rating'] = [ 'input_id' => "cycle-$cycle->id-rating", 'input_name' => "rating", 'count' => 5, 'value' => $cycle->rating, 'star_color' => '#fff', ]; } @endphp @includeIf('layouts.components.card_header', [ 'title' => 'Zyklus Details', 'rating' => $is_transformed['rating'], ])
@includeIf('layouts.components.inputs_v2', [ 'input_type' => 'icon_radio_slider', 'input_id' => "cycle-$cycle->id-type", 'input_name' => "type", 'label' => 'Auftrags Typ', 'radio_icon_width' => '70', 'value' => $cycle->type, 'options' => [ [ 'option_value' => 'centric', 'option_label' => 'Labor', 'option_icon_name' => 'dental_labor', 'option_icon_class' => 'mt-3', 'default_checked' => $cycle->type === 'centric' ? true : false, ], [ 'option_value' => 'scan', 'option_label' => 'Modellanlieferung', 'option_icon_name' => 'dental (3)', 'option_icon_class' => 'mt-3', 'option_icon_width' => '50', 'default_checked' => $cycle->type === 'scan' ? true : false, ], [ 'option_value' => 'import', 'option_label' => 'Import', 'option_icon_name' => 'dental (1)', 'option_icon_class' => 'mt-3', 'option_icon_width' => '60', 'default_checked' => $cycle->type === 'import' ? true : false, ], ], ])
@includeIf('layouts.components.inputs_v2', [ 'input_type' => 'select', 'input_id' => "cycle-$cycle->id-kind", 'input_name' => "kind", 'label' => 'Arbeitsart', 'placeholder' => !empty($cycle->type) ? enumGetValue(OrderTypeDefinition::class, $cycle->type) : '', 'value' => $cycle->kind , 'options' => $all_options_calculation_table ?? [], ])
@includeIf('layouts.components.inputs_v2', [ 'input_type' => 'textarea', 'input_id' => "cycle-$cycle->id-bemerkungen", 'input_name' => "bemerkungen", 'input_class' => 'text-danger', 'label' => 'Bemerkungen', 'input_attr' => 'rows=3', 'text_editor' => true, 'value' => ( !empty($cycle->status_description) ? $cycle->status_description ." | " : '' ) .$cycle->bemerkungen , ])
@empty($disabled) @includeIf('layouts.components.rounded_fixed_btn', ['rounded_fixed_btn' => ['save']])
@endempty
@endforeach @endisset