small refactor
This commit is contained in:
parent
e22e74a725
commit
c2f92cb127
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue