mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
feat: configurable behaviour of tracking button on /choresoverview
This commit is contained in:
parent
8ac8000f30
commit
915b172897
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
### Chores
|
||||
|
||||
- xxx
|
||||
- There is now a new sub feature flag `FEATURE_FLAG_CHORES_OVERVIEW_DEFAULT_TRACK_ON_NEXT_SCHEDULE` to change the behaviour of the green button on `/choresoverview`. If set to true, the green button will track an execution of the corresponding chore on the next scheduled time. If set to false it will instead track an execution for now/today. (Flag defaults to `true`, so no changed behavior when not configured)
|
||||
|
||||
### Calendar
|
||||
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD', true); // Activa
|
|||
Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true);
|
||||
Setting('FEATURE_FLAG_RECIPES_MEALPLAN', true);
|
||||
Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true);
|
||||
Setting('FEATURE_FLAG_CHORES_OVERVIEW_DEFAULT_TRACK_ON_NEXT_SCHEDULE', true)
|
||||
Setting('FEATURE_FLAG_THERMAL_PRINTER', false);
|
||||
|
||||
// Feature settings
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@
|
|||
<tr id="chore-{{ $curentChoreEntry->chore_id }}-row"
|
||||
class="@if($curentChoreEntry->due_type == 'overdue') table-danger @elseif($curentChoreEntry->due_type == 'duetoday') table-info @elseif($curentChoreEntry->due_type == 'duesoon') table-warning @endif">
|
||||
<td class="fit-content border-right">
|
||||
@if(GROCY_FEATURE_FLAG_CHORES_OVERVIEW_DEFAULT_TRACK_ON_NEXT_SCHEDULE)
|
||||
<a class="btn btn-success btn-sm track-chore-button permission-CHORE_TRACK_EXECUTION"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
|
|
@ -145,6 +146,17 @@
|
|||
data-chore-name="{{ FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->name }}">
|
||||
<i class="fa-solid fa-play"></i>
|
||||
</a>
|
||||
@else
|
||||
<a class="btn btn-success btn-sm track-chore-button now permission-CHORE_TRACK_EXECUTION"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
data-placement="left"
|
||||
title="{{ $__t('Track chore execution now') }}"
|
||||
data-chore-id="{{ $curentChoreEntry->chore_id }}"
|
||||
data-chore-name="{{ FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->name }}">
|
||||
<i class="fa-solid fa-play"></i>
|
||||
</a>
|
||||
@endif
|
||||
<a class="btn btn-secondary btn-sm track-chore-button skip permission-CHORE_TRACK_EXECUTION @if(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type == \Grocy\Services\ChoresService::CHORE_PERIOD_TYPE_MANUALLY) disabled @endif"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
|
|
@ -161,12 +173,21 @@
|
|||
<i class="fa-solid fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="table-inline-menu dropdown-menu dropdown-menu-right">
|
||||
@if(GROCY_FEATURE_FLAG_CHORES_OVERVIEW_DEFAULT_TRACK_ON_NEXT_SCHEDULE)
|
||||
<a class="dropdown-item track-chore-button now permission-CHORE_TRACK_EXECUTION"
|
||||
data-chore-id="{{ $curentChoreEntry->chore_id }}"
|
||||
type="button"
|
||||
href="#">
|
||||
<span>{{ $__t('Track chore execution now') }}</span>
|
||||
</a>
|
||||
@else
|
||||
<a class="dropdown-item track-chore-button permission-CHORE_TRACK_EXECUTION"
|
||||
data-chore-id="{{ $curentChoreEntry->chore_id }}"
|
||||
type="button"
|
||||
href="#">
|
||||
<span>{{ $__t('Track next chore schedule') }}</span>
|
||||
</a>
|
||||
@endif
|
||||
<a class="dropdown-item reschedule-chore-button permission-CHORE_TRACK_EXECUTION"
|
||||
data-chore-id="{{ $curentChoreEntry->chore_id }}"
|
||||
type="button"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user