@extends('layout.default') @if($mode == 'edit') @section('title', $__t('Edit chore')) @else @section('title', $__t('Create chore')) @endif @section('viewJsName', 'choreform') @section('content')

@yield('title')


@if($mode == 'edit') @endif
{{ $__t('A name is required') }}
active == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="active" name="active" value="1">
{{ $__t('A period type is required') }}
@php if($mode == 'edit') { $value = $chore->period_days; } else { $value = 0; } @endphp @include('components.numberpicker', array( 'id' => 'period_days', 'label' => 'Period days', 'value' => $value, 'min' => '0', 'additionalCssClasses' => 'input-group-chore-period-type', 'additionalGroupCssClasses' => 'period-type-input period-type-dynamic-regular period-type-monthly' ))
@php if($mode == 'edit') { $value = $chore->period_interval; } else { $value = 1; } @endphp @include('components.numberpicker', array( 'id' => 'period_interval', 'label' => 'Period interval', 'value' => $value, 'min' => '1', 'additionalCssClasses' => 'input-group-chore-period-type', 'additionalGroupCssClasses' => 'period-type-input period-type-daily period-type-weekly period-type-monthly period-type-yearly', 'hintId' => 'chore-period-interval-info' )) @if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
{{ $__t('An assignment type is required') }}
{{ $__t('This assignment type requires that at least one is assigned') }}
@else @endif
track_date_only == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="track_date_only" name="track_date_only" value="1">
rollover == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="rollover" name="rollover" value="1">
@if(GROCY_FEATURE_FLAG_STOCK)
consume_product_on_execution == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="consume_product_on_execution" name="consume_product_on_execution" value="1">
@php $prefillById = ''; if($mode=='edit' && !empty($chore->product_id)) { $prefillById = $chore->product_id; } @endphp @include('components.productpicker', array( 'products' => $products, 'nextInputSelector' => '#product_amount', 'isRequired' => false, 'disallowAllProductWorkflows' => true, 'prefillById' => $prefillById )) @php if($mode == 'edit') { $value = $chore->product_amount; } else { $value = ''; } @endphp @include('components.numberpicker', array( 'id' => 'product_amount', 'label' => 'Amount', 'contextInfoId' => 'amount_qu_unit', 'min' => $DEFAULT_MIN_AMOUNT, 'decimals' => $userSettings['stock_decimal_places_amounts'], 'isRequired' => false, 'value' => $value, 'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount' )) @endif @include('components.userfieldsform', array( 'userfields' => $userfields, 'entity' => 'chores' ))
@stop