Commit d4682491 by jaymehta

.

1 parent 7d2b1fe3
...@@ -48,29 +48,30 @@ const ListingFilter = () => { ...@@ -48,29 +48,30 @@ const ListingFilter = () => {
</div> </div>
<div className="inner"> <div className="inner">
<div className="price"> <div className="price">
$0 - 3000 <span className="sub-text"></span> $0 - 1000 <span className="sub-text"></span>
</div> </div>
<div className="graph"> <div className="graph">
<Slider <Slider
range={{ range={{
draggableTrack: true draggableTrack: true
}} }}
step={10}
onChange={e => { onChange={e => {
// console.log(e); // console.log(e);
setTimeout(() => { dispatch(setActivityFilters({ filters: { ...activityFilters, priceLowerLimit: e[0], priceUpperLimit: e[1] } }));
dispatch(setActivityFilters({ filters: { ...activityFilters, priceLowerLimit: e[0], priceUpperLimit: e[1] } })); // setTimeout(() => {
}, 1000); // }, 1000);
}} }}
defaultValue={[0, 3000]} defaultValue={[0, 1000]}
min={0} // min={0}
max={3000} max={1000}
tooltip={{ tooltip={{
open: true open: true
}} }}
/> />
<div className="graph-price"> <div className="graph-price">
<div className="min">$0</div> <div className="min">$0</div>
<div className="min">$3000</div> <div className="min">$1000</div>
</div> </div>
{/* <img className="img-fluid w-100" src="/images/buget.svg" /> */} {/* <img className="img-fluid w-100" src="/images/buget.svg" /> */}
</div> </div>
......
...@@ -319,7 +319,7 @@ export const getActivitiesForEndUser = () => async dispatch => { ...@@ -319,7 +319,7 @@ export const getActivitiesForEndUser = () => async dispatch => {
}; };
export const getActivitiesByFilters = export const getActivitiesByFilters =
({ category, subCategory, price, ageLowerLimit, duration, fromDate, toDate, minGroupSize, maxGroupSize, minimumDuration, maximumDuration, activityType, sort }) => ({ category, subCategory, price, ageLowerLimit, duration, fromDate, toDate, minGroupSize, maxGroupSize, minimumDuration, maximumDuration, activityType, sort, priceLowerLimit, priceUpperLimit }) =>
async dispatch => { async dispatch => {
let sortFilter = []; let sortFilter = [];
try { try {
...@@ -340,7 +340,7 @@ export const getActivitiesByFilters = ...@@ -340,7 +340,7 @@ export const getActivitiesByFilters =
} }
let query = { let query = {
filters: { filters: {
approved: { $eq: true } approved: { $eq: "approved" }
// fromDate: { $gte: fromDate }, // fromDate: { $gte: fromDate },
// toDate: { $lte: toDate }, // toDate: { $lte: toDate },
// $and: [{ fromDate: { $gte: "2024-05-05" } }, { toDate: { $lte: toDate } }] // $and: [{ fromDate: { $gte: "2024-05-05" } }, { toDate: { $lte: toDate } }]
...@@ -391,6 +391,9 @@ export const getActivitiesByFilters = ...@@ -391,6 +391,9 @@ export const getActivitiesByFilters =
if (sort) { if (sort) {
query["sort"] = sortFilter; query["sort"] = sortFilter;
} }
if (priceLowerLimit && priceUpperLimit) {
}
// console.log("subcategoryquery:", query); // console.log("subcategoryquery:", query);
const queryString = qs.stringify(query, { const queryString = qs.stringify(query, {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!