2018-04-11 19:49:35 +02:00
|
|
|
@extends('layout.default')
|
|
|
|
|
2019-05-01 20:19:18 +02:00
|
|
|
@section('title', $__t('Chore tracking'))
|
2018-09-22 13:26:58 +02:00
|
|
|
@section('activeNav', 'choretracking')
|
|
|
|
@section('viewJsName', 'choretracking')
|
2018-04-12 21:13:38 +02:00
|
|
|
|
2018-04-11 19:49:35 +02:00
|
|
|
@section('content')
|
2018-07-10 20:37:13 +02:00
|
|
|
<div class="row">
|
2018-07-12 19:12:31 +02:00
|
|
|
<div class="col-xs-12 col-md-6 col-xl-4 pb-3">
|
2020-04-19 08:51:02 -04:00
|
|
|
<h2 class="title">@yield('title')</h2>
|
|
|
|
<hr>
|
2020-08-31 20:32:50 +02:00
|
|
|
<form id="choretracking-form"
|
|
|
|
novalidate>
|
2018-07-10 20:37:13 +02:00
|
|
|
|
|
|
|
<div class="form-group">
|
2019-05-01 20:19:18 +02:00
|
|
|
<label for="chore_id">{{ $__t('Chore') }}</label>
|
2020-08-31 20:32:50 +02:00
|
|
|
<select class="form-control combobox"
|
|
|
|
id="chore_id"
|
|
|
|
name="chore_id"
|
|
|
|
required>
|
2018-07-10 20:37:13 +02:00
|
|
|
<option value=""></option>
|
2018-09-22 13:26:58 +02:00
|
|
|
@foreach($chores as $chore)
|
2020-08-31 20:32:50 +02:00
|
|
|
<option value="{{ $chore->id }}">{{ $chore->name }}</option>
|
2018-07-10 20:37:13 +02:00
|
|
|
@endforeach
|
|
|
|
</select>
|
2019-05-01 20:19:18 +02:00
|
|
|
<div class="invalid-feedback">{{ $__t('You have to select a chore') }}</div>
|
2018-07-10 20:37:13 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
@include('components.datetimepicker', array(
|
2020-08-31 20:32:50 +02:00
|
|
|
'id' => 'tracked_time',
|
|
|
|
'label' => 'Tracked time',
|
|
|
|
'format' => 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
'initWithNow' => true,
|
|
|
|
'limitEndToNow' => true,
|
|
|
|
'limitStartToNow' => false,
|
|
|
|
'invalidFeedback' => $__t('This can only be before now')
|
2018-07-10 20:37:13 +02:00
|
|
|
))
|
|
|
|
|
2019-09-26 17:20:25 +02:00
|
|
|
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
|
2018-07-24 20:45:14 +02:00
|
|
|
@include('components.userpicker', array(
|
2020-08-31 20:32:50 +02:00
|
|
|
'label' => 'Done by',
|
|
|
|
'users' => $users,
|
|
|
|
'nextInputSelector' => '#user_id',
|
|
|
|
'prefillByUserId' => GROCY_USER_ID
|
2018-07-24 20:45:14 +02:00
|
|
|
))
|
2019-09-26 17:20:25 +02:00
|
|
|
@else
|
2020-08-31 20:32:50 +02:00
|
|
|
<input type="hidden"
|
|
|
|
id="user_id"
|
|
|
|
name="user_id"
|
|
|
|
value="{{ GROCY_USER_ID }}">
|
2019-09-26 17:20:25 +02:00
|
|
|
@endif
|
2018-07-24 20:45:14 +02:00
|
|
|
|
2020-08-31 20:32:50 +02:00
|
|
|
<button id="save-choretracking-button"
|
|
|
|
class="btn btn-success">{{ $__t('OK') }}</button>
|
2018-07-10 20:37:13 +02:00
|
|
|
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2018-07-11 19:43:05 +02:00
|
|
|
<div class="col-xs-12 col-md-6 col-xl-4">
|
2018-09-22 13:26:58 +02:00
|
|
|
@include('components.chorecard')
|
2018-07-10 20:37:13 +02:00
|
|
|
</div>
|
2017-07-25 20:03:31 +02:00
|
|
|
</div>
|
2018-04-11 19:49:35 +02:00
|
|
|
@stop
|