2500-display_dates #450

Merged
carlosjr merged 7 commits from 2500-display_dates into dev 2020-11-11 14:31:52 +00:00
2 changed files with 7 additions and 9 deletions
Showing only changes of commit c2f92cb127 - Show all commits

View File

@ -52,8 +52,8 @@
{{::order.landed | date:'dd/MM/yyyy'}}
</span>
</vn-td>
<vn-td shrink>{{::order.hourTheoretical | dashIfEmpty}}</vn-td>
<vn-td shrink>{{::ticket.hourEffective | dashIfEmpty}}</vn-td>
<vn-td shrink>{{::order.hourTheoretical | date: 'HH:mm' | dashIfEmpty}}</vn-td>
<vn-td shrink>{{::ticket.hourEffective | date: 'HH:mm' | dashIfEmpty}}</vn-td>
<vn-td number>{{::order.total | currency: 'EUR': 2 | dashIfEmpty}}</vn-td>
<vn-td shrink>
<vn-icon-button

View File

@ -10,15 +10,13 @@ export default class Controller extends Section {
compareDate(date) {
let today = new Date();
today.setHours(0, 0, 0, 0);
let timeTicket = new Date(date);
timeTicket.setHours(0, 0, 0, 0);
let comparation = today - timeTicket;
date = new Date(date);
date.setHours(0, 0, 0, 0);
if (comparation == 0)
return 'warning';
if (comparation < 0)
return 'success';
const timeDifference = today - date;
if (timeDifference == 0) return 'warning';
if (timeDifference < 0) return 'success';
}
}