General UI review/test

This commit is contained in:
Bernd Bestel
2020-12-19 14:03:28 +01:00
parent 7ef5bc6f77
commit 574d17fa52
15 changed files with 64 additions and 42 deletions

View File

@@ -591,10 +591,10 @@ msgstr ""
msgid "Quantity unit"
msgstr ""
msgid "Only check if a single unit is in stock (a different quantity can then be used below)"
msgid "Only check if any amount is in stock"
msgstr ""
msgid "Are you sure to consume all ingredients needed by recipe \"%s\" (ingredients marked with \"check only if a single unit is in stock\" will be ignored)?"
msgid "Are you sure to consume all ingredients needed by recipe \"%s\" (ingredients marked with \"only check if any amount is in stock\" will be ignored)?"
msgstr ""
msgid "Removed all ingredients of recipe \"%s\" from stock"
@@ -2026,3 +2026,6 @@ msgstr ""
msgid "Hide/view columns"
msgstr ""
msgid "A different amount/unit can then be used below while for stock fulfillment checking it is sufficient when any amount of the product in stock"
msgstr ""

View File

@@ -938,7 +938,7 @@ $(".change-table-columns-visibility-button").on("click", function(e)
data-table-selector="' + dataTableSelector + '" \
data-column-index="-1" \
> \
<label class="custom-control-label" \
<label class="custom-control-label font-italic" \
for="column-rowgroup-none">' + __t("None") + ' \
</label > \
</div>';
@@ -998,10 +998,10 @@ $(".change-table-columns-visibility-button").on("click", function(e)
}
});
var message = '<div class="text-center"><h5>' + __t('Table options') + '</h5><hr><h5>' + __t('Hide/view columns') + '</h5><div class="text-left form-group">' + columnCheckBoxesHtml + '</div></div>';
var message = '<div class="text-center"><h5>' + __t('Table options') + '</h5><hr><h5 class="mb-0">' + __t('Hide/view columns') + '</h5><div class="text-left form-group">' + columnCheckBoxesHtml + '</div></div>';
if (rowGroupDefined)
{
message += '<div class="text-center mt-1"><h5>' + __t('Group by') + '</h5><div class="text-left form-group">' + rowGroupRadioBoxesHtml + '</div></div>';
message += '<div class="text-center mt-1"><h5 class="pt-3 mb-0">' + __t('Group by') + '</h5><div class="text-left form-group">' + rowGroupRadioBoxesHtml + '</div></div>';
}
bootbox.dialog({
@@ -1009,7 +1009,6 @@ $(".change-table-columns-visibility-button").on("click", function(e)
size: 'small',
backdrop: true,
closeButton: false,
onEscape: true,
buttons: {
reset: {
label: __t('Reset'),
@@ -1017,16 +1016,15 @@ $(".change-table-columns-visibility-button").on("click", function(e)
callback: function()
{
bootbox.confirm({
swapButtonOrder: true,
message: __t("Are you sure to reset the table options?"),
buttons: {
confirm: {
label: 'Yes',
className: 'btn-danger'
},
cancel: {
label: 'No',
className: 'btn-primary'
className: 'btn-danger'
},
confirm: {
label: 'Yes',
className: 'btn-success'
}
},
callback: function(result)
@@ -1084,7 +1082,7 @@ $(document).on("click", ".change-table-columns-rowgroup-toggle", function()
dataTable.rowGroup().enable(false);
//remove fixed order
// Remove fixed order
dataTable.order.fixed({});
}
else
@@ -1097,7 +1095,7 @@ $(document).on("click", ".change-table-columns-rowgroup-toggle", function()
dataTable.rowGroup().enable(true);
dataTable.rowGroup().dataSrc(columnIndex);
//apply fixed order for group column
// Apply fixed order for group column
var fixedOrder = {
pre: [columnIndex, 'asc']
};

View File

@@ -76,6 +76,8 @@ Grocy.Components.ProductAmountPicker.AllowAnyQu = function(keepInitialQu = false
Grocy.Components.ProductAmountPicker.SetQuantityUnit($("#qu_id").attr("data-initial-qu-id"));
}
$("#qu_id").removeAttr("disabled");
$(".input-group-productamountpicker").trigger("change");
}

View File

@@ -667,7 +667,7 @@ $(document).on('click', '.recipe-consume-button', function(e)
var servings = $(e.currentTarget).attr('data-mealplan-servings');
bootbox.confirm({
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', objectName),
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName),
closeButton: false,
buttons: {
confirm: {

View File

@@ -136,7 +136,7 @@ $('#recipe-pos-form input').keydown(function(event)
}
});
$("#only_check_single_unit_in_stock").on("click", function()
$("#only_check_single_unit_in_stock").on("change", function()
{
if (this.checked)
{

View File

@@ -192,7 +192,7 @@ $(".recipe-consume").on('click', function(e)
var objectId = $(e.currentTarget).attr('data-recipe-id');
bootbox.confirm({
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', objectName),
message: __t('Are you sure to consume all ingredients needed by recipe "%s" (ingredients marked with "only check if any amount is in stock" will be ignored)?', objectName),
closeButton: false,
buttons: {
confirm: {

View File

@@ -74,6 +74,8 @@ $("#clear-filter-button").on("click", function()
$("#transaction-type-filter").val("all");
$("#location-filter").val("all");
$("#user-filter").val("all");
$("#product-filter").val("all");
stockJournalTable.column(1).search("").draw();
stockJournalTable.column(4).search("").draw();
stockJournalTable.column(5).search("").draw();
stockJournalTable.column(6).search("").draw();

View File

@@ -62,6 +62,7 @@ $("#clear-filter-button").on("click", function()
$("#transaction-type-filter").val("all");
$("#location-filter").val("all");
$("#user-filter").val("all");
$("#product-filter").val("all");
journalSummaryTable.column(1).search("").draw();
journalSummaryTable.column(2).search("").draw();
journalSummaryTable.column(3).search("").draw();

View File

@@ -119,13 +119,9 @@
<th>{{ $__t('Chore') }}</th>
<th>{{ $__t('Next estimated tracking') }}</th>
<th>{{ $__t('Last tracked') }}</th>
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
<th>{{ $__t('Assigned to') }}</th>
@endif
<th class="@if(!GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) d-none @endif">{{ $__t('Assigned to') }}</th>
<th class="d-none">Hidden status</th>
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
<th class="d-none">Hidden assigned to user id</th>
@endif
@include('components.userfields_thead', array(
'userfields' => $userfields
@@ -195,8 +191,8 @@
class="timeago timeago-contextual @if($curentChoreEntry->track_date_only == 1) timeago-date-only @endif"
datetime="{{ $curentChoreEntry->last_tracked_time }}"></time>
</td>
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
<td>
<td class="@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) d-none @endif">
<span id="chore-{{ $curentChoreEntry->chore_id }}-next-execution-assigned-user">
@if(!empty($curentChoreEntry->next_execution_assigned_to_user_id))
{{ FindObjectInArrayByPropertyValue($users, 'id', $curentChoreEntry->next_execution_assigned_to_user_id)->display_name }}
@@ -205,7 +201,6 @@
@endif
</span>
</td>
@endif
<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
@@ -223,12 +218,10 @@
duesoon
@endif
</td>
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
<td
class="d-none">
@if(!empty($curentChoreEntry->next_execution_assigned_to_user_id))
xx{{ $curentChoreEntry->next_execution_assigned_to_user_id }}xx
@endif
</td>
@endif

View File

@@ -1,12 +1,16 @@
<label>
<div class="custom-control custom-checkbox">
<input type="checkbox"
name="{{ $perm->permission_name }}"
class="permission-cb"
class="permission-cb form-check-input custom-control-input"
data-perm-id="{{ $perm->permission_id }}"
id="perm-{{ $perm->permission_id }}"
@if($perm->has_permission) checked @endif
@if(isset($permParent) && $permParent->has_permission) disabled @endif>
{{ $__t($perm->permission_name) }}
</label>
<label class="form-check-label custom-control-label"
for="perm-{{ $perm->permission_id }}">
{{ $__t($perm->permission_name) }}
</label>
</div>
<div id="permission-sub-{{ $perm->permission_name }}">
<ul>
@foreach($perm->uihelper_user_permissionsList(array('user_id' => $user->id))->via('parent') as $p)

View File

@@ -18,7 +18,7 @@
Workaround because of Firefox bug
see https://github.com/twbs/bootstrap/issues/22753
and https://bugzilla.mozilla.org/show_bug.cgi?id=1413121
*/
*/
.row {
display: inline !important;
}
@@ -56,7 +56,7 @@
@foreach($locations as $location)
<div class="page">
<h1 class="pt-4">
<h1 class="pt-4 text-center">
<img src="{{ $U('/img/grocy_logo.svg?v=', true) }}{{ $version }}"
height="30"
class="d-none d-print-flex mx-auto">
@@ -66,7 +66,7 @@
{{ $__t('Print') . ' (' . $__t('this location') . ')' }}
</a>
</h1>
<h6 class="mb-4 d-none d-print-block">
<h6 class="mb-4 d-none d-print-block text-center">
{{ $__t('Time of printing') }}:
<span class="d-inline print-timestamp"></span>
</h6>

View File

@@ -154,7 +154,12 @@
@endif
</td>
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif">
{{ FindObjectInArrayByPropertyValue($locations, 'id', $product->location_id)->name }}
@php
$location = FindObjectInArrayByPropertyValue($locations, 'id', $product->location_id);
@endphp
@if($location != null)
{{ $location->name }}
@endif
</td>
<td>
<span class="locale-number locale-number-quantity-amount">{{ $product->min_stock_amount }}</span>
@@ -169,8 +174,11 @@
@if(!empty($product->product_group_id)) {{ FindObjectInArrayByPropertyValue($productGroups, 'id', $product->product_group_id)->name }} @endif
</td>
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
@if(!empty($product->shopping_location_id))
{{ FindObjectInArrayByPropertyValue($shoppingLocations, 'id', $product->shopping_location_id)->name }}
@php
$store = FindObjectInArrayByPropertyValue($shoppingLocations, 'id', $product->shopping_location_id);
@endphp
@if($store != null)
{{ $store->name }}
@endif
</td>

View File

@@ -46,13 +46,15 @@
'nextInputSelector' => '#amount'
))
<div class="form-group mb-1">
<div class="form-group mb-2">
<div class="custom-control custom-checkbox">
<input @if($mode=='edit'
&&
$recipePos->only_check_single_unit_in_stock == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="only_check_single_unit_in_stock" name="only_check_single_unit_in_stock" value="1">
<label class="form-check-label custom-control-label"
for="only_check_single_unit_in_stock">{{ $__t('Only check if a single unit is in stock (a different quantity can then be used below)') }}</label>
for="only_check_single_unit_in_stock">{{ $__t('Only check if any amount is in stock') }}&nbsp;<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
title="{{ $__t('A different amount/unit can then be used below while for stock fulfillment checking it is sufficient when any amount of the product in stock') }}"></i></label>
</div>
</div>
@@ -61,7 +63,7 @@
@include('components.productamountpicker', array(
'value' => $value,
'initialQuId' => $initialQuId,
'additionalGroupCssClasses' => 'mb-1'
'additionalGroupCssClasses' => 'mb-2'
))
<div class="form-group">

View File

@@ -73,7 +73,7 @@
for="use_specific_stock_entry">{{ $__t('Use a specific stock item') }}
&nbsp;<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
title="{{ $__t('The first item in this list would be picked by the default rule which is "Opened first, then first due first, then first in first out') }}"></i>
title="{{ $__t('The first item in this list would be picked by the default rule which is "Opened first, then first due first, then first in first out"') }}"></i>
</label>
</div>
<select disabled

View File

@@ -10,6 +10,15 @@
</script>
@endpush
@push('pageStyles')
<style>
ul {
list-style-type: none;
}
</style>
@endpush
@section('content')
<div class="row">
<div class="col">
@@ -21,7 +30,7 @@
<div class="row">
<div class="col">
<ul>
<ul class="pl-0">
@foreach($permissions as $perm)
<li>
@include('components.userpermission_select', array(