mirror of
https://github.com/WDI-Ideas/rubix-admin-panel.git
synced 2026-04-27 17:45:50 +00:00
updated
This commit is contained in:
11
index.html
11
index.html
@@ -9,5 +9,16 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
<script>
|
||||
|
||||
const craftedMsg = "Crafted with ❤️ by WDI Team for a better web.";
|
||||
const websiteMsg = "Website: www.wdipl.com";
|
||||
|
||||
const craftedStyles = 'font-size: 16px; font-family: monospace; background: #000; color: #E5195E; padding: 12px 19px; border: 1.8px dashed; border-right: 0px #000 solid';
|
||||
const websiteStyles = 'font-size: 16px; font-family: monospace; background: #E5195E; color: #000; padding: 12px 19px; border: 1.8px dashed #000; border-left: 0px #000 solid';
|
||||
console.log('%c' + craftedMsg + ' %c' + websiteMsg, craftedStyles, websiteStyles);
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -51,7 +51,6 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => {
|
||||
const formData = watch();
|
||||
|
||||
const onSubmit = async (data) => {
|
||||
console.log(data);
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const formData = new FormData();
|
||||
@@ -237,18 +236,18 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => {
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
errorBorderColor="crimson"
|
||||
isInvalid={formData?.sub_heading.length > 230}
|
||||
isInvalid={formData?.sub_heading?.length > 230}
|
||||
/>
|
||||
|
||||
<FormHelperText
|
||||
color={
|
||||
formData?.sub_heading.length > 230
|
||||
formData?.sub_heading?.length > 230
|
||||
? "red"
|
||||
: "gray.500"
|
||||
}
|
||||
className="web-text-small"
|
||||
>
|
||||
If sub heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.sub_heading.length} characters
|
||||
If sub heading crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.sub_heading?.length} characters
|
||||
</FormHelperText>
|
||||
{errors.sub_heading && (
|
||||
<span className="text-danger web-text-small fw-bold ps-2 d-flex align-items-center gap-1 mt-1">
|
||||
@@ -268,17 +267,17 @@ const AddBanner = ({ createApi, navigateLink, title, center }) => {
|
||||
className="web-text-medium"
|
||||
size="sm"
|
||||
errorBorderColor="crimson"
|
||||
isInvalid={formData?.CTO_button_title.length > 30}
|
||||
isInvalid={formData?.CTO_button_title?.length > 30}
|
||||
/>
|
||||
<FormHelperText
|
||||
color={
|
||||
formData?.CTO_button_title.length > 30
|
||||
formData?.CTO_button_title?.length > 30
|
||||
? "red"
|
||||
: "gray.500"
|
||||
}
|
||||
className="web-text-small"
|
||||
>
|
||||
If Button title crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.CTO_button_title.length} characters
|
||||
If Button title crosses 50 characters it will cause problem in alignment on website.you have entered {formData?.CTO_button_title?.length} characters
|
||||
</FormHelperText>
|
||||
|
||||
{errors.CTO_button_title && (
|
||||
|
||||
@@ -106,13 +106,12 @@ const BannerEdit = ({isLoading, data, updateBanner, navigateTo, refetch, center}
|
||||
form.append("banner_image", formData.banner_image[0]);
|
||||
}
|
||||
if (formData?.banner_image === data?.data?.banner_image) {
|
||||
console.log("hit");
|
||||
form.delete("banner_image");
|
||||
}
|
||||
// Log the FormData entries
|
||||
for (const [key, value] of form.entries()) {
|
||||
console.log(`${key}: ${value}`);
|
||||
}
|
||||
// for (const [key, value] of form.entries()) {
|
||||
// console.log(`${key}: ${value}`);
|
||||
// }
|
||||
const mutationResult = await updateBanner({ id: id, data: form })
|
||||
.then((response) => {
|
||||
// Handle the response here
|
||||
|
||||
@@ -5,7 +5,6 @@ import { TiWarning } from "react-icons/ti";
|
||||
const ChipSelector = ({chips, setChips}) => {
|
||||
const [text, setText] = useState("");
|
||||
const [validationError, setValidationError] = useState("");
|
||||
console.log(chips);
|
||||
|
||||
function removeChip(chipToRemove) {
|
||||
const updatedChips = chips.filter((chip, index) => index !== chipToRemove);
|
||||
|
||||
@@ -37,7 +37,6 @@ const TabularView = ({
|
||||
}
|
||||
};
|
||||
|
||||
console.log(apiData?.data?.data);
|
||||
|
||||
const paginationNext = () => {
|
||||
const totalPage = Math.ceil(totalPages / pageSize);
|
||||
|
||||
@@ -5,7 +5,6 @@ import BannerView from "../../../Components/Banner/BannerView";
|
||||
|
||||
const BannerLearnView = () => {
|
||||
const { id } = useParams();
|
||||
console.log(id);
|
||||
const { data, error, isLoading } = useGetLearnBannerByIdQuery(id);
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ const BannerNews = () => {
|
||||
const [deleteNewsBanner] = useDeleteNewsBannerMutation();
|
||||
const [updateNewsBuildStatus] = useUpdateNewsBannerStatusMutation();
|
||||
const { data, error, isLoading } = useUpdateNewsBannerStatusMutation();
|
||||
console.log({ data, error, isLoading });
|
||||
return (
|
||||
<BannerTable
|
||||
addLink={"/banner/news/add-banner"}
|
||||
|
||||
@@ -5,7 +5,6 @@ import BannerView from "../../../Components/Banner/BannerView";
|
||||
|
||||
const BannerNewsView = () => {
|
||||
const { id } = useParams();
|
||||
console.log(id);
|
||||
const { data, error, isLoading } = useGetNewsBannerByIdQuery(id);
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import BannerView from "../../../Components/Banner/BannerView";
|
||||
|
||||
const EcoBannerView = () => {
|
||||
const { id } = useParams();
|
||||
console.log(id);
|
||||
const { data, error, isLoading } = useGetEcoBannerByIdQuery(id);
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import BannerView from "../../../Components/Banner/BannerView";
|
||||
|
||||
const HomeBannerView = () => {
|
||||
const { id } = useParams();
|
||||
console.log(id);
|
||||
const { data, error, isLoading } = useGetHomeBannerByIdQuery(id);
|
||||
|
||||
|
||||
|
||||
@@ -61,10 +61,8 @@ const AddBlogsAndArticles = () => {
|
||||
resolver: yupResolver(addBlogSchema),
|
||||
});
|
||||
|
||||
console.log(errors);
|
||||
|
||||
const onSubmit = async (data) => {
|
||||
console.log(data);
|
||||
setYupFormValue('content', value)
|
||||
const formData = new FormData();
|
||||
formData.append("author_name", data.author_name);
|
||||
|
||||
@@ -103,7 +103,6 @@ const BlogsAndArticles = () => {
|
||||
.then((response) => {
|
||||
console.log(response?.data);
|
||||
if (response?.data?.statusCode === 201) {
|
||||
console.log("toasted");
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox
|
||||
|
||||
@@ -48,7 +48,6 @@ const EditBlogsAndArticles = () => {
|
||||
const [smallImageData, setSmallImageData] = useState({});
|
||||
const [chips, setChips] = useState();
|
||||
|
||||
console.log(blog?.tags?.map((tagObject) => tagObject.tag));
|
||||
|
||||
const [valueQuill, setValueQuill] = useState(blog?.content);
|
||||
|
||||
@@ -74,7 +73,6 @@ const EditBlogsAndArticles = () => {
|
||||
},
|
||||
});
|
||||
|
||||
console.log(blog?.tags);
|
||||
|
||||
useEffect(() => {
|
||||
if (data?.data) {
|
||||
@@ -96,7 +94,6 @@ const EditBlogsAndArticles = () => {
|
||||
}, [data, blog, setValue]);
|
||||
|
||||
const onSubmit = async (data) => {
|
||||
console.log(data);
|
||||
const formData = new FormData();
|
||||
formData.append("author_name", data.author_name);
|
||||
formData.append("author_designation", data.author_designation);
|
||||
@@ -196,7 +193,6 @@ const EditBlogsAndArticles = () => {
|
||||
}
|
||||
};
|
||||
|
||||
console.log(chips);
|
||||
|
||||
if (isLoading) {
|
||||
return <FullscreenLoaders />;
|
||||
|
||||
@@ -118,7 +118,6 @@ const Community = () => {
|
||||
.then((response) => {
|
||||
console.log(response?.data);
|
||||
if (response?.data?.statusCode === 201) {
|
||||
console.log("toasted");
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={response?.data?.message} />
|
||||
|
||||
@@ -6,9 +6,7 @@ import { Box, Container, SimpleGrid, Text } from '@chakra-ui/react';
|
||||
|
||||
const CommunityCardDisplay = () => {
|
||||
const community = useGetCommunityQuery();
|
||||
console.log(community.data?.data?.rows);
|
||||
const communityData = community.data?.data?.rows
|
||||
console.log(communityData);
|
||||
return (
|
||||
<Box rounded={4} backgroundColor={"#101015"}>
|
||||
<Container
|
||||
|
||||
@@ -83,7 +83,6 @@ const ComunityEditPage = () => {
|
||||
form.append("profile_image", formData.profile_image[0]);
|
||||
}
|
||||
if (formData?.profile_image === data?.data?.profile_image) {
|
||||
console.log("hit");
|
||||
form.delete("profile_image");
|
||||
}
|
||||
await updateCommunity({ id: id, data: form })
|
||||
|
||||
@@ -14,7 +14,6 @@ const ComunityViewPage = () => {
|
||||
const { id } = useParams();
|
||||
const { data, error, isLoading } = useGetCommunityByIdQuery(id);
|
||||
|
||||
console.log(data);
|
||||
|
||||
return isLoading ? (
|
||||
<FullscreenLoaders />
|
||||
|
||||
@@ -79,7 +79,6 @@ const EditEvents = () => {
|
||||
}
|
||||
}, [data, setValue]);
|
||||
|
||||
console.log(selectedImage);
|
||||
|
||||
|
||||
|
||||
@@ -99,7 +98,6 @@ const EditEvents = () => {
|
||||
|
||||
|
||||
const onSubmit = (data) => {
|
||||
console.log(data);
|
||||
setIsLoadingEdit(true);
|
||||
const formData = new FormData();
|
||||
formData.append("title", data.title);
|
||||
@@ -149,7 +147,6 @@ const EditEvents = () => {
|
||||
// Handle error notification if needed
|
||||
});
|
||||
|
||||
console.log(res);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ const Events = () => {
|
||||
|
||||
// ====================================================[Functions]===================================================================
|
||||
const handleDelete = async (id) => {
|
||||
console.log(id);
|
||||
try {
|
||||
// Trigger the mutation
|
||||
setDeleteIsLoading(true);
|
||||
|
||||
@@ -13,7 +13,6 @@ const ViewEvents = () => {
|
||||
const navigate = useNavigate();
|
||||
const { data, error, isLoading } = useGetEventsByIdQuery(id);
|
||||
const events = data?.data;
|
||||
console.log(events);
|
||||
if (isLoading) {
|
||||
return <FullscreenLoaders />;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import React from "react";
|
||||
import { OPACITY_ON_LOAD } from "../../Layout/animations";
|
||||
import { Box } from "@chakra-ui/react";
|
||||
import { Box, Text } from "@chakra-ui/react";
|
||||
import Header from "../../Components/Header";
|
||||
|
||||
import { FaInstagram } from "react-icons/fa";
|
||||
import { FaFacebook } from "react-icons/fa";
|
||||
|
||||
const HelpAndSupport = () => {
|
||||
return (
|
||||
<Box
|
||||
@@ -12,6 +15,71 @@ const HelpAndSupport = () => {
|
||||
height={"100vh"}
|
||||
>
|
||||
<Header title={"Help And Support"} />
|
||||
<Box pt={2}>
|
||||
<Text className="web-text-large fw-bold text-secondary">
|
||||
Follow us on social!
|
||||
</Text>
|
||||
<Box display={"flex "} alignItems={"center"} gap={2} p={2} ps={0}>
|
||||
<FaInstagram
|
||||
style={{ color: "#EB2C33" }}
|
||||
className="web-text-xlarge fw-bold "
|
||||
/>{" "}
|
||||
<Text
|
||||
as={"span"}
|
||||
bgGradient="linear(to-l, #7928CA, #FF0080)"
|
||||
bgClip="text"
|
||||
fontSize="md"
|
||||
fontWeight="extrabold"
|
||||
>
|
||||
Instagram
|
||||
</Text>
|
||||
</Box>
|
||||
|
||||
<Box display={"flex "} alignItems={"center"} gap={2} p={2} ps={0}>
|
||||
<FaFacebook
|
||||
style={{ color: "#1877F2" }}
|
||||
className="web-text-xlarge fw-bold"
|
||||
/>{" "}
|
||||
<Text
|
||||
fontSize="lg"
|
||||
as={"span"}
|
||||
style={{ color: "#1877F2" }}
|
||||
className=" fw-bold"
|
||||
>
|
||||
{" "}
|
||||
facebook
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Box pt={2}>
|
||||
<Text as={'span'} className="web-text-large fw-bold text-secondary">
|
||||
General Inquiries
|
||||
</Text>
|
||||
<Box display={"flex "} alignItems={"center"} gap={2} p={2} ps={0}>
|
||||
<Text
|
||||
as={"span"}
|
||||
fontSize="sm"
|
||||
>
|
||||
ideas@wdipl.com
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
|
||||
<Box display={"flex "} alignItems={"center"} mt={8} p={2} ps={0}>
|
||||
<Text
|
||||
as={"span"}
|
||||
fontSize="sm"
|
||||
className="text-secondary"
|
||||
>
|
||||
Rubix v1.0.0
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -92,9 +92,9 @@ const EditWhitepaper = () => {
|
||||
form.append("image", data?.image[0]);
|
||||
}
|
||||
// Log formData entries
|
||||
for (let [key, value] of form.entries()) {
|
||||
console.log(`${key}: ${value}`);
|
||||
}
|
||||
// for (let [key, value] of form.entries()) {
|
||||
// console.log(`${key}: ${value}`);
|
||||
// }
|
||||
|
||||
await updateWhitepaper({ id: id, data: form })
|
||||
.then((response) => {
|
||||
|
||||
@@ -15,7 +15,6 @@ const ViewWhitePaper = () => {
|
||||
const navigate = useNavigate();
|
||||
const { data, error, isLoading } = useGetWhitepaperByIdQuery(id);
|
||||
const whitepaper = data?.data?.data;
|
||||
console.log(whitepaper?.document);
|
||||
|
||||
if (isLoading) {
|
||||
return <FullscreenLoaders />;
|
||||
|
||||
@@ -102,7 +102,6 @@ const AddUseCase = () => {
|
||||
// Log and append file attachments
|
||||
if (data.attachment && data.attachment.length > 0) {
|
||||
Array.from(data.attachment).forEach((file, index) => {
|
||||
console.log(`attachment[${index}]: ${file.name}`);
|
||||
formData.append("attachment", file);
|
||||
});
|
||||
}
|
||||
@@ -546,7 +545,7 @@ const AddUseCase = () => {
|
||||
className="web-text-medium form-control rounded-1"
|
||||
size="sm"
|
||||
multiple={true}
|
||||
onChange={(e)=> console.log(e.target.value)}
|
||||
// onChange={(e)=> console.log(e.target.value)}
|
||||
/>
|
||||
<FormHelperText className="web-text-small">
|
||||
You can select multiple documents using <span className="text-dark">
|
||||
|
||||
@@ -91,7 +91,6 @@ const EditUseCase = () => {
|
||||
}, [data, blog, setValue]);
|
||||
|
||||
const onSubmit = async (data) => {
|
||||
console.log(data);
|
||||
const formData = new FormData();
|
||||
formData.append("meta_description", data.meta_description);
|
||||
formData.append("title", data.title);
|
||||
|
||||
@@ -88,7 +88,6 @@ const Usecase = () => {
|
||||
// Trigger the mutation
|
||||
await updateUsecaseStatus({ id })
|
||||
.then((response) => {
|
||||
console.log(response?.data);
|
||||
if (response?.data?.statusCode === 201) {
|
||||
toast({
|
||||
render: () => (
|
||||
|
||||
Reference in New Issue
Block a user