Merge pull request #6 from witelgroup/feature/privacy_inquiry_technical_deputy
Feature/privacy inquiry technical deputy
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import DialogLoading from "@/core/components/DialogLoading";
|
import DialogLoading from "@/core/components/DialogLoading";
|
||||||
import { GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS } from "@/core/utils/routes";
|
import { GET_REQUEST_INQUIRY_PRIVACY } from "@/core/utils/routes";
|
||||||
import useRequest from "@/lib/hooks/useRequest";
|
import useRequest from "@/lib/hooks/useRequest";
|
||||||
import { DialogContent, Typography } from "@mui/material";
|
import { DialogContent, Typography } from "@mui/material";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS}/${rowId}`);
|
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY}/${rowId}`);
|
||||||
setData(response.data.data);
|
setData(response.data.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import TabPanel from "@/core/components/TabPanel";
|
|||||||
|
|
||||||
const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose }) => {
|
const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose }) => {
|
||||||
const [tabState, setTabState] = useState(0);
|
const [tabState, setTabState] = useState(0);
|
||||||
|
console.log("DATA: ", data);
|
||||||
|
|
||||||
const handleChangeTab = (event, newValue) => {
|
const handleChangeTab = (event, newValue) => {
|
||||||
setTabState(newValue);
|
setTabState(newValue);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import DialogLoading from "@/core/components/DialogLoading";
|
import DialogLoading from "@/core/components/DialogLoading";
|
||||||
import { GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS } from "@/core/utils/routes";
|
import { GET_REQUEST_INQUIRY_PRIVACY } from "@/core/utils/routes";
|
||||||
import useRequest from "@/lib/hooks/useRequest";
|
import useRequest from "@/lib/hooks/useRequest";
|
||||||
import { DialogContent, Typography } from "@mui/material";
|
import { DialogContent, Typography } from "@mui/material";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS}/${rowId}`);
|
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY}/${rowId}`);
|
||||||
setData(response.data.data);
|
setData(response.data.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
@@ -28,9 +28,8 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div>Loading...</div>
|
<DialogLoading loadingOpen={loading} />
|
||||||
) : // <DialogLoading />
|
) : data ? (
|
||||||
data ? (
|
|
||||||
<ConfirmRoadSafetyFormContext
|
<ConfirmRoadSafetyFormContext
|
||||||
row={row}
|
row={row}
|
||||||
rowId={rowId}
|
rowId={rowId}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import DialogLoading from "@/core/components/DialogLoading";
|
import DialogLoading from "@/core/components/DialogLoading";
|
||||||
import { GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS } from "@/core/utils/routes";
|
import { GET_REQUEST_INQUIRY_PRIVACY } from "@/core/utils/routes";
|
||||||
import useRequest from "@/lib/hooks/useRequest";
|
import useRequest from "@/lib/hooks/useRequest";
|
||||||
import { DialogContent, Typography } from "@mui/material";
|
import { DialogContent, Typography } from "@mui/material";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS}/${rowId}`);
|
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY}/${rowId}`);
|
||||||
setData(response.data.data);
|
setData(response.data.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
} finally {
|
} finally {
|
||||||
@@ -28,7 +28,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<DialogLoading />
|
<DialogLoading loadingOpen={loading} />
|
||||||
) : data ? (
|
) : data ? (
|
||||||
<ConfirmRoadSafetyFormContext
|
<ConfirmRoadSafetyFormContext
|
||||||
row={row}
|
row={row}
|
||||||
|
|||||||
@@ -2,21 +2,22 @@ import { Box } from "@mui/material";
|
|||||||
import ConfirmRoadSafetyForm from "./ConfirmRoadSafetyForm";
|
import ConfirmRoadSafetyForm from "./ConfirmRoadSafetyForm";
|
||||||
import ConfirmVerifyRoadSafetyForm from "./ConfirmVerifyRoadSafetyForm";
|
import ConfirmVerifyRoadSafetyForm from "./ConfirmVerifyRoadSafetyForm";
|
||||||
import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm";
|
import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm";
|
||||||
|
import History from "./History";
|
||||||
|
|
||||||
const RowActions = ({ row, mutate }) => {
|
const RowActions = ({ row, mutate }) => {
|
||||||
return (
|
return (
|
||||||
<></>
|
<Box sx={{ display: "flex", gap: 1 }}>
|
||||||
// <Box sx={{ display: "flex", gap: 1 }}>
|
<History rowId={row.original.id} />
|
||||||
// {row.original.state_id == 3 && (
|
{row.original.state_id == 3 && (
|
||||||
// <ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
<ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||||
// )}
|
)}
|
||||||
// {row.original.state_id == 6 && (
|
{row.original.state_id == 6 && (
|
||||||
// <ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
<ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||||
// )}
|
)}
|
||||||
// {row.original.state_id == 14 && (
|
{row.original.state_id == 14 && (
|
||||||
// <ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
<ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||||
// )}
|
)}
|
||||||
// </Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default RowActions;
|
export default RowActions;
|
||||||
|
|||||||
@@ -246,3 +246,4 @@ export const GET_GENERAL_MANAGER_LIST = api + "/api/v3/harim/general_manager";
|
|||||||
|
|
||||||
// History
|
// History
|
||||||
export const GET_HISTORY_LIST = api + "/api/v3/harim/detail/histories";
|
export const GET_HISTORY_LIST = api + "/api/v3/harim/detail/histories";
|
||||||
|
export const GET_REQUEST_INQUIRY_PRIVACY = api + "/api/v3/harim/technical_deputy";
|
||||||
|
|||||||
Reference in New Issue
Block a user