add estimated project and tasks frontend

This commit is contained in:
Gregor Vostrak
2024-09-28 22:56:33 +02:00
parent bff766d363
commit a6528102fe
21 changed files with 310 additions and 38 deletions

View File

@@ -2,7 +2,7 @@
import TextInput from '@/packages/ui/src/Input/TextInput.vue';
import SecondaryButton from '@/packages/ui/src/Buttons/SecondaryButton.vue';
import DialogModal from '@/packages/ui/src/DialogModal.vue';
import { computed, ref } from 'vue';
import { ref } from 'vue';
import PrimaryButton from '@/packages/ui/src/Buttons/PrimaryButton.vue';
import { useFocus } from '@vueuse/core';
import InputLabel from '@/packages/ui/src/Input/InputLabel.vue';
@@ -12,9 +12,8 @@ import { Link, useForm } from '@inertiajs/vue3';
import { getCurrentOrganizationId } from '@/utils/useUser';
import { filterRoles } from '@/utils/roles';
import {
hasActiveSubscription,
isAllowedToPerformPremiumAction,
isBillingActivated,
isInTrial,
} from '@/utils/billing';
import { CreditCardIcon, UserGroupIcon } from '@heroicons/vue/20/solid';
import { canManageBilling, canUpdateOrganization } from '@/utils/permissions';
@@ -84,14 +83,6 @@ async function submit() {
const clientNameInput = ref<HTMLInputElement | null>(null);
useFocus(clientNameInput, { initialValue: true });
const inviteMembersIsAllowed = computed(() => {
return (
!isBillingActivated() ||
(isBillingActivated() && hasActiveSubscription()) ||
(isBillingActivated() && isInTrial())
);
});
</script>
<template>
@@ -103,7 +94,7 @@ const inviteMembersIsAllowed = computed(() => {
</template>
<template #content>
<div v-if="!inviteMembersIsAllowed">
<div v-if="!isAllowedToPerformPremiumAction()">
<div
class="rounded-full flex items-center justify-center w-20 h-20 mx-auto border border-border-tertiary bg-secondary">
<UserGroupIcon class="w-12"></UserGroupIcon>
@@ -215,7 +206,7 @@ const inviteMembersIsAllowed = computed(() => {
<template #footer>
<SecondaryButton @click="show = false"> Cancel</SecondaryButton>
<PrimaryButton
v-if="inviteMembersIsAllowed"
v-if="isAllowedToPerformPremiumAction()"
class="ms-3"
:class="{ 'opacity-25': saving }"
:disabled="saving"