mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +00:00
Improve journal UI when undoing a transaction
This commit is contained in:
parent
c71e46191f
commit
5966a3d678
@ -59,7 +59,9 @@ $(document).on('click', '.undo-battery-execution-button', function(e)
|
|||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
element.closest("tr").addClass("text-muted");
|
element.closest("tr").addClass("text-muted");
|
||||||
element.closest(".undo-battery-execution-button").addClass("disabled");
|
element.parent().siblings().find("span.name-anchor").addClass("text-strike-through").after("<br>" + L("Undone on") + " " + moment().format("YYYY-MM-DD HH:mm:ss") + " <time class='timeago timeago-contextual' datetime='" + moment().format("YYYY-MM-DD HH:mm:ss") + "'></time>");
|
||||||
|
element.closest(".undo-stock-booking-button").addClass("disabled");
|
||||||
|
RefreshContextualTimeago();
|
||||||
toastr.success(L("Charge cycle successfully undone"));
|
toastr.success(L("Charge cycle successfully undone"));
|
||||||
},
|
},
|
||||||
function(xhr)
|
function(xhr)
|
||||||
|
@ -59,7 +59,9 @@ $(document).on('click', '.undo-chore-execution-button', function(e)
|
|||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
element.closest("tr").addClass("text-muted");
|
element.closest("tr").addClass("text-muted");
|
||||||
element.closest(".undo-chore-execution-button").addClass("disabled");
|
element.parent().siblings().find("span.name-anchor").addClass("text-strike-through").after("<br>" + L("Undone on") + " " + moment().format("YYYY-MM-DD HH:mm:ss") + " <time class='timeago timeago-contextual' datetime='" + moment().format("YYYY-MM-DD HH:mm:ss") + "'></time>");
|
||||||
|
element.closest(".undo-stock-booking-button").addClass("disabled");
|
||||||
|
RefreshContextualTimeago();
|
||||||
toastr.success(L("Chore execution successfully undone"));
|
toastr.success(L("Chore execution successfully undone"));
|
||||||
},
|
},
|
||||||
function(xhr)
|
function(xhr)
|
||||||
|
@ -59,7 +59,9 @@ $(document).on('click', '.undo-stock-booking-button', function(e)
|
|||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
element.closest("tr").addClass("text-muted");
|
element.closest("tr").addClass("text-muted");
|
||||||
|
element.parent().siblings().find("span.name-anchor").addClass("text-strike-through").after("<br>" + L("Undone on") + " " + moment().format("YYYY-MM-DD HH:mm:ss") + " <time class='timeago timeago-contextual' datetime='" + moment().format("YYYY-MM-DD HH:mm:ss") + "'></time>");
|
||||||
element.closest(".undo-stock-booking-button").addClass("disabled");
|
element.closest(".undo-stock-booking-button").addClass("disabled");
|
||||||
|
RefreshContextualTimeago();
|
||||||
toastr.success(L("Booking successfully undone"));
|
toastr.success(L("Booking successfully undone"));
|
||||||
},
|
},
|
||||||
function(xhr)
|
function(xhr)
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="@if($chargeCycleEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($batteries, 'id', $chargeCycleEntry->battery_id)->name }}</span>
|
<span class="name-anchor @if($chargeCycleEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($batteries, 'id', $chargeCycleEntry->battery_id)->name }}</span>
|
||||||
@if($chargeCycleEntry->undone == 1)
|
@if($chargeCycleEntry->undone == 1)
|
||||||
<br>
|
<br>
|
||||||
{{ $L('Undone on') . ' ' . $chargeCycleEntry->undone_timestamp }}
|
{{ $L('Undone on') . ' ' . $chargeCycleEntry->undone_timestamp }}
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="@if($choreLogEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($chores, 'id', $choreLogEntry->chore_id)->name }}</span>
|
<span class="name-anchor @if($choreLogEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($chores, 'id', $choreLogEntry->chore_id)->name }}</span>
|
||||||
@if($choreLogEntry->undone == 1)
|
@if($choreLogEntry->undone == 1)
|
||||||
<br>
|
<br>
|
||||||
{{ $L('Undone on') . ' ' . $choreLogEntry->undone_timestamp }}
|
{{ $L('Undone on') . ' ' . $choreLogEntry->undone_timestamp }}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="@if($stockLogEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($products, 'id', $stockLogEntry->product_id)->name }}</span>
|
<span class="name-anchor @if($stockLogEntry->undone == 1) text-strike-through @endif">{{ FindObjectInArrayByPropertyValue($products, 'id', $stockLogEntry->product_id)->name }}</span>
|
||||||
@if($stockLogEntry->undone == 1)
|
@if($stockLogEntry->undone == 1)
|
||||||
<br>
|
<br>
|
||||||
{{ $L('Undone on') . ' ' . $stockLogEntry->undone_timestamp }}
|
{{ $L('Undone on') . ' ' . $stockLogEntry->undone_timestamp }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user