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 { 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 { DialogContent, Typography } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
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);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
|
||||
@@ -8,6 +8,7 @@ import TabPanel from "@/core/components/TabPanel";
|
||||
|
||||
const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose }) => {
|
||||
const [tabState, setTabState] = useState(0);
|
||||
console.log("DATA: ", data);
|
||||
|
||||
const handleChangeTab = (event, newValue) => {
|
||||
setTabState(newValue);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 { DialogContent, Typography } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
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);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
@@ -28,9 +28,8 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
return (
|
||||
<>
|
||||
{loading ? (
|
||||
<div>Loading...</div>
|
||||
) : // <DialogLoading />
|
||||
data ? (
|
||||
<DialogLoading loadingOpen={loading} />
|
||||
) : data ? (
|
||||
<ConfirmRoadSafetyFormContext
|
||||
row={row}
|
||||
rowId={rowId}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 { DialogContent, Typography } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
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);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
@@ -28,7 +28,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
return (
|
||||
<>
|
||||
{loading ? (
|
||||
<DialogLoading />
|
||||
<DialogLoading loadingOpen={loading} />
|
||||
) : data ? (
|
||||
<ConfirmRoadSafetyFormContext
|
||||
row={row}
|
||||
|
||||
@@ -2,21 +2,22 @@ import { Box } from "@mui/material";
|
||||
import ConfirmRoadSafetyForm from "./ConfirmRoadSafetyForm";
|
||||
import ConfirmVerifyRoadSafetyForm from "./ConfirmVerifyRoadSafetyForm";
|
||||
import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm";
|
||||
import History from "./History";
|
||||
|
||||
const RowActions = ({ row, mutate }) => {
|
||||
return (
|
||||
<></>
|
||||
// <Box sx={{ display: "flex", gap: 1 }}>
|
||||
// {row.original.state_id == 3 && (
|
||||
// <ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
// )}
|
||||
// {row.original.state_id == 6 && (
|
||||
// <ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
// )}
|
||||
// {row.original.state_id == 14 && (
|
||||
// <ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
// )}
|
||||
// </Box>
|
||||
<Box sx={{ display: "flex", gap: 1 }}>
|
||||
<History rowId={row.original.id} />
|
||||
{row.original.state_id == 3 && (
|
||||
<ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
)}
|
||||
{row.original.state_id == 6 && (
|
||||
<ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
)}
|
||||
{row.original.state_id == 14 && (
|
||||
<ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
export default RowActions;
|
||||
|
||||
@@ -246,3 +246,4 @@ export const GET_GENERAL_MANAGER_LIST = api + "/api/v3/harim/general_manager";
|
||||
|
||||
// History
|
||||
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