Compare commits
3 Commits
105fea9232
...
cbc3aae112
| Author | SHA1 | Date |
|---|---|---|
|
|
cbc3aae112 | |
|
|
90d7a8377b | |
|
|
471cf2432e |
|
|
@ -0,0 +1,30 @@
|
||||||
|
'use client' // Error components must be Client Components
|
||||||
|
|
||||||
|
import { useEffect } from 'react'
|
||||||
|
|
||||||
|
export default function Error({
|
||||||
|
error,
|
||||||
|
reset,
|
||||||
|
}: {
|
||||||
|
error: Error & { digest?: string }
|
||||||
|
reset: () => void
|
||||||
|
}) {
|
||||||
|
useEffect(() => {
|
||||||
|
// Log the error to an error reporting service
|
||||||
|
console.error(error)
|
||||||
|
}, [error])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h2>Something went wrong!</h2>
|
||||||
|
<button
|
||||||
|
onClick={
|
||||||
|
// Attempt to recover by trying to re-render the segment
|
||||||
|
() => reset()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Try again
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
'use client' // Error components must be Client Components
|
||||||
|
|
||||||
|
import { useEffect } from 'react'
|
||||||
|
|
||||||
|
export default function Error({
|
||||||
|
error,
|
||||||
|
reset,
|
||||||
|
}: {
|
||||||
|
error: Error & { digest?: string }
|
||||||
|
reset: () => void
|
||||||
|
}) {
|
||||||
|
useEffect(() => {
|
||||||
|
// Log the error to an error reporting service
|
||||||
|
console.error(error)
|
||||||
|
}, [error])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h2>Something went wrong!</h2>
|
||||||
|
<button
|
||||||
|
onClick={
|
||||||
|
// Attempt to recover by trying to re-render the segment
|
||||||
|
() => reset()
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Try again
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ import { Triangle } from "react-loader-spinner";
|
||||||
export default function Loading() {
|
export default function Loading() {
|
||||||
// You can add any UI inside Loading, including a Skeleton.
|
// You can add any UI inside Loading, including a Skeleton.
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-full flex justify-center items-center">
|
<div className="w-full min-h-screen flex justify-center items-center">
|
||||||
<Triangle
|
<Triangle
|
||||||
visible={true}
|
visible={true}
|
||||||
height="80"
|
height="80"
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,7 @@ export default function AdminCategories() {
|
||||||
queryKey: ["CategoriesList"],
|
queryKey: ["CategoriesList"],
|
||||||
queryFn: () => GetAllCategories(),
|
queryFn: () => GetAllCategories(),
|
||||||
// refetchOnWindowFocus: false,
|
// refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
console.log(data1);
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
const handleClickEdit = (id: string, title: string, description: string) => {
|
const handleClickEdit = (id: string, title: string, description: string) => {
|
||||||
|
|
@ -220,15 +219,13 @@ export default function AdminCategories() {
|
||||||
title: data.titleCat,
|
title: data.titleCat,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
}
|
}
|
||||||
function onSubmitAdd(data: AddCatFormValues) {
|
function onSubmitAdd(data: AddCatFormValues) {
|
||||||
AddCatMutation.mutate({
|
AddCatMutation.mutate({
|
||||||
title: data.titleCategory,
|
title: data.titleCategory,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="w-full min-h-[85vh] flex justify-center">
|
<div className="w-full min-h-[85vh] flex justify-center">
|
||||||
|
|
|
||||||
|
|
@ -88,13 +88,9 @@ export default function AdminKeysManagement() {
|
||||||
reader.onload = (e) => {
|
reader.onload = (e) => {
|
||||||
const contents = e?.target?.result;
|
const contents = e?.target?.result;
|
||||||
// Process the contents of the file here
|
// Process the contents of the file here
|
||||||
setSelectedFile(contents);
|
setSelectedFile(contents);
|
||||||
console.log(contents);
|
|
||||||
};
|
};
|
||||||
reader?.readAsText(file);
|
reader?.readAsText(file);
|
||||||
|
|
||||||
console.log(reader);
|
|
||||||
console.log(selectedFile);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Edit Form
|
// Edit Form
|
||||||
|
|
@ -134,11 +130,7 @@ export default function AdminKeysManagement() {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmitEdit(data: z.infer<typeof FormSchemaEditKey>) {
|
function onSubmitEdit(data: z.infer<typeof FormSchemaEditKey>) {
|
||||||
console.log("bcbcbbcbcbc" + data);
|
|
||||||
console.log("bcbcbbcbcbccc" + selectedFile);
|
|
||||||
console.log("bcbcbbcbcbccccc" + data1[0]?.id);
|
|
||||||
|
|
||||||
ChangeKeyMutation.mutate({
|
ChangeKeyMutation.mutate({
|
||||||
privateKey: selectedFile,
|
privateKey: selectedFile,
|
||||||
publicKeyId: keyId,
|
publicKeyId: keyId,
|
||||||
|
|
@ -209,8 +201,7 @@ export default function AdminKeysManagement() {
|
||||||
queryKey: ["KeysList"],
|
queryKey: ["KeysList"],
|
||||||
queryFn: () => GetKeys(),
|
queryFn: () => GetKeys(),
|
||||||
// refetchOnWindowFocus: false,
|
// refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
console.log(data1);
|
|
||||||
|
|
||||||
// GenerateKeyPair
|
// GenerateKeyPair
|
||||||
const {
|
const {
|
||||||
|
|
@ -229,8 +220,7 @@ export default function AdminKeysManagement() {
|
||||||
// type RefetchFunction = (options?: RefetchOptions) => Promise<void>;
|
// type RefetchFunction = (options?: RefetchOptions) => Promise<void>;
|
||||||
|
|
||||||
const handleClickGenerate = () => {
|
const handleClickGenerate = () => {
|
||||||
refetch2();
|
refetch2();
|
||||||
console.log(data2);
|
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isSuccess2) {
|
if (isSuccess2) {
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,7 @@ export default function AdminOrganizations() {
|
||||||
queryKey: ["OrganizationList"],
|
queryKey: ["OrganizationList"],
|
||||||
queryFn: () => GetAllOrganizations(),
|
queryFn: () => GetAllOrganizations(),
|
||||||
// refetchOnWindowFocus: false,
|
// refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
console.log(data1);
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
const handleClickEdit = (id: string, title: string, description: string) => {
|
const handleClickEdit = (id: string, title: string, description: string) => {
|
||||||
|
|
@ -223,15 +222,13 @@ export default function AdminOrganizations() {
|
||||||
title: data.titleOrg,
|
title: data.titleOrg,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
}
|
}
|
||||||
function onSubmitAdd(data: AddOrgFormValues) {
|
function onSubmitAdd(data: AddOrgFormValues) {
|
||||||
AddOrgMutation.mutate({
|
AddOrgMutation.mutate({
|
||||||
title: data.titleOrg,
|
title: data.titleOrg,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="w-full min-h-[85vh] flex justify-center">
|
<div className="w-full min-h-[85vh] flex justify-center">
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ export default function AdminSlider() {
|
||||||
isLoading: isListLoading,
|
isLoading: isListLoading,
|
||||||
refetch: refetch1,
|
refetch: refetch1,
|
||||||
} = useQuery({
|
} = useQuery({
|
||||||
queryKey: ["NewsList"],
|
queryKey: ["SliderList"],
|
||||||
queryFn: () => GetAllSliders(),
|
queryFn: () => GetAllSliders(),
|
||||||
// refetchOnWindowFocus: false,
|
// refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
|
@ -296,7 +296,6 @@ function onSubmitEdit(data: EditSliderFormValues) {
|
||||||
resetField("Url");
|
resetField("Url");
|
||||||
resetField("Description");
|
resetField("Description");
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
}
|
}
|
||||||
const { resetField } = useForm();
|
const { resetField } = useForm();
|
||||||
|
|
||||||
|
|
@ -312,7 +311,6 @@ function onSubmitAdd(data: AddSliderFormValues) {
|
||||||
|
|
||||||
AddSliderMutation.mutate(formData);
|
AddSliderMutation.mutate(formData);
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default function AdminWebContents() {
|
||||||
|
|
||||||
const [contentTitle, setContentTitle] = useState("");
|
const [contentTitle, setContentTitle] = useState("");
|
||||||
const [contentDesc, setContentDesc] = useState("");
|
const [contentDesc, setContentDesc] = useState("");
|
||||||
// console.log(value);
|
|
||||||
var toolbarOptions = [
|
var toolbarOptions = [
|
||||||
["bold", "italic", "underline", "strike"], // toggled buttons
|
["bold", "italic", "underline", "strike"], // toggled buttons
|
||||||
["blockquote", "code-block"],
|
["blockquote", "code-block"],
|
||||||
|
|
@ -75,7 +75,7 @@ export default function AdminWebContents() {
|
||||||
queryFn: () => getContents(),
|
queryFn: () => getContents(),
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
// console.log(data1);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// if (isInitialRender2 && isSuccess1) {
|
// if (isInitialRender2 && isSuccess1) {
|
||||||
|
|
@ -83,35 +83,29 @@ export default function AdminWebContents() {
|
||||||
// {
|
// {
|
||||||
data1?.map((item: any) => {
|
data1?.map((item: any) => {
|
||||||
if (item.title === "CallUs") {
|
if (item.title === "CallUs") {
|
||||||
console.log("contetn : " + item.content);
|
|
||||||
setContentValueCall(item.content);
|
setContentValueCall(item.content);
|
||||||
setCallId(item.id);
|
setCallId(item.id);
|
||||||
setCallBtn("Edit");
|
setCallBtn("Edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.title === "AboutUs") {
|
if (item.title === "AboutUs") {
|
||||||
console.log("contetn : " + item.content);
|
|
||||||
setContentValueAbout(item.content);
|
setContentValueAbout(item.content);
|
||||||
setAboutId(item.id);
|
setAboutId(item.id);
|
||||||
setAboutBtn("Edit");
|
setAboutBtn("Edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.title === "AfterRegistration") {
|
if (item.title === "AfterRegistration") {
|
||||||
console.log("contetn : " + item.content);
|
|
||||||
setContentValueAfter(item.content);
|
setContentValueAfter(item.content);
|
||||||
setAfterId(item.id);
|
setAfterId(item.id);
|
||||||
setAfterBtn("Edit");
|
setAfterBtn("Edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.title === "BeforeRegistration") {
|
if (item.title === "BeforeRegistration") {
|
||||||
console.log("contetn : " + item.content);
|
|
||||||
setContentValueBefore(item.content);
|
setContentValueBefore(item.content);
|
||||||
setBeforeId(item.id);
|
setBeforeId(item.id);
|
||||||
setBeforeBtn("Edit");
|
setBeforeBtn("Edit");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }
|
|
||||||
console.log("contetn : " + data1);
|
|
||||||
}
|
}
|
||||||
}, [isSuccess1]);
|
}, [isSuccess1]);
|
||||||
|
|
||||||
|
|
@ -179,9 +173,6 @@ export default function AdminWebContents() {
|
||||||
formData.append("Content", contentValueCall);
|
formData.append("Content", contentValueCall);
|
||||||
|
|
||||||
AddWebContents.mutate(formData);
|
AddWebContents.mutate(formData);
|
||||||
console.log(contentValueCall);
|
|
||||||
// console.log(contentTitle);
|
|
||||||
// console.log(contentDesc);
|
|
||||||
}
|
}
|
||||||
// AboutUs
|
// AboutUs
|
||||||
function onSubmitAddAboutUs() {
|
function onSubmitAddAboutUs() {
|
||||||
|
|
@ -191,7 +182,6 @@ export default function AdminWebContents() {
|
||||||
formData.append("Content", contentValueAbout);
|
formData.append("Content", contentValueAbout);
|
||||||
|
|
||||||
AddWebContents.mutate(formData);
|
AddWebContents.mutate(formData);
|
||||||
console.log(contentValueAbout);
|
|
||||||
}
|
}
|
||||||
// AboutUs
|
// AboutUs
|
||||||
function onSubmitAddَAfterText() {
|
function onSubmitAddَAfterText() {
|
||||||
|
|
@ -201,7 +191,6 @@ export default function AdminWebContents() {
|
||||||
formData.append("Content", contentValueAfter);
|
formData.append("Content", contentValueAfter);
|
||||||
|
|
||||||
AddWebContents.mutate(formData);
|
AddWebContents.mutate(formData);
|
||||||
console.log(contentValueAfter);
|
|
||||||
}
|
}
|
||||||
// AboutUs
|
// AboutUs
|
||||||
function onSubmitAddBeforeText() {
|
function onSubmitAddBeforeText() {
|
||||||
|
|
@ -211,7 +200,6 @@ export default function AdminWebContents() {
|
||||||
formData.append("Content", contentValueBefore);
|
formData.append("Content", contentValueBefore);
|
||||||
|
|
||||||
AddWebContents.mutate(formData);
|
AddWebContents.mutate(formData);
|
||||||
console.log(contentValueBefore);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit Mutation
|
// Edit Mutation
|
||||||
|
|
@ -221,7 +209,6 @@ export default function AdminWebContents() {
|
||||||
formData.append("description", "CallUs....");
|
formData.append("description", "CallUs....");
|
||||||
formData.append("Content", contentValueCall);
|
formData.append("Content", contentValueCall);
|
||||||
EditWebContents.mutate({ id: callId, payload: formData });
|
EditWebContents.mutate({ id: callId, payload: formData });
|
||||||
console.log("formData"+formData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onEditAboutUs() {
|
function onEditAboutUs() {
|
||||||
|
|
@ -237,8 +224,7 @@ export default function AdminWebContents() {
|
||||||
formData.append("title", "AfterRegistration");
|
formData.append("title", "AfterRegistration");
|
||||||
formData.append("description", "AfterRegistration....");
|
formData.append("description", "AfterRegistration....");
|
||||||
formData.append("Content", contentValueAfter);
|
formData.append("Content", contentValueAfter);
|
||||||
EditWebContents.mutate({ id: afterId, payload: formData });
|
EditWebContents.mutate({ id: afterId, payload: formData });
|
||||||
console.log("formData22"+formData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onEditBeforeText() {
|
function onEditBeforeText() {
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ export default function ComplainsDetails({
|
||||||
|
|
||||||
const checkKey2 = (item: any) => {
|
const checkKey2 = (item: any) => {
|
||||||
const dcKey = Decrypt(item.cipherKeyInspector, selectedFile);
|
const dcKey = Decrypt(item.cipherKeyInspector, selectedFile);
|
||||||
console.log(dcKey);
|
|
||||||
if (dcKey != false && dcKey != null) {
|
if (dcKey != false && dcKey != null) {
|
||||||
if (check) {
|
if (check) {
|
||||||
// localStorage.setItem("privateKey", dcKey);
|
// localStorage.setItem("privateKey", dcKey);
|
||||||
|
|
@ -192,8 +192,7 @@ export default function ComplainsDetails({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
data = getComplaintMutation?.data;
|
data = getComplaintMutation?.data;
|
||||||
// console.log("Complainet data"+getComplaintMutation?.data);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -269,7 +268,7 @@ export default function ComplainsDetails({
|
||||||
|
|
||||||
<div className="w-full flex max-lg:flex-col items-start mt-2 gap-2">
|
<div className="w-full flex max-lg:flex-col items-start mt-2 gap-2">
|
||||||
{/* 1 */}
|
{/* 1 */}
|
||||||
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[80vh]">
|
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[78vh]">
|
||||||
<div className=" max-lg:hidden bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col lg:h-full">
|
<div className=" max-lg:hidden bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col lg:h-full">
|
||||||
<p className="text-[#464646] text-base font-bold mb-1">
|
<p className="text-[#464646] text-base font-bold mb-1">
|
||||||
انجام عملیات
|
انجام عملیات
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@ export default function ControllerDashboard() {
|
||||||
queryKey: ["Infos"],
|
queryKey: ["Infos"],
|
||||||
queryFn: () => getInfo(),
|
queryFn: () => getInfo(),
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
const [decryptedMessage, errorMessage] = useDecrypt(
|
const [decryptedMessage, errorMessage] = useDecrypt(
|
||||||
"gJoT9AqK7wk1MZFSD04yXXfF36fzsOL+RYtJfySrEnQeJ7VoaL7pmOU6nB3+0+PQcaxIi3hf1AHjzIB0Cn5oHgKROeoI4XslhAezZk23QhtIU4HUF1wpeOJfA+4hWyRfbh4fI9774sa/KL47VaBbrNM/rvBxk6hjlKx5mTb3hqM="
|
"gJoT9AqK7wk1MZFSD04yXXfF36fzsOL+RYtJfySrEnQeJ7VoaL7pmOU6nB3+0+PQcaxIi3hf1AHjzIB0Cn5oHgKROeoI4XslhAezZk23QhtIU4HUF1wpeOJfA+4hWyRfbh4fI9774sa/KL47VaBbrNM/rvBxk6hjlKx5mTb3hqM="
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,7 @@ export default function InspectorOperations({
|
||||||
const password = useData((state) => state.data.password);
|
const password = useData((state) => state.data.password);
|
||||||
const possibleOperations = complaintData?.possibleOperationsWithDescription;
|
const possibleOperations = complaintData?.possibleOperationsWithDescription;
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
console.log(possibleOperations);
|
|
||||||
const form = useForm<z.infer<typeof FormSchema>>({
|
const form = useForm<z.infer<typeof FormSchema>>({
|
||||||
resolver: zodResolver(FormSchema),
|
resolver: zodResolver(FormSchema),
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
|
|
@ -98,9 +97,7 @@ export default function InspectorOperations({
|
||||||
function onSubmit(data: z.infer<typeof FormSchema>) {
|
function onSubmit(data: z.infer<typeof FormSchema>) {
|
||||||
const storedData = JSON.parse(
|
const storedData = JSON.parse(
|
||||||
localStorage.getItem("CompliantData") as string
|
localStorage.getItem("CompliantData") as string
|
||||||
);
|
);
|
||||||
console.log(storedData);
|
|
||||||
console.log(key2);
|
|
||||||
const dcKey = Decrypt(storedData.cipherKeyInspector, key2);
|
const dcKey = Decrypt(storedData.cipherKeyInspector, key2);
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("text", data.text);
|
formData.append("text", data.text);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import { getInfo, getInfoList } from "@/utils/infoApi";
|
||||||
import { useQueries, useQuery } from "@tanstack/react-query";
|
import { useQueries, useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
export default function Reports({ data }: { data: any }) {
|
export default function Reports({ data }: { data: any }) {
|
||||||
console.log(data);
|
|
||||||
const [first, setfirst] = useState<any>(false);
|
const [first, setfirst] = useState<any>(false);
|
||||||
const Queries: any = useQueries({
|
const Queries: any = useQueries({
|
||||||
queries: data?.map((item: any) => ({
|
queries: data?.map((item: any) => ({
|
||||||
|
|
@ -20,8 +19,6 @@ export default function Reports({ data }: { data: any }) {
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
const codes = data.map((item: any) => item.code);
|
const codes = data.map((item: any) => item.code);
|
||||||
console.log(codes);
|
|
||||||
console.log(Queries[0]);
|
|
||||||
const charts = Queries.map((item: any) => item.data);
|
const charts = Queries.map((item: any) => item.data);
|
||||||
const successfulRequests = Queries.filter(
|
const successfulRequests = Queries.filter(
|
||||||
(item: any) => item.isSuccess == true
|
(item: any) => item.isSuccess == true
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ export default function ReportsController() {
|
||||||
});
|
});
|
||||||
const [first, setfirst] = useState<any>(false);
|
const [first, setfirst] = useState<any>(false);
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
return (
|
return (
|
||||||
<div className="w-[95vw] lg:w-[82vw] xl:w-[75vw] 3xl:w-[65vw] max-sm:mt-16 mt-8 pt-9 mx-auto">
|
<div className="w-[95vw] lg:w-[82vw] xl:w-[75vw] 3xl:w-[65vw] max-sm:mt-16 mt-8 pt-9 mx-auto">
|
||||||
{data && <Reports data={data} />}
|
{data && <Reports data={data} />}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ export default function TabController() {
|
||||||
const contents = e?.target?.result;
|
const contents = e?.target?.result;
|
||||||
// Process the contents of the file here
|
// Process the contents of the file here
|
||||||
setSelectedFile(contents);
|
setSelectedFile(contents);
|
||||||
console.log(contents);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
|
|
@ -70,20 +69,15 @@ export default function TabController() {
|
||||||
// const initialSelectedTab = dataState[0]?.value || '';
|
// const initialSelectedTab = dataState[0]?.value || '';
|
||||||
// setSelectedTab(initialSelectedTab);
|
// setSelectedTab(initialSelectedTab);
|
||||||
|
|
||||||
// console.log(dataState[0]?.title);
|
|
||||||
|
|
||||||
const { data, isLoading, refetch } = useQuery({
|
const { data, isLoading, refetch } = useQuery({
|
||||||
queryKey: ["ComplaintsList" ,psblState,dataState],
|
queryKey: ["ComplaintsList" ,psblState,dataState],
|
||||||
queryFn: () => getComplaintsList(psblState),
|
queryFn: () => getComplaintsList(psblState),
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
console.log("dataState", dataState);
|
|
||||||
console.log("psblState", psblState);
|
|
||||||
console.log("data", data);
|
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
// // Handle the data after it has been updated
|
// // Handle the data after it has been updated
|
||||||
// console.log(data);
|
|
||||||
// }, [data]);
|
// }, [data]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,6 @@ export default function TableController({
|
||||||
reader.onload = (e) => {
|
reader.onload = (e) => {
|
||||||
const contents = e?.target?.result;
|
const contents = e?.target?.result;
|
||||||
setSelectedFile(contents);
|
setSelectedFile(contents);
|
||||||
console.log(contents);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,9 @@ dEqG/38xFdYTFEekexcHnT/Vt1MW4/j76vBJHYWuAJU=
|
||||||
try {
|
try {
|
||||||
const decryptor = new JSEncrypt();
|
const decryptor = new JSEncrypt();
|
||||||
decryptor.setPrivateKey(privateKey);
|
decryptor.setPrivateKey(privateKey);
|
||||||
console.log(decryptor);
|
|
||||||
console.log(privateKey);
|
|
||||||
console.log(encryptedData);
|
|
||||||
const decrypted = decryptor.decrypt(
|
const decrypted = decryptor.decrypt(
|
||||||
"FLjMFDdOUjeJDhBdTXjqkKDx81H6gWwXxvx0sQHTgDFiUoggMwCoJbn+eruMdjnppksh8zhm3rUPCIKeWe6SEuw1PX1MaKpDvZd7wNphKgWb6pLafTQTxsB0eLmTurYHkvtOyJkMHhdRravaEeoGSKmMeC9G2ahYpVYgobicBAU="
|
"FLjMFDdOUjeJDhBdTXjqkKDx81H6gWwXxvx0sQHTgDFiUoggMwCoJbn+eruMdjnppksh8zhm3rUPCIKeWe6SEuw1PX1MaKpDvZd7wNphKgWb6pLafTQTxsB0eLmTurYHkvtOyJkMHhdRravaEeoGSKmMeC9G2ahYpVYgobicBAU="
|
||||||
);
|
);
|
||||||
console.log(decrypted);
|
|
||||||
setDecryptedData(decrypted);
|
setDecryptedData(decrypted);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue