Fix UI Maintenances
This commit is contained in:
@@ -343,7 +343,7 @@ sans-serif;
|
||||
content: '';
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: @color-perrywinkle;
|
||||
background-image: linear-gradient(to bottom, #1756ad, #002680);
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
content: '';
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: #8eb5e2;
|
||||
background-image: linear-gradient(to bottom, #1756ad, #002680);
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
|
||||
@@ -92,7 +92,6 @@ export default class Maintenance extends Vue {
|
||||
var expirationDate = minutes + "m";
|
||||
return expirationDate;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
let hour = moment.duration(missingDays).asHours();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="body">
|
||||
<div class="box scrollable">
|
||||
<div class="title-box">{{selectedMaintenance.description}}</div>
|
||||
<div class="subtitle" v-if="existMantainance()">Ultimo intervento effettuato {{this.getDaysFromLastExpiration(selectedMaintenance)}} gg fa</div>
|
||||
<div class="subtitle" v-if="existMantainance()">{{this.getDaysFromLastExpiration(selectedMaintenance)}}</div>
|
||||
<div class="subtitle" v-if="!existMantainance()">Nessuna manutenzione effettuata</div>
|
||||
<div class="info">
|
||||
<!-- <div class="estimated-time">
|
||||
@@ -248,7 +248,13 @@ export default {
|
||||
if(m){
|
||||
var today = moment(new Date());
|
||||
var end = moment(m.lastPerformedDate);
|
||||
return moment.duration(today.diff(end))._data.days;
|
||||
var days = moment.duration(today.diff(end))._data.days;
|
||||
if(days==0)
|
||||
return "Ultimo intervento effettuato oggi";
|
||||
else if(days<=7)
|
||||
return "Ultimo intervento effettuato " + days + " giorni fa";
|
||||
else
|
||||
return "Ultimo intervento effettuato in data: " + moment(m.lastPerformedDate).format('DD-MM-YYYY');
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user