Commit 29ac3b39 by jaymehta

..

1 parent 395e7636
import React from 'react'
const Enquiries = () => {
return (
<div>Enquiries</div>
)
}
export default Enquiries
\ No newline at end of file \ No newline at end of file
...@@ -155,11 +155,11 @@ const GiftcardListing = () => { ...@@ -155,11 +155,11 @@ const GiftcardListing = () => {
<h2 style={{ fontSize: 28 }}>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>
<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={giftData} /> <Table columns={columns} dataSource={giftData} />
</div> </div>
......
...@@ -14,16 +14,7 @@ const Sidebar = () => { ...@@ -14,16 +14,7 @@ const Sidebar = () => {
return ( return (
<div className={`sidebar ${collapsed ? "collapsed" : ""}`}> <div className={`sidebar ${collapsed ? "collapsed" : ""}`}>
{/* <button className="toggle-btn" onClick={toggleSidebar}>
Toggle Sidebar
</button> */}
<ul> <ul>
{/* <li className={router.pathname === "/admin/orders" ? "active" : ""}>
<a href="/admin/orders">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<span>Orders</span>
</a>
</li> */}
<li className={router.pathname === "/admin/activities" ? "active" : ""}> <li className={router.pathname === "/admin/activities" ? "active" : ""}>
<Link prefetch href="/admin/activities"> <Link prefetch href="/admin/activities">
<div> <div>
......
import Image from 'next/image'; import Image from "next/image";
import Link from 'next/link'; import Link from "next/link";
import { useRouter } from 'next/router'; import { useRouter } from "next/router";
import React from 'react' import React from "react";
export const GenericSidebar = ({isRoute}) => { export const GenericSidebar = ({ isRoute }) => {
const router = useRouter(); const router = useRouter();
const VenderRoutes = () => { const VenderRoutes = () => {
return ( return (
...@@ -11,9 +11,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -11,9 +11,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/vendor/dashboard"> <Link href="/vendor/dashboard">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" /> <Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" />
<div className="mx-2"> <div className="mx-2">Dashboard</div>
Dashboard
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -21,9 +19,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -21,9 +19,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/vendor/activity-details"> <Link href="/vendor/activity-details">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image className="" alt="" width={25} height={18} src="/images/vendor/add-activity.svg" /> <Image className="" alt="" width={25} height={18} src="/images/vendor/add-activity.svg" />
<div className="mx-2"> <div className="mx-2">Add Activity</div>
Add Activity
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -31,9 +27,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -31,9 +27,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/vendor/business-details"> <Link href="/vendor/business-details">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" /> <Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" />
<div className="mx-2"> <div className="mx-2">Business Details</div>
Business Details
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -41,9 +35,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -41,9 +35,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/vendor/enquiries"> <Link href="/vendor/enquiries">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" /> <Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2"> <div className="mx-2">Enquiries</div>
Enquiries
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -51,9 +43,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -51,9 +43,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/vendor/activities"> <Link href="/vendor/activities">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" /> <Image alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" />
<div className="mx-2"> <div className="mx-2">Activities</div>
Activities
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -61,15 +51,13 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -61,15 +51,13 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/vendor/reviews"> <Link href="/vendor/reviews">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" /> <Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2"> <div className="mx-2">Reviews</div>
Reviews
</div>
</span> </span>
</Link> </Link>
</li> </li>
</ul> </ul>
) );
} };
const AdminRoutes = () => { const AdminRoutes = () => {
return ( return (
<ul> <ul>
...@@ -77,9 +65,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -77,9 +65,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/admin/activities"> <Link href="/admin/activities">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" /> <Image className="" alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" />
<div className="mx-2"> <div className="mx-2">Activities</div>
Activities
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -87,9 +73,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -87,9 +73,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/admin/vendors"> <Link href="/admin/vendors">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image className="" alt="" width={25} height={18} src="/images/admin/icon-user.svg" /> <Image className="" alt="" width={25} height={18} src="/images/admin/icon-user.svg" />
<div className="mx-2"> <div className="mx-2">Vendor</div>
Vendor
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -97,9 +81,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -97,9 +81,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/admin/giftcards"> <Link href="/admin/giftcards">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/admin/icon-gift.svg" /> <Image className="" alt="" width={22} height={15} src="/images/admin/icon-gift.svg" />
<div className="mx-2"> <div className="mx-2">Gift Card</div>
Gift Card
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -107,9 +89,7 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -107,9 +89,7 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/admin/reviews"> <Link href="/admin/reviews">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" /> <Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2"> <div className="mx-2">Reviews</div>
Reviews
</div>
</span> </span>
</Link> </Link>
</li> </li>
...@@ -117,32 +97,43 @@ export const GenericSidebar = ({isRoute}) => { ...@@ -117,32 +97,43 @@ export const GenericSidebar = ({isRoute}) => {
<Link href="/admin/contact-us-leads"> <Link href="/admin/contact-us-leads">
<span className="d-flex cursor-pointer"> <span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" /> <Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2"> <div className="mx-2">Contact Us Leads</div>
Contact Us Leads </span>
</div> </Link>
</li>
<li className={router.pathname === "/admin/enquiries" ? "active" : ""}>
<Link prefetch href="/admin/enquiries">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/admin/icon-gift.svg" />
<div className="mx-2">Enquiries</div>
</span> </span>
</Link> </Link>
</li> </li>
</ul> </ul>
) );
} };
return ( return (
<div className='h-100 d-flex flex-column justify-content-between bg-z-primary primary-sidebar' style={{ <div
width: '15%', className="h-100 d-flex flex-column justify-content-between bg-z-primary primary-sidebar"
boxShadow: '8px 0px 16px -15px rgba(0,0,0,0.25)', style={{
'-webkit-box-shadow': '8px 0px 16px -15px rgba(0,0,0,0.25)', width: "15%",
'-moz-box-shadow': '8px 0px 16px -15px rgba(0,0,0,0.25)', 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={{ {isRoute === "vendor" && <VenderRoutes />}
borderInlineStart: '4px solid #393e49' {isRoute === "admin" && <AdminRoutes />}
}}> <div
<p className='text-white m-0' style={{ fontSize: 16 }}> className="px-3 py-2"
{isRoute === 'admin' ? 'Admin' : 'Vendor'} style={{
borderInlineStart: "4px solid #393e49"
}}
>
<p className="text-white m-0" style={{ fontSize: 16 }}>
{isRoute === "admin" ? "Admin" : "Vendor"}
</p> </p>
</div> </div>
</div> </div>
)
}
\ No newline at end of file \ No newline at end of file
);
};
...@@ -166,7 +166,7 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta ...@@ -166,7 +166,7 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
price: item.attributes.pricePerPerson, price: item.attributes.pricePerPerson,
place: item.attributes.activityType, place: item.attributes.activityType,
gift: item.attributes.giftSomeone ? "Yes" : "No", gift: item.attributes.giftSomeone ? "Yes" : "No",
status: item.attributes.approved status: [item.attributes.approved]
}; };
}); });
...@@ -214,10 +214,45 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta ...@@ -214,10 +214,45 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
width: "15%" width: "15%"
}, },
{ {
title: "Place", title: "Status",
dataIndex: "place", key: "status",
dataIndex: "status",
render: (_, { status }) => (
<>
{status.map(tag => {
// console.log("tag", tag);
let color;
// if (tag === "loser") {
// color = "volcano";
// }
switch (tag) {
case "approved":
color = "green";
break;
case "pending":
color = "orange";
break;
width: "15%" case "none":
color = "red";
break;
case "rejected":
color = "red";
break;
default:
break;
}
// console.log("color", color);
return (
<Tag color={color} key={tag}>
{tag?.toString().toUpperCase()}
</Tag>
);
})}
</>
)
}, },
{ {
title: "Action", title: "Action",
......
import React, { useEffect, useState } from "react";
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
import { wrapper } from "../../../redux/store";
export default function Enquiries() {
return (
<GenericLayout>
</GenericLayout>
);
}
/** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
return {
props: {}
};
});
import React, { useEffect } from "react"; import React, { useEffect, useState } from "react";
import Layout from "../../../components/layout/Layout"; import Layout from "../../../components/layout/Layout";
import { wrapper } from "../../../redux/store"; import { wrapper } from "../../../redux/store";
import Sidebar from "../../../components/layout/VendorDashboardSidebar"; import Sidebar from "../../../components/layout/VendorDashboardSidebar";
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!