Skip to content

Commit

Permalink
Delete old troi api code
Browse files Browse the repository at this point in the history
  • Loading branch information
malte-laukoetter committed Dec 15, 2023
1 parent ef160cc commit 1bdce8d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 672 deletions.
7 changes: 3 additions & 4 deletions app/components/troi.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import moment from "moment";
import { TimeEntries, TimeEntry } from "~/troi/TimeEntry";
import { CalculationPosition } from "~/troi/CalculationPosition";
import { useFetcher } from "@remix-run/react";
import { convertToCacheFormat } from "~/utils/TimeEntryCache";
import { LoadingOverlay } from "./LoadingOverlay";

interface Props {
Expand Down Expand Up @@ -88,9 +87,9 @@ export default function Troi(props: Props) {
},
{
method: "POST",
action: `/calculation_postions/${
position.id
}/time_entries/${convertToCacheFormat(selectedDate)}`,
action: `/calculation_postions/${position.id}/time_entries/${moment(
selectedDate,
).format("YYYY-MM-DD")}`,
},
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionFunctionArgs } from "@remix-run/node";
import { addTimeEntry } from "~/troi/troiControllerServer";
import { addTimeEntry } from "~/troi/troiApiController";

export async function action({ request, params }: ActionFunctionArgs) {
if (request.method !== "POST") {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
getCalculationPositions,
getCalenderEvents,
getTimeEntries,
} from "~/troi/troiControllerServer";
} from "~/troi/troiApiController";

let isHydrating = true;

Expand Down
2 changes: 1 addition & 1 deletion app/routes/time_entries.$id.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionFunctionArgs } from "@remix-run/node";
import { deleteTimeEntry, updateTimeEntry } from "~/troi/troiControllerServer";
import { deleteTimeEntry, updateTimeEntry } from "~/troi/troiApiController";

export async function action({ request, params }: ActionFunctionArgs) {
if (!params.id) {
Expand Down
File renamed without changes.
335 changes: 0 additions & 335 deletions app/troi/troiController.ts

This file was deleted.

Loading

0 comments on commit 1bdce8d

Please sign in to comment.