Skip to content

Commit

Permalink
statistic reports: multiselect for service units
Browse files Browse the repository at this point in the history
  • Loading branch information
NC-jsAhonen committed Nov 8, 2023
1 parent b6a562f commit b7a15f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/leaseStatisticReport/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
LeaseStatisticReportFormatOptions,
} from '$src/leaseStatisticReport/enums';
import type {Reports} from '$src/types';
import {FieldTypes} from '$src/enums';

/**
* Get report type options
Expand Down Expand Up @@ -148,5 +149,11 @@ export const getOutputFields = (options: Object): Array<Object> => {
* @return {string}
*/
export const formatType = (value: Object): string => {
return get(value, 'type').replace('Model', '').replace('Field', '').replace('Null', '').toLowerCase();
const formattedValue = get(value, 'type').replace('Model', '').replace('Field', '').replace('Null', '').toLowerCase()
switch (formattedValue) {
case "multiplechoice":
return FieldTypes.MULTISELECT
default:
return formattedValue
}
};

0 comments on commit b7a15f1

Please sign in to comment.