maintenance
This commit is contained in:
1 parent
e55ae64222
commit
24cbcec2c9
10 files changed
+40
-51
No files matched your search
@@ -2,13 +2,10 @@ import { MaintenanceForm } from "@/pages/maintenance/MaintenanceForm";
|
||||
|
||||
import { useParams } from "react-router";
|
||||
import { useNavigate } from "react-router";
|
||||
import { z } from "zod";
|
||||
import { usePatch, useGet } from "@/hooks/UseApi";
|
||||
import type { ApiResponse } from "@/types/api";
|
||||
import { maintenanceSchema } from "@/validation/zod";
|
||||
import type { IMonitor } from "@/types/monitor";
|
||||
|
||||
type FormValues = z.infer<typeof maintenanceSchema>;
|
||||
import type { FormValues } from "@/pages/maintenance/MaintenanceForm";
|
||||
|
||||
const MaintenanceConfigPage = () => {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { MaintenanceForm } from "@/pages/maintenance/MaintenanceForm";
|
||||
|
||||
import { useNavigate } from "react-router";
|
||||
import { z } from "zod";
|
||||
import { usePost, useGet } from "@/hooks/UseApi";
|
||||
import type { ApiResponse } from "@/types/api";
|
||||
import { maintenanceSchema } from "@/validation/zod";
|
||||
import type { IMonitor } from "@/types/monitor";
|
||||
import type { IMaintenance } from "@/types/maintenance";
|
||||
|
||||
type FormValues = z.infer<typeof maintenanceSchema>;
|
||||
import type { FormValues } from "@/pages/maintenance/MaintenanceForm";
|
||||
|
||||
const MaintenanceCreatePage = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -12,13 +12,13 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { z } from "zod";
|
||||
import { MaintenanceRepeats } from "@/types/maintenance";
|
||||
import { maintenanceSchema } from "@/validation/zod";
|
||||
import { maintenanceSchema } from "@/validation";
|
||||
import { useForm, Controller, type SubmitHandler } from "react-hook-form";
|
||||
import { useEffect } from "react";
|
||||
import { useInitForm } from "@/hooks/forms/UseInitMaintenanceForm";
|
||||
import type { IMonitor } from "@/types/monitor";
|
||||
|
||||
type FormValues = z.infer<typeof maintenanceSchema>;
|
||||
export type FormValues = z.infer<typeof maintenanceSchema>;
|
||||
|
||||
export const MaintenanceForm = ({
|
||||
monitorOptions,
|
||||
|
||||
@@ -2,13 +2,10 @@ import { NotificationChannelsForm } from "./NotificationChannelsForm";
|
||||
|
||||
import { useParams } from "react-router";
|
||||
import { useNavigate } from "react-router";
|
||||
import { z } from "zod";
|
||||
import { usePatch, useGet } from "@/hooks/UseApi";
|
||||
import type { ApiResponse } from "@/types/api";
|
||||
import { notificationChannelSchema } from "@/validation";
|
||||
import type { INotificationChannel } from "@/types/notification-channel";
|
||||
|
||||
type FormValues = z.infer<typeof notificationChannelSchema>;
|
||||
import type { FormValues } from "./NotificationChannelsForm";
|
||||
|
||||
const NotificationsChannelConfigPage = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import { NotificationChannelsForm } from "./NotificationChannelsForm";
|
||||
|
||||
import { useNavigate } from "react-router";
|
||||
import { z } from "zod";
|
||||
import { usePost } from "@/hooks/UseApi";
|
||||
import { notificationChannelSchema } from "@/validation";
|
||||
import type { INotificationChannel } from "@/types/notification-channel";
|
||||
|
||||
type FormValues = z.infer<typeof notificationChannelSchema>;
|
||||
import type { FormValues } from "./NotificationChannelsForm";
|
||||
|
||||
const NotificationsChannelCreatePage = () => {
|
||||
const { post, loading } = usePost<FormValues, INotificationChannel>();
|
||||
|
||||
@@ -17,7 +17,7 @@ import { useInitForm } from "@/hooks/forms/UseInitNotificationsChannelForm";
|
||||
import { Typography } from "@mui/material";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
|
||||
type FormValues = z.infer<typeof notificationChannelSchema>;
|
||||
export type FormValues = z.infer<typeof notificationChannelSchema>;
|
||||
|
||||
export const NotificationChannelsForm = ({
|
||||
initialData,
|
||||
|
||||
Reference in new issue
Block a user