mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 11:12:16 +01:00
hide total billable amounts from employees when employees_can_see_billable_rates is disabled
This commit is contained in:
committed by
Constantin Graf
parent
73ce5f793d
commit
50cc7053e4
@@ -12,7 +12,7 @@ type AggregatedGroupedData = GroupedData & {
|
||||
|
||||
type GroupedData = {
|
||||
seconds: number;
|
||||
cost: number;
|
||||
cost: number | null;
|
||||
description: string | null | undefined;
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ const expanded = ref(false);
|
||||
{{ formatHumanReadableDuration(entry.seconds) }}
|
||||
</div>
|
||||
<div class="justify-end pr-6 flex items-center">
|
||||
{{ formatCents(entry.cost, getOrganizationCurrencyString()) }}
|
||||
{{entry.cost ? formatCents(entry.cost, getOrganizationCurrencyString()) : '--' }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
import { router } from '@inertiajs/vue3';
|
||||
import TabBar from '@/Components/Common/TabBar/TabBar.vue';
|
||||
import TabBarItem from '@/Components/Common/TabBar/TabBarItem.vue';
|
||||
import {canViewReport} from "@/utils/permissions";
|
||||
import {computed} from "vue";
|
||||
defineProps<{
|
||||
active: 'reporting' | 'detailed' | 'shared';
|
||||
}>();
|
||||
|
||||
const showSharedReports = computed(() => canViewReport());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -20,6 +24,7 @@ defineProps<{
|
||||
>Detailed</TabBarItem
|
||||
>
|
||||
<TabBarItem
|
||||
v-if="showSharedReports"
|
||||
:active="active === 'shared'"
|
||||
@click="router.visit(route('reporting.shared'))"
|
||||
>Shared</TabBarItem
|
||||
|
||||
@@ -43,7 +43,7 @@ const props = defineProps<{
|
||||
totalWeeklyBillableAmount: {
|
||||
value: number;
|
||||
currency: string;
|
||||
};
|
||||
} | null;
|
||||
weeklyHistory: {
|
||||
date: string;
|
||||
duration: number;
|
||||
@@ -199,10 +199,11 @@ const option = ref({
|
||||
<StatCard
|
||||
title="Billable Amount"
|
||||
:value="
|
||||
props.totalWeeklyBillableAmount ?
|
||||
formatCents(
|
||||
props.totalWeeklyBillableAmount.value,
|
||||
getOrganizationCurrencyString()
|
||||
)
|
||||
) : '--'
|
||||
" />
|
||||
<ProjectsChartCard
|
||||
:weekly-project-overview="
|
||||
|
||||
@@ -14,7 +14,7 @@ const props = defineProps<{
|
||||
icon?: Component;
|
||||
current?: boolean;
|
||||
href: string;
|
||||
subItems?: { title: string; route: string }[];
|
||||
subItems?: { title: string; route: string, show: boolean }[];
|
||||
}>();
|
||||
|
||||
const open = useSessionStorage('nav-collapse-state-' + props.title, true);
|
||||
@@ -66,6 +66,7 @@ const open = useSessionStorage('nav-collapse-state-' + props.title, true);
|
||||
:key="subItem.title"
|
||||
class="w-full relative">
|
||||
<NavigationSidebarLink
|
||||
v-if="subItem.show"
|
||||
:title="subItem.title"
|
||||
:current="route().current(subItem.route)"
|
||||
:href="
|
||||
|
||||
Reference in New Issue
Block a user