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 (
<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>
<li className={router.pathname === "/admin/contact-us-leads" ? "active" : ""}>
<Link href="/admin/contact-us-leads">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2">
Contact Us Leads
</div>
</span>
</Link>
</li>
</ul>
)
}
return ( 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
<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>
<li className={router.pathname === "/admin/contact-us-leads" ? "active" : ""}>
<Link href="/admin/contact-us-leads">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2">Contact Us Leads</div>
</span>
</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>
</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>
);
};
...@@ -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",
width: "15%" 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;
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",
...@@ -432,7 +467,7 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta ...@@ -432,7 +467,7 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
return ( return (
<div className="p-5"> <div className="p-5">
<Table <Table
loading={loading} loading={loading}
rowSelection={rowSelection} rowSelection={rowSelection}
columns={columns} columns={columns}
dataSource={data} dataSource={data}
......
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!