Skip to content

Commit 7df2502

Browse files
authored
Merge pull request #22 from codebar-ag/main
main/production
2 parents 577a4da + 8a76c63 commit 7df2502

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

resources/js/Components/Common/Reporting/ReportingOverview.vue

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ const tableData = computed(() => {
260260
};
261261
});
262262
});
263+
264+
const showBillableRate = computed(() => {
265+
return !!(
266+
getCurrentRole() !== 'employee' ||
267+
organization?.value?.employees_can_see_billable_rates
268+
);
269+
});
263270
</script>
264271

265272
<template>
@@ -420,20 +427,16 @@ const tableData = computed(() => {
420427
</div>
421428
<div class="px-6 pt-6 pb-3">
422429
<template
423-
v-for="reportingRowEntry in aggregatedTableTimeEntries?.grouped_data"
424-
:key="reportingRowEntry.key">
430+
v-for="reportingRowEntry in tableData"
431+
:key="reportingRowEntry.description">
425432
<ReportingRow
426-
:reporting-row-entry="reportingRowEntry"
427-
:grouped-type="
428-
aggregatedTableTimeEntries?.grouped_type
429-
"
430-
:show-seconds="showSeconds"
431-
:group="group"
432-
:sub-group="subGroup"></ReportingRow>
433+
:entry="reportingRowEntry"
434+
:currency="getOrganizationCurrencyString()"></ReportingRow>
433435
</template>
434436
<div
435437
v-if="
436438
aggregatedTableTimeEntries &&
439+
aggregatedTableTimeEntries.grouped_data &&
437440
aggregatedTableTimeEntries.grouped_data.length > 0
438441
"
439442
class="border-t border-background-separator pt-3 mt-6 text-sm space-y-2">
@@ -468,7 +471,7 @@ const tableData = computed(() => {
468471
}}
469472
</div>
470473
</div>
471-
</template>
474+
</div>
472475
<div
473476
v-else
474477
class="chart flex flex-col items-center justify-center py-12">

resources/js/Pages/Projects.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const shownProjects = computed(() => {
5959
const projectNameMatch = project.name.toLowerCase().includes(query);
6060
6161
// Search in client name
62-
const client = clientsMap.get(project.client_id);
62+
const client = project.client_id ? clientsMap.get(project.client_id) : null;
6363
const clientNameMatch = client?.name.toLowerCase().includes(query) || false;
6464
6565
return projectNameMatch || clientNameMatch;

resources/js/Pages/SharedReport.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { formatHumanReadableDuration } from '@/packages/ui/src/utils/time';
77
import ReportingRow from '@/Components/Common/Reporting/ReportingRow.vue';
88
import { formatCents } from '@/packages/ui/src/utils/money';
99
import type { CurrencyFormat } from '@/packages/ui/src/utils/money';
10+
import { getOrganizationCurrencyString } from '@/utils/money';
1011
import { computed, onMounted, provide, ref } from 'vue';
1112
import { useQuery } from '@tanstack/vue-query';
1213
import { api } from '@/packages/api/src';
@@ -184,20 +185,16 @@ onMounted(async () => {
184185
</div>
185186
<div class="px-6 pt-6 pb-3">
186187
<template
187-
v-for="reportingRowEntry in aggregatedTableTimeEntries?.grouped_data"
188-
:key="reportingRowEntry.key">
188+
v-for="reportingRowEntry in tableData"
189+
:key="reportingRowEntry.description">
189190
<ReportingRow
190-
:reporting-row-entry="reportingRowEntry"
191-
:grouped-type="
192-
aggregatedTableTimeEntries?.grouped_type
193-
"
194-
:show-seconds="false"
195-
:group="group"
196-
:sub-group="subGroup"></ReportingRow>
191+
:entry="reportingRowEntry"
192+
:currency="getOrganizationCurrencyString()"></ReportingRow>
197193
</template>
198194
<div
199195
v-if="
200196
aggregatedTableTimeEntries &&
197+
aggregatedTableTimeEntries.grouped_data &&
201198
aggregatedTableTimeEntries.grouped_data.length >
202199
0
203200
"

0 commit comments

Comments
 (0)