fix store note and icon user in table

This commit is contained in:
Alessandro Francia
2018-06-21 14:29:27 +02:00
parent 7ae7878fbc
commit 8aaf3c670c
4 changed files with 17 additions and 12 deletions
@@ -100,7 +100,7 @@
tr:nth-child(even) {background: #dddddd}
tr:nth-child(odd) {background: #FFF}
th, td{
th,td{
width: 20%;
}
tbody{
+4 -3
View File
@@ -25,21 +25,22 @@
<div class="maintenance-box-left-body">
<table>
<thead>
<tr>
<!-- <th>{{'maintenance_table_header_icon_user' | localize("Icona utente")}}</th> -->
<tr>
<th>{{'maintenance_table_header_title' | localize("Titolo")}}</th>
<th>{{'maintenance_table_header_counter' | localize("Contatore")}}</th>
<th>{{'maintenance_table_header_deadline' | localize("Scadenza")}}</th>
<th>{{'maintenance_table_header_state' | localize("Stato")}}</th>
<th>{{'maintenance_table_header_icon_user' | localize("Icona utente")}}</th>
</tr>
</thead>
<tbody class="scrollable">
<tr v-for="m in maintenances" :key="m.id" :class="{selected: selectedMaintenance == m}" @click="selectMaintenance(m)">
<!-- <td colspan="1" v-if="m.createdByCms"><i class="fa fa-user"></i></td> -->
<td colspan="1">{{getTitleMaintenance(m.createdByCms, m.id, m.title)}}</td>
<td colspan="1"><maintenance-progress :class="{selected: selectedMaintenance == m}" :progress="m.percentageOfCompletion"></maintenance-progress></td>
<td colspan="1">{{expirationDate(m.type, m.missingDays)}}</td>
<td colspan="1">{{getState(m.percentageOfCompletion)}}</td>
<td colspan="1" v-if="m.createdByCms"><i class="fa fa-user"></i></td>
<td colspan="1" v-if="!m.createdByCms"></td>
</tr>
</tbody>
<tfoot>
@@ -28,7 +28,7 @@
<button class="btn pulsante-pdf">Pdf</button>
<button class="btn help"><div class="modifytext">Chiedi</div><div>Aiuto</div></button>
</div> -->
<accordion-maintenance :title="'Allegati'">
<accordion-maintenance :title="'Allegati'" :counter="attachmentsMaintenance.length">
<div class="dropdown">
<div class="filename" v-for="a in attachmentsMaintenance" :key="a.id" :class="{selected: selectedAttachMaintenance == a}" @click="onClickSelectAttach(a)">
<i class="fa fa-file-text-o"></i> <span>{{a.fileName}}</span>
+11 -7
View File
@@ -60,6 +60,16 @@ export const maintenanceStore = {
}
},
UpdateNotesMaintenance(store, model: server.MaintenanceNote[]){
debugger
store._noteMaintenance.clear();
store.noteMaintenance = [];
for(const key in model){
const element = model[key];
store._noteMaintenance.set(element.id,element);
store.noteMaintenance = Array.from(store._noteMaintenance.values());
}
},
DeleteNoteMaintenance(store, model: server.MaintenanceNote){
store._noteMaintenance.delete(model.id);
store.noteMaintenance = Array.from(store._noteMaintenance.values());
@@ -113,13 +123,7 @@ export const maintenanceStore = {
context.commit("UpdateNoteMaintenance", model);
},
updateNotesMaintenance(context, model: server.MaintenanceNote[]){
if(model.length == 0){
context.commit("UpdateNoteMaintenance", null);
}
for (const key in model){
const element = model[key];
context.commit("UpdateNoteMaintenance", element);
}
context.commit("UpdateNotesMaintenance", model);
},
updateMaintenance(context, model: server.Maintenance){
context.commit("UpdateMaintenance", model);