trithuc-mvc-react 2.8.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Box,
|
|
1
|
+
import { Box, useMediaQuery, useTheme } from "@mui/material";
|
|
2
2
|
import { FormProvider, useForm } from "react-hook-form";
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
|
|
6
|
-
import { useEffect } from "react";
|
|
7
6
|
import moment from "moment/moment";
|
|
7
|
+
import { useEffect } from "react";
|
|
8
8
|
|
|
9
|
+
import { URL_APPLICATION, URL_APPLICATION_API } from "@/constants";
|
|
10
|
+
import { yupResolver } from "@hookform/resolvers/yup";
|
|
9
11
|
import { useMutation, useQueryClient } from "react-query";
|
|
10
|
-
import { saveDataToTable } from "../../api";
|
|
11
12
|
import { toast } from "react-toastify";
|
|
12
|
-
import {
|
|
13
|
+
import { saveDataToTable } from "../../api";
|
|
13
14
|
import FormField from "./FormField";
|
|
14
|
-
import {
|
|
15
|
-
import { yupResolver } from "@hookform/resolvers/yup";
|
|
15
|
+
import { useDataTable } from "./hooks";
|
|
16
16
|
EditorForm.propTypes = {
|
|
17
17
|
fields: PropTypes.array
|
|
18
18
|
};
|
|
@@ -96,7 +96,7 @@ function EditorForm({ fields, submitRef }) {
|
|
|
96
96
|
if (status) {
|
|
97
97
|
if (URL_APPLICATION_API) {
|
|
98
98
|
toast.success(message);
|
|
99
|
-
}else{
|
|
99
|
+
} else {
|
|
100
100
|
toast.success(Id == 0 ? "Thêm thành công!" : "Cập nhật thành công!");
|
|
101
101
|
}
|
|
102
102
|
queryClient.invalidateQueries(tableName);
|