mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Replace Timeago with momentjs (#1687)
* Replaced timeago with moment.fromNow * Fixed datetime when best_before_date is empty * Removed the now unnecessary timeago package * Removed not longer localization strings * Check for empty instead of string comparison Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -241,7 +241,7 @@
|
||||
<span id="stock-{{ $stockEntry->id }}-due-date">{{ $stockEntry->best_before_date }}</span>
|
||||
<time id="stock-{{ $stockEntry->id }}-due-date-timeago"
|
||||
class="timeago timeago-contextual"
|
||||
datetime="{{ $stockEntry->best_before_date }} 23:59:59"></time>
|
||||
@if($stockEntry->best_before_date != "") datetime="{{ $stockEntry->best_before_date }} 23:59:59" @endif></time>
|
||||
</td>
|
||||
<td id="stock-{{ $stockEntry->id }}-location"
|
||||
class="@if(!GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif"
|
||||
@@ -265,7 +265,7 @@
|
||||
<span id="stock-{{ $stockEntry->id }}-purchased-date">{{ $stockEntry->purchased_date }}</span>
|
||||
<time id="stock-{{ $stockEntry->id }}-purchased-date-timeago"
|
||||
class="timeago timeago-contextual"
|
||||
datetime="{{ $stockEntry->purchased_date }} 23:59:59"></time>
|
||||
@if(!empty($stockEntry->purchased_date)) datetime="{{ $stockEntry->purchased_date }} 23:59:59" @endif></time>
|
||||
</td>
|
||||
<td class="d-none">{{ $stockEntry->purchased_date }}</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user