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 90695a54
authored
2024-06-29 12:58:37 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
1eec64c6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
99 deletions
components/admin/Reviews.js
components/admin/ReviewsListing.js
components/home/SearchBar.js
components/layout/Header.js
components/listing/LetDiscover.js
components/listing/ListingInner.js
components/vendor/ActivityListingRBAC.js
components/admin/Reviews.js
View file @
90695a5
...
@@ -179,7 +179,6 @@ const Reviews = ({ isVendor }) => {
...
@@ -179,7 +179,6 @@ const Reviews = ({ isVendor }) => {
};
};
})
})
);
);
// dispatch(getActivitiesByFilters({}));
},
[
reviews
]);
},
[
reviews
]);
return
(
return
(
...
...
components/admin/ReviewsListing.js
View file @
90695a5
...
@@ -89,7 +89,6 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
...
@@ -89,7 +89,6 @@ const ReviewsListing = ({ activityId, setshowReviews, isVendor }) => {
onClick
=
{
async
()
=>
{
onClick
=
{
async
()
=>
{
const
res
=
await
deleteReview
({
reviewId
});
const
res
=
await
deleteReview
({
reviewId
});
dispatch
(
getReviewsAction
({
activityId
}));
dispatch
(
getReviewsAction
({
activityId
}));
// dispatch(getActivitiesByFilters({}));
toast
.
success
(
"Review deleted"
);
toast
.
success
(
"Review deleted"
);
setshowModal
(
false
);
setshowModal
(
false
);
// console.log(res);
// console.log(res);
...
...
components/home/SearchBar.js
View file @
90695a5
...
@@ -24,7 +24,7 @@ const SearchBar = () => {
...
@@ -24,7 +24,7 @@ const SearchBar = () => {
<
Typeahead
<
Typeahead
open
=
{
open
}
open
=
{
open
}
id
=
"select"
id
=
"select"
placeholder
=
"Search for
products, brand
s or categories"
placeholder
=
"Search for
experience
s or categories"
onBlur
=
{()
=>
{
onBlur
=
{()
=>
{
setopen
(
false
);
setopen
(
false
);
}}
}}
...
...
components/layout/Header.js
View file @
90695a5
...
@@ -11,11 +11,12 @@ import { getWishlists } from "../../redux/actions/activityAction";
...
@@ -11,11 +11,12 @@ import { getWishlists } from "../../redux/actions/activityAction";
import
{
Typeahead
}
from
"react-bootstrap-typeahead"
;
import
{
Typeahead
}
from
"react-bootstrap-typeahead"
;
import
axios
from
"axios"
;
import
axios
from
"axios"
;
import
ActiveLink
from
"../common/ActiveLink"
;
import
ActiveLink
from
"../common/ActiveLink"
;
import
{
Skeleton
}
from
"antd"
;
const
Header
=
()
=>
{
const
Header
=
()
=>
{
const
[
isGridViewOpen
,
setIsGridViewOpen
]
=
useState
(
false
);
const
[
isGridViewOpen
,
setIsGridViewOpen
]
=
useState
(
false
);
const
{
loadedUser
}
=
useSelector
(
state
=>
state
.
loadedUser
);
const
{
loadedUser
}
=
useSelector
(
state
=>
state
.
loadedUser
);
const
{
endUser
}
=
useSelector
(
state
=>
state
.
endUser
);
const
{
endUser
,
loading
}
=
useSelector
(
state
=>
state
.
endUser
);
const
[
open
,
setopen
]
=
useState
(
false
);
const
[
open
,
setopen
]
=
useState
(
false
);
const
[
options
,
setoptions
]
=
useState
([]);
const
[
options
,
setoptions
]
=
useState
([]);
// console.log("options", options);
// console.log("options", options);
...
@@ -79,7 +80,9 @@ const Header = () => {
...
@@ -79,7 +80,9 @@ const Header = () => {
<
/div
>
<
/div
>
<
div
className
=
""
>
<
div
className
=
""
>
<
div
className
=
"name"
>
John
Doe
<
/div
>
<
div
className
=
"name"
>
John
Doe
<
/div
>
<
div
className
=
"view-profile"
><
a
href
=
""
>
View
Profile
<
/a></
div
>
<
div
className
=
"view-profile"
>
<
a
href
=
""
>
View
Profile
<
/a
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"user-item"
>
<
div
className
=
"user-item"
>
...
@@ -109,11 +112,13 @@ const Header = () => {
...
@@ -109,11 +112,13 @@ const Header = () => {
<
/a
>
<
/a
>
<
/li
>
<
/li
>
<
li
>
<
li
>
<
a
onClick
=
{
async
()
=>
{
<
a
signOut
({
redirect
:
false
});
onClick
=
{
async
()
=>
{
await
router
.
push
(
"/"
);
signOut
({
redirect
:
false
});
window
.
location
.
reload
();
await
router
.
push
(
"/"
);
}}
>
window
.
location
.
reload
();
}}
>
<
span
className
=
"image-container"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/logout.svg"
/>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/logout.svg"
/>
<
/span
>
<
/span
>
...
@@ -122,7 +127,6 @@ const Header = () => {
...
@@ -122,7 +127,6 @@ const Header = () => {
<
/li
>
<
/li
>
<
/ul
>
<
/ul
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
/* <Button
{
/* <Button
...
@@ -192,7 +196,7 @@ const Header = () => {
...
@@ -192,7 +196,7 @@ const Header = () => {
setopen
(
false
);
setopen
(
false
);
}}
}}
id
=
"select"
id
=
"select"
placeholder
=
"Search for
products, brand
s or categories"
placeholder
=
"Search for
experience
s or categories"
onChange
=
{
selected
=>
{
onChange
=
{
selected
=>
{
console
.
log
(
"selected"
,
selected
);
console
.
log
(
"selected"
,
selected
);
// router.push("/listing");
// router.push("/listing");
...
@@ -249,75 +253,79 @@ const Header = () => {
...
@@ -249,75 +253,79 @@ const Header = () => {
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
<
/Form
>
<
/Form
>
{
/* {console.log(user.id)} */
}
{
!
loading
?
(
{
loadedUser
&&
loadedUser
.
id
?
(
<>
<
div
className
=
"top-btn hide-on-mobile"
>
{
loadedUser
&&
loadedUser
.
id
?
(
<
div
className
=
"logout-bk"
>
<
div
className
=
"top-btn hide-on-mobile"
>
<
a
onClick
=
{
toggleGridViewDropdown
}
className
=
"user-icon"
>
<
div
className
=
"logout-bk"
>
<
span
className
=
"image-container user-pic"
>
<
a
onClick
=
{
toggleGridViewDropdown
}
className
=
"user-icon"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/user.svg"
/>
<
span
className
=
"image-container user-pic"
>
<
/span
>
<
span
className
=
"image-container arrow-d"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/user-arrow-down.svg"
/>
<
/span
>
<
/a
>
{
/* <p>{loadedUser.phone}</p> */
}
<
div
className
=
{
`inner-box
${
isGridViewOpen
?
"open"
:
""
}
`
}
>
<
div
className
=
"user-info"
>
<
div
className
=
"pic"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/user.svg"
/>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/user.svg"
/>
<
/span
>
<
/span
>
<
/div
>
<
span
className
=
"image-container arrow-d"
>
<
div
className
=
""
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/user-arrow-down.svg"
/>
<
div
className
=
"name"
>
John
Doe
<
/div
>
<
/span
>
<
div
className
=
"view-profile"
><
a
href
=
""
>
View
Profile
<
/a></
div
>
<
/a
>
<
/div
>
{
/* <p>{loadedUser.phone}</p> */
}
<
/div
>
<
div
className
=
{
`inner-box
${
isGridViewOpen
?
"open"
:
""
}
`
}
>
<
div
className
=
"user-item"
>
<
div
className
=
"user-info"
>
<
ul
>
<
div
className
=
"pic"
>
<
li
>
<
a
href
=
""
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/my-booking.svg"
/>
<
/span
>
My
Enquires
<
/a
>
<
/li
>
<
li
>
<
a
href
=
"/user/wishlist"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/my-wishlist.svg"
/>
<
/span
>
My
Wishlist
<
/a
>
<
/li
>
<
li
>
<
a
href
=
"/gift-card"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/my-gift-card.svg"
/>
<
/span
>
My
Gift
Card
<
/a
>
<
/li
>
<
li
>
<
a
onClick
=
{
async
()
=>
{
signOut
({
redirect
:
false
});
await
router
.
push
(
"/"
);
window
.
location
.
reload
();
}}
>
<
span
className
=
"image-container"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/
logout
.svg"
/>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/
user
.svg"
/>
<
/span
>
<
/span
>
Log
out
<
/div
>
<
/a
>
<
div
className
=
""
>
<
/li
>
<
div
className
=
"name"
>
John
Doe
<
/div
>
<
/ul
>
<
div
className
=
"view-profile"
>
<
a
href
=
""
>
View
Profile
<
/a
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"user-item"
>
<
ul
>
<
li
>
<
a
href
=
""
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/my-booking.svg"
/>
<
/span
>
My
Enquires
<
/a
>
<
/li
>
<
li
>
<
a
href
=
"/user/wishlist"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/my-wishlist.svg"
/>
<
/span
>
My
Wishlist
<
/a
>
<
/li
>
<
li
>
<
a
href
=
"/gift-card"
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/my-gift-card.svg"
/>
<
/span
>
My
Gift
Card
<
/a
>
<
/li
>
<
li
>
<
a
onClick
=
{
async
()
=>
{
signOut
({
redirect
:
false
});
await
router
.
push
(
"/"
);
window
.
location
.
reload
();
}}
>
<
span
className
=
"image-container"
>
<
Image
layout
=
"fill"
priority
alt
=
""
className
=
"image img-fluid"
src
=
"/images/icons/logout.svg"
/>
<
/span
>
Log
out
<
/a
>
<
/li
>
<
/ul
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
/* <Button
<
/div
>
<
/div
>
{
/* <Button
onClick={async () => {
onClick={async () => {
signOut({ redirect: false });
signOut({ redirect: false });
await router.push("/");
await router.push("/");
...
@@ -328,27 +336,34 @@ const Header = () => {
...
@@ -328,27 +336,34 @@ const Header = () => {
>
>
Log out
Log out
</Button> */
}
</Button> */
}
<
/div
>
<
/div
>
)
:
(
<
div
className
=
"top-btn hide-on-mobiles"
>
<
Button
onClick
=
{()
=>
{
router
.
push
(
"/signup/user"
);
}}
className
=
"me-3"
variant
=
"primary"
>
Sign
Up
<
/Button
>
<
Button
onClick
=
{()
=>
{
router
.
push
(
"/login/user"
);
}}
className
=
""
variant
=
"primary"
>
Log
In
<
/Button
>
<
/div
>
)}
<
/
>
)
:
(
)
:
(
<
div
className
=
"top-btn hide-on-mobiles asdasd"
>
<
div
className
=
"d-flex align-items-center gap-2"
>
<
Button
{
/* <Skeleton.Image active style={{ height: 50, width: 70 }} /> */
}
onClick
=
{()
=>
{
<
Skeleton
.
Button
active
style
=
{{
height
:
40
,
width
:
190
}}
shape
=
{
"rounded"
}
/
>
router
.
push
(
"/signup/user"
);
}}
className
=
"me-3"
variant
=
"primary"
>
Sign
Up
<
/Button
>
<
Button
onClick
=
{()
=>
{
router
.
push
(
"/login/user"
);
}}
className
=
""
variant
=
"primary"
>
Log
In
<
/Button
>
<
/div
>
<
/div
>
)}
)}
<
/Navbar.Collapse
>
<
/Navbar.Collapse
>
...
...
components/listing/LetDiscover.js
View file @
90695a5
...
@@ -42,7 +42,6 @@ const LetDiscover = ({ categories }) => {
...
@@ -42,7 +42,6 @@ const LetDiscover = ({ categories }) => {
// }, [router]);
// }, [router]);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
"router.query.category"
,
router
.
query
.
category
);
console
.
log
(
"router.query.category"
,
router
.
query
.
category
);
// console.log("getting id to filtered categoryiiiiiiiiiiifsdkhdjkskiiiiiiiiiiiiiiiiiiiiiiiii", parseInt(router.query.category))
if
(
router
.
query
.
category
)
{
if
(
router
.
query
.
category
)
{
dispatch
(
setActivityFilters
({
filters
:
{
category
:
Number
(
router
.
query
.
category
),
subCategories
:
[]
}
}));
dispatch
(
setActivityFilters
({
filters
:
{
category
:
Number
(
router
.
query
.
category
),
subCategories
:
[]
}
}));
...
...
components/listing/ListingInner.js
View file @
90695a5
...
@@ -100,7 +100,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
...
@@ -100,7 +100,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
dispatch
(
dispatch
(
getActivitiesByFilters
({
getActivitiesByFilters
({
subCategory
:
filters
.
subCategory
,
subCategory
:
filters
.
subCategory
,
category
:
filters
.
category
,
category
:
filters
.
category
?
filters
.
category
:
router
.
query
.
category
,
activityType
:
filters
.
activityType
,
activityType
:
filters
.
activityType
,
fromDate
:
filters
.
fromDate
,
fromDate
:
filters
.
fromDate
,
toDate
:
filters
.
toDate
,
toDate
:
filters
.
toDate
,
...
...
components/vendor/ActivityListingRBAC.js
View file @
90695a5
...
@@ -185,7 +185,9 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
...
@@ -185,7 +185,9 @@ export const ActivityListingRBAC = ({ setactivityDetailInfo, setShowActivityDeta
filters
:
categoryFilterArray
,
filters
:
categoryFilterArray
,
filterMode
:
"tree"
,
filterMode
:
"tree"
,
filterSearch
:
true
,
filterSearch
:
true
,
onFilter
:
(
value
,
record
)
=>
record
.
category
.
startsWith
(
value
),
onFilter
:
(
value
,
record
)
=>
{
console
.
log
(
value
);
},
width
:
"15%"
width
:
"15%"
},
},
{
{
...
...
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