@php use App\Enums\OrderTypeDefinition; use App\Models\Orders_calculation_table; @endphp @if (isset($timeline_items)) {{-- import = China! Bundle Ziel Hongkong Nancy Oberursel Nancy service_vip11 upload = Datei downlaod Einheiten Material Zahnfarbe alles von Kunde scan = Ziel Hongkong Nancy Oberursel Torsten Nancy service_vip11 centric = // --}}
@includeIf('layouts.components.cycle_timeline', [ 'timeline_items' => $timeline_items, ])
@foreach ($timeline_items as $key => $item)
@csrf @method('PUT') @php $show = ''; $disabled = false; if ($key === array_key_first($timeline_items)) { $show = 'show'; } else { $disabled = true; } $cycle = $item['cycle_class']; @endphp
@if ($disabled === true) @includeIf('layouts.components.alert', ['warning' => 'Zyklus geschlossen!
Bewertung noch möglich.']) @endif
@php unset($options); foreach (OrderTypeDefinition::asArray() as $key => $type) { $options[] = [ 'option_label' => $type, 'option_value' => $key, ]; } @endphp @includeIf('layouts.components.inputs', [ 'input_type' => 'select', 'input_id' => "cycle-$cycle->id-type", 'input_name' => "type", 'input_class' => 'cycle-type', 'label' => 'Zyklus Typ', 'placeholder' => '', 'value' => $cycle->type, 'options' => $options, 'disabled' => $disabled, ])
@includeIf('layouts.components.rating', [ 'input_id' => "cycle-$cycle->id-rating", 'input_name' => "rating", 'label' => 'Bewertung', 'count' => 5, 'value' => $cycle->rating, ])
@php unset($options); foreach (Orders_calculation_table::where('type', $cycle->type)->get() as $calculation_type) { $options[] = [ 'option_label' => $calculation_type->name, 'option_value' => $calculation_type->name, ]; } @endphp @if (isset($options))
@includeIf('layouts.components.inputs', [ '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' => $options ?? [], 'disabled' => $disabled, ])
@endif @if (!empty($cycle->status_description) || !empty($cycle->bemerkungen))
@includeIf('layouts.components.inputs', [ 'input_id' => "cycle-$cycle->id-bemerkungen", 'input_name' => "bemerkungen", 'label' => 'Bemerkungen', 'disabled' => true, 'value' => ( !empty($cycle->status_description) ? $cycle->status_description ." | " : '' ) .$cycle->bemerkungen , ])
@endif
@if ($cycle->type === 'centric')
@includeIf('layouts.components.card_header', [ 'title' => 'Centric / Labor', ])
@includeIf('layouts.components.inputs', [ 'input_id' => "cycle-$cycle->id-batch", 'input_name' => "batch", 'label' => 'Löffelnummer', 'placeholder' => '', 'value' => $cycle->batch , 'disabled' => $disabled, ])
@includeIf('layouts.components.inputs', [ 'input_type' => 'checkbox', 'input_id' => "reparatur", 'check_label' => 'Reparatur', 'value' => $cycle->reparatur ?? '', 'margin_top' => 37, 'disabled' => $disabled, ])
@includeIf('layouts.components.inputs', [ 'input_id' => "cycle-$cycle->id-zahnfarbe", 'input_name' => "zahnfarbe", 'label' => 'Zahnfarbe', 'placeholder' => '', 'value' => $cycle->zahnfarbe , 'disabled' => $disabled, ])
@endif @if ( $cycle->type === 'scan' || $cycle->type === 'import' )
@php unset($options); $scan_option = ''; if($cycle->type === 'scan') { $scan_option = [ 'option_label' => 'Torsten', 'option_value' => '34', ]; } $options = [ [ 'option_label' => 'bitte wählen...', 'option_value' => '', ], [ 'option_label' => 'Hongkong Nancy', 'option_value' => '26', ], [ 'option_label' => 'Oberursel', 'option_value' => '32', ], $scan_option, [ 'option_label' => 'Nancy service_vip11', 'option_value' => '35', ], ]; @endphp @includeIf('layouts.components.inputs', [ 'input_type' => 'select', 'input_id' => "order-$order->id-ziel", 'input_name' => "ziel", 'label' => 'Ziel', 'placeholder' => '', 'value' => $order->ziel , 'options' => $options, ])
@includeIf('layouts.components.inputs', [ 'input_id' => "cycle-$cycle->id-china_send", 'input_name' => "china_send", 'label' => 'Verschickt am:', 'placeholder' => '', 'value' => $cycle->states()->where('state_type', 'cv')->latest()->first() ? date('d.m.Y H:i', strtotime($cycle->states()->where('state_type', 'cv')->latest()->first()->updated_at)) : '', ])
@includeIf('layouts.components.inputs', [ 'input_id' => "cycle-$cycle->id-china_tracking", 'input_name' => "china_tracking", 'label' => 'Traking Nr.', 'placeholder' => '', 'value' => $cycle->states()->where('state_type', 'cv')->latest()->first() ? $cycle->states()->where('state_type', 'cv')->latest()->first()->state_description : '', // 'value' => $cycle->states()->where('state_type', 'cv')->frist()->description , ])
@includeIf('layouts.components.inputs', [ 'input_id' => "cycle-$cycle->id-china_back", 'input_name' => "china_back", 'label' => 'Zurück bekommen am:', 'placeholder' => '', 'value' => $cycle->states()->where('state_type', 'cb')->latest()->first() ? date('d.m.Y H:i', strtotime($cycle->states()->where('state_type', 'cb')->latest()->first()->updated_at)) : '', // 'value' => $cycle->states()->where('state_type', 'cb')->frist()->updated_at , ])
@endif
@includeIf('layouts.components.card_header', [ 'title' => "Zyklus $cycle->cycle Statusverlauf", ])
@includeIf('orders._form_cycle_state_timeline')
@includeIf('layouts.components.btn_save', ['sticky_bottom' => true,])
@endforeach @endif