diff --git a/console_aziendale/src/components/modal/specific-modals/CompanyFormModal.vue b/console_aziendale/src/components/modal/specific-modals/CompanyFormModal.vue
index b0c2a8b..f5a9a5a 100644
--- a/console_aziendale/src/components/modal/specific-modals/CompanyFormModal.vue
+++ b/console_aziendale/src/components/modal/specific-modals/CompanyFormModal.vue
@@ -54,21 +54,18 @@
-
+ >
t);
+ this.territoryIds = res.items.filter(t => t.territoryId);
}
},
},
- created() {
+ mounted() {
this.setModalData();
this.getTerritories();
},
diff --git a/console_aziendale/src/components/stats-views/DataTable.vue b/console_aziendale/src/components/stats-views/DataTable.vue
index c0be649..d260f00 100644
--- a/console_aziendale/src/components/stats-views/DataTable.vue
+++ b/console_aziendale/src/components/stats-views/DataTable.vue
@@ -8,16 +8,25 @@
- |
- {{header}} |
+ |
+ {{header}} |
+
-
- {{ item.name }}
+
+
+ {{item[header.value]}} |
+
+
+
@@ -53,4 +62,11 @@
z-index: 1;
}
+ .statstable table .cell-agg {
+ border-right: 1px solid rgba(0, 0, 0, 0.12);
+ }
+ .statstable table td {
+ white-space: nowrap;
+ }
+
\ No newline at end of file
diff --git a/console_aziendale/src/pages/companies/Company.vue b/console_aziendale/src/pages/companies/Company.vue
index 98cbcff..e03b6ad 100644
--- a/console_aziendale/src/pages/companies/Company.vue
+++ b/console_aziendale/src/pages/companies/Company.vue
@@ -31,7 +31,7 @@
Nessun sito web inserito
-
+
mdi-email
@@ -39,7 +39,7 @@
-
+
mdi-phone
@@ -83,7 +83,7 @@
mdi-pencil
-
{{actualCompany.item.state ? 'mdi-close' : 'mdi-check'}}
diff --git a/console_aziendale/src/pages/employees/Employee.vue b/console_aziendale/src/pages/employees/Employee.vue
index bc39b87..74c1347 100644
--- a/console_aziendale/src/pages/employees/Employee.vue
+++ b/console_aziendale/src/pages/employees/Employee.vue
@@ -90,12 +90,14 @@ export default {
if (this.actualEmployee && this.actualEmployee.item && this.allCampaigns && this.allCampaigns.items) {
console.log('updating');
let list = (this.actualEmployee.item.campaigns || []).concat(this.actualEmployee.item.trackingRecord ? Object.keys(this.actualEmployee.item.trackingRecord) : []);
- this.employeeCampaigns = Array.from(new Set(list)).map(cId => {
+ const arr = Array.from(new Set(list)).map(cId => {
let tr = this.actualEmployee.item.trackingRecord && this.actualEmployee.item.trackingRecord[cId] ? this.actualEmployee.item.trackingRecord[cId] : {registration: new Date().getTime()}
tr.id = cId;
tr.title = (this.allCampaigns.items.find(c => c.id === cId) || {title: cId}).title;
return tr;
});
+ arr.sort((a,b) => a.title.localeCompare(b.title));
+ this.employeeCampaigns = arr;
}
}
},
diff --git a/console_aziendale/src/pages/employees/Employees.vue b/console_aziendale/src/pages/employees/Employees.vue
index bbad4d4..4a80938 100644
--- a/console_aziendale/src/pages/employees/Employees.vue
+++ b/console_aziendale/src/pages/employees/Employees.vue
@@ -136,12 +136,14 @@ export default {
let empList = this.allEmployees.items.slice();
empList.forEach(e => {
let list = (e.campaigns || []).concat(e.trackingRecord ? Object.keys(e.trackingRecord) : []);
- e.employeeCampaigns = Array.from(new Set(list)).map(cId => {
+ const arr = Array.from(new Set(list)).map(cId => {
let tr = e.trackingRecord && e.trackingRecord[cId] ? e.trackingRecord[cId] : {registration: new Date().getTime()}
tr.id = cId;
tr.title = (this.allCampaigns.items.find(c => c.id === cId) || {title: cId}).title;
return tr;
- }).map(c => c.title).join(', ');
+ }).map(c => c.title)
+ arr.sort();
+ e.employeeCampaigns = arr.join(', ');
});
this.employees = empList;
}
diff --git a/console_aziendale/src/services/viewStat.services.js b/console_aziendale/src/services/viewStat.services.js
index 97fd555..ab1cac4 100644
--- a/console_aziendale/src/services/viewStat.services.js
+++ b/console_aziendale/src/services/viewStat.services.js
@@ -42,7 +42,11 @@ async function fillTheViewWithValues(values, view, selection, currentCampaign) {
case 'Tabella':
viewData.headers = getHeadersTable(values, selection, currentCampaign)
viewData.subheaders = getSubHeaders(viewData.headers, selection, currentCampaign)
- viewData.headerNumber = viewData.subheaders.length / viewData.headers.length;
+ viewData.headerNumber = Math.floor(viewData.subheaders.length / viewData.headers.length);
+ for (let i = 0; i < viewData.subheaders.length; i++) {
+ let s = viewData.subheaders[i];
+ s.class = (i == 0 || (i % viewData.headerNumber == 0)) ? 'cell-agg': '';
+ }
viewData.data = await getData(viewData.headers, selection, values, currentCampaign)
break;
@@ -85,15 +89,15 @@ function getHeadersTable(values, selection, currentCampaign) {
}
//based on configuration, return the subheader=header.length*selection.dataColumns
function getSubHeaders(headers, selection, currentCampaign) {
- let subheaders = [{ text: 'Nome', value: 'name' }];
+ let subheaders = [{ text: 'Nome', value: 'name', class: 'cell-agg'}];
for (let i = 0; i < headers.length; i++) {
for (let k = 0; k < selection.dataColumns.length; k++) {
let dc = selection.dataColumns[k];
if (!dc.mean) {
- subheaders.push({ text: dc.label, value: dc.value + headers[i] })
+ subheaders.push({ text: dc.label, value: dc.value + headers[i]})
} else {
currentCampaign.means.forEach(m => {
- subheaders.push({ text: dc.label + ' ('+ m +')', value: dc.value + m + headers[i] })
+ subheaders.push({ text: dc.label + ' ('+ m +')', value: dc.value + m + headers[i]})
});
}
}
diff --git a/console_aziendale/src/store/modal.module.js b/console_aziendale/src/store/modal.module.js
index 6966af7..34f2f8b 100644
--- a/console_aziendale/src/store/modal.module.js
+++ b/console_aziendale/src/store/modal.module.js
@@ -12,6 +12,7 @@ const actions = {
},
closeModal({ commit }) {
commit('setActive', false);
+ commit('setType', null);
},
initModal({ commit }){
commit('init');