mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-12 10:12:17 +01:00
Move tabs and TabBar into UI package
This commit is contained in:
@@ -26,6 +26,7 @@ const props = defineProps<{
|
||||
createClient: (client: CreateClientBody) => Promise<Client | undefined>;
|
||||
currency: string;
|
||||
enableEstimatedTime: boolean;
|
||||
organizationBillableRate: number | null;
|
||||
}>();
|
||||
|
||||
const activeClients = computed(() => {
|
||||
@@ -113,7 +114,10 @@ const currentClientName = computed(() => {
|
||||
<ProjectEditBillableSection
|
||||
v-model:is-billable="project.is_billable"
|
||||
v-model:billable-rate="project.billable_rate"
|
||||
:currency="currency"></ProjectEditBillableSection>
|
||||
:currency="currency"
|
||||
:organization-billable-rate="
|
||||
organizationBillableRate
|
||||
"></ProjectEditBillableSection>
|
||||
<EstimatedTimeSection
|
||||
v-if="enableEstimatedTime"
|
||||
v-model="project.estimated_time"
|
||||
|
||||
@@ -10,15 +10,12 @@ import {
|
||||
} from '@/packages/ui/src/tooltip';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import BillableIcon from '@/packages/ui/src/Icons/BillableIcon.vue';
|
||||
import { useOrganizationQuery } from '@/utils/useOrganizationQuery';
|
||||
import { getCurrentOrganizationId } from '@/utils/useUser';
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
currency: string;
|
||||
organizationBillableRate: number | null;
|
||||
}>();
|
||||
|
||||
const { organization } = useOrganizationQuery(getCurrentOrganizationId()!);
|
||||
|
||||
type RateType = 'default-rate' | 'custom-rate';
|
||||
|
||||
const billableDefault = ref<'billable' | 'non-billable'>('non-billable');
|
||||
@@ -49,7 +46,7 @@ watch(rateType, () => {
|
||||
billableDefault.value = 'billable';
|
||||
isBillable.value = true;
|
||||
if (!billableRate.value) {
|
||||
billableRate.value = organization.value?.billable_rate ?? null;
|
||||
billableRate.value = props.organizationBillableRate ?? null;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -57,7 +54,7 @@ watch(rateType, () => {
|
||||
const displayedRate = computed({
|
||||
get() {
|
||||
if (rateType.value === 'default-rate') {
|
||||
return organization.value?.billable_rate ?? null;
|
||||
return props.organizationBillableRate ?? null;
|
||||
}
|
||||
return billableRate.value;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user