From 5d228f1ef19d706384f6bd9510a519596d825355 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Wed, 6 Aug 2025 12:45:07 +0200 Subject: [PATCH] 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 --- .../Common/Reporting/ReportingOverview.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/resources/js/Components/Common/Reporting/ReportingOverview.vue b/resources/js/Components/Common/Reporting/ReportingOverview.vue index f002f419..bd6f00c9 100644 --- a/resources/js/Components/Common/Reporting/ReportingOverview.vue +++ b/resources/js/Components/Common/Reporting/ReportingOverview.vue @@ -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),