Files
eatvio-infra/resources/views/livewire/diary/consultant-comments-edit.blade.php
2023-10-04 17:57:09 +03:00

97 lines
5.3 KiB
PHP

<section class="py-5" id="main">
<div class="container d-flex justify-content-between align-items-center mb-4 px-4 py-2 --bg_white --shadow --radius --mw-1000">
<a href="{{ route('calendar.index') }}" class="d-flex align-items-center --f_bold --f_main">
<svg width="17" height="16" class="me-2"><use xlink:href="#GoBack"></use></svg>
<span class="d-none d-md-inline">Календарь</span>
</a>
<div class="fs-5_5 text-center">
<div class="--f_bolder"><a class="link-dark" href="{{ route('calendar.index') }}">{{ $daysCount }} День</a></div>
<div class="--f_blue">{{ $diary->date }}</div>
</div>
</div>
<div class="container d-flex justify-content-between mb-4 px-0 py-2 --mw-1000 flex-wrap flex-md-nowrap">
<div class="w-30 me-3 py-3 px-4 --bg_white --shadow --radius text-center --f_bold --no_wrap">
<p>Проснулись</p>
<div class="d-flex align-items-center justify-content-center">
<svg width="24" height="24" class="me-2"><use xlink:href="#Clock"></use></svg>
<span class="--f_blue">{{ $diary->wakeup }}</span>
</div>
</div>
<div class="w-30 py-3 px-4 --bg_white --shadow --radius text-center --f_bold --no_wrap">
<p>Легли спать</p>
<div class="d-flex align-items-center justify-content-center">
<svg width="26" height="24" class="me-2"><use xlink:href="#Sleep"></use></svg>
<span class="--f_blue">{{ $diary->retire }}</span>
</div>
</div>
<div class="ms-md-4_5 mt-3 mt-md-0 fs-4_5 w-100 --bordered --radius --f_bold flex-grow-1 --arr_right">
<textarea wire:model="comments.retire" class="form-control h-100 fs-6 --is_edit" placeholder="Введите комментарий к отчёту..." ></textarea>
</div>
</div>
@foreach($curMeals as $key => $meal)
<div class="container mb-4 pt-3 pb-2 overflow-hidden --bg_white --shadow --radius --mw-1000">
<div class="d-flex px-md-5 justify-content-between align-items-center flex-wrap flex-lg-nowrap flex-column-reverse flex-lg-row overflow-x-xs-scroll">
<h3>{{ $typeNames[$meal->type] }}</h3>
<div class="d-flex mb-3 mb-lg-0 align-items-center">
<div class="d-flex align-items-center">
<small>Сытность:</small><span class="ms-2 fs-5 --f_bold --f_blue">{{ $meal->satiety }}</span>
</div>
<div class="d-flex mx-3 align-items-center">
<small>Настроение:</small><span class="ms-2 fs-5 --f_bold --f_blue">{{ $meal->mood }}</span>
</div>
<div class="d-flex align-items-center">
<svg width="23" height="22"><use xlink:href="#Time"></use></svg>
<span class="ms-2 fs-5 --f_bold --f_blue">{{ $meal->time }}</span>
</div>
</div>
</div>
@if(count($meal->portions))
<div class="mt-3">
<div class="" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-0" role="tabpanel" aria-labelledby="pills-0-tab">
<table class="table --table_blue mb-0 fs-4_5 --f_bold">
@foreach($meal->portions as $portion)
<tr>
<td class="ps-md-5 w-50">{{ $portion->product_name }}</td>
<td class="pe-md-5 w-50 text-end">{{ $portion->quantity }} {{ $portion->portion }}</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
@endif
@if(count($meal->photos))
<div class="d-flex">
@foreach($meal->photos as $photo)
<img src="{{ $photo->path }}" width="100" height="80" class="img-thumbnail"/>
@endforeach
</div>
@endif
</div>
@if(count($meal->portions))
<div class="container --mw-1000 mb-4 px-0 fs-4_5 --bordered --radius --f_bold --arr_top">
<textarea wire:model="comments.{{ $commentTypes[$key] }}" class="form-control h-100 fs-6 --is_edit" placeholder="Введите комментарий к отчёту..." data-bs-toggle="tooltip" title="Введите комментарий к отчёту..." >{{ $comments[$commentTypes[$key]] ?? "" }}</textarea>
</div>
@endif
@endforeach
<div class="container mb-4 px-4 py-4 --bg_white --shadow --radius --mw-1000 text-center">
<small>
<p>Дополнительная информация:</p>
<div class="--f_bold">{{ $diary->comment }}</div>
</small>
</div>
<div class="container --mw-1000 mb-4 px-0 fs-4_5 --bg_note --bordered --radius --f_bold --arr_top">
<textarea wire:model="comments.total" class="form-control h-100 fs-6 --is_edit" placeholder="Введите комментарий к отчёту..." data-bs-toggle="tooltip" title="Введите комментарий к отчёту..." ></textarea>
</div>
<div class="container p-0 --mw-1000">
<a href="#" wire:click.prevent="save" class="btn btn-lg btn-secondary btn-block w-100 --f_bolder" type="submit">ДОБАВИТЬ КОММЕНТАРИИ</a>
</div>
</section>