Move tabs and TabBar into UI package

This commit is contained in:
Gregor Vostrak
2026-03-23 17:25:26 +01:00
parent 5c6d84dc38
commit c19a0f9acc
35 changed files with 103 additions and 25 deletions

View File

@@ -46,6 +46,7 @@ const props = defineProps<{
updateTimeEntry: (timeEntry: TimeEntry) => void;
deleteTimeEntries: (timeEntries: TimeEntry[]) => void;
currency: string;
organizationBillableRate: number | null;
selectedTimeEntries: TimeEntry[];
enableEstimatedTime: boolean;
canCreateProject: boolean;
@@ -136,6 +137,7 @@ function onSelectChange(checked: boolean) {
:project="timeEntry.project_id"
:enable-estimated-time
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:task="timeEntry.task_id"
@changed="
updateProjectAndTask
@@ -240,6 +242,7 @@ function onSelectChange(checked: boolean) {
:project="timeEntry.project_id"
:enable-estimated-time
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:task="timeEntry.task_id"
@changed="
updateProjectAndTask
@@ -291,6 +294,7 @@ function onSelectChange(checked: boolean) {
:create-client
:clients
:create-project
:organization-billable-rate="organizationBillableRate"
:tags="tags"
indent
:update-time-entry="(timeEntry: TimeEntry) => updateTimeEntry(timeEntry)"

View File

@@ -42,6 +42,7 @@ const props = defineProps<{
start?: string;
end?: string;
currency: string;
organizationBillableRate: number | null;
canCreateProject: boolean;
}>();
@@ -165,6 +166,7 @@ const billableProxy = computed({
:create-client
:can-create-project
:currency
:organization-billable-rate="organizationBillableRate"
:projects="projects"
:tasks="tasks"
:enable-estimated-time="enableEstimatedTime" />

View File

@@ -43,6 +43,7 @@ const props = defineProps<{
tasks: Task[];
clients: Client[];
currency: string;
organizationBillableRate: number | null;
canCreateProject: boolean;
}>();
@@ -172,6 +173,7 @@ const billableProxy = computed({
:create-client
:can-create-project="canCreateProject"
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:projects="projects"
:tasks="tasks"
:enable-estimated-time="enableEstimatedTime" />

View File

@@ -34,6 +34,7 @@ const props = defineProps<{
createProject: (project: CreateProjectBody) => Promise<Project | undefined>;
createClient: (client: CreateClientBody) => Promise<Client | undefined>;
currency: string;
organizationBillableRate: number | null;
enableEstimatedTime: boolean;
canCreateProject: boolean;
}>();
@@ -163,6 +164,7 @@ function unselectAllTimeEntries(value: TimeEntriesGroupedByType[]) {
:delete-time-entries
:create-tag
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:time-entry="entry"
@selected="
(timeEntries: TimeEntry[]) => {
@@ -195,6 +197,7 @@ function unselectAllTimeEntries(value: TimeEntriesGroupedByType[]) {
:tags="tags"
:clients
:create-tag
:organization-billable-rate="organizationBillableRate"
:update-time-entry
:on-start-stop-click="() => startTimeEntryFromExisting(entry)"
:delete-time-entry="() => deleteTimeEntries([entry])"

View File

@@ -33,6 +33,7 @@ const props = defineProps<{
currency: string;
enableEstimatedTime: boolean;
canCreateProject: boolean;
organizationBillableRate: number | null;
}>();
const emit = defineEmits<{
@@ -58,6 +59,7 @@ const showMassUpdateModal = ref(false);
:enable-estimated-time
:can-create-project
:currency
:organization-billable-rate="organizationBillableRate"
:time-entries="selectedTimeEntries"
@submit="emit('submit')"></TimeEntryMassUpdateModal>
<MainContainer

View File

@@ -35,6 +35,7 @@ const props = defineProps<{
createTag: (name: string) => Promise<Tag | undefined>;
updateTimeEntries: (changeset: UpdateMultipleTimeEntriesChangeset) => Promise<void>;
currency: string;
organizationBillableRate: number | null;
enableEstimatedTime: boolean;
canCreateProject: boolean;
}>();
@@ -162,6 +163,7 @@ watch(removeAllTags, () => {
:create-project
:create-client
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:can-create-project
empty-placeholder="Select project..."
allow-reset

View File

@@ -46,6 +46,7 @@ const props = defineProps<{
duplicateTimeEntry?: () => void;
updateTimeEntry: (timeEntry: TimeEntry) => void;
currency: string;
organizationBillableRate: number | null;
showMember?: boolean;
showDate?: boolean;
selected?: boolean;
@@ -142,6 +143,7 @@ async function handleDeleteTimeEntry() {
:tasks="tasks"
:project="timeEntry.project_id"
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:enable-estimated-time
:task="timeEntry.task_id"
@changed="updateProjectAndTask"></TimeTrackerProjectTaskDropdown>
@@ -209,6 +211,7 @@ async function handleDeleteTimeEntry() {
:tasks="tasks"
:project="timeEntry.project_id"
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:enable-estimated-time
:task="timeEntry.task_id"
@changed="
@@ -277,6 +280,7 @@ async function handleDeleteTimeEntry() {
:tasks="tasks"
:clients="clients"
:currency="currency"
:organization-billable-rate="organizationBillableRate"
:can-create-project="canCreateProject" />
</template>