Commit fb9081c5 by Chetan

vendor and admin panel new ui

1 parent c2689bd5
...@@ -11,82 +11,78 @@ const GiftcardListing = () => { ...@@ -11,82 +11,78 @@ const GiftcardListing = () => {
return ( return (
<Fragment> <Fragment>
<div className="row"> <div className="p-5">
<div className="col-12 col-lg-12"> <div className="d-flex align-items-center justify-content-between px-2 mb-2">
<div className="rightContent"> <div>
<div className="d-flex align-items-center justify-content-between px-2 mb-2"> <h2 style={{ fontSize: 28 }}>Gift Card Requests</h2>
<div> <p>View all the gift cards</p>
<h2>Gift Card Requests</h2> </div>
<p>View all the gift cards</p> <div>
</div> <Button type="button" variant="" className="btnAdd m-0">
<div> <Image alt="" width="16" height="16" src="/images/vendor/icon-filter.svg" className="me-2" /> Filter
<Button type="button" variant="" className="btnAdd m-0"> </Button>
<Image alt="" width="16" height="16" src="/images/vendor/icon-filter.svg" className="me-2" /> Filter
</Button>
</div>
</div>
<Table responsive className="listingTable">
<thead>
<tr>
<th>
<label className="check-container mb-0 ps-2" htmlFor="checkh">
<input
type="checkbox"
id="checkh"
className="check-box"
/>
<span className="checkmark"></span>
</label>
</th>
<th>Name</th>
<th>Amount</th>
<th>Phone Number</th>
<th>Sender Email Address</th>
<th>Receiver Email Address</th>
<th></th>
</tr>
</thead>
<tbody>
{array.map((data, index) => (
<tr key={index}>
<td>
<label className="check-container mb-0 ps-2" htmlFor={`check${index}`}>
<input
type="checkbox"
id={`check${index}`}
className="check-box"
/>
<span className="checkmark"></span>
</label>
</td>
<td>Michael Anderson</td>
<td>$ 499</td>
<td>+91 9865 43210</td>
<td>adventuretrails@example.com</td>
<td>john@example.com</td>
<td>
<div className="actions">
<div className="ellipse" onClick={() => toggleMenu(index)}>
<Image alt="" width={20} height={20} src="/images/vendor/icon-more-vertical.svg" />
</div>
{showMenuIndex === index && (
<div className="menu">
<ul>
<li>Delete</li>
</ul>
</div>
)}
</div>
</td>
</tr>
))}
<tr>
<td colSpan={7}>Showing Results 10 of 1567</td>
</tr>
</tbody>
</Table>
</div> </div>
</div> </div>
<Table responsive className="listingTable">
<thead>
<tr>
<th>
<label className="check-container mb-0 ps-2" htmlFor="checkh">
<input
type="checkbox"
id="checkh"
className="check-box"
/>
<span className="checkmark"></span>
</label>
</th>
<th>Name</th>
<th>Amount</th>
<th>Phone Number</th>
<th>Sender Email Address</th>
<th>Receiver Email Address</th>
<th></th>
</tr>
</thead>
<tbody>
{array.map((data, index) => (
<tr key={index}>
<td>
<label className="check-container mb-0 ps-2" htmlFor={`check${index}`}>
<input
type="checkbox"
id={`check${index}`}
className="check-box"
/>
<span className="checkmark"></span>
</label>
</td>
<td>Michael Anderson</td>
<td>$ 499</td>
<td>+91 9865 43210</td>
<td>adventuretrails@example.com</td>
<td>john@example.com</td>
<td>
<div className="actions">
<div className="ellipse" onClick={() => toggleMenu(index)}>
<Image alt="" width={20} height={20} src="/images/vendor/icon-more-vertical.svg" />
</div>
{showMenuIndex === index && (
<div className="menu">
<ul>
<li>Delete</li>
</ul>
</div>
)}
</div>
</td>
</tr>
))}
<tr>
<td colSpan={7}>Showing Results 10 of 1567</td>
</tr>
</tbody>
</Table>
</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,22 +182,24 @@ const VendorListing = () => { ...@@ -182,22 +182,24 @@ const VendorListing = () => {
return ( return (
<Fragment> <Fragment>
<div className={restriction ? "overlay" : ""}> <div className="p-5">
{restriction ? ( <div className={restriction ? "overlay" : ""}>
<div className="d-flex justify-content-center align-items-center" style={{ color: "#FFF", fontSize: "50px", height: "100%" }}> {restriction ? (
Access restricted! Only admin is allowed to view the data. <div className="d-flex justify-content-center align-items-center" style={{ color: "#FFF", fontSize: "50px", height: "100%" }}>
</div> Access restricted! Only admin is allowed to view the data.
) : ( </div>
<div> ) : (
{!showDetail ? ( <div>
<Table loading={loading} columns={columns} dataSource={data} /> {!showDetail ? (
) : ( <Table loading={loading} columns={columns} dataSource={data} />
// <VendorDetailModal /> ) : (
<VendorDetails setShowDetail={setShowDetail} showDetail={showDetail} detail={detail} /> // <VendorDetailModal />
)} <VendorDetails setShowDetail={setShowDetail} showDetail={showDetail} detail={detail} />
<div></div> )}
</div> <div></div>
)} </div>
)}
</div>
</div> </div>
</Fragment> </Fragment>
// <Fragment> // <Fragment>
......
...@@ -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,198 +116,199 @@ const BusinessDetails = () => { ...@@ -116,198 +116,199 @@ const BusinessDetails = () => {
// vendorDetails && console.log("vendorData", vendorData, vendorDetails.length > 0); // vendorDetails && console.log("vendorData", vendorData, vendorDetails.length > 0);
return ( return (
<Fragment> <Fragment>
{loadedUser && ( <div className="w-100">
<div className="container p-5"> {loadedUser && (
<div className="row"> <div className="container p-5">
<div className="col-12 col-lg-8"> <div className="row">
<div className="content-div business-details"> <div className="col-12 col-lg-8">
<h2>Tell us about your business</h2> <div className="content-div business-details">
<p>Please have the following ready before you begin</p> <h2>Tell us about your business</h2>
<p> <p>Please have the following ready before you begin</p>
<FaArrowRight /> Your bank account details for receiving payments from ZanGO <p>
</p> <FaArrowRight /> Your bank account details for receiving payments from ZanGO
<p className="mb-4"> </p>
<FaArrowRight /> Tax (GST/PAN) details of your business. <p className="mb-4">
</p> <FaArrowRight /> Tax (GST/PAN) details of your business.
<hr /> </p>
<div className="form-container mt-4"> <hr />
<ApprovalStatus /> <div className="form-container mt-4">
<Formik <ApprovalStatus />
enableReinitialize <Formik
initialValues={{ enableReinitialize
panNumber: vendorData?.panNumber ? vendorData?.panNumber : "", initialValues={{
panFile: vendorData?.panImage ? vendorData?.panImage : "", panNumber: vendorData?.panNumber ? vendorData?.panNumber : "",
gstNumber: vendorData?.gstNumber ? vendorData?.gstNumber : "", panFile: vendorData?.panImage ? vendorData?.panImage : "",
gstCertificateFile: vendorData?.gstImage ? vendorData?.gstImage : "", gstNumber: vendorData?.gstNumber ? vendorData?.gstNumber : "",
businessName: vendorData?.businessName ? vendorData?.businessName : "", gstCertificateFile: vendorData?.gstImage ? vendorData?.gstImage : "",
brandLogoFile: vendorData?.logo ? vendorData?.logo : "", businessName: vendorData?.businessName ? vendorData?.businessName : "",
pincode: vendorData?.pincode ? vendorData?.pincode : "", brandLogoFile: vendorData?.logo ? vendorData?.logo : "",
country: vendorData?.country ? vendorData?.country : "", pincode: vendorData?.pincode ? vendorData?.pincode : "",
state: vendorData?.state ? vendorData?.state : "", country: vendorData?.country ? vendorData?.country : "",
city: vendorData?.city ? vendorData?.city : "", state: vendorData?.state ? vendorData?.state : "",
addressLine1: vendorData?.addressLine1 ? vendorData?.addressLine1 : "", city: vendorData?.city ? vendorData?.city : "",
addressLine2: vendorData?.addressLine2 ? vendorData?.addressLine2 : "" addressLine1: vendorData?.addressLine1 ? vendorData?.addressLine1 : "",
}} addressLine2: vendorData?.addressLine2 ? vendorData?.addressLine2 : ""
validationSchema={businessDetailsValidationSchema} }}
// enableReinitialize={true} validationSchema={businessDetailsValidationSchema}
onSubmit={async values => { // enableReinitialize={true}
console.log("business details values", values); onSubmit={async values => {
const businessDetails = { console.log("business details values", values);
pan: values.panNumber, const businessDetails = {
gst: values.gstNumber, pan: values.panNumber,
businessName: values.businessName, gst: values.gstNumber,
state: values.state, businessName: values.businessName,
city: values.city, state: values.state,
pincode: values.pincode, city: values.city,
country: values.country, pincode: values.pincode,
addressLine1: values.addressLine1, country: values.country,
addressLine2: values.addressLine2 addressLine1: values.addressLine1,
}; addressLine2: values.addressLine2
// await dispatch(updateVendorBusinessDetails({businessDetails, })) };
// await dispatch(updateVendorBusinessDetails({businessDetails, }))
const response = await dispatch(getLoggedInVendor()); const response = await dispatch(getLoggedInVendor());
console.log("loggedInVendorReducer", response); console.log("loggedInVendorReducer", response);
const updateBusinessDetails = await dispatch(updateVendorBusinessDetails({ businessDetails, vendorId: response.id })); const updateBusinessDetails = await dispatch(updateVendorBusinessDetails({ businessDetails, vendorId: response.id }));
await updateUserApprovalStatus({ status: "pending" }); await updateUserApprovalStatus({ status: "pending" });
await dispatch(loadUser()); await dispatch(loadUser());
router.push("/vendor/dashboard"); router.push("/vendor/dashboard");
// console.log("updateBusinessDetails", updateBusinessDetails); // console.log("updateBusinessDetails", updateBusinessDetails);
}} }}
> >
{({ values, errors, touched, handleChange, handleBlur, handleSubmit, setFieldValue }) => ( {({ values, errors, touched, handleChange, handleBlur, handleSubmit, setFieldValue }) => (
<Form <Form
onSubmit={e => { onSubmit={e => {
e.preventDefault(); e.preventDefault();
handleSubmit(); handleSubmit();
}} }}
> >
<h4>Vendor Business Information</h4> <h4>Vendor Business Information</h4>
<div className="mt-3"> <div className="mt-3">
<p className="textH">Business documents</p> <p className="textH">Business documents</p>
<div className="row"> <div className="row">
<div className="col-12 col-lg-5"> <div className="col-12 col-lg-5">
<div className="input-group"> <div className="input-group">
<label>Enter Business PAN No.</label> <label>Enter Business PAN No.</label>
<input type="text" name="panNumber" onChange={handleChange} onBlur={handleBlur} value={values.panNumber} disabled={disableFields} /> <input type="text" name="panNumber" onChange={handleChange} onBlur={handleBlur} value={values.panNumber} disabled={disableFields} />
{errors.panNumber && touched.panNumber && <span className="form-error">{errors.panNumber}</span>} {errors.panNumber && touched.panNumber && <span className="form-error">{errors.panNumber}</span>}
</div>
</div>
<div className="col-12 offset-lg-1 col-lg-5">
<div className="input-group">
<label>Upload PAN</label>
<div className="custom-file">
<input
disabled={disableFields}
type="file"
className="custom-file-input"
id="panFile"
name="panFile"
onChange={event => {
if (event) {
const file = event.currentTarget.files[0];
setFieldValue("panFile", file);
}
}}
onBlur={handleBlur}
// value={values.panFile}
onClick={event => {
const { target = {} } = event || {};
target.value = "";
}}
/>
<label className="custom-file-label" htmlFor="panFile">
Upload
</label>
</div> </div>
<p className="textS">Upload in .PNG or .JPG/JPEG format</p> </div>
{errors.panFile && touched.panFile && <span className="form-error">{errors.panFile}</span>} <div className="col-12 offset-lg-1 col-lg-5">
{values.panFile && ( <div className="input-group">
<div className="d-flex align-items-center justify-content-between p-1" style={{ width: "100%" }}> <label>Upload PAN</label>
<p className="textS m-0">{values.panFile.name}</p> <div className="custom-file">
<FaTimes <input
style={{ cursor: "pointer" }} disabled={disableFields}
onClick={() => { type="file"
setFieldValue("panFile", ""); className="custom-file-input"
id="panFile"
name="panFile"
onChange={event => {
if (event) {
const file = event.currentTarget.files[0];
setFieldValue("panFile", file);
}
}}
onBlur={handleBlur}
// value={values.panFile}
onClick={event => {
const { target = {} } = event || {};
target.value = "";
}} }}
/> />
<label className="custom-file-label" htmlFor="panFile">
Upload
</label>
</div> </div>
)} <p className="textS">Upload in .PNG or .JPG/JPEG format</p>
{errors.panFile && touched.panFile && <span className="form-error">{errors.panFile}</span>}
{values.panFile && (
<div className="d-flex align-items-center justify-content-between p-1" style={{ width: "100%" }}>
<p className="textS m-0">{values.panFile.name}</p>
<FaTimes
style={{ cursor: "pointer" }}
onClick={() => {
setFieldValue("panFile", "");
}}
/>
</div>
)}
</div>
</div> </div>
</div> </div>
</div> <div className="row">
<div className="row"> <div className="col-12 col-lg-5">
<div className="col-12 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>GST Number</label>
<label>GST Number</label> <input disabled={disableFields} type="text" name="gstNumber" onChange={handleChange} onBlur={handleBlur} value={values.gstNumber} />
<input disabled={disableFields} type="text" name="gstNumber" onChange={handleChange} onBlur={handleBlur} value={values.gstNumber} /> {errors.gstNumber && touched.gstNumber && <span className="form-error">{errors.gstNumber}</span>}
{errors.gstNumber && touched.gstNumber && <span className="form-error">{errors.gstNumber}</span>} </div>
</div> </div>
</div> <div className="col-12 offset-lg-1 col-lg-5">
<div className="col-12 offset-lg-1 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>GST Certificate</label>
<label>GST Certificate</label> <div className="custom-file">
<div className="custom-file"> <input
<input disabled={disableFields}
disabled={disableFields} type="file"
type="file" className="custom-file-input"
className="custom-file-input" id="gstCertificateFile"
id="gstCertificateFile" name="gstCertificateFile"
name="gstCertificateFile" onChange={handleChange}
onChange={handleChange} onBlur={handleBlur}
onBlur={handleBlur} value={values.gstCertificateFile}
value={values.gstCertificateFile} />
/> <label className="custom-file-label" htmlFor="gstCertificateFile">
<label className="custom-file-label" htmlFor="gstCertificateFile"> Upload
Upload </label>
</label> </div>
<p className="textS">Upload in .PNG or .JPG/JPEG format</p>
{errors.gstCertificateFile && touched.gstCertificateFile && <span className="form-error">{errors.gstCertificateFile}</span>}
</div> </div>
<p className="textS">Upload in .PNG or .JPG/JPEG format</p>
{errors.gstCertificateFile && touched.gstCertificateFile && <span className="form-error">{errors.gstCertificateFile}</span>}
</div> </div>
</div> </div>
</div> <div className="row">
<div className="row"> <div className="col-12 col-lg-5">
<div className="col-12 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>Business Name</label>
<label>Business Name</label> <input disabled={disableFields} type="text" name="businessName" onChange={handleChange} onBlur={handleBlur} value={values.businessName} />
<input disabled={disableFields} type="text" name="businessName" onChange={handleChange} onBlur={handleBlur} value={values.businessName} /> {errors.businessName && touched.businessName && <span className="form-error">{errors.businessName}</span>}
{errors.businessName && touched.businessName && <span className="form-error">{errors.businessName}</span>} </div>
</div> </div>
</div> <div className="col-12 offset-lg-1 col-lg-5">
<div className="col-12 offset-lg-1 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>Brand Logo</label>
<label>Brand Logo</label> <div className="custom-file">
<div className="custom-file"> <input
<input disabled={disableFields}
disabled={disableFields} type="file"
type="file" className="custom-file-input"
className="custom-file-input" id="brandLogoFile"
id="brandLogoFile" name="brandLogoFile"
name="brandLogoFile" onChange={handleChange}
onChange={handleChange} onBlur={handleBlur}
onBlur={handleBlur} value={values.brandLogoFile}
value={values.brandLogoFile} />
/> <label className="custom-file-label" htmlFor="brandLogoFile">
<label className="custom-file-label" htmlFor="brandLogoFile"> Upload
Upload </label>
</label> </div>
<p className="textS">Upload in .PNG or .JPG/JPEG format</p>
{errors.brandLogoFile && touched.brandLogoFile && <span className="form-error">{errors.brandLogoFile}</span>}
</div> </div>
<p className="textS">Upload in .PNG or .JPG/JPEG format</p>
{errors.brandLogoFile && touched.brandLogoFile && <span className="form-error">{errors.brandLogoFile}</span>}
</div> </div>
</div> </div>
</div> </div>
</div> <hr />
<hr /> <div className="mt-4">
<div className="mt-4"> <p className="textH">Business Address</p>
<p className="textH">Business Address</p> <div className="row">
<div className="row"> <div className="col-12 col-lg-5">
<div className="col-12 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>Pincode</label>
<label>Pincode</label> {/* <AsyncTypeahead
{/* <AsyncTypeahead
onSearch={handleSearch} onSearch={handleSearch}
minLength={3} minLength={3}
value={values.pincode} value={values.pincode}
...@@ -328,105 +329,106 @@ const BusinessDetails = () => { ...@@ -328,105 +329,106 @@ const BusinessDetails = () => {
console.log("input change", e); console.log("input change", e);
}} }}
/> */} /> */}
<input disabled={disableFields} type="text" name="pincode" onChange={handleChange} onBlur={handleBlur} value={values.pincode} /> <input disabled={disableFields} type="text" name="pincode" onChange={handleChange} onBlur={handleBlur} value={values.pincode} />
{errors.pincode && touched.pincode && <span className="form-error">{errors.pincode}</span>} {errors.pincode && touched.pincode && <span className="form-error">{errors.pincode}</span>}
</div>
</div> </div>
</div> <div className="col-12 offset-lg-1 col-lg-5">
<div className="col-12 offset-lg-1 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>Country</label>
<label>Country</label> <input disabled={disableFields} type="text" name="country" onChange={handleChange} onBlur={handleBlur} value={values.country} />
<input disabled={disableFields} type="text" name="country" onChange={handleChange} onBlur={handleBlur} value={values.country} /> {errors.country && touched.country && <span className="form-error">{errors.country}</span>}
{errors.country && touched.country && <span className="form-error">{errors.country}</span>} </div>
</div> </div>
</div> </div>
</div> <div className="row">
<div className="row"> <div className="col-12 col-lg-5">
<div className="col-12 col-lg-5"> <div className="input-group">
<div className="input-group"> <label>State</label>
<label>State</label> <input disabled={disableFields} type="text" name="state" onChange={handleChange} onBlur={handleBlur} value={values.state} />
<input disabled={disableFields} type="text" name="state" onChange={handleChange} onBlur={handleBlur} value={values.state} /> {errors.state && touched.state && <span className="form-error">{errors.state}</span>}
{errors.state && touched.state && <span className="form-error">{errors.state}</span>} </div>
</div>
<div className="col-12 offset-lg-1 col-lg-5">
<div className="input-group">
<label>City</label>
<input disabled={disableFields} type="text" name="city" onChange={handleChange} onBlur={handleBlur} value={values.city} />
{errors.city && touched.city && <span className="form-error">{errors.city}</span>}
</div>
</div> </div>
</div> </div>
<div className="col-12 offset-lg-1 col-lg-5"> <div className="row">
<div className="input-group"> <div className="col-12 col-lg-5">
<label>City</label> <div className="input-group">
<input disabled={disableFields} type="text" name="city" onChange={handleChange} onBlur={handleBlur} value={values.city} /> <label>Address Line 1</label>
{errors.city && touched.city && <span className="form-error">{errors.city}</span>} <input disabled={disableFields} type="text" name="addressLine1" onChange={handleChange} onBlur={handleBlur} value={values.addressLine1} />
{errors.addressLine1 && touched.addressLine1 && <span className="form-error">{errors.addressLine1}</span>}
</div>
</div>
<div className="col-12 offset-lg-1 col-lg-5">
<div className="input-group">
<label>Address Line 2</label>
<input disabled={disableFields} type="text" name="addressLine2" onChange={handleChange} onBlur={handleBlur} value={values.addressLine2} />
{errors.addressLine2 && touched.addressLine2 && <span className="form-error">{errors.addressLine2}</span>}
</div>
</div> </div>
</div> </div>
</div> </div>
<div className="row"> <div className="row mt-3 mb-1">
<div className="col-12 col-lg-5"> <div className="col-12 col-lg-5">
<div className="input-group"> <div className="input-group">
<label>Address Line 1</label> <Button disabled={disableFields} type="submit" className="btn btn-primary btn-submit">
<input disabled={disableFields} type="text" name="addressLine1" onChange={handleChange} onBlur={handleBlur} value={values.addressLine1} /> Send for Approval
{errors.addressLine1 && touched.addressLine1 && <span className="form-error">{errors.addressLine1}</span>} </Button>
</div> </div>
</div> </div>
<div className="col-12 offset-lg-1 col-lg-5"> <div className="col-12 col-lg-5">
<div className="input-group"> <div className="input-group">
<label>Address Line 2</label> <Button disabled={false} onClick={() => {
<input disabled={disableFields} type="text" name="addressLine2" onChange={handleChange} onBlur={handleBlur} value={values.addressLine2} /> router.push("/vendor/dashboard")
{errors.addressLine2 && touched.addressLine2 && <span className="form-error">{errors.addressLine2}</span>} }} className="btn btn-primary btn-submit">
Go to dashboard
</Button>
</div> </div>
</div> </div>
</div> </div>
</div> </Form>
<div className="row mt-3 mb-1"> )}
<div className="col-12 col-lg-5"> </Formik>
<div className="input-group"> </div>
<Button disabled={disableFields} type="submit" className="btn btn-primary btn-submit">
Send for Approval
</Button>
</div>
</div>
<div className="col-12 col-lg-5">
<div className="input-group">
<Button disabled={false} onClick={()=> {
router.push("/vendor/dashboard")
}} className="btn btn-primary btn-submit">
Go to dashboard
</Button>
</div>
</div>
</div>
</Form>
)}
</Formik>
</div> </div>
</div> </div>
</div> <div className="col-12 col-lg-4">
<div className="col-12 col-lg-4"> <div className="content-div help-center">
<div className="content-div help-center"> <h2>Help Center</h2>
<h2>Help Center</h2> <ul className="helplist">
<ul className="helplist"> <li>
<li> <Image alt="" src="/images/vendor/question.svg" width="22" height="22" />
<Image alt="" src="/images/vendor/question.svg" width="22" height="22" /> <p>Lorem Ipsum Dolor Sit?</p>
<p>Lorem Ipsum Dolor Sit?</p> </li>
</li> <li>
<li> <Image alt="" src="/images/vendor/question.svg" width="22" height="22" />
<Image alt="" src="/images/vendor/question.svg" width="22" height="22" /> <p>Lorem Ipsum Dolor Sit?</p>
<p>Lorem Ipsum Dolor Sit?</p> </li>
</li> <li>
<li> <Image alt="" src="/images/vendor/question.svg" width="22" height="22" />
<Image alt="" src="/images/vendor/question.svg" width="22" height="22" /> <p>Lorem Ipsum Dolor Sit?</p>
<p>Lorem Ipsum Dolor Sit?</p> </li>
</li> <li>
<li> <Image alt="" src="/images/vendor/question.svg" width="22" height="22" />
<Image alt="" src="/images/vendor/question.svg" width="22" height="22" /> <p>Lorem Ipsum Dolor Sit?</p>
<p>Lorem Ipsum Dolor Sit?</p> </li>
</li> <li>
<li> <Image alt="" src="/images/vendor/call.svg" width="32" height="32" />
<Image alt="" src="/images/vendor/call.svg" width="32" height="32" /> <p>+1 (407) 8798 789</p>
<p>+1 (407) 8798 789</p> </li>
</li> </ul>
</ul> </div>
</div> </div>
</div> </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 /> */}
{/* <ActivityListing /> */} {/* <div className="content"> */}
<ActivityListingRBAC setactivityDetailInfo={setactivityDetailInfo} setShowActivityDetailsModal={setShowActivityDetailsModal} /> {/* <ActivityListing /> */}
{showActivityDetailsModal && ( <ActivityListingRBAC setactivityDetailInfo={setactivityDetailInfo} setShowActivityDetailsModal={setShowActivityDetailsModal} />
<ActivityDetailsModal show={showActivityDetailsModal} handleClose={handleCloseActivityDetails} activityDetailInfo={activityDetailInfo} /> {showActivityDetailsModal && (
)} <ActivityDetailsModal show={showActivityDetailsModal} handleClose={handleCloseActivityDetails} activityDetailInfo={activityDetailInfo} />
</div> )}
</div> {/* </div> */}
</Layout> {/* </div> */}
{/* </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">
<GiftcardListing /> <GenericLayout>
</div> <GiftcardListing />
</div> </GenericLayout>
</Layout> // </div>
// </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">
<Reviews isVendor={false} /> <GenericLayout>
</div> <Reviews isVendor={false} />
</div> </GenericLayout>
</Layout> // </div>
</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">
<VendorListing /> <GenericLayout>
</div> <VendorListing />
</div> </GenericLayout>
</Layout> // </div>
// </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> */} <ActivityDetails isUpdate={true} />
</GenericLayout>
<div className="sidebarContainer"> // <Layout>
<Sidebar /> // <ToastContainer position="bottom-right"></ToastContainer>
<div className="content"> // <div className="sidebarContainer">
{/* <ActivityListingRBAC /> */} // <Sidebar />
<ActivityDetails isUpdate={true} /> // <div className="content">
{/* <UpdateActivity /> */} // <ActivityListingRBAC />
</div> // <ActivityDetails isUpdate={true} />
</div> // <UpdateActivity />
</Layout> // </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,27 +5,28 @@ import { getAllCategories, getAllSubCategories } from "../../../redux/actions/ca ...@@ -5,27 +5,28 @@ 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>
); );
}; };
/** For server side rendering */ /** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => { export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
await store.dispatch(loadUser()); await store.dispatch(loadUser());
await store.dispatch(getAllCategories()) await store.dispatch(getAllCategories())
// await store.dispatch(getLoggedInVendor()) // await store.dispatch(getLoggedInVendor())
// await store.dispatch(getAllSubCategories()) // await store.dispatch(getAllSubCategories())
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> </GenericLayout>
</div> // </div>
</Layout>
</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!