mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 03:02:15 +01:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user