diff --git a/resources/js/packages/api/src/index.d.ts b/resources/js/packages/api/src/index.d.ts deleted file mode 100644 index 4e8d5dbb..00000000 --- a/resources/js/packages/api/src/index.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { ApiOf, ZodiosResponseByAlias, ZodiosBodyByAlias, ZodiosQueryParamsByAlias } from '@zodios/core'; -export type SolidTimeApi = ApiOf; -export type InvitationsIndexResponse = ZodiosResponseByAlias; -export type CreateInvitationBody = ZodiosBodyByAlias; -export type Invitation = InvitationsIndexResponse['data'][0]; -export type TimeEntryResponse = ZodiosResponseByAlias; -export type TimeEntry = TimeEntryResponse['data'][0]; -export type CreateTimeEntryBody = ZodiosBodyByAlias; -export type ProjectResponse = ZodiosResponseByAlias; -export type Project = ProjectResponse['data'][0]; -export type CreateProjectBody = ZodiosBodyByAlias; -export type UpdateProjectBody = ZodiosBodyByAlias; -export type ProjectMemberResponse = ZodiosResponseByAlias; -export type CreateProjectMemberBody = ZodiosBodyByAlias; -export type UpdateProjectMemberBody = ZodiosBodyByAlias; -export type ProjectMember = ProjectMemberResponse['data'][0]; -export type CreateTaskBody = ZodiosBodyByAlias; -export type CreateClientBody = ZodiosBodyByAlias; -export type UpdateClientBody = ZodiosBodyByAlias; -export type TagIndexResponse = ZodiosResponseByAlias; -export type Tag = TagIndexResponse['data'][0]; -export type TaskIndexResponse = ZodiosResponseByAlias; -export type Task = TaskIndexResponse['data'][0]; -export type UpdateTaskBody = ZodiosBodyByAlias; -export type ClientIndexResponse = ZodiosResponseByAlias; -export type Client = ClientIndexResponse['data'][0]; -export type MemberIndexResponse = ZodiosResponseByAlias; -export type Member = MemberIndexResponse['data'][0]; -export type UpdateMemberBody = ZodiosBodyByAlias; -export type InviteMemberBody = ZodiosBodyByAlias; -export type MemberRole = InviteMemberBody['role']; -export type CreateTagBody = ZodiosBodyByAlias; -export type ImportType = ZodiosResponseByAlias['data'][0]; -export type ImportReport = ZodiosResponseByAlias; -export type ReportingResponse = ZodiosResponseByAlias; -export type AggregatedTimeEntries = ReportingResponse['data']; -export type GroupedDataEntries = ReportingResponse['data']['grouped_data']; -export type AggregatedTimeEntriesQueryParams = ZodiosQueryParamsByAlias; -export type OrganizationResponse = ZodiosResponseByAlias; -export type Organization = ZodiosResponseByAlias['data']; -export type UpdateOrganizationBody = ZodiosBodyByAlias; -export type MyMemberships = ZodiosResponseByAlias['data']; -export type MyMembership = MyMemberships[0]; -export declare const api: any; diff --git a/resources/js/packages/api/vite.config.js b/resources/js/packages/api/vite.config.js index e6fef8a1..773c3830 100644 --- a/resources/js/packages/api/vite.config.js +++ b/resources/js/packages/api/vite.config.js @@ -1,6 +1,6 @@ -import { resolve } from 'path' -import { defineConfig } from 'vite' -import dts from "vite-plugin-dts"; +import { resolve } from 'path'; +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; export default defineConfig({ plugins: [dts()], @@ -13,4 +13,4 @@ export default defineConfig({ fileName: 'solidtime-api', }, }, -}) +}); diff --git a/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue b/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue index 2494f133..81811e96 100644 --- a/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue +++ b/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue @@ -40,30 +40,38 @@ const props = defineProps<{ }>(); function updateTimeEntryDescription(description: string) { - const updatedTimeEntries = props.timeEntry.timeEntries.map((entry: TimeEntry) => { - return { ...entry, description }; - }); + const updatedTimeEntries = props.timeEntry.timeEntries.map( + (entry: TimeEntry) => { + return { ...entry, description }; + } + ); props.updateTimeEntries(updatedTimeEntries); } function updateTimeEntryTags(tags: string[]) { - const updatedTimeEntries = props.timeEntry.timeEntries.map((entry: TimeEntry) => { - return { ...entry, tags }; - }); + const updatedTimeEntries = props.timeEntry.timeEntries.map( + (entry: TimeEntry) => { + return { ...entry, tags }; + } + ); props.updateTimeEntries(updatedTimeEntries); } function updateTimeEntryBillable(billable: boolean) { - const updatedTimeEntries = props.timeEntry.timeEntries.map((entry: TimeEntry) => { - return { ...entry, billable }; - }); + const updatedTimeEntries = props.timeEntry.timeEntries.map( + (entry: TimeEntry) => { + return { ...entry, billable }; + } + ); props.updateTimeEntries(updatedTimeEntries); } function updateProjectAndTask(projectId: string, taskId: string) { - const updatedTimeEntries = props.timeEntry.timeEntries.map((entry: TimeEntry) => { - return { ...entry, project_id: projectId, task_id: taskId }; - }); + const updatedTimeEntries = props.timeEntry.timeEntries.map( + (entry: TimeEntry) => { + return { ...entry, project_id: projectId, task_id: taskId }; + } + ); props.updateTimeEntries(updatedTimeEntries); } diff --git a/resources/js/packages/ui/src/index.ts b/resources/js/packages/ui/src/index.ts index 704f659a..60289ed0 100644 --- a/resources/js/packages/ui/src/index.ts +++ b/resources/js/packages/ui/src/index.ts @@ -45,5 +45,5 @@ export { SelectDropdown, Badge, Checkbox, - TimeEntryGroupedTable + TimeEntryGroupedTable, }; diff --git a/resources/js/packages/ui/vite.config.js b/resources/js/packages/ui/vite.config.js index dcee0867..e85ee959 100644 --- a/resources/js/packages/ui/vite.config.js +++ b/resources/js/packages/ui/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite'; import { resolve } from 'path'; import vue from '@vitejs/plugin-vue'; -import dts from "vite-plugin-dts"; +import dts from 'vite-plugin-dts'; // https://vitejs.dev/config/ export default defineConfig({ diff --git a/resources/js/utils/useUser.ts b/resources/js/utils/useUser.ts index 067a488d..1cd13cd6 100644 --- a/resources/js/utils/useUser.ts +++ b/resources/js/utils/useUser.ts @@ -10,7 +10,6 @@ function getCurrentUserId() { return page.props.auth.user.id; } - function getCurrentOrganizationId() { return page.props.auth.user.current_team_id; } @@ -27,8 +26,6 @@ function getCurrentRole() { )?.membership.role; } - - export { getCurrentOrganizationId, getCurrentUserId,