Skip to content

Commit f01db23

Browse files
committed
cleanup help-detail.blade.php
Closes code4romania#120
1 parent 0eaa6ad commit f01db23

File tree

1 file changed

+1
-170
lines changed

1 file changed

+1
-170
lines changed

resources/views/admin/help-detail.blade.php

Lines changed: 1 addition & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<li class="d-flex align-items-start">
2020
<i class="fa fa-map-marker"></i>
2121
<span>
22-
Locatie: <b>{{ $helpRequest->city }}</b>, Regiune <b>{{ $helpRequest->county->region_en }} ({{ $helpRequest->county->region_uk }})</b>
22+
Locatie: <b>{{ $helpRequest->city }}</b>, Regiune <b>{{ $helpRequest->createdBy?->county->region_en }} ({{ $helpRequest->createdBy?->county->region_uk }})</b>
2323
</span>
2424
</li>
2525
<li class="d-flex">
@@ -90,175 +90,6 @@
9090
])
9191

9292
</div>
93-
@foreach($helpRequest->helptypes as $helpType)
94-
<div class="card" id="helpTypeCard{{ $helpType->id }}">
95-
<div class="card-body">
96-
<h5 class="font-weight-600 text-primary mb-4">{{ __($helpType->name) }}</h5>
97-
<div class="row">
98-
<div class="col-sm-5">
99-
@if (\App\HelpType::TYPE_SMS === $helpType->id)
100-
<div class="kv">
101-
<p>{{ __('Estimated amount required for treatment / surgery') }}:</p>
102-
<b>{{ $helpRequest->helprequestsmsdetail()->first()->amount }}</b>
103-
</div>
104-
<div class="kv">
105-
<p>{{ __('Clinic / hospital name where the patient is accepted') }}:</p>
106-
<b>{{ $helpRequest->helprequestsmsdetail()->first()->clinic }}</b>
107-
</div>
108-
<div class="row mt-4">
109-
<div class="col">
110-
<div class="kv">
111-
<p>{{ __('Country') }}:</p>
112-
<b>{{ $helpRequest->helprequestsmsdetail()->first()->country->name }}</b>
113-
</div>
114-
</div>
115-
<div class="col">
116-
<div class="kv">
117-
<p>{{ __('City') }}:</p>
118-
<b>{{ $helpRequest->helprequestsmsdetail()->first()->city }}</b>
119-
</div>
120-
</div>
121-
</div>
122-
@elseif (\App\HelpType::TYPE_ACCOMMODATION === $helpType->id)
123-
<div class="kv">
124-
<p>{{ __('At which hospital will the medical investigations / treatment be performed') }}?</p>
125-
<b>{{ $helpRequest->helprequestaccommodationdetail()->first()->clinic }}</b>
126-
</div>
127-
<div class="kv">
128-
<p>{{ __('Starting with what date you need accommodation') }}?</p>
129-
<b>{{ formatDate($helpRequest->helprequestaccommodationdetail()->first()->start_date) }}</b>
130-
</div>
131-
<div class="kv">
132-
<p>{{ __('Detail here if you need special accommodation conditions') }}:</p>
133-
<b>{{ $helpRequest->helprequestaccommodationdetail()->first()->special_request }}</b>
134-
</div>
135-
@elseif (\App\HelpType::TYPE_OTHER_NEEDS === $helpType->id)
136-
<div class="kv">
137-
<b>{{ $helpType->pivot->message }}</b>
138-
</div>
139-
@endif
140-
</div>
141-
<div class="col-sm-4">
142-
@if (\App\HelpType::TYPE_SMS === $helpType->id)
143-
<div class="kv">
144-
<p>{{ __('Fund destination') }}:</p>
145-
<b>{{ $helpRequest->helprequestsmsdetail()->first()->purpose }}</b>
146-
</div>
147-
@elseif (\App\HelpType::TYPE_ACCOMMODATION === $helpType->id)
148-
<div class="kv">
149-
<p>{{ __('For how many people do you need accommodation') }}?</p>
150-
<b>{{ $helpRequest->helprequestaccommodationdetail()->first()->guests_number }}</b>
151-
</div>
152-
<div class="kv">
153-
<p>{{ __('Until when do you need accommodation') }}?</p>
154-
<b>{{ formatDate($helpRequest->helprequestaccommodationdetail()->first()->end_date) }}</b>
155-
</div>
156-
@endif
157-
</div>
158-
<div class="col-sm-3">
159-
<div class="form-group">
160-
<label for="change-approval-{{ $helpType->id }}">Nivel de aprobare:</label>
161-
@php
162-
$newClass = '';
163-
164-
if ('pending' === $helpType->pivot->approve_status) {
165-
$newClass = 'bg-warning border-warning';
166-
} else if ('approved' === $helpType->pivot->approve_status) {
167-
$newClass = 'bg-success border-success';
168-
} else if ('denied' === $helpType->pivot->approve_status) {
169-
$newClass = 'bg-danger border-danger';
170-
}
171-
@endphp
172-
<select name="change-approval-{{ $helpType->id }}" id="change-approval-{{ $helpType->id }}" data-type-id="{{ $helpType->id }}" data-identifier="{{ $helpType->pivot->id }}" class="change-approval-status custom-select form-control text-white font-weight-600 {{ $newClass }}">
173-
@foreach(\App\HelpRequestType::approveStatusList() as $key => $value)
174-
@if (!(\App\HelpRequestType::APPROVE_STATUS_PENDING === $key && \App\HelpRequestType::APPROVE_STATUS_PENDING !== $helpType->pivot->approve_status))
175-
<option value="{{ $key }}" {{ ($key == $helpType->pivot->approve_status) ? 'selected' : '' }}>{{ __($value) }}</option>
176-
@endif
177-
@endforeach
178-
</select>
179-
</div>
180-
181-
@if (\App\HelpType::TYPE_ACCOMMODATION === $helpType->id)
182-
<div class="form-group">
183-
@if (empty($helpRequest->helprequestaccommodationdetail()->first()->accommodation_id))
184-
<button id="accBookAction" class="form-control font-weight-600 btn btn-secondary text-white btn-md">
185-
{{ __('Book Accommodation') }}
186-
</button>
187-
@else
188-
<button id="accCancelBookAction" class="form-control font-weight-600 btn text-white btn-warning btn-md">
189-
{{ __('Cancel Booking') }}
190-
</button>
191-
192-
193-
194-
<div class="mt-4">
195-
<a class="form-control font-weight-600 btn btn-info text-white btn-md" href="{{@route('admin.accommodation-detail', ['id' => $helpRequest->helprequestaccommodationdetail()->first()->accommodation_id])}}">
196-
Vezi detalii cazare
197-
</a>
198-
</div>
199-
@endif
200-
</div>
201-
@endif
202-
</div>
203-
</div>
204-
</div>
205-
</div>
206-
@endforeach
207-
208-
@if ($helpRequest->helprequestaccommodationdetail()->first())
209-
<!-- Accommodation book modal -->
210-
<div class="modal fade bd-example-modal-sm" id="accommodationBookModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" data-content="{{ $helpRequest->helprequestaccommodationdetail()->first()->id }}">
211-
<div class="modal-dialog modal-sm">
212-
<div class="modal-content">
213-
<div class="modal-header">
214-
<h5 class="modal-title" id="exampleModalScrollableTitle">{{ __('Book Accommodation') }}</h5>
215-
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
216-
<span aria-hidden="true">&times;</span>
217-
</button>
218-
</div>
219-
<div class="modal-body">
220-
221-
<div class="form-group">
222-
<label for="accommodationId">Introdu "{{ __("Accommodation No") }}" pentru a face asocierea.</label>
223-
224-
<input id="accommodationId" type="number" class="form-control font-weight-600">
225-
226-
<span class="invalid-feedback d-flex d-none" role="alert" id="accommodationBookError"></span>
227-
228-
</div>
229-
</div>
230-
<div class="modal-footer">
231-
<button type="button" class="btn btn-link text-dark" data-dismiss="modal" id="cancel">{{ __('Cancel') }}</button>
232-
<button type="button" class="btn btn-secondary" id="proceedAssocAccommodation">{{ __('Yes') }}</button>
233-
</div>
234-
</div>
235-
</div>
236-
</div>
237-
238-
<!-- Accommodation cancel book modal -->
239-
<div class="modal fade bd-example-modal-sm" id="accommodationCancelBookModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" data-content="{{ $helpRequest->helprequestaccommodationdetail()->first()->id }}">
240-
<div class="modal-dialog modal-sm">
241-
<div class="modal-content">
242-
<div class="modal-header">
243-
<h5 class="modal-title" id="exampleModalScrollableTitle">Anuleaza rezervarea</h5>
244-
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
245-
<span aria-hidden="true">&times;</span>
246-
</button>
247-
</div>
248-
<div class="modal-body">
249-
250-
<div class="form-group">
251-
<label for="accommodationId">Anulezi rezervarea?</label>
252-
</div>
253-
</div>
254-
<div class="modal-footer">
255-
<button type="button" class="btn btn-link text-dark" data-dismiss="modal" id="cancel">{{ __('Cancel') }}</button>
256-
<button type="button" class="btn btn-secondary" id="proceedDeassocAccommodation">{{ __('Yes') }}</button>
257-
</div>
258-
</div>
259-
</div>
260-
</div>
261-
@endif
26293

26394
<!-- Confirmation modal -->
26495
<div class="modal fade bd-example-modal-sm" id="confirmationModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">

0 commit comments

Comments
 (0)