convert billable query string to boolean for shared report #876

billable is handled as a string filter for the query parameters as they are otherwise converted to 0 and 1, but for the report save request it should be a boolean
This commit is contained in:
Gregor Vostrak
2025-08-06 12:45:07 +02:00
parent f68f05d1aa
commit 5d228f1ef1

View File

@@ -161,8 +161,19 @@ async function createTag(tag: string) {
}
const reportProperties = computed(() => {
const { billable, ...rest } = getFilterAttributes();
let billableValue: boolean | null = null;
// if billable is null keep it if it is 'true' or 'false' convert it to boolean
if (billable === 'true') {
billableValue = true;
} else if (billable === 'false') {
billableValue = false;
}
return {
...getFilterAttributes(),
...rest,
billable: billableValue,
group: group.value,
sub_group: subGroup.value,
history_group: getOptimalGroupingOption(startDate.value, endDate.value),