diff --git a/frontend/src/routes/admin/-components/FeatureCard.tsx b/frontend/src/routes/admin/-components/FeatureCard.tsx
new file mode 100644
index 0000000..17a00dc
--- /dev/null
+++ b/frontend/src/routes/admin/-components/FeatureCard.tsx
@@ -0,0 +1,91 @@
+import { useSuspenseQuery } from "@tanstack/react-query";
+import axios from "axios";
+import React from "react";
+import { toast } from "sonner";
+import { Card, CardDescription, CardHeader } from "../../../components/ui/card";
+import { useAppForm } from "../../../lib/formSutff";
+import { getSettings } from "../../../lib/queries/getSettings";
+
+type Setting = {
+ id: string;
+ name: string;
+ description?: string;
+ value: string;
+ active: boolean;
+ inputType: "text" | "boolean" | "number" | "select";
+ options?: string[];
+};
+
+export default function FeatureCard({ item }: { item: Setting }) {
+ const { refetch } = useSuspenseQuery(getSettings());
+ const form = useAppForm({
+ defaultValues: {
+ value: item.value ?? "",
+ active: item.active,
+ },
+ onSubmit: async ({ value }) => {
+ try {
+ // adding this in as my base as i need to see timers working
+ if (window.location.hostname === "localhost") {
+ await new Promise((res) => setTimeout(res, 1000));
+ }
+
+ const { data } = await axios.patch(`/lst/api/settings/${item.name}`, {
+ value: value.value,
+ active: value.active ? "true" : "false",
+ });
+
+ refetch();
+ toast.success(
+
+
{data.message}
+
+ This was a feature setting so{" "}
+ {value.active
+ ? "processes related to this will start working on there next interval"
+ : "processes related to this will stop working on there next interval"}
+
+
+
+
+ System Settings
+
+
+
+
+ Features
+ System
+ Standard
+
+ }>
+
+
+
+
+
+
+ );
+}
diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx
index c0c81c8..d6fec2e 100644
--- a/frontend/src/routes/index.tsx
+++ b/frontend/src/routes/index.tsx
@@ -18,10 +18,42 @@ function Index() {
if (isPending)
return
Loading...
;
// if (!session) return Sign In
+ let url: string;
+ if (window.location.origin.includes("localhost")) {
+ url = `https://www.youtube.com/watch?v=dQw4w9WgXcQ`;
+ } else if (window.location.origin.includes("vms006")) {
+ url = `https://${window.location.hostname.replace("vms006", "prod.alpla.net/")}lst/app/old/ocp`;
+ } else {
+ url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
+ }
return (
-
-
Welcome Home!
+
+
Welcome Lst - V3
+
+
+ This is active in your plant today due to having warehousing activated
+ and new functions needed to be introduced, you should be still using LST
+ as you were before
+