diff --git a/ui/src/pages/gestion-reseaux-cfas/CreateReseauCfaForm.js b/ui/src/pages/gestion-reseaux-cfas/CreateReseauCfaForm.js
deleted file mode 100644
index eabb4f5f3..000000000
--- a/ui/src/pages/gestion-reseaux-cfas/CreateReseauCfaForm.js
+++ /dev/null
@@ -1,89 +0,0 @@
-import {
- Button,
- FormControl,
- FormErrorMessage,
- FormLabel,
- Input,
- ModalBody,
- ModalFooter,
- Select,
- Stack,
- Text,
-} from "@chakra-ui/react";
-import { Field, Form, Formik } from "formik";
-import PropTypes from "prop-types";
-import React from "react";
-import * as Yup from "yup";
-
-import { uaiRegex } from "../../common/domain/uai";
-
-const formValidationSchema = Yup.object().shape({
- nom_reseau: Yup.string().required("Requis"),
- nom_etablissement: Yup.string().required("Requis"),
- uai: Yup.string().matches(uaiRegex, "UAI invalide").required("Requis"),
-});
-
-const initialValues = { nom_reseau: "", nom_etablissement: "", uai: "" };
-
-const CreateReseauCfaForm = ({ onSubmit, networkList }) => {
- return (
-
- {({ status = {}, isSubmitting }) => {
- return (
-
- );
- }}
-
- );
-};
-
-CreateReseauCfaForm.propTypes = {
- onSubmit: PropTypes.func.isRequired,
- networkList: PropTypes.array,
-};
-
-export default CreateReseauCfaForm;
diff --git a/ui/src/pages/gestion-reseaux-cfas/CreateReseauCfaModal.js b/ui/src/pages/gestion-reseaux-cfas/CreateReseauCfaModal.js
deleted file mode 100644
index 2a8733088..000000000
--- a/ui/src/pages/gestion-reseaux-cfas/CreateReseauCfaModal.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import { Box, Modal, ModalContent, ModalHeader, ModalOverlay } from "@chakra-ui/react";
-import PropTypes from "prop-types";
-import React from "react";
-import { useMutation, useQuery, useQueryClient } from "react-query";
-
-import { fetchReseaux, postCreateReseauCfa } from "../../common/api/tableauDeBord";
-import ModalClosingButton from "../../common/components/ModalClosingButton/ModalClosingButton";
-import CreateReseauCfaForm from "./CreateReseauCfaForm";
-
-const CreateReseauCfaModal = ({ isOpen, onClose }) => {
- const { data } = useQuery(["reseaux"], () => fetchReseaux());
- const networkList = data;
-
- const queryClient = useQueryClient();
- const createReseauCfa = useMutation(
- (newReseauCfa) => {
- return postCreateReseauCfa(newReseauCfa);
- },
- {
- onSuccess() {
- queryClient.invalidateQueries(["reseauxCfas"]);
- onClose();
- },
- }
- );
- return (
-
-
-
-
-
-
- Ajouter un CFA
-
-
-
- {
- await createReseauCfa.mutateAsync(data);
- }}
- />
-
-
- );
-};
-
-CreateReseauCfaModal.propTypes = {
- isOpen: PropTypes.bool.isRequired,
- onClose: PropTypes.func.isRequired,
-};
-
-export default CreateReseauCfaModal;
diff --git a/ui/src/pages/gestion-reseaux-cfas/GestionReseauCfaPage.js b/ui/src/pages/gestion-reseaux-cfas/GestionReseauCfaPage.js
deleted file mode 100644
index 102d4b90c..000000000
--- a/ui/src/pages/gestion-reseaux-cfas/GestionReseauCfaPage.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Button, Heading, useDisclosure } from "@chakra-ui/react";
-import React from "react";
-
-import { Footer, Header, Section } from "../../common/components";
-import { NAVIGATION_PAGES } from "../../common/constants/navigationPages";
-import CreateReseauCfaModal from "./CreateReseauCfaModal";
-import ReseauxCfasTable from "./ReseauxCfasTable";
-
-const GestionReseauxCfasPage = () => {
- const createCfaModal = useDisclosure();
-
- return (
- <>
-
-
-
-
- {NAVIGATION_PAGES.GestionReseauxCfas.title}
-
-
-
-
- Liste des reseaux CFAS{" "}
-
-
-
-
-
- >
- );
-};
-
-export default GestionReseauxCfasPage;
diff --git a/ui/src/pages/gestion-reseaux-cfas/ReseauxCfasTable.js b/ui/src/pages/gestion-reseaux-cfas/ReseauxCfasTable.js
deleted file mode 100644
index 335c25cf7..000000000
--- a/ui/src/pages/gestion-reseaux-cfas/ReseauxCfasTable.js
+++ /dev/null
@@ -1,57 +0,0 @@
-import { Button, Tbody, Td, Tr, useToast } from "@chakra-ui/react";
-import React from "react";
-import { useMutation, useQuery, useQueryClient } from "react-query";
-
-import { deleteReseauCfa, fetchReseauxCfas } from "../../common/api/tableauDeBord";
-import { Table } from "../../common/components";
-
-const ReseauxCfasTable = () => {
- const toast = useToast();
- const { data, isLoading } = useQuery(["reseauxCfas"], () => fetchReseauxCfas());
- const reseauxCfasList = data;
-
- const queryClient = useQueryClient();
- const deleteReseauxCfas = useMutation(
- (reseauCfa) => {
- return deleteReseauCfa(reseauCfa);
- },
- {
- onSuccess() {
- queryClient.invalidateQueries(["reseauxCfas"]);
- },
- }
- );
- return (
-
-
- {reseauxCfasList?.map(({ id, nom_reseau, nom_etablissement, uai }) => {
- return (
-
- {nom_reseau} |
- {nom_etablissement} |
- {uai} |
-
-
- |
-
- );
- })}
-
-
- );
-};
-
-export default ReseauxCfasTable;