mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 10:42:16 +01:00
cleanup and fix formatting for utils and packages
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user