develop #12
@@ -6,6 +6,7 @@ import { Form, Formik } from "formik";
|
|||||||
import { useIntegrationsContext } from "../../context/IntegrationsContext";
|
import { useIntegrationsContext } from "../../context/IntegrationsContext";
|
||||||
import { useCameraBlackboard } from "../../hooks/useCameraBlackboard";
|
import { useCameraBlackboard } from "../../hooks/useCameraBlackboard";
|
||||||
import type { CategoryPopups } from "../../types/types";
|
import type { CategoryPopups } from "../../types/types";
|
||||||
|
import { toast } from "sonner";
|
||||||
|
|
||||||
const NPEDCategoryPopup = () => {
|
const NPEDCategoryPopup = () => {
|
||||||
const { state, dispatch } = useIntegrationsContext();
|
const { state, dispatch } = useIntegrationsContext();
|
||||||
@@ -24,11 +25,12 @@ const NPEDCategoryPopup = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = async (values: CategoryPopups) => {
|
const handleSubmit = async (values: CategoryPopups) => {
|
||||||
await mutation.mutateAsync({
|
const result = await mutation.mutateAsync({
|
||||||
operation: "INSERT",
|
operation: "INSERT",
|
||||||
value: values,
|
value: values,
|
||||||
path: "CategoryPopup",
|
path: "CategoryPopup",
|
||||||
});
|
});
|
||||||
|
if (result?.reason === "OK") toast.success("Pop up settings saved");
|
||||||
dispatch({ type: "NPEDCATENABLED", payload: values });
|
dispatch({ type: "NPEDCATENABLED", payload: values });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import NPEDIcon from "/NPED.svg";
|
|||||||
const NPEDCard = () => {
|
const NPEDCard = () => {
|
||||||
return (
|
return (
|
||||||
<Card className="p-4">
|
<Card className="p-4">
|
||||||
<CardHeader title={"NPED Config"} img={NPEDIcon} />
|
<CardHeader title={"NPED"} img={NPEDIcon} />
|
||||||
<NPEDFields />
|
<NPEDFields />
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const SystemSettings = () => {
|
|||||||
<Tab>System</Tab>
|
<Tab>System</Tab>
|
||||||
<Tab>Output</Tab>
|
<Tab>Output</Tab>
|
||||||
<Tab>Integrations</Tab>
|
<Tab>Integrations</Tab>
|
||||||
<Tab>WiFi and Modem</Tab>
|
<Tab>WiFi & Modem</Tab>
|
||||||
<Tab>Sound</Tab>
|
<Tab>Sound</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel>
|
<TabPanel>
|
||||||
|
|||||||
Reference in New Issue
Block a user