Fixed /tasks group by category (fixes #1274)

This commit is contained in:
Bernd Bestel 2021-06-28 19:31:27 +02:00
parent 69f8c237ff
commit 7587ead732
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 13 additions and 13 deletions

View File

@ -965,7 +965,7 @@ $(".change-table-columns-visibility-button").on("click", function(e)
return;
}
var shadowColumnIndex = $(this.header()).attr("data-shodow-rowgroup-column");
var shadowColumnIndex = $(this.header()).attr("data-shadow-rowgroup-column");
if (shadowColumnIndex)
{
index = shadowColumnIndex;

View File

@ -3,13 +3,8 @@
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 },
{ 'visible': false, 'targets': 3 },
{ "type": "html", "targets": 2 }
].concat($.fn.dataTable.defaults.columnDefs),
'rowGroup': {
enable: true,
dataSrc: 3
}
].concat($.fn.dataTable.defaults.columnDefs)
});
$('#tasks-table tbody').removeClass("d-none");
tasksTable.columns.adjust().draw();

View File

@ -69,7 +69,7 @@
<th class="@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif">{{ $__t('Location') }}</th>
<th class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Store') }}</th>
<th class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Price') }}</th>
<th data-shodow-rowgroup-column="9">{{ $__t('Purchased date') }}</th>
<th data-shadow-rowgroup-column="9">{{ $__t('Purchased date') }}</th>
<th class="d-none">Hidden purchased_date</th>
@include('components.userfields_thead', array(

View File

@ -107,9 +107,10 @@
</th>
<th>{{ $__t('Task') }}</th>
<th>{{ $__t('Due') }}</th>
<th>{{ $__t('Category') }}</th>
<th data-shadow-rowgroup-column="6">{{ $__t('Category') }}</th>
<th>{{ $__t('Assigned to') }}</th>
<th class="d-none">Hidden status</th>
<th class="d-none">Hidden category_id</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
@ -187,10 +188,14 @@
duesoon
@endif
</td>
@include('components.userfields_tbody',
array( 'userfields'=> $userfields,
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $task->id)
))
<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,
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $task->id)
))
</tr>
@endforeach