Commit 1f47f486 by jaymehta
2 parents b4043d26 fb9081c5
...@@ -11,12 +11,10 @@ const GiftcardListing = () => { ...@@ -11,12 +11,10 @@ const GiftcardListing = () => {
return ( return (
<Fragment> <Fragment>
<div className="row"> <div className="p-5">
<div className="col-12 col-lg-12">
<div className="rightContent">
<div className="d-flex align-items-center justify-content-between px-2 mb-2"> <div className="d-flex align-items-center justify-content-between px-2 mb-2">
<div> <div>
<h2>Gift Card Requests</h2> <h2 style={{ fontSize: 28 }}>Gift Card Requests</h2>
<p>View all the gift cards</p> <p>View all the gift cards</p>
</div> </div>
<div> <div>
...@@ -86,8 +84,6 @@ const GiftcardListing = () => { ...@@ -86,8 +84,6 @@ const GiftcardListing = () => {
</tbody> </tbody>
</Table> </Table>
</div> </div>
</div>
</div>
</Fragment> </Fragment>
); );
}; };
......
...@@ -184,7 +184,7 @@ const Reviews = ({ isVendor }) => { ...@@ -184,7 +184,7 @@ const Reviews = ({ isVendor }) => {
return ( return (
<Fragment> <Fragment>
<div className="row"> <div className="p-5">
{!showReviews ? <Table columns={columns} dataSource={data} /> : <ReviewsListing setshowReviews={setshowReviews} activityId={activityId} isVendor={isVendor} />} {!showReviews ? <Table columns={columns} dataSource={data} /> : <ReviewsListing setshowReviews={setshowReviews} activityId={activityId} isVendor={isVendor} />}
</div> </div>
</Fragment> </Fragment>
......
...@@ -182,6 +182,7 @@ const VendorListing = () => { ...@@ -182,6 +182,7 @@ const VendorListing = () => {
return ( return (
<Fragment> <Fragment>
<div className="p-5">
<div className={restriction ? "overlay" : ""}> <div className={restriction ? "overlay" : ""}>
{restriction ? ( {restriction ? (
<div className="d-flex justify-content-center align-items-center" style={{ color: "#FFF", fontSize: "50px", height: "100%" }}> <div className="d-flex justify-content-center align-items-center" style={{ color: "#FFF", fontSize: "50px", height: "100%" }}>
...@@ -199,6 +200,7 @@ const VendorListing = () => { ...@@ -199,6 +200,7 @@ const VendorListing = () => {
</div> </div>
)} )}
</div> </div>
</div>
</Fragment> </Fragment>
// <Fragment> // <Fragment>
// {!showVendorDetails && ( // {!showVendorDetails && (
......
...@@ -81,7 +81,7 @@ const GiftCard = () => { ...@@ -81,7 +81,7 @@ const GiftCard = () => {
<div className="col-md-5"> <div className="col-md-5">
<div className="gift-card-lt"> <div className="gift-card-lt">
<div className="gift-box"> <div className="gift-box">
<img src="/images/zango-logo.svg" alt="Gift Card" /> <img src="/images/gift-card.svg" alt="Gift Card" />
</div> </div>
<h3>Amount: ${amount}</h3> <h3>Amount: ${amount}</h3>
</div> </div>
......
...@@ -37,7 +37,7 @@ const Footer = () => { ...@@ -37,7 +37,7 @@ const Footer = () => {
<div className="col-md-9"> <div className="col-md-9">
<div className="footer-logo"> <div className="footer-logo">
<span className="image-container"> <span className="image-container">
<Image layout="fill" className="image img-fluid" alt="" src="/images/Zango-logo-footer.svg" /> <Image layout="fill" className="image img-fluid" alt="" src="/images/Footer-logo.svg" />
</span> </span>
</div> </div>
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor </div> <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor </div>
......
import { Avatar, Skeleton } from "antd";
import Image from "next/image"
import { useRouter } from "next/router";
import { signOut } from "next-auth/react";
import { UserOutlined } from '@ant-design/icons';
export const GenericHeader = ({ venderBusiness, venderEmail, adminName, adminEmail, isRoute }) => {
const router = useRouter();
const VenderDetails = () => {
return <div>
{!venderBusiness && !venderEmail ?
<div className="d-flex align-items-center gap-2">
<Skeleton.Image active style={{ height: 50, width: 70 }} />
<Skeleton.Button active style={{ height: 40, width: 190 }} shape={"rounded"} />
</div>
:
<div className="d-flex align-items-center gap-3">
<Skeleton.Image style={{ height: 50, width: 70 }} />
<div className="d-flex flex-column">
<p className="m-0">{venderBusiness}</p>
<p className="m-0">{venderEmail}</p>
</div>
</div>
}
</div>
}
const AdminDetails = () => {
return <div>
{!adminName && !adminEmail ?
<div className="d-flex align-items-center gap-2">
<Skeleton.Avatar active size={40} />
<Skeleton.Button active style={{ height: 40, width: 190 }} shape={"rounded"} />
</div>
:
<div className="d-flex align-items-center gap-3">
<Avatar icon={<UserOutlined />} active size={40} />
<div className="d-flex flex-column">
<p className="m-0">{adminName}</p>
<p className="m-0">{adminEmail}</p>
</div>
</div>
}
</div>
}
return (
<div
className="bg-light px-5 d-flex align-items-center justify-content-between w-100"
style={{
height: 80,
boxshadow: '0px 1px 9px -3px rgba(0,0,0,0.56)',
'-webkit-box-shadow': '0px 1px 9px -3px rgba(0,0,0,0.56)',
'-moz-box-shadow': '0px 4px 1px -3px rgba(0,0,0,0.56)'
}}
>
<Image loading="lazy" objectFit="contain" height={50} width={100} alt="" className="" src="/images/main-logo.svg" />
<div className="d-flex align-items-center gap-5">
{isRoute === 'vendor' && <VenderDetails />}
{isRoute === 'admin' && <AdminDetails />}
<button
className="btn btn-primary rounded-pill"
style={{ height: 40 }}
onClick={async () => {
signOut({ redirect: false });
await router.push("/");
window.location.reload();
}}
>
Logout
</button>
</div>
</div>
)
}
\ No newline at end of file \ No newline at end of file
import { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { loadUser } from "../../../redux/actions/userActions";
import { getVendorDetails } from "../../../redux/actions/vendorActions";
import { GenericHeader } from "./GenericHeader";
import { GenericSidebar } from "./GenericSidebar";
import { getActivitiesForAdmin } from "../../../redux/actions/activityAction";
import { useRouter } from "next/router";
export const GenericLayout = ({ children }) => {
const dispatch = useDispatch();
const router = useRouter();
const [isRoute, setIsRoute] = useState("");
useEffect(() => {
const adminUri = router.pathname.includes('admin');
const vendorUri = router.pathname.includes('vendor');
setIsRoute(adminUri ? 'admin' : vendorUri ? 'vendor' : '');
console.log('isRoute:', isRoute);
}, [router.pathname]);
useEffect(() => {
dispatch(loadUser());
dispatch(getVendorDetails());
dispatch(getActivitiesForAdmin({}));
}, []);
const { vendorDetails } = useSelector(state => state.vendorDetails);
const { loadedUser } = useSelector(state => state.loadedUser);
return (
<div
style={{
height: '100vh',
width: '100vw'
}}
>
<GenericHeader
venderBusiness={vendorDetails?.attributes?.businessName}
venderEmail={vendorDetails?.attributes?.email}
adminName={loadedUser?.username}
adminEmail={loadedUser?.email}
isRoute={isRoute}
/>
<div
className="w-100 d-flex"
style={{
height: 'calc(100vh - 80px)',
}}
>
<GenericSidebar isRoute={isRoute} />
<div style={{
width: '85%',
overflowY: 'auto'
}}>
{children}
</div>
</div>
</div>
)
}
\ No newline at end of file \ No newline at end of file
import Image from 'next/image';
import Link from 'next/link';
import { useRouter } from 'next/router';
import React from 'react'
export const GenericSidebar = ({isRoute}) => {
const router = useRouter();
const VenderRoutes = () => {
return (
<ul>
<li className={router.pathname === "/vendor/dashboard" ? "active" : ""}>
<Link href="/vendor/dashboard">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" />
<div className="mx-2">
Dashboard
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/activity-details" ? "active" : ""}>
<Link href="/vendor/activity-details">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={25} height={18} src="/images/vendor/add-activity.svg" />
<div className="mx-2">
Add Activity
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/business-details" ? "active" : ""}>
<Link href="/vendor/business-details">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" />
<div className="mx-2">
Business Details
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/enquiries" ? "active" : ""}>
<Link href="/vendor/enquiries">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2">
Enquiries
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/activities" ? "active" : ""}>
<Link href="/vendor/activities">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" />
<div className="mx-2">
Activities
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/reviews" ? "active" : ""}>
<Link href="/vendor/reviews">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2">
Reviews
</div>
</span>
</Link>
</li>
</ul>
)
}
const AdminRoutes = () => {
return (
<ul>
<li className={router.pathname === "/admin/activities" ? "active" : ""}>
<Link href="/admin/activities">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" />
<div className="mx-2">
Activities
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/admin/vendors" ? "active" : ""}>
<Link href="/admin/vendors">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={25} height={18} src="/images/admin/icon-user.svg" />
<div className="mx-2">
Vendor
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/admin/giftcards" ? "active" : ""}>
<Link href="/admin/giftcards">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/admin/icon-gift.svg" />
<div className="mx-2">
Gift Card
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/admin/reviews" ? "active" : ""}>
<Link href="/admin/reviews">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2">
Reviews
</div>
</span>
</Link>
</li>
</ul>
)
}
return (
<div className='h-100 d-flex flex-column justify-content-between bg-z-primary primary-sidebar' style={{
width: '15%',
boxShadow: '8px 0px 16px -15px rgba(0,0,0,0.25)',
'-webkit-box-shadow': '8px 0px 16px -15px rgba(0,0,0,0.25)',
'-moz-box-shadow': '8px 0px 16px -15px rgba(0,0,0,0.25)',
}}>
{isRoute === 'vendor' && <VenderRoutes />}
{isRoute === 'admin' && <AdminRoutes />}
<div className='px-3 py-2' style={{
borderInlineStart: '4px solid #393e49'
}}>
<p className='text-white m-0' style={{ fontSize: 16 }}>
{isRoute === 'admin' ? 'Admin' : 'Vendor'}
</p>
</div>
</div>
)
}
\ No newline at end of file \ No newline at end of file
...@@ -51,7 +51,7 @@ const Header = () => { ...@@ -51,7 +51,7 @@ const Header = () => {
<Container fluid> <Container fluid>
<Navbar.Brand href="/"> <Navbar.Brand href="/">
<span className="image-container"> <span className="image-container">
<Image loading="lazy" layout="fill" alt="" className="image img-fluid" src="/images/Zango-logo.svg" /> <Image loading="lazy" layout="fill" alt="" className="image img-fluid" src="/images/main-logo.svg" />
</span> </span>
</Navbar.Brand> </Navbar.Brand>
<Navbar.Toggle aria-controls="navbarScroll" /> <Navbar.Toggle aria-controls="navbarScroll" />
......
...@@ -266,7 +266,7 @@ const ActivityDetails = ({ isUpdate }) => { ...@@ -266,7 +266,7 @@ const ActivityDetails = ({ isUpdate }) => {
console.log("activityPeriodState", activityPeriodState); console.log("activityPeriodState", activityPeriodState);
return ( return (
<Fragment> <Fragment>
<div className="container p-1"> <div className="container p-5">
<div className="row"> <div className="row">
<div className="col-12 col-lg-8"> <div className="col-12 col-lg-8">
<div className="content-div business-details"> <div className="content-div business-details">
......
...@@ -430,7 +430,7 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta ...@@ -430,7 +430,7 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
} }
}; };
return ( return (
<div> <div className="p-5">
<Table rowSelection={rowSelection} columns={columns} dataSource={data} onChange={onChange} /> <Table rowSelection={rowSelection} columns={columns} dataSource={data} onChange={onChange} />
<Modal <Modal
show={rejectPopUp} show={rejectPopUp}
......
...@@ -116,6 +116,7 @@ const BusinessDetails = () => { ...@@ -116,6 +116,7 @@ const BusinessDetails = () => {
// vendorDetails && console.log("vendorData", vendorData, vendorDetails.length > 0); // vendorDetails && console.log("vendorData", vendorData, vendorDetails.length > 0);
return ( return (
<Fragment> <Fragment>
<div className="w-100">
{loadedUser && ( {loadedUser && (
<div className="container p-5"> <div className="container p-5">
<div className="row"> <div className="row">
...@@ -383,7 +384,7 @@ const BusinessDetails = () => { ...@@ -383,7 +384,7 @@ const BusinessDetails = () => {
</div> </div>
<div className="col-12 col-lg-5"> <div className="col-12 col-lg-5">
<div className="input-group"> <div className="input-group">
<Button disabled={false} onClick={()=> { <Button disabled={false} onClick={() => {
router.push("/vendor/dashboard") router.push("/vendor/dashboard")
}} className="btn btn-primary btn-submit"> }} className="btn btn-primary btn-submit">
Go to dashboard Go to dashboard
...@@ -427,6 +428,7 @@ const BusinessDetails = () => { ...@@ -427,6 +428,7 @@ const BusinessDetails = () => {
</div> </div>
</div> </div>
)} )}
</div>
</Fragment> </Fragment>
); );
}; };
......
...@@ -139,24 +139,24 @@ const OrderListing = () => { ...@@ -139,24 +139,24 @@ const OrderListing = () => {
return ( return (
<Fragment> <Fragment>
<div className="row"> {/* <div className="row">
<div className="col-12 col-lg-12"> <div className="col-12 col-lg-12">
<div className="rightContent"> <div className="rightContent">
<div className="d-flex align-items-center justify-content-between px-2 mb-2"> <div className="d-flex align-items-center justify-content-between px-2 mb-2"> */}
<div> <div className="mb-3">
<h2>Orders</h2> <h2 style={{fontSize: 28}}>Orders</h2>
<p>View all the orders</p> <p>View all the orders</p>
</div> </div>
<div> {/* <div>
{/* <Button type="button" variant="" className="btnAdd m-0"> <Button type="button" variant="" className="btnAdd m-0">
<Image alt="" width="16" height="16" src="/images/vendor/icon-filter.svg" className="me-2" /> Filter <Image alt="" width="16" height="16" src="/images/vendor/icon-filter.svg" className="me-2" /> Filter
</Button> */} </Button>
</div>
</div> </div>
</div> */}
<Table columns={columns} dataSource={data} onChange={onChange} /> <Table columns={columns} dataSource={data} onChange={onChange} />
{/* </div>
</div> </div>
</div> </div> */}
</div>
<Modal <Modal
show={showEnquiryModal} show={showEnquiryModal}
onHide={() => { onHide={() => {
......
...@@ -9,6 +9,7 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca ...@@ -9,6 +9,7 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { getActivitiesForAdmin } from "../../../redux/actions/activityAction"; import { getActivitiesForAdmin } from "../../../redux/actions/activityAction";
import ActivityDetailsModal from "../../../components/admin/ActivityDetailsModal"; import ActivityDetailsModal from "../../../components/admin/ActivityDetailsModal";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
export default function ActivityListingPage() { export default function ActivityListingPage() {
const [activityDetailInfo, setactivityDetailInfo] = useState(); const [activityDetailInfo, setactivityDetailInfo] = useState();
...@@ -23,18 +24,20 @@ export default function ActivityListingPage() { ...@@ -23,18 +24,20 @@ export default function ActivityListingPage() {
dispatch(getActivitiesForAdmin({})); dispatch(getActivitiesForAdmin({}));
}, []); }, []);
return ( return (
<Layout> <GenericLayout>
<div className="sidebarContainer"> {/* <Layout> */}
<Sidebar /> {/* <div className="sidebarContainer"> */}
<div className="content"> {/* <Sidebar /> */}
{/* <div className="content"> */}
{/* <ActivityListing /> */} {/* <ActivityListing /> */}
<ActivityListingRBAC setactivityDetailInfo={setactivityDetailInfo} setShowActivityDetailsModal={setShowActivityDetailsModal} /> <ActivityListingRBAC setactivityDetailInfo={setactivityDetailInfo} setShowActivityDetailsModal={setShowActivityDetailsModal} />
{showActivityDetailsModal && ( {showActivityDetailsModal && (
<ActivityDetailsModal show={showActivityDetailsModal} handleClose={handleCloseActivityDetails} activityDetailInfo={activityDetailInfo} /> <ActivityDetailsModal show={showActivityDetailsModal} handleClose={handleCloseActivityDetails} activityDetailInfo={activityDetailInfo} />
)} )}
</div> {/* </div> */}
</div> {/* </div> */}
</Layout> {/* </Layout> */}
</GenericLayout>
); );
} }
......
...@@ -2,17 +2,20 @@ import React from "react"; ...@@ -2,17 +2,20 @@ import React from "react";
import Layout from "../../../components/layout/Layout"; import Layout from "../../../components/layout/Layout";
import Sidebar from "../../../components/layout/AdminDashboardSidebar"; import Sidebar from "../../../components/layout/AdminDashboardSidebar";
import GiftcardListing from "../../../components/admin/GiftcardListing"; import GiftcardListing from "../../../components/admin/GiftcardListing";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
export default function GiftCardListingPage() { export default function GiftCardListingPage() {
return ( return (
<Layout> // <Layout>
<div className="sidebarContainer"> // <div className="sidebarContainer">
<Sidebar /> // <Sidebar />
<div className="content"> // <div className="content">
<GenericLayout>
<GiftcardListing /> <GiftcardListing />
</div> </GenericLayout>
</div> // </div>
</Layout> // </div>
// </Layout>
); );
}; };
...@@ -4,19 +4,22 @@ import Sidebar from "../../../components/layout/AdminDashboardSidebar"; ...@@ -4,19 +4,22 @@ import Sidebar from "../../../components/layout/AdminDashboardSidebar";
import Layout from "../../../components/layout/Layout"; import Layout from "../../../components/layout/Layout";
import { getActivitiesByFilters } from "../../../redux/actions/activityAction"; import { getActivitiesByFilters } from "../../../redux/actions/activityAction";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
const ReviewsPage = () => { const ReviewsPage = () => {
return ( return (
<div> // <div>
<Layout> // <Layout>
<div className="sidebarContainer"> // <div className="sidebarContainer">
<Sidebar /> // <Sidebar />
<div className="content"> // <div className="content">
<GenericLayout>
<Reviews isVendor={false} /> <Reviews isVendor={false} />
</div> </GenericLayout>
</div> // </div>
</Layout> // </div>
</div> // </Layout>
// </div>
); );
}; };
......
...@@ -6,17 +6,20 @@ import { wrapper } from "../../../redux/store"; ...@@ -6,17 +6,20 @@ import { wrapper } from "../../../redux/store";
import { getAllVendors } from "../../../redux/actions/vendorActions"; import { getAllVendors } from "../../../redux/actions/vendorActions";
import { loadUser } from "../../../redux/actions/userActions"; import { loadUser } from "../../../redux/actions/userActions";
import { getAllCategories, getAllSubCategories } from "../../../redux/actions/categoriesAction"; import { getAllCategories, getAllSubCategories } from "../../../redux/actions/categoriesAction";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
export default function VendorListingPage() { export default function VendorListingPage() {
return ( return (
<Layout> // <Layout>
<div className="sidebarContainer"> // <div className="sidebarContainer">
<Sidebar /> // <Sidebar />
<div className="content"> // <div className="content">
<GenericLayout>
<VendorListing /> <VendorListing />
</div> </GenericLayout>
</div> // </div>
</Layout> // </div>
// </Layout>
); );
} }
......
...@@ -12,21 +12,24 @@ import { getActivitiesByVendor, getActivityById } from "../../../redux/actions/a ...@@ -12,21 +12,24 @@ import { getActivitiesByVendor, getActivityById } from "../../../redux/actions/a
import { getAllCategories, getAllSubCategories } from "../../../redux/actions/categoriesAction"; import { getAllCategories, getAllSubCategories } from "../../../redux/actions/categoriesAction";
import { loadUser } from "../../../redux/actions/userActions"; import { loadUser } from "../../../redux/actions/userActions";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
const EditActivityDetail = () => { const EditActivityDetail = () => {
return ( return (
<Layout> <GenericLayout>
{/* <ToastContainer position="bottom-right"></ToastContainer> */}
<div className="sidebarContainer">
<Sidebar />
<div className="content">
{/* <ActivityListingRBAC /> */}
<ActivityDetails isUpdate={true} /> <ActivityDetails isUpdate={true} />
{/* <UpdateActivity /> */} </GenericLayout>
</div> // <Layout>
</div> // <ToastContainer position="bottom-right"></ToastContainer>
</Layout> // <div className="sidebarContainer">
// <Sidebar />
// <div className="content">
// <ActivityListingRBAC />
// <ActivityDetails isUpdate={true} />
// <UpdateActivity />
// </div>
// </div>
// </Layout>
); );
}; };
......
...@@ -8,6 +8,7 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca ...@@ -8,6 +8,7 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca
import { getActivitiesByVendor } from "../../../redux/actions/activityAction"; import { getActivitiesByVendor } from "../../../redux/actions/activityAction";
import { loadUser } from "../../../redux/actions/userActions"; import { loadUser } from "../../../redux/actions/userActions";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
// import { loadUser } from "../redux/actions/userActions"; // import { loadUser } from "../redux/actions/userActions";
// import { wrapper } from "../redux/store"; // import { wrapper } from "../redux/store";
...@@ -19,14 +20,14 @@ export default function ActivityListingPage() { ...@@ -19,14 +20,14 @@ export default function ActivityListingPage() {
}, []); }, []);
return ( return (
<Layout> <GenericLayout>
<div className="sidebarContainer"> {/* <div className="sidebarContainer">
<Sidebar /> <Sidebar />
<div className="content"> <div className="content"> */}
<ActivityListingRBAC /> <ActivityListingRBAC />
</div> {/* </div>
</div> </div> */}
</Layout> </GenericLayout>
); );
} }
......
...@@ -5,13 +5,15 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca ...@@ -5,13 +5,15 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca
import { loadUser } from "../../../redux/actions/userActions"; import { loadUser } from "../../../redux/actions/userActions";
import { getLoggedInVendor } from "../../../redux/actions/vendorActions"; import { getLoggedInVendor } from "../../../redux/actions/vendorActions";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
export default function ActivityDetailsPage () { export default function ActivityDetailsPage() {
return ( return (
<Layout> // <Layout>
<GenericLayout>
<ActivityDetails isUpdate={false} /> <ActivityDetails isUpdate={false} />
</Layout> </GenericLayout>
); );
}; };
...@@ -27,5 +29,4 @@ export const getServerSideProps = wrapper.getServerSideProps(store => async ({ r ...@@ -27,5 +29,4 @@ export const getServerSideProps = wrapper.getServerSideProps(store => async ({ r
return { return {
props: {} props: {}
}; };
});
\ No newline at end of file \ No newline at end of file
});
...@@ -5,6 +5,7 @@ import BusinessDetails from "../../../components/vendor/BusinessDetails"; ...@@ -5,6 +5,7 @@ import BusinessDetails from "../../../components/vendor/BusinessDetails";
import { loadUser } from "../../../redux/actions/userActions"; import { loadUser } from "../../../redux/actions/userActions";
import { getVendorDetails } from "../../../redux/actions/vendorActions"; import { getVendorDetails } from "../../../redux/actions/vendorActions";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
// import { loadUser } from "../redux/actions/userActions"; // import { loadUser } from "../redux/actions/userActions";
// import { wrapper } from "../redux/store"; // import { wrapper } from "../redux/store";
...@@ -15,9 +16,11 @@ export default function BusinessDetailsPage() { ...@@ -15,9 +16,11 @@ export default function BusinessDetailsPage() {
}, []); }, []);
return ( return (
<Layout> // <Layout>
<GenericLayout>
<BusinessDetails /> <BusinessDetails />
</Layout> </GenericLayout>
// </Layout>
); );
} }
......
...@@ -8,6 +8,7 @@ import { useDispatch, useSelector } from "react-redux"; ...@@ -8,6 +8,7 @@ import { useDispatch, useSelector } from "react-redux";
import { loadUser } from "../../../redux/actions/userActions"; import { loadUser } from "../../../redux/actions/userActions";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
const VendorDashboard = () => { const VendorDashboard = () => {
const { loadedUser, error } = useSelector(state => state.loadedUser); const { loadedUser, error } = useSelector(state => state.loadedUser);
...@@ -69,18 +70,17 @@ const VendorDashboard = () => { ...@@ -69,18 +70,17 @@ const VendorDashboard = () => {
}; };
return ( return (
<Layout> <GenericLayout>
<div className="sidebarContainer"> {/* <div className="sidebarContainer">
<Sidebar /> <Sidebar /> */}
<div className="content"> <div className="h-100 d-flex-align-items-center justify-content-center p-5">
<div className="row">
<ApprovalStatus /> <ApprovalStatus />
<div className="d-flex justify-content-center py-4"> <div className="d-flex justify-content-center py-4">
<span className="image-container"> <span className="image-container">
<Image alt="" layout="fill" src="/images/vendor/Isolation_Mode.png" className="image" /> <Image alt="" layout="fill" src="/images/vendor/Isolation_Mode.png" className="image" />
</span> </span>
</div> </div>
<div className="text-center py-2 mb-5"> <div className="text-center py-2">
<p className="p3">No information is available right now</p> <p className="p3">No information is available right now</p>
<Button <Button
onClick={() => { onClick={() => {
...@@ -99,9 +99,8 @@ const VendorDashboard = () => { ...@@ -99,9 +99,8 @@ const VendorDashboard = () => {
</Button> </Button>
</div> </div>
</div> </div>
</div> {/* </div> */}
</div> </GenericLayout>
</Layout>
); );
}; };
......
...@@ -3,19 +3,20 @@ import Layout from "../../../components/layout/Layout"; ...@@ -3,19 +3,20 @@ import Layout from "../../../components/layout/Layout";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import OrderListing from "../../../components/vendor/OrderListing"; import OrderListing from "../../../components/vendor/OrderListing";
import Sidebar from "../../../components/layout/VendorDashboardSidebar"; import Sidebar from "../../../components/layout/VendorDashboardSidebar";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
// import { loadUser } from "../redux/actions/userActions"; // import { loadUser } from "../redux/actions/userActions";
// import { wrapper } from "../redux/store"; // import { wrapper } from "../redux/store";
const OrderListingPage = () => { const OrderListingPage = () => {
return ( return (
<Layout> <GenericLayout>
<div className="sidebarContainer"> {/* <div className="sidebarContainer">
<Sidebar /> <Sidebar /> */}
<div className="content"> <div className="w-100 p-5">
<OrderListing /> <OrderListing />
</div> </div>
</div> {/* </div> */}
</Layout> </GenericLayout>
); );
}; };
......
...@@ -5,6 +5,7 @@ import Layout from "../../../components/layout/Layout"; ...@@ -5,6 +5,7 @@ import Layout from "../../../components/layout/Layout";
import Sidebar from "../../../components/layout/VendorDashboardSidebar"; import Sidebar from "../../../components/layout/VendorDashboardSidebar";
import { getActivitiesByVendor } from "../../../redux/actions/activityAction"; import { getActivitiesByVendor } from "../../../redux/actions/activityAction";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
const ReviewsPage = () => { const ReviewsPage = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
...@@ -13,16 +14,14 @@ const ReviewsPage = () => { ...@@ -13,16 +14,14 @@ const ReviewsPage = () => {
}, []); }, []);
return ( return (
<div> // <div>
<Layout> <GenericLayout>
<div className="sidebarContainer"> {/* <div className="sidebarContainer">
<Sidebar /> <Sidebar /> */}
<div className="content">
<Reviews isVendor={true} /> <Reviews isVendor={true} />
</div> {/* </div> */}
</div> </GenericLayout>
</Layout> // </div>
</div>
); );
}; };
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<svg width="64px" height="64px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M14 7V13M11 10H17M14 21C11 21 8 21 5 21C3.89543 21 3.00001 20.1069 3.00001 19.0023C3 16.2888 3 11.5934 3 10M9 17H19C20.1046 17 21 16.1046 21 15V5C21 3.89543 20.1046 3 19 3H9C7.89543 3 7 3.89543 7 5V15C7 16.1046 7.89543 17 9 17Z" stroke="#fff" stroke-width="1.488" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>
\ No newline at end of file \ No newline at end of file
...@@ -89,7 +89,7 @@ export const updateVendorBusinessDetails = ...@@ -89,7 +89,7 @@ export const updateVendorBusinessDetails =
export const getLoggedInVendor = () => async dispatch => { export const getLoggedInVendor = () => async dispatch => {
const session = await getSession(); const session = await getSession();
console.log("session", session); console.log("session lfkjskfjsdh", session);
if (!session) { if (!session) {
throw new Error("You are not authenticated. Please log in."); throw new Error("You are not authenticated. Please log in.");
...@@ -135,6 +135,9 @@ export const getLoggedInVendor = () => async dispatch => { ...@@ -135,6 +135,9 @@ export const getLoggedInVendor = () => async dispatch => {
export const getVendorDetails = () => async dispatch => { export const getVendorDetails = () => async dispatch => {
const session = await getSession(); const session = await getSession();
if (!session) {
return
}
try { try {
dispatch({ dispatch({
type: GET_VENDOR_DETAILS_REQUEST type: GET_VENDOR_DETAILS_REQUEST
......
...@@ -1335,6 +1335,48 @@ span.form-error, ...@@ -1335,6 +1335,48 @@ span.form-error,
} }
/* vendor dashboar */ /* vendor dashboar */
.bg-z-primary{
background-color: #242932;
}
.primary-sidebar ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.primary-sidebar ul li {
padding: 0.85rem 2rem;
color: #fff;
}
.primary-sidebar ul li.active {
background-color: #393e49;
color: #fff;
}
.primary-sidebar ul li a {
font-family: "Poppins Regular";
font-size: 14px;
line-height: 21px;
letter-spacing: 0em;
text-align: left;
color: #fff !important;
text-decoration: none;
display: flex;
align-items: center;
}
.primary-sidebar ul li a>span {
flex: 0 0 auto;
}
.primary-sidebar ul li a span {
padding-left: 1rem;
padding-top: 5px;
}
.sidebarContainer { .sidebarContainer {
display: flex; display: flex;
} }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!