mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
Move tabs and TabBar into UI package
This commit is contained in:
@@ -23,7 +23,10 @@ import { useClientsStore } from '@/utils/useClients';
|
||||
import { getOrganizationCurrencyString } from '@/utils/money';
|
||||
import { canCreateProjects } from '@/utils/permissions';
|
||||
import { useCurrentTimeEntryStore } from '@/utils/useCurrentTimeEntry';
|
||||
import { useOrganizationQuery } from '@/utils/useOrganizationQuery';
|
||||
import { getCurrentOrganizationId } from '@/utils/useUser';
|
||||
|
||||
const { organization } = useOrganizationQuery(getCurrentOrganizationId()!);
|
||||
const calendarStart = ref<Date | undefined>(undefined);
|
||||
const calendarEnd = ref<Date | undefined>(undefined);
|
||||
|
||||
@@ -124,6 +127,7 @@ function onRefresh() {
|
||||
:enable-estimated-time="isAllowedToPerformPremiumAction()"
|
||||
:currency="getOrganizationCurrencyString()"
|
||||
:can-create-project="canCreateProjects()"
|
||||
:organization-billable-rate="organization?.billable_rate ?? null"
|
||||
:create-time-entry="createTimeEntry"
|
||||
:update-time-entry="updateTimeEntry"
|
||||
:delete-time-entry="deleteTimeEntry"
|
||||
|
||||
@@ -10,8 +10,7 @@ import ClientTable from '@/Components/Common/Client/ClientTable.vue';
|
||||
import ClientCreateModal from '@/Components/Common/Client/ClientCreateModal.vue';
|
||||
import PageTitle from '@/Components/Common/PageTitle.vue';
|
||||
import { canCreateClients } from '@/utils/permissions';
|
||||
import TabBarItem from '@/Components/Common/TabBar/TabBarItem.vue';
|
||||
import TabBar from '@/Components/Common/TabBar/TabBar.vue';
|
||||
import { TabBar, TabBarItem } from '@/packages/ui/src';
|
||||
import { useStorage } from '@vueuse/core';
|
||||
import type { SortColumn, SortDirection } from '@/Components/Common/Client/ClientTable.vue';
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ import AppLayout from '@/Layouts/AppLayout.vue';
|
||||
import { PlusIcon } from '@heroicons/vue/16/solid';
|
||||
import { UserGroupIcon } from '@heroicons/vue/20/solid';
|
||||
import SecondaryButton from '@/packages/ui/src/Buttons/SecondaryButton.vue';
|
||||
import TabBar from '@/Components/Common/TabBar/TabBar.vue';
|
||||
import TabBarItem from '@/Components/Common/TabBar/TabBarItem.vue';
|
||||
import { TabBar, TabBarItem } from '@/packages/ui/src';
|
||||
import { ref } from 'vue';
|
||||
import MemberTable from '@/Components/Common/Member/MemberTable.vue';
|
||||
import MemberInviteModal from '@/Components/Common/Member/MemberInviteModal.vue';
|
||||
|
||||
@@ -21,8 +21,7 @@ import ProjectMemberTable from '@/Components/Common/ProjectMember/ProjectMemberT
|
||||
import ProjectMemberCreateModal from '@/Components/Common/ProjectMember/ProjectMemberCreateModal.vue';
|
||||
import { useProjectMembersQuery } from '@/utils/useProjectMembersQuery';
|
||||
import { canCreateProjects, canCreateTasks, canViewProjectMembers } from '@/utils/permissions';
|
||||
import TabBarItem from '@/Components/Common/TabBar/TabBarItem.vue';
|
||||
import TabBar from '@/Components/Common/TabBar/TabBar.vue';
|
||||
import { TabBar, TabBarItem } from '@/packages/ui/src';
|
||||
import { useTasksQuery } from '@/utils/useTasksQuery';
|
||||
import ProjectEditModal from '@/Components/Common/Project/ProjectEditModal.vue';
|
||||
import { Badge } from '@/packages/ui/src';
|
||||
|
||||
@@ -131,6 +131,7 @@ const showBillableRate = computed(() => {
|
||||
:enable-estimated-time="isAllowedToPerformPremiumAction()"
|
||||
:create-client
|
||||
:currency="getOrganizationCurrencyString()"
|
||||
:organization-billable-rate="organization?.billable_rate ?? null"
|
||||
:clients="clients"
|
||||
@submit="createProject"></ProjectCreateModal>
|
||||
</MainContainer>
|
||||
|
||||
@@ -66,6 +66,7 @@ import ReportingExportModal from '@/Components/Common/Reporting/ReportingExportM
|
||||
import ReportingFilterBar from '@/Components/Common/Reporting/ReportingFilterBar.vue';
|
||||
import { useTimeEntriesReportQuery } from '@/utils/useTimeEntriesReportQuery';
|
||||
import { useTimeEntriesMutations } from '@/utils/useTimeEntriesMutations';
|
||||
import { useOrganizationQuery } from '@/utils/useOrganizationQuery';
|
||||
|
||||
// TimeEntryRoundingType is now defined in ReportingRoundingControls component
|
||||
type TimeEntryRoundingType = 'up' | 'down' | 'nearest';
|
||||
@@ -89,6 +90,7 @@ const roundingType = ref<TimeEntryRoundingType>('nearest');
|
||||
const roundingMinutes = ref<number>(15);
|
||||
|
||||
const { members } = useMembersQuery();
|
||||
const { organization } = useOrganizationQuery(getCurrentOrganizationId()!);
|
||||
const pageLimit = 15;
|
||||
|
||||
// Watch rounding enabled state to trigger updates
|
||||
@@ -353,6 +355,7 @@ async function downloadExport(format: ExportFormat) {
|
||||
:tags="tags"
|
||||
:currency="getOrganizationCurrencyString()"
|
||||
:clients="clients"
|
||||
:organization-billable-rate="organization?.billable_rate ?? null"
|
||||
class="border-b border-default-background-separator"
|
||||
:update-time-entries="
|
||||
(args) =>
|
||||
@@ -384,6 +387,7 @@ async function downloadExport(format: ExportFormat) {
|
||||
:on-start-stop-click="() => startTimeEntryFromExisting(entry)"
|
||||
:delete-time-entry="() => deleteTimeEntries([entry])"
|
||||
:currency="getOrganizationCurrencyString()"
|
||||
:organization-billable-rate="organization?.billable_rate ?? null"
|
||||
:duplicate-time-entry="() => createTimeEntry(entry)"
|
||||
:members="members"
|
||||
show-date
|
||||
|
||||
@@ -26,6 +26,8 @@ import TimeEntryMassActionRow from '@/packages/ui/src/TimeEntry/TimeEntryMassAct
|
||||
import type { UpdateMultipleTimeEntriesChangeset } from '@/packages/api/src';
|
||||
import { isAllowedToPerformPremiumAction } from '@/utils/billing';
|
||||
import { canCreateProjects } from '@/utils/permissions';
|
||||
import { useOrganizationQuery } from '@/utils/useOrganizationQuery';
|
||||
import { getCurrentOrganizationId } from '@/utils/useUser';
|
||||
import { useTagsStore } from '@/utils/useTags';
|
||||
import { useProjectsStore } from '@/utils/useProjects';
|
||||
import { useClientsStore } from '@/utils/useClients';
|
||||
@@ -87,6 +89,8 @@ async function createClient(body: CreateClientBody): Promise<Client | undefined>
|
||||
return await useClientsStore().createClient(body);
|
||||
}
|
||||
|
||||
const { organization } = useOrganizationQuery(getCurrentOrganizationId()!);
|
||||
|
||||
const selectedTimeEntries = ref([] as TimeEntry[]);
|
||||
|
||||
async function clearSelectionAndState() {
|
||||
@@ -115,6 +119,7 @@ function deleteSelected() {
|
||||
:tags="tags"
|
||||
:currency="getOrganizationCurrencyString()"
|
||||
:clients="clients"
|
||||
:organization-billable-rate="organization?.billable_rate ?? null"
|
||||
class="border-t border-default-background-separator hidden sm:block"
|
||||
:update-time-entries="
|
||||
(args) =>
|
||||
@@ -134,6 +139,7 @@ function deleteSelected() {
|
||||
:create-project
|
||||
:enable-estimated-time="isAllowedToPerformPremiumAction()"
|
||||
:can-create-project="canCreateProjects()"
|
||||
:organization-billable-rate="organization?.billable_rate ?? null"
|
||||
:clients
|
||||
:create-client
|
||||
:update-time-entry
|
||||
|
||||
Reference in New Issue
Block a user