2500-display_dates #450
|
@ -52,8 +52,8 @@
|
||||||
{{::order.landed | date:'dd/MM/yyyy'}}
|
{{::order.landed | date:'dd/MM/yyyy'}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td shrink>{{::order.hourTheoretical | dashIfEmpty}}</vn-td>
|
<vn-td shrink>{{::order.hourTheoretical | date: 'HH:mm' | dashIfEmpty}}</vn-td>
|
||||||
<vn-td shrink>{{::ticket.hourEffective | 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 number>{{::order.total | currency: 'EUR': 2 | dashIfEmpty}}</vn-td>
|
||||||
<vn-td shrink>
|
<vn-td shrink>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
|
|
@ -10,15 +10,13 @@ export default class Controller extends Section {
|
||||||
compareDate(date) {
|
compareDate(date) {
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
today.setHours(0, 0, 0, 0);
|
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)
|
const timeDifference = today - date;
|
||||||
return 'warning';
|
if (timeDifference == 0) return 'warning';
|
||||||
if (comparation < 0)
|
if (timeDifference < 0) return 'success';
|
||||||
return 'success';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue