Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kazhamiakin committed Mar 8, 2024
2 parents 8d44f34 + 8b97c31 commit 55b230a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions console_aziendale/src/services/stat.services.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ function getItemsAggregation(itemAggregationValue, campaignId, companyId) {
return employeeService.getAllEmployees(companyId).then((content) => {
return content.filter(e => e.campaigns.indexOf(campaignId) >= 0)
.map(e => {
e.label = (e.surname) ? `${e.surname} ${e.name}` : `${e.name}`;
e.label = (e.surname && e.surname != '-')
? `${e.surname} ${e.name}`
: (e.name && e.name != '-')
? `${e.name}`
: (e.code)
? `- - (${e.code})`
: `${e.id}`;
return e;
});
});
Expand Down Expand Up @@ -216,7 +222,7 @@ function getAllEmployeesStats(configuration) {
configuration.timePeriod.value != 'ALL' ? (configuration.selectedDateFrom ? configuration.selectedDateFrom : null) : null,
configuration.timePeriod.value != 'ALL' ? (configuration.selectedDateTo ? configuration.selectedDateTo : null) : null,
getFields(configuration),
true,
false,
configuration.csv
);
}
Expand Down

0 comments on commit 55b230a

Please sign in to comment.