| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | @extends('layout.default') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | @section('title', $__t('Chores journal')) | 
					
						
							| 
									
										
										
										
											2018-10-27 17:26:00 +02:00
										 |  |  | @section('activeNav', 'choresjournal') | 
					
						
							|  |  |  | @section('viewJsName', 'choresjournal') | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | @section('content') | 
					
						
							|  |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 		<h2 class="title">@yield('title')</h2> | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 		<div class="float-right"> | 
					
						
							|  |  |  | 			<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3" | 
					
						
							|  |  |  | 				type="button" | 
					
						
							|  |  |  | 				data-toggle="collapse" | 
					
						
							|  |  |  | 				data-target="#table-filter-row"> | 
					
						
							|  |  |  | 				<i class="fas fa-filter"></i> | 
					
						
							|  |  |  | 			</button> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | <hr class="my-2 py-1"> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | <div class="row collapse d-md-flex" | 
					
						
							|  |  |  | 	id="table-filter-row"> | 
					
						
							| 
									
										
										
										
											2019-03-04 17:43:12 +01:00
										 |  |  | 	<div class="col-xs-12 col-md-6 col-xl-3"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 		<div class="input-group"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 			<div class="input-group-prepend"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<span class="input-group-text"><i class="fas fa-search"></i></span> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 			<input type="text" | 
					
						
							|  |  |  | 				id="search" | 
					
						
							|  |  |  | 				class="form-control" | 
					
						
							|  |  |  | 				placeholder="{{ $__t('Search') }}"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2019-03-04 17:43:12 +01:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 	<div class="col-xs-12 col-md-6 col-xl-3"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 		<div class="input-group"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 			<div class="input-group-prepend"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 				<span class="input-group-text"><i class="fas fa-filter"></i> {{ $__t('Chore') }}</span> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 			<select class="form-control" | 
					
						
							|  |  |  | 				id="chore-filter"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 				<option value="all">{{ $__t('All') }}</option> | 
					
						
							|  |  |  | 				@foreach($chores as $chore) | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<option value="{{ $chore->id }}">{{ $chore->name }}</option> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 				@endforeach | 
					
						
							|  |  |  | 			</select> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 	<div class="col"> | 
					
						
							|  |  |  | 		<div class="float-right"> | 
					
						
							|  |  |  | 			<a id="clear-filter-button" | 
					
						
							|  |  |  | 				class="btn btn-sm btn-outline-info" | 
					
						
							|  |  |  | 				href="#"> | 
					
						
							|  |  |  | 				{{ $__t('Clear filter') }} | 
					
						
							|  |  |  | 			</a> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | <div class="row mt-2"> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 	<div class="col"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 		<table id="chores-journal-table" | 
					
						
							| 
									
										
										
										
											2020-11-07 14:53:45 +01:00
										 |  |  | 			class="table table-sm table-striped nowrap w-100"> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 			<thead> | 
					
						
							|  |  |  | 				<tr> | 
					
						
							| 
									
										
										
										
											2019-03-09 10:49:26 +01:00
										 |  |  | 					<th class="border-right"></th> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 					<th>{{ $__t('Chore') }}</th> | 
					
						
							|  |  |  | 					<th>{{ $__t('Tracked time') }}</th> | 
					
						
							| 
									
										
										
										
											2019-09-26 17:20:25 +02:00
										 |  |  | 					@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 					<th>{{ $__t('Done by') }}</th> | 
					
						
							| 
									
										
										
										
											2019-09-26 17:20:25 +02:00
										 |  |  | 					@endif | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 			</thead> | 
					
						
							| 
									
										
										
										
											2019-01-05 20:06:35 +01:00
										 |  |  | 			<tbody class="d-none"> | 
					
						
							| 
									
										
										
										
											2018-09-22 13:26:58 +02:00
										 |  |  | 				@foreach($choresLog as $choreLogEntry) | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<tr id="chore-execution-{{ $choreLogEntry->id }}-row" | 
					
						
							|  |  |  | 					class="@if($choreLogEntry->undone == 1) text-muted @endif"> | 
					
						
							| 
									
										
										
										
											2019-03-09 10:49:26 +01:00
										 |  |  | 					<td class="fit-content border-right"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<a class="btn btn-secondary btn-sm undo-chore-execution-button permission-CHORE_UNDO_EXECUTION @if($choreLogEntry->undone == 1) disabled @endif" | 
					
						
							|  |  |  | 							href="#" | 
					
						
							|  |  |  | 							data-execution-id="{{ $choreLogEntry->id }}" | 
					
						
							|  |  |  | 							data-toggle="tooltip" | 
					
						
							|  |  |  | 							data-placement="left" | 
					
						
							|  |  |  | 							title="{{ $__t('Undo chore execution') }}"> | 
					
						
							| 
									
										
										
										
											2018-10-27 17:26:00 +02:00
										 |  |  | 							<i class="fas fa-undo"></i> | 
					
						
							|  |  |  | 						</a> | 
					
						
							|  |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 					<td> | 
					
						
							| 
									
										
										
										
											2018-11-18 12:58:15 +01:00
										 |  |  | 						<span class="name-anchor @if($choreLogEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($chores, 'id', $choreLogEntry->chore_id)->name }}</span> | 
					
						
							| 
									
										
										
										
											2018-10-27 17:26:00 +02:00
										 |  |  | 						@if($choreLogEntry->undone == 1) | 
					
						
							|  |  |  | 						<br> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 						{{ $__t('Undone on') . ' ' . $choreLogEntry->undone_timestamp }} | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<time class="timeago timeago-contextual" | 
					
						
							|  |  |  | 							datetime="{{ $choreLogEntry->undone_timestamp }}"></time> | 
					
						
							| 
									
										
										
										
											2018-10-27 17:26:00 +02:00
										 |  |  | 						@endif | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							| 
									
										
										
										
											2019-07-07 19:38:57 +02:00
										 |  |  | 						<span>{{ $choreLogEntry->tracked_time }}</span> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<time class="timeago timeago-contextual @if(FindObjectInArrayByPropertyValue($chores, 'id', $choreLogEntry->chore_id)->track_date_only == 1) timeago-date-only @endif" | 
					
						
							|  |  |  | 							datetime="{{ $choreLogEntry->tracked_time }}"></time> | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2019-09-26 17:20:25 +02:00
										 |  |  | 					@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 					<td> | 
					
						
							| 
									
										
										
										
											2018-09-22 13:26:58 +02:00
										 |  |  | 						@if ($choreLogEntry->done_by_user_id !== null && !empty($choreLogEntry->done_by_user_id)) | 
					
						
							|  |  |  | 						{{ GetUserDisplayName(FindObjectInArrayByPropertyValue($users, 'id', $choreLogEntry->done_by_user_id)) }} | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 						@else | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 						{{ $__t('Unknown') }} | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 						@endif | 
					
						
							|  |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2019-09-26 17:20:25 +02:00
										 |  |  | 					@endif | 
					
						
							| 
									
										
										
										
											2018-07-25 20:01:58 +02:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 				@endforeach | 
					
						
							|  |  |  | 			</tbody> | 
					
						
							|  |  |  | 		</table> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | @stop |