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 a08c5fbe
authored
2024-06-10 16:31:41 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://git.logicloop.io/jaymehta/zango-frontend
2 parents
8634093b
4fb5e42c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
82 deletions
components/admin/ReviewsListing.js
components/detail/GuestReviews.js
components/home/Banner.js
components/layout/Header.js
components/user/MyWhishList.js
pages/user/wishlist/index.js
redux/actions/activityAction.js
styles/globals.css
components/admin/ReviewsListing.js
View file @
a08c5fb
...
...
@@ -44,7 +44,8 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
<
Accordion
.
Item
key
=
{
item
.
id
}
eventKey
=
{
item
.
id
}
>
<
Accordion
.
Header
>
<
div
className
=
"title-accord"
>
<
span
>
{
`
${
item
.
attributes
.
comments
.
slice
(
0
,
80
).
trim
()}
...`
}
<
/span> <span className="rt-name">{`by ${item.attributes.endUser.data.attributes.email}`}</
span
>
<
span
>
{
`
${
item
.
attributes
.
comments
.
slice
(
0
,
80
).
trim
()}
...`
}
<
/span>{" "
}
<
span
className
=
"rt-name"
>
{
`by
${
item
.
attributes
.
endUser
.
data
.
attributes
.
email
}
`
}
<
/span
>
<
/div
>
<
/Accordion.Header
>
<
Accordion
.
Body
>
...
...
@@ -79,11 +80,12 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
}}
centered
>
<
Modal
.
Header
closeButton
>
Are
you
sure
you
want
to
delete
this
review
?
<
/Modal.Header
>
<
Modal
.
Header
closeButton
>
<
strong
>
Are
you
sure
you
want
to
delete
this
review
?
<
/strong>
</
Modal
.
Header
>
<
Modal
.
Body
>
<
div
className
=
"row"
>
<
div
className
=
"col-12 d-flex align-items-center justify-content-center"
>
<
Button
className
=
"btnAdd btnApprove m-
0"
className
=
"btnAdd btnApprove me-3 w-10
0"
onClick
=
{
async
()
=>
{
const
res
=
await
deleteReview
({
reviewId
});
dispatch
(
getReviewsAction
({
activityId
}));
...
...
@@ -96,7 +98,7 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
Yes
<
/Button
>
<
Button
className
=
"btnAdd btnReject m-
0"
className
=
"btnAdd btnReject m-0 w-10
0"
onClick
=
{()
=>
{
setshowModal
(
false
);
setreviewId
();
...
...
@@ -105,6 +107,7 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
Cancel
<
/Button
>
<
/div
>
<
/div
>
<
/Modal.Body
>
<
/Modal
>
<
/div
>
...
...
components/detail/GuestReviews.js
View file @
a08c5fb
...
...
@@ -101,7 +101,7 @@ const GuestReviews = ({ activityById }) => {
rating
=
{
data
.
attributes
.
rating
}
starRatedColor
=
"#ffe20"
// Set the rated color to yellow
starHoverColor
=
"#ffe20"
// Set the hover color to yellow
changeRating
=
{()
=>
{}}
changeRating
=
{()
=>
{
}}
numberOfStars
=
{
5
}
name
=
"rating"
starDimension
=
"20px"
// Set star width and height
...
...
@@ -149,10 +149,12 @@ const GuestReviews = ({ activityById }) => {
starDimension="
20
px
" // Set star width and height
/>
</div>
<div className="
row
">
<div className="
col
-
md
-
6
">
<textarea
// style={{ width: "
50
%
" }}
rows={4}
className="
p
-
2
mx
-
2
col
-
md
-
6
"
className="
p
-
2
w
-
100
"
placeholder="
Comments
"
name="
comments
"
value={comments}
...
...
@@ -163,6 +165,8 @@ const GuestReviews = ({ activityById }) => {
// setrejectionReasonText(e.target.value);
}}
/>
</div>
</div>
<div className="
view
-
all
-
btn
my
-
3
">
<Button
disabled={rating == 0 || comments == ""}
...
...
components/home/Banner.js
View file @
a08c5fb
...
...
@@ -17,11 +17,11 @@ const Banner = ({ homeBanner }) => {
<
div
>
<
Swiper
slidesPerView
=
{
1
}
autoplay
=
{{
delay
:
9000
,
disableOnInteraction
:
false
}}
//
autoplay={false}
//
autoplay={{
//
delay: 9000,
//
disableOnInteraction: false
//
}}
autoplay
=
{
false
}
spaceBetween
=
{
10
}
navigation
=
{
true
}
pagination
=
{{
...
...
components/layout/Header.js
View file @
a08c5fb
...
...
@@ -46,7 +46,7 @@ const Header = () => {
},
[
endUser
]);
return
(
<
header
className
=
{
`header_wrap
${
isSticky
?
"stick"
:
""
}
`
}
>
{
isSticky
&&
<
div
style
=
{{
height
:
76
}}
className
=
"bg-transparent"
><
/div>
}
{
isSticky
&&
<
div
style
=
{{
height
:
76
}}
className
=
"bg-transparent"
><
/div>
}
<
Navbar
expand
=
"lg"
className
=
"bg-body-tertiary"
>
<
Container
fluid
>
<
Navbar
.
Brand
href
=
"/"
>
...
...
@@ -57,6 +57,9 @@ const Header = () => {
<
Navbar
.
Toggle
aria
-
controls
=
"navbarScroll"
/>
<
Navbar
.
Collapse
id
=
"navbarScroll"
>
<
Nav
className
=
" my-2 my-lg-0"
style
=
{{
maxHeight
:
"100px"
}}
navbarScroll
>
<
ActiveLink
href
=
"/user/wishlist"
activeClassName
=
"active"
>
<
a
className
=
"nav-link "
>
Wishlist
<
/a
>
<
/ActiveLink
>
<
ActiveLink
href
=
"/blog"
activeClassName
=
"active"
>
<
a
className
=
"nav-link "
>
Blogs
<
/a
>
<
/ActiveLink
>
...
...
components/user/MyWhishList.js
View file @
a08c5fb
import
Image
from
"next/image"
;
import
React
,
{
Fragment
}
from
"react"
;
import
{
Button
}
from
"react-bootstrap"
;
import
{
renderImage
}
from
"../../services/imageHandling"
;
const
MyWhishList
=
()
=>
{
const
whishListData
=
[
{
id
:
"0"
,
name
:
"City Climb"
,
description
:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
,
price
:
"$200"
,
discount
:
"40% OFF"
,
availablity
:
"For 1 Night"
,
other
:
"Includes taxes & Fees"
,
rating
:
"8.8"
,
type
:
"Top Rated"
,
image
:
"/images/user/image1.png"
},
{
id
:
"1"
,
name
:
"City Climb"
,
description
:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
,
price
:
"$200"
,
discount
:
"40% OFF"
,
availablity
:
"For 1 Night"
,
other
:
"Includes taxes & Fees"
,
rating
:
"8.8"
,
type
:
"Top Rated"
,
image
:
"/images/user/image2.png"
},
{
id
:
"2"
,
name
:
"City Climb"
,
description
:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
,
price
:
"$200"
,
discount
:
"40% OFF"
,
availablity
:
"For 1 Night"
,
other
:
"Includes taxes & Fees"
,
rating
:
"8.8"
,
type
:
"Top Rated"
,
image
:
"/images/user/image3.png"
},
{
id
:
"3"
,
name
:
"City Climb"
,
description
:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
,
price
:
"$200"
,
discount
:
"40% OFF"
,
availablity
:
"For 1 Night"
,
other
:
"Includes taxes & Fees"
,
rating
:
"8.8"
,
type
:
"Top Rated"
,
image
:
"/images/user/image4.png"
}
]
import
{
cleanImage
}
from
"../../services/imageHandling"
;
import
WishlistComponent
from
"../detail/WIshlistComponent"
;
import
{
useRouter
}
from
"next/router"
;
const
MyWhishList
=
({
data
})
=>
{
const
router
=
useRouter
();
return
(
<
Fragment
>
<
div
className
=
"container pb-5"
>
...
...
@@ -63,44 +15,45 @@ const MyWhishList = () => {
<
h2
className
=
"px-2 px-lg-0"
>
My
Bookings
<
/h2
>
<
div
className
=
"listing-items"
>
<
div
className
=
"row"
>
{
whishListData
?.
length
&&
whishListData
.
map
((
data
,
index
)
=>
(
{
data
?.
length
>
0
?
<>
{
data
.
map
((
data
,
index
)
=>
(
<
div
className
=
"col-12 col-sm-12 col-lg-3 col-md-6 px-4 px-lg-3"
key
=
{
`1
${
index
}
`
}
>
<
div
className
=
"item"
>
<
div
className
=
"browse-experiences-item"
>
<
div
className
=
"img-wrapper"
>
<
span
className
=
"image-container"
>
<
Image
src
=
{
renderImage
(
data
.
image
)}
layout
=
"fill"
className
=
"image img-fluid"
/>
<
Image
src
=
{
cleanImage
(
data
?.
attributes
?.
experience
?.
data
?.
attributes
?.
image
?.
data
?.
attributes
)}
layout
=
"fill"
className
=
"image img-fluid"
/>
<
/span
>
<
div
className
=
"top-rated"
>
Top
Rated
<
/div
>
<
/div
>
<
div
className
=
"info"
>
<
div
className
=
"top-name"
>
<
div
className
=
"title"
>
{
data
.
name
}
<
/div
>
<
div
className
=
"title"
>
{
data
?.
attributes
?.
experience
?.
data
?.
attributes
?
.
name
}
<
/div
>
<
div
className
=
"rating-wishlist"
>
<
div
className
=
"rating"
>
<
span
className
=
"number"
>
{
data
.
rating
}
<
/span
>
<
span
className
=
"number"
>
{
data
?.
attributes
?.
experience
?.
data
?.
attributes
?
.
rating
}
<
/span
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/star.svg"
/>
<
/span
>
<
/div
>
<
span
className
=
"image-container"
>
<
Image
src
=
{
renderImage
(
"/images/user/heart.svg"
)}
layout
=
"fill"
className
=
"image"
/>
<
/span
>
<
WishlistComponent
activityId
=
{
data
?.
attributes
?.
experience
?.
data
?.
id
}
userId
=
{
data
?.
attributes
?.
endUser
?.
data
?.
id
}
/
>
<
/div
>
<
/div
>
<
div
className
=
"discription"
>
Lorem
ipsum
dolor
sit
amet
,
consectetur
adipiscing
elit
,
<
a
href
=
""
>
Read
More
<
/a></
div
>
{
/* <p className="price">{data.price} <span>{data.discount}</span></p> */
}
<
div
className
=
"discription"
><
p
className
=
"text-trunc-2"
>
{
data
?.
attributes
?.
experience
?.
data
?.
attributes
?.
description
}
<
/p></
div
>
<
div
className
=
"price"
>
$
{
data
?.
price
}
<
span
className
=
"off"
>
{
data
.
discount
}
<
/span
>
$
{
data
?.
attributes
?.
experience
?.
data
?.
attributes
?.
pricePerPerson
}
<
span
className
=
"off"
>
{
}
%
OFF
<
/span
>
<
/div
>
<
div
className
=
"detail"
>
<
div
>
{
data
.
availablity
}
<
/div
>
<
div
>
{
data
.
other
}
<
/div
>
<
div
className
=
""
>
For
1
Night
<
/div
>
<
div
className
=
""
>
Includes
taxes
&
Fees
<
/div
>
<
/div
>
<
div
className
=
"explore-now"
>
<
Button
variant
=
"primary"
onClick
=
{()
=>
{
router
.
push
(
`/activities/
${
data
?.
attributes
?.
experience
?.
data
?.
id
}
`);
}}
>
Explore Now
</Button>
...
...
@@ -110,6 +63,13 @@ const MyWhishList = () => {
</div>
</div>
))}
</>
:
<>
<p>No Item Found</p>
</>
}
</div>
</div>
</div>
...
...
pages/user/wishlist/index.js
View file @
a08c5fb
import
React
from
"react"
;
import
Layout
from
"../../../components/layout/Layout"
;
import
MyWhishList
from
"../../../components/user/MyWhishList"
;
import
{
useSelector
}
from
"react-redux"
;
export
default
function
UserProfilePage
()
{
export
default
function
UserProfilePage
()
{
const
{
wishlists
}
=
useSelector
(
state
=>
state
.
wishlists
)
return
(
<
Layout
>
<
MyWhishList
/>
<
MyWhishList
data
=
{
wishlists
}
/
>
<
/Layout
>
);
};
\ No newline at end of file
redux/actions/activityAction.js
View file @
a08c5fb
...
...
@@ -547,7 +547,7 @@ export const getWishlists =
}
}
},
populate
:
[
"endUser"
,
"experience"
]
populate
:
[
"endUser"
,
"experience"
,
"experience.image"
]
};
const
queryString
=
qs
.
stringify
(
query
,
{
...
...
styles/globals.css
View file @
a08c5fb
This diff is collapsed.
Click to expand it.
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