mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Highlight chores/tasks/batteries due today in a separate color + status filter (closes #1740)
This commit is contained in:
@@ -29,13 +29,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-top border-bottom my-2 py-1">
|
||||
<div id="info-due-batteries"
|
||||
data-status-filter="duesoon"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
class="warning-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-overdue-batteries"
|
||||
data-status-filter="overdue"
|
||||
class="error-message status-filter-message responsive-button"></div>
|
||||
class="error-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-due-today-batteries"
|
||||
data-status-filter="duetoday"
|
||||
class="normal-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-due-soon-batteries"
|
||||
data-status-filter="duesoon"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
class="warning-message status-filter-message responsive-button"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
@@ -74,8 +77,9 @@
|
||||
<select class="custom-control custom-select"
|
||||
id="status-filter">
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
<option value="overdue">{{ $__t('Overdue') }}</option>
|
||||
<option value="duetoday">{{ $__t('Due today') }}</option>
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,9 +113,7 @@
|
||||
<tbody class="d-none">
|
||||
@foreach($current as $currentBatteryEntry)
|
||||
<tr id="battery-{{ $currentBatteryEntry->battery_id }}-row"
|
||||
class="@if(FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->charge_interval_days > 0 && $currentBatteryEntry->next_estimated_charge_time < date('Y-m-d H:i:s')) table-danger @elseif(FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->charge_interval_days > 0 && $currentBatteryEntry->next_estimated_charge_time < date('Y-m-d H:i:s', strtotime('+' . $nextXDays . ' days')))
|
||||
table-warning
|
||||
@endif">
|
||||
class="@if($currentBatteryEntry->due_type == 'overdue') table-danger @elseif($currentBatteryEntry->due_type == 'duetoday') table-info @elseif($currentBatteryEntry->due_type == 'duesoon') table-warning @endif">
|
||||
<td class="fit-content border-right">
|
||||
<a class="btn btn-success btn-sm track-charge-cycle-button permission-BATTERIES_TRACK_CHARGE_CYCLE"
|
||||
href="#"
|
||||
@@ -186,25 +188,10 @@
|
||||
@endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
"@if(FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->charge_interval_days > 0 && $currentBatteryEntry->next_estimated_charge_time < date('Y-m-d
|
||||
H:i:s'))
|
||||
overdue
|
||||
@elseif(FindObjectInArrayByPropertyValue($batteries, 'id'
|
||||
,
|
||||
$currentBatteryEntry->battery_id)->charge_interval_days > 0 && $currentBatteryEntry->next_estimated_charge_time < date('Y-m-d
|
||||
H:i:s',
|
||||
strtotime('+'
|
||||
.
|
||||
$nextXDays
|
||||
. ' days'
|
||||
)))
|
||||
duesoon
|
||||
@endif
|
||||
</td>
|
||||
@include('components.userfields_tbody',
|
||||
array( 'userfields'=> $userfields,
|
||||
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $currentBatteryEntry->battery_id)
|
||||
))
|
||||
{{ $currentBatteryEntry->due_type }}
|
||||
@if($currentBatteryEntry->due_type == 'duetoday')
|
||||
duesoon
|
||||
@endif
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
@@ -29,17 +29,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-top border-bottom my-2 py-1">
|
||||
<div id="info-due-chores"
|
||||
data-status-filter="duesoon"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
class="warning-message status-filter-message responsive-message mr-2"></div>
|
||||
<div id="info-overdue-chores"
|
||||
data-status-filter="overdue"
|
||||
class="error-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-due-today-chores"
|
||||
data-status-filter="duetoday"
|
||||
class="normal-message status-filter-message responsive-button mr-2"></div>
|
||||
<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>
|
||||
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
|
||||
<div id="info-assigned-to-me-chores"
|
||||
data-user-filter="xx{{ GROCY_USER_ID }}xx"
|
||||
class="normal-message user-filter-message responsive-button"></div>
|
||||
class="secondary-message user-filter-message responsive-button"></div>
|
||||
@endif
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
@@ -79,8 +82,9 @@
|
||||
<select class="custom-control custom-select"
|
||||
id="status-filter">
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
<option value="overdue">{{ $__t('Overdue') }}</option>
|
||||
<option value="duetoday">{{ $__t('Due today') }}</option>
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,9 +136,7 @@
|
||||
<tbody class="d-none">
|
||||
@foreach($currentChores as $curentChoreEntry)
|
||||
<tr id="chore-{{ $curentChoreEntry->chore_id }}-row"
|
||||
class="@if(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_PERIOD_TYPE_MANUALLY && $curentChoreEntry->next_estimated_execution_time < date('Y-m-d H:i:s')) table-danger @elseif(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_PERIOD_TYPE_MANUALLY && $curentChoreEntry->next_estimated_execution_time < date('Y-m-d H:i:s', strtotime('+' . $nextXDays . ' days')))
|
||||
table-warning
|
||||
@endif">
|
||||
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">
|
||||
<a class="btn btn-success btn-sm track-chore-button permission-CHORE_TRACK_EXECUTION"
|
||||
href="#"
|
||||
@@ -217,25 +219,14 @@
|
||||
</td>
|
||||
<td id="chore-{{ $curentChoreEntry->chore_id }}-due-filter-column"
|
||||
class="d-none">
|
||||
@if(FindObjectInArrayByPropertyValue($chores, 'id', $curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_PERIOD_TYPE_MANUALLY && $curentChoreEntry->next_estimated_execution_time < date('Y-m-d
|
||||
H:i:s'))
|
||||
overdue
|
||||
@elseif(FindObjectInArrayByPropertyValue($chores, 'id'
|
||||
,
|
||||
$curentChoreEntry->chore_id)->period_type !== \Grocy\Services\ChoresService::CHORE_PERIOD_TYPE_MANUALLY && $curentChoreEntry->next_estimated_execution_time < date('Y-m-d
|
||||
H:i:s',
|
||||
strtotime('+'
|
||||
.
|
||||
$nextXDays
|
||||
. ' days'
|
||||
)))
|
||||
duesoon
|
||||
@endif
|
||||
</td>
|
||||
<td
|
||||
class="d-none">
|
||||
@if(!empty($curentChoreEntry->next_execution_assigned_to_user_id))
|
||||
xx{{ $curentChoreEntry->next_execution_assigned_to_user_id }}xx
|
||||
{{ $curentChoreEntry->due_type }}
|
||||
@if($curentChoreEntry->due_type == 'duetoday')
|
||||
duesoon
|
||||
@endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if(!empty($curentChoreEntry->next_execution_assigned_to_user_id))
|
||||
xx{{ $curentChoreEntry->next_execution_assigned_to_user_id }}xx
|
||||
</td>
|
||||
@endif
|
||||
|
||||
|
@@ -50,16 +50,16 @@
|
||||
</div>
|
||||
<div class="border-top border-bottom my-2 py-1">
|
||||
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
<div id="info-expired-products"
|
||||
data-status-filter="expired"
|
||||
class="error-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-overdue-products"
|
||||
data-status-filter="overdue"
|
||||
class="secondary-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-duesoon-products"
|
||||
data-next-x-days="{{ $nextXDays }}"
|
||||
data-status-filter="duesoon"
|
||||
class="warning-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-overdue-products"
|
||||
data-status-filter="overdue"
|
||||
class="secondary-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-expired-products"
|
||||
data-status-filter="expired"
|
||||
class="error-message status-filter-message responsive-button mr-2"></div>
|
||||
@endif
|
||||
<div id="info-missing-products"
|
||||
data-status-filter="belowminstockamount"
|
||||
|
@@ -29,13 +29,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-top border-bottom my-2 py-1">
|
||||
<div id="info-due-tasks"
|
||||
<div id="info-overdue-tasks"
|
||||
data-status-filter="overdue"
|
||||
class="error-message status-filter-message responsive-button mr-2"></div>
|
||||
<div id="info-due-today-tasks"
|
||||
data-status-filter="duetoday"
|
||||
class="normal-message status-filter-message responsive-button mr-2"></div>
|
||||
<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>
|
||||
<div id="info-overdue-tasks"
|
||||
data-status-filter="overdue"
|
||||
class="error-message status-filter-message responsive-button"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
@@ -74,8 +77,9 @@
|
||||
<select class="custom-control custom-select"
|
||||
id="status-filter">
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
<option value="overdue">{{ $__t('Overdue') }}</option>
|
||||
<option value="duetoday">{{ $__t('Due today') }}</option>
|
||||
<option value="duesoon">{{ $__t('Due soon') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,9 +125,7 @@
|
||||
<tbody class="d-none">
|
||||
@foreach($tasks as $task)
|
||||
<tr id="task-{{ $task->id }}-row"
|
||||
class="@if($task->done == 1) text-muted @endif @if(!empty($task->due_date) && $task->due_date < date('Y-m-d')) table-danger @elseif(!empty($task->due_date) && $task->due_date < date('Y-m-d', strtotime('+' . $nextXDays . ' days')))
|
||||
table-warning
|
||||
@endif">
|
||||
class="@if($task->due_type == 'overdue') table-danger @elseif($task->due_type == 'duetoday') table-info @elseif($task->due_type == 'duesoon') table-warning @endif">
|
||||
<td class="fit-content border-right">
|
||||
@if($task->done == 0)
|
||||
<a class="btn btn-success btn-sm do-task-button"
|
||||
@@ -177,20 +179,13 @@
|
||||
@if($task->assigned_to_user_id != null) <span>{{ GetUserDisplayName(FindObjectInArrayByPropertyValue($users, 'id', $task->assigned_to_user_id)) }}</span> @endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($task->done == 1) text-muted @endif @if(!empty($task->due_date) && $task->due_date < date('Y-m-d'))
|
||||
overdue
|
||||
@elseif(!empty($task->due_date) && $task->due_date < date('Y-m-d',
|
||||
strtotime('+'
|
||||
.
|
||||
$nextXDays
|
||||
. ' days'
|
||||
)))
|
||||
duesoon
|
||||
@endif
|
||||
</td>
|
||||
<td
|
||||
class="d-none">
|
||||
@if($task->category_id != null) {{ FindObjectInArrayByPropertyValue($taskCategories, 'id', $task->category_id)->name }} @else {{ $__t('Uncategorized') }} @endif
|
||||
{{ $task->due_type }}
|
||||
@if($task->due_type == 'duetoday')
|
||||
duesoon
|
||||
@endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($task->category_id != null) {{ FindObjectInArrayByPropertyValue($taskCategories, 'id', $task->category_id)->name }} @else {{ $__t('Uncategorized') }} @endif
|
||||
</td>
|
||||
@include('components.userfields_tbody',
|
||||
array( 'userfields'=> $userfields,
|
||||
|
Reference in New Issue
Block a user