Skip to content

Commit

Permalink
cleanup and fix formatting for utils and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Onatcer committed Aug 22, 2024
1 parent 9b4e586 commit 3e43de4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 65 deletions.
44 changes: 0 additions & 44 deletions resources/js/packages/api/src/index.d.ts

This file was deleted.

8 changes: 4 additions & 4 deletions resources/js/packages/api/vite.config.js
Original file line number Diff line number Diff line change
@@ -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()],
Expand All @@ -13,4 +13,4 @@ export default defineConfig({
fileName: 'solidtime-api',
},
},
})
});
32 changes: 20 additions & 12 deletions resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion resources/js/packages/ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ export {
SelectDropdown,
Badge,
Checkbox,
TimeEntryGroupedTable
TimeEntryGroupedTable,
};
2 changes: 1 addition & 1 deletion resources/js/packages/ui/vite.config.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
3 changes: 0 additions & 3 deletions resources/js/utils/useUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function getCurrentUserId() {
return page.props.auth.user.id;
}


function getCurrentOrganizationId() {
return page.props.auth.user.current_team_id;
}
Expand All @@ -27,8 +26,6 @@ function getCurrentRole() {
)?.membership.role;
}



export {
getCurrentOrganizationId,
getCurrentUserId,
Expand Down

0 comments on commit 3e43de4

Please sign in to comment.