Compare commits
No commits in common. "d10cf03f989e25b82316f1a79af7482d139e629f" and "d97c13b5656359320667a2fa474a957be2401fcd" have entirely different histories.
d10cf03f98
...
d97c13b565
|
|
@ -139,6 +139,8 @@ export default function AdminCategories() {
|
|||
mutationKey: ["ChangeCat"],
|
||||
mutationFn: UpdateCategory,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
setOpenEdit(false);
|
||||
|
||||
refetch1();
|
||||
|
|
@ -159,6 +161,8 @@ export default function AdminCategories() {
|
|||
mutationKey: ["DeleteCat"],
|
||||
mutationFn: DeleteCategory,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
setOpenEdit(false);
|
||||
refetch1();
|
||||
toast("عملیات شما با موفقیت انجام شد. ", {
|
||||
|
|
@ -178,6 +182,8 @@ export default function AdminCategories() {
|
|||
mutationKey: ["AddCat"],
|
||||
mutationFn: SubmitCategory,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
setOpenAdd(false);
|
||||
|
||||
refetch1();
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ export default function AdminKeysManagement() {
|
|||
mutationKey: ["ChangeKey"],
|
||||
mutationFn: ChangeKey,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
// alert("Success");
|
||||
console.log("Success ChangeKey");
|
||||
setOpenEdit(false);
|
||||
|
||||
toast("عملیات شما با موفقیت انجام شد. ", {
|
||||
|
|
@ -144,6 +147,9 @@ export default function AdminKeysManagement() {
|
|||
mutationKey: ["AddKey"],
|
||||
mutationFn: AddKey,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success AddKey");
|
||||
|
||||
setOpenAdd(false);
|
||||
|
||||
refetch1();
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ export default function AdminNews() {
|
|||
image: string
|
||||
) => {
|
||||
// Set state variables
|
||||
console.log(id);
|
||||
setKeyId(id);
|
||||
setTitleNews(title);
|
||||
setDescNews(description);
|
||||
|
|
@ -229,6 +230,8 @@ export default function AdminNews() {
|
|||
mutationKey: ["ChangeNews"],
|
||||
mutationFn: UpdateNews,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success Change News");
|
||||
setOpenEdit(false);
|
||||
|
||||
refetch1();
|
||||
|
|
@ -249,6 +252,8 @@ export default function AdminNews() {
|
|||
mutationKey: ["DeleteNews"],
|
||||
mutationFn: DeleteNews,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success Change News");
|
||||
setOpenEdit(false);
|
||||
refetch1();
|
||||
toast("عملیات شما با موفقیت انجام شد. ", {
|
||||
|
|
@ -306,6 +311,8 @@ export default function AdminNews() {
|
|||
resetField("Url");
|
||||
resetField("Description");
|
||||
resetField("Content");
|
||||
|
||||
console.log(data);
|
||||
}
|
||||
const { resetField } = useForm();
|
||||
|
||||
|
|
@ -321,6 +328,8 @@ export default function AdminNews() {
|
|||
}
|
||||
|
||||
AddNewsMutation.mutate(formData);
|
||||
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -142,6 +142,8 @@ export default function AdminOrganizations() {
|
|||
mutationKey: ["ChangeOrg"],
|
||||
mutationFn: UpdateOrganization,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
setOpenEdit(false);
|
||||
|
||||
refetch1();
|
||||
|
|
@ -162,6 +164,8 @@ export default function AdminOrganizations() {
|
|||
mutationKey: ["DeleteOrg"],
|
||||
mutationFn: DeleteOrganization,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
setOpenEdit(false);
|
||||
refetch1();
|
||||
toast("عملیات شما با موفقیت انجام شد. ", {
|
||||
|
|
@ -181,6 +185,8 @@ export default function AdminOrganizations() {
|
|||
mutationKey: ["AddOrg"],
|
||||
mutationFn: SubmitOrganization,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
setOpenAdd(false);
|
||||
|
||||
refetch1();
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ export default function AdminSlider() {
|
|||
queryFn: () => GetAllSliders(),
|
||||
// refetchOnWindowFocus: false,
|
||||
});
|
||||
console.log(data1);
|
||||
|
||||
// Edit
|
||||
const handleClickEdit = (
|
||||
|
|
@ -201,6 +202,8 @@ const ChangeSliderMutation = useMutation({
|
|||
mutationKey: ["ChangeSlider"],
|
||||
mutationFn: UpdateSlider,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success Change Slider");
|
||||
setOpenEdit(false);
|
||||
|
||||
refetch1();
|
||||
|
|
@ -221,6 +224,8 @@ const DeleteSliderMutation = useMutation({
|
|||
mutationKey: ["DeleteSlider"],
|
||||
mutationFn: DeleteSlider,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success Change Slider");
|
||||
setOpenEdit(false);
|
||||
refetch1();
|
||||
toast("عملیات شما با موفقیت انجام شد. ", {
|
||||
|
|
@ -240,6 +245,8 @@ const AddSliderMutation = useMutation({
|
|||
mutationKey: ["AddSlider"],
|
||||
mutationFn: SubmitSlider,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success Change Slider");
|
||||
setOpenAdd(false);
|
||||
|
||||
refetch1();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,9 @@ export default function AdminWebContents() {
|
|||
mutationKey: ["AddWebContents"],
|
||||
mutationFn: SubmitWebContents,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success ChangeCat");
|
||||
|
||||
setContentValueCall("");
|
||||
setContentValueAbout("");
|
||||
setContentValueAfter("");
|
||||
|
|
@ -138,6 +141,8 @@ export default function AdminWebContents() {
|
|||
mutationKey: ["EditWebContents"],
|
||||
mutationFn: UpdateWebContents,
|
||||
onSuccess: (res) => {
|
||||
console.log(res);
|
||||
console.log("Success Change UpdateWebContents");
|
||||
|
||||
toast("عملیات ویرایش شما با موفقیت انجام شد . ", {
|
||||
className: "!bg-green-500 !text-white",
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ export default function InspectorOperations({
|
|||
placeholder="متن خود را وارد نمایید"
|
||||
className="resize-none bg-white lg:min-h-[20em]"
|
||||
{...field}
|
||||
disabled={possibleOperations.length == 0}
|
||||
/>
|
||||
</FormControl>
|
||||
{/* <FormDescription>
|
||||
|
|
@ -165,10 +164,10 @@ export default function InspectorOperations({
|
|||
type="file"
|
||||
onChange={(e) => {
|
||||
field.onChange(e.target.files ? e.target.files : null);
|
||||
console.log(e.target.files);
|
||||
}}
|
||||
multiple
|
||||
className="bg-white "
|
||||
disabled={possibleOperations.length == 0}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
|
@ -189,13 +188,13 @@ export default function InspectorOperations({
|
|||
>
|
||||
<FormItem className="flex items-center space-x-3 space-y-0">
|
||||
<FormControl>
|
||||
<RadioGroupItem value="private" className="ml-2 " disabled={possibleOperations.length == 0}/>
|
||||
<RadioGroupItem value="private" className="ml-2 " />
|
||||
</FormControl>
|
||||
<FormLabel className="font-normal">خصوصی</FormLabel>
|
||||
</FormItem>
|
||||
<FormItem className="flex items-center space-x-3 space-y-0">
|
||||
<FormControl>
|
||||
<RadioGroupItem value="public" className="ml-2 " disabled={possibleOperations.length == 0}/>
|
||||
<RadioGroupItem value="public" className="ml-2 " />
|
||||
</FormControl>
|
||||
<FormLabel className="font-normal">عمومی</FormLabel>
|
||||
</FormItem>
|
||||
|
|
@ -223,7 +222,6 @@ export default function InspectorOperations({
|
|||
<SelectTrigger
|
||||
className=" bg-white h-10 !placeholder:text-xs text-xs"
|
||||
dir="rtl"
|
||||
disabled={possibleOperations.length == 0}
|
||||
>
|
||||
<SelectValue
|
||||
className="text-xs "
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ export default function LineChart({
|
|||
anchor: "end",
|
||||
font: { size: 12 },
|
||||
formatter: function (value, context) {
|
||||
console.log(context.dataset);
|
||||
return value == 0 ? "" : value;
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default function Pagination({
|
|||
length?: any;
|
||||
}) {
|
||||
const handlePageClick = (event: any) => {
|
||||
console.log(event.selected);
|
||||
Page(event.selected);
|
||||
};
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ export default function Pagination({
|
|||
previousLabel={<MdKeyboardArrowRight className="w-5 h-5 " />}
|
||||
pageClassName=" w-10 h-10 grid place-content-center rounded-lg !text-blue shadow-md"
|
||||
className={twMerge(
|
||||
" flex flex-wrap gap-3 text-sm md:text-base w-full rounded-md p-1 bg-white/30 backdrop-blur-lg justify-center text-blue mt-5 absolute left-0 right-0 bottom-6"
|
||||
" flex flex-wrap gap-3 text-sm md:text-base w-full bottom-0 rounded-md p-1 bg-white/30 backdrop-blur-lg justify-center text-blue mt-5"
|
||||
)}
|
||||
activeClassName=" bg-blue text-blue shadow-md shadow-main"
|
||||
activeLinkClassName=" text-white w-full p-1 h-full"
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ export default function TabController() {
|
|||
const [search, setSearch] = useState<any>(null);
|
||||
const [page, setPage] = useState<any>(1);
|
||||
const [totalCount, setTotalCount] = useState<any>(0);
|
||||
const [currentPage, setCurrentPage] = useState<any>(0);
|
||||
const [pageSize, setPageSize] = useState<any>(0);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const [psblState, setPsblState] = useState(0);
|
||||
|
|
@ -66,8 +63,6 @@ export default function TabController() {
|
|||
if (data) {
|
||||
const headersData = JSON.parse(data.headers["x-pagination"]);
|
||||
setTotalCount(headersData.TotalCount);
|
||||
setCurrentPage(headersData.CurrentPage);
|
||||
setPageSize(headersData.PageSize);
|
||||
}
|
||||
}, [data]);
|
||||
useEffect(() => {
|
||||
|
|
@ -136,8 +131,6 @@ export default function TabController() {
|
|||
{data ? (
|
||||
<TableController
|
||||
data={data?.data}
|
||||
currentPage ={currentPage}
|
||||
pageSize ={pageSize}
|
||||
/>
|
||||
) : (
|
||||
<div className="flex flex-col gap-3">
|
||||
|
|
|
|||
|
|
@ -51,17 +51,8 @@ interface Complaint {
|
|||
lastActor: number;
|
||||
cipherKeyInspector: string;
|
||||
}
|
||||
export default function TableController({
|
||||
data,
|
||||
pageSize,
|
||||
currentPage
|
||||
}: {
|
||||
data: Complaint[];
|
||||
pageSize: number;
|
||||
currentPage: number;
|
||||
}) {
|
||||
export default function TableController({ data }: { data: Complaint[] }) {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Table className="border-[1px] border-solid border-muted rounded-md w-full min-w-[40rem] overflow-y-auto scrollbar-thumb-gray-600 scrollbar-track-gray-100 scrollbar-thin">
|
||||
|
|
@ -90,7 +81,7 @@ export default function TableController({
|
|||
key={item.id}
|
||||
>
|
||||
<TableCell className="w-1/12 font-medium ">
|
||||
{pageSize * (currentPage - 1) + (index + 1)}
|
||||
{index + 1}
|
||||
</TableCell>
|
||||
<TableCell className="w-1/12">{item.trackingNumber}</TableCell>
|
||||
<TableCell className="w-2/12">
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ export default function Verify() {
|
|||
otpToken: localStorage.getItem("verificationToken"),
|
||||
verificationCode: otp,
|
||||
};
|
||||
console.log(userData);
|
||||
verifyMutation.mutate(payload);
|
||||
}
|
||||
}, [otp]);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ function BarChart({
|
|||
// var value2 = chartData[1].values.map((item) => Number(item.value));
|
||||
// DataSets.push({ label: label1, data: value1 });
|
||||
// DataSets.push({ label: label2, data: value2 });
|
||||
|
||||
// // console.log(labels);
|
||||
// // console.log(value1);
|
||||
// } else if ("گزارش تعداد درخواست ها بر اساس نوع بیمه") {
|
||||
// var labels = chartData[0].values.map((item) => {
|
||||
// return item.title;
|
||||
|
|
@ -78,8 +79,9 @@ function BarChart({
|
|||
// var label1 = "";
|
||||
// var value1 = chartData[0].values.map((item) => Number(item.value));
|
||||
// DataSets.push({ label: label1, data: value1 });
|
||||
|
||||
// console.log(value1);
|
||||
// }
|
||||
console.log(chartData);
|
||||
const options: ChartOptions<"bar"> = {
|
||||
scales: { x: { ticks: { autoSkip: false } }, y: { stacked: false } },
|
||||
responsive: true,
|
||||
|
|
@ -110,10 +112,12 @@ function BarChart({
|
|||
// // suggestedMax:
|
||||
// // Math.max(
|
||||
// // ...chartData.map((l, j) => {
|
||||
// // console.log(l);
|
||||
// // const a = l.values.map((v) => {
|
||||
// // return Number(v.value);
|
||||
// // });
|
||||
// // const b = Math.max(...a);
|
||||
// // console.log(b);
|
||||
// // return l.values.map((v) => Number(v.value));
|
||||
// // })
|
||||
// // ) * 1.2,
|
||||
|
|
@ -136,6 +140,7 @@ function BarChart({
|
|||
};
|
||||
}),
|
||||
};
|
||||
// console.log(data);
|
||||
return (
|
||||
<Bar dir="rtl" className="min-h-[20rem]" options={options} data={data} />
|
||||
);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ dEqG/38xFdYTFEekexcHnT/Vt1MW4/j76vBJHYWuAJU=
|
|||
);
|
||||
setDecryptedData(decrypted);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
setError(error);
|
||||
}
|
||||
}, [encryptedData]);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ axios.interceptors.response.use(
|
|||
return response;
|
||||
},
|
||||
async function (error) {
|
||||
console.log(error);
|
||||
const originalRequest = error.config;
|
||||
|
||||
if (error.response.status === 401) {
|
||||
|
|
|
|||
|
|
@ -10,11 +10,13 @@ export async function getCategory() {
|
|||
// Get Captcha
|
||||
export async function getCaptcha() {
|
||||
const data = await axios.get("api/Common/Captcha", { responseType: "blob" });
|
||||
console.log(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
// Get Captcha
|
||||
export async function getContents() {
|
||||
const data = await axios.get("api/Common/Contents");
|
||||
console.log(data);
|
||||
return data.data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue