hide create project buttons and modal depending on the permission

This commit is contained in:
Gregor Vostrak
2024-10-28 13:37:39 +01:00
parent eb4debe481
commit cd7573dcf1
11 changed files with 29 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ import TimeTrackerRunningInDifferentOrganizationOverlay from '@/packages/ui/src/
import { useClientsStore } from '@/utils/useClients';
import { getOrganizationCurrencyString } from '@/utils/money';
import { isAllowedToPerformPremiumAction } from '@/utils/billing';
import { canCreateProjects } from '@/utils/permissions';
const page = usePage<{
auth: {
@@ -113,6 +114,7 @@ const { tags } = storeToRefs(useTagsStore());
<TimeTrackerControls
:createProject
:enableEstimatedTime="isAllowedToPerformPremiumAction()"
:canCreateProject="canCreateProjects()"
:createClient
:clients
:tags