Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit db7ced53
authored
2024-07-02 14:00:41 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
856042df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
43 deletions
components/detail/DetailSchedule.js
components/vendor/ActivityDetails.js
redux/actions/activityAction.js
components/detail/DetailSchedule.js
View file @
db7ced5
...
@@ -44,7 +44,13 @@ const DetailSchedule = ({ activityById }) => {
...
@@ -44,7 +44,13 @@ const DetailSchedule = ({ activityById }) => {
<
span
className
=
"image-container"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
alt
=
""
className
=
"image img-fluid"
src
=
"/images/availability/month.svg"
/>
<
Image
layout
=
"fill"
alt
=
""
className
=
"image img-fluid"
src
=
"/images/availability/month.svg"
/>
<
/span
>
<
/span
>
From
:
{
activityById
.
data
.
attributes
.
fromDate
}
To
:
{
activityById
.
data
.
attributes
.
toDate
}
{
activityById
.
data
.
attributes
.
fromDate
==
"2021-01-01"
?
(
"Available on all days"
)
:
(
<>
From
:
{
activityById
.
data
.
attributes
.
fromDate
}
To
:
{
activityById
.
data
.
attributes
.
toDate
}
<
/
>
)}
<
/li
>
<
/li
>
{
/* <li>
{
/* <li>
<span className="image-container">
<span className="image-container">
...
...
components/vendor/ActivityDetails.js
View file @
db7ced5
...
@@ -56,45 +56,6 @@ const ActivityDetails = ({ isUpdate }) => {
...
@@ -56,45 +56,6 @@ const ActivityDetails = ({ isUpdate }) => {
const
[
cancellationPolicy
,
setCancellationPolicy
]
=
useState
();
const
[
cancellationPolicy
,
setCancellationPolicy
]
=
useState
();
useEffect
(()
=>
{
useEffect
(()
=>
{
// dispatch(loadUser());
// setFileList([
// // {
// // uid: "-1",
// // name: "image.png",
// // status: "done",
// // url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
// // },
// // {
// // uid: "-2",
// // name: "image.png",
// // status: "done",
// // url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
// // },
// // {
// // uid: "-3",
// // name: "image.png",
// // status: "done",
// // url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
// // },
// // {
// // uid: "-4",
// // name: "image.png",
// // status: "done",
// // url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
// // },
// // {
// // uid: "-xxx",
// // percent: 50,
// // name: "image.png",
// // status: "uploading",
// // url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
// // },
// // {
// // uid: "-5",
// // name: "image.png",
// // status: "error"
// // }
// ]);
},
[]);
},
[]);
const
ActivityApprovalStatus
=
({
status
})
=>
{
const
ActivityApprovalStatus
=
({
status
})
=>
{
...
...
redux/actions/activityAction.js
View file @
db7ced5
...
@@ -400,8 +400,8 @@ export const getActivitiesByFilters =
...
@@ -400,8 +400,8 @@ export const getActivitiesByFilters =
maximumDuration
,
maximumDuration
,
activityType
,
activityType
,
sort
,
sort
,
priceLowerLimit
,
priceLowerLimit
=
0
,
priceUpperLimit
,
priceUpperLimit
=
5000
,
currentPage
currentPage
})
=>
})
=>
async
dispatch
=>
{
async
dispatch
=>
{
...
@@ -470,8 +470,11 @@ export const getActivitiesByFilters =
...
@@ -470,8 +470,11 @@ export const getActivitiesByFilters =
// { fromDate: {$lte: "2022-07-09"}}
// { fromDate: {$lte: "2022-07-09"}}
if
(
fromDate
&&
toDate
)
{
if
(
fromDate
&&
toDate
)
{
// query.filters["$and"] = [{ fromDate: { $gte: fromDate } }, { toDate: { $lte: toDate } }];
// query.filters["$and"] = [{ fromDate: { $gte: fromDate } }, { toDate: { $lte: toDate } }];
query
.
filters
[
"$or"
]
=
[{
fromDate
:
{
$eq
:
"2021-01-01"
}
},
{
$and
:
[{
fromDate
:
{
$gte
:
fromDate
}
},
{
toDate
:
{
$lte
:
toDate
}
}]
}];
//
query.filters["$or"] = [{ fromDate: { $eq: "2021-01-01" } }, { $and: [{ fromDate: { $gte: fromDate } }, { toDate: { $lte: toDate } }] }];
// query.filters["$or"] = [{ fromDate: { $gte: fromDate } }, { toDate: { $lte: toDate } }];
// query.filters["$or"] = [{ fromDate: { $gte: fromDate } }, { toDate: { $lte: toDate } }];
query
.
filters
[
"$not"
]
=
{
$or
:
[{
$and
:
[{
fromDate
:
{
$lte
:
fromDate
}
},
{
toDate
:
{
$lte
:
fromDate
}
}]
},
{
$and
:
[{
fromDate
:
{
$gte
:
toDate
}
},
{
toDate
:
{
$gte
:
toDate
}
}]
}]
};
delete
query
.
filters
.
fromDate
;
delete
query
.
filters
.
fromDate
;
delete
query
.
filters
.
toDate
;
delete
query
.
filters
.
toDate
;
}
}
...
@@ -525,6 +528,14 @@ export const getActivitiesByFilters =
...
@@ -525,6 +528,14 @@ export const getActivitiesByFilters =
if
(
sort
)
{
if
(
sort
)
{
query
[
"sort"
]
=
sortFilter
;
query
[
"sort"
]
=
sortFilter
;
}
}
if
(
priceUpperLimit
&&
priceLowerLimit
)
{
// query.filters[]
if
(
query
.
filters
.
$and
)
{
query
.
filters
.
$and
=
[...
query
.
filters
.
$and
,
{
pricePerPerson
:
{
$lte
:
priceUpperLimit
}
},
{
pricePerPerson
:
{
$gte
:
priceLowerLimit
}
}];
}
else
{
query
.
filters
[
"$and"
]
=
[{
pricePerPerson
:
{
$lte
:
priceUpperLimit
}
},
{
pricePerPerson
:
{
$gte
:
priceLowerLimit
}
}];
}
}
if
(
priceUpperLimit
)
{
if
(
priceUpperLimit
)
{
query
.
filters
[
"pricePerPerson"
]
=
{
$lte
:
priceUpperLimit
};
query
.
filters
[
"pricePerPerson"
]
=
{
$lte
:
priceUpperLimit
};
}
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment