mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 11:48:55 +00:00
Make it possible to disable chores/tasks/batteries due soon filters/highlighting (closes #1485)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
- Stock entry labels get now also printed on inventory (only when adding products, same option "Stock entry label" like on the purchase page)
|
||||
- Added a separate status filter and table row highlighting (blue) on the chores, tasks and batteries overview pages for items due today
|
||||
- Additionally, the "due soon" days of chores/tasks/batteries (top right corner settings menu) can be set to `0` to disable that filter/highlighting
|
||||
- Optimized relative time display (also fixed a phrasing problem for some languages, e.g. Hungarian) (thanks @Tallyrald)
|
||||
- When using LDAP authentication, the configured `LDAP_UID_ATTR` is now used to compare if the user already exists instead of the username entered on the login page (that prevents creating multiple users if you entere the username in different notations) (thanks @FloSet)
|
||||
- When using reverse proxy authentication (`ReverseProxyAuthMiddleware`), it's now also possible to pass the username in an environment variable instead of an HTTP header (new `config.php` option `REVERSE_PROXY_AUTH_USE_ENV`) (thanks @Forceu)
|
||||
|
@@ -94,7 +94,7 @@ class BatteriesController extends BaseController
|
||||
{
|
||||
$currentBattery->due_type = 'duetoday';
|
||||
}
|
||||
elseif ($currentBattery->next_estimated_charge_time <= date('Y-m-d H:i:s', strtotime('+' . $nextXDays . ' days')))
|
||||
elseif ($nextXDays > 0 && $currentBattery->next_estimated_charge_time <= date('Y-m-d H:i:s', strtotime('+' . $nextXDays . ' days')))
|
||||
{
|
||||
$currentBattery->due_type = 'duesoon';
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ class ChoresController extends BaseController
|
||||
{
|
||||
$currentChore->due_type = 'duetoday';
|
||||
}
|
||||
elseif ($currentChore->next_estimated_execution_time <= date('Y-m-d H:i:s', strtotime('+' . $nextXDays . ' days')))
|
||||
elseif ($nextXDays > 0 && $currentChore->next_estimated_execution_time <= date('Y-m-d H:i:s', strtotime('+' . $nextXDays . ' days')))
|
||||
{
|
||||
$currentChore->due_type = 'duesoon';
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ class TasksController extends BaseController
|
||||
{
|
||||
$task->due_type = 'duetoday';
|
||||
}
|
||||
elseif ($task->due_date <= date('Y-m-d 23:59:59', strtotime('+' . $nextXDays . ' days')))
|
||||
elseif ($nextXDays > 0 && $task->due_date <= date('Y-m-d 23:59:59', strtotime('+' . $nextXDays . ' days')))
|
||||
{
|
||||
$task->due_type = 'duesoon';
|
||||
}
|
||||
|
@@ -2277,3 +2277,6 @@ msgid "%s battery is due to be charged today"
|
||||
msgid_plural "%s batteries are due to be charged today"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "Set to 0 to hide due soon filters/highlighting"
|
||||
msgstr ""
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<div id="info-due-soon-batteries"
|
||||
data-status-filter="duesoon"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
class="warning-message status-filter-message responsive-button"></div>
|
||||
class="warning-message status-filter-message responsive-button @if($nextXDays == 0) d-none @endif"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
@@ -79,7 +79,9 @@
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="overdue">{{ $__t('Overdue') }}</option>
|
||||
<option value="duetoday">{{ $__t('Due today') }}</option>
|
||||
@if($nextXDays > 0)
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -20,8 +20,9 @@
|
||||
'id' => 'batteries_due_soon_days',
|
||||
'additionalAttributes' => 'data-setting-key="batteries_due_soon_days"',
|
||||
'label' => 'Due soon days',
|
||||
'min' => 1,
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
'min' => 0,
|
||||
'additionalCssClasses' => 'user-setting-control',
|
||||
'hint' => $__t('Set to 0 to hide due soon filters/highlighting')
|
||||
))
|
||||
|
||||
<a href="{{ $U('/batteriesoverview') }}"
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<div id="info-due-soon-chores"
|
||||
data-status-filter="duesoon"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
class="warning-message status-filter-message responsive-message mr-2"></div>
|
||||
class="warning-message status-filter-message responsive-message mr-2 @if($nextXDays == 0) d-none @endif"></div>
|
||||
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
|
||||
<div id="info-assigned-to-me-chores"
|
||||
data-user-filter="xx{{ GROCY_USER_ID }}xx"
|
||||
@@ -84,7 +84,9 @@
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="overdue">{{ $__t('Overdue') }}</option>
|
||||
<option value="duetoday">{{ $__t('Due today') }}</option>
|
||||
@if($nextXDays > 0)
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -16,12 +16,14 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-12">
|
||||
<h4 class="mt-2">{{ $__t('Chores overview') }}</h4>
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'chores_due_soon_days',
|
||||
'additionalAttributes' => 'data-setting-key="chores_due_soon_days"',
|
||||
'label' => 'Due soon days',
|
||||
'min' => 1,
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
'min' => 0,
|
||||
'additionalCssClasses' => 'user-setting-control',
|
||||
'hint' => $__t('Set to 0 to hide due soon filters/highlighting')
|
||||
))
|
||||
|
||||
<a href="{{ $U('/choresoverview') }}"
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<div id="info-due-soon-tasks"
|
||||
data-status-filter="duesoon"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
class="warning-message status-filter-message responsive-button mr-2"></div>
|
||||
class="warning-message status-filter-message responsive-button @if($nextXDays == 0) d-none @endif"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
@@ -79,7 +79,9 @@
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="overdue">{{ $__t('Overdue') }}</option>
|
||||
<option value="duetoday">{{ $__t('Due today') }}</option>
|
||||
@if($nextXDays > 0)
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -20,8 +20,9 @@
|
||||
'id' => 'tasks_due_soon_days',
|
||||
'additionalAttributes' => 'data-setting-key="tasks_due_soon_days"',
|
||||
'label' => 'Due soon days',
|
||||
'min' => 1,
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
'min' => 0,
|
||||
'additionalCssClasses' => 'user-setting-control',
|
||||
'hint' => $__t('Set to 0 to hide due soon filters/highlighting')
|
||||
))
|
||||
|
||||
<a href="{{ $U('/tasks') }}"
|
||||
|
Reference in New Issue
Block a user