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 a216359b
authored
2024-05-23 19:13:38 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
2b663a1a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
8 deletions
components/admin/VendorListing.js
components/listing/ListingInner.js
package.json
redux/actions/activityAction.js
redux/actions/userActions.js
components/admin/VendorListing.js
View file @
a216359
...
@@ -84,12 +84,13 @@ const VendorListing = () => {
...
@@ -84,12 +84,13 @@ const VendorListing = () => {
let
initialData
=
let
initialData
=
allVendors
&&
allVendors
&&
allVendors
.
map
(
item
=>
{
allVendors
.
map
(
item
=>
{
console
.
log
(
"item"
,
item
.
attributes
.
user
.
data
);
return
{
return
{
key
:
item
.
id
,
key
:
item
.
id
,
name
:
item
.
attributes
.
name
,
name
:
item
.
attributes
.
name
,
businessName
:
item
.
attributes
.
businessName
,
businessName
:
item
.
attributes
.
businessName
,
status
:
[
item
.
attributes
.
user
.
data
.
attributes
.
approved
],
status
:
[
item
.
attributes
.
user
.
data
?
.
attributes
.
approved
],
confirmed
:
item
.
attributes
.
user
.
data
.
attributes
.
confirmed
confirmed
:
item
.
attributes
.
user
.
data
?
.
attributes
.
confirmed
};
};
});
});
console
.
log
(
"initialData"
,
initialData
);
console
.
log
(
"initialData"
,
initialData
);
...
@@ -153,7 +154,7 @@ const VendorListing = () => {
...
@@ -153,7 +154,7 @@ const VendorListing = () => {
// console.log("color", color);
// console.log("color", color);
return
(
return
(
<
Tag
color
=
{
color
}
key
=
{
tag
}
>
<
Tag
color
=
{
color
}
key
=
{
tag
}
>
{
tag
.
toString
().
toUpperCase
()}
{
tag
?
.
toString
().
toUpperCase
()}
<
/Tag
>
<
/Tag
>
);
);
})}
})}
...
...
components/listing/ListingInner.js
View file @
a216359
...
@@ -83,6 +83,9 @@ const ListingInner = ({ allActivitiesData, loading }) => {
...
@@ -83,6 +83,9 @@ const ListingInner = ({ allActivitiesData, loading }) => {
if
(
activityFilters
.
sorting
)
{
if
(
activityFilters
.
sorting
)
{
filters
[
"sort"
]
=
activityFilters
.
sorting
;
filters
[
"sort"
]
=
activityFilters
.
sorting
;
}
}
if
(
activityFilters
.
priceUpperLimit
)
{
filters
[
"priceUpperLimit"
]
=
activityFilters
.
priceUpperLimit
;
}
// console.log("subcategory >>", filters);
// console.log("subcategory >>", filters);
dispatch
(
dispatch
(
getActivitiesByFilters
({
getActivitiesByFilters
({
...
@@ -96,7 +99,8 @@ const ListingInner = ({ allActivitiesData, loading }) => {
...
@@ -96,7 +99,8 @@ const ListingInner = ({ allActivitiesData, loading }) => {
minGroupSize
:
filters
.
minGroupSize
,
minGroupSize
:
filters
.
minGroupSize
,
maxGroupSize
:
filters
.
maxGroupSize
,
maxGroupSize
:
filters
.
maxGroupSize
,
ageLowerLimit
:
filters
.
ageLowerLimit
,
ageLowerLimit
:
filters
.
ageLowerLimit
,
sort
:
filters
.
sort
sort
:
filters
.
sort
,
priceUpperLimit
:
filters
.
priceUpperLimit
})
})
);
);
},
[
activityFilters
]);
},
[
activityFilters
]);
...
...
package.json
View file @
a216359
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
"@ant-design/icons"
:
"^5.3.6"
,
"@ant-design/icons"
:
"^5.3.6"
,
"@stripe/stripe-js"
:
"^1.35.0"
,
"@stripe/stripe-js"
:
"^1.35.0"
,
"antd"
:
"^5.15.3"
,
"antd"
:
"^5.15.3"
,
"antd-img-crop"
:
"^4.22.0"
,
"axios"
:
"^0.27.2"
,
"axios"
:
"^0.27.2"
,
"dayjs"
:
"^1.11.10"
,
"dayjs"
:
"^1.11.10"
,
"easyinvoice"
:
"^2.3.3"
,
"easyinvoice"
:
"^2.3.3"
,
...
...
redux/actions/activityAction.js
View file @
a216359
...
@@ -151,7 +151,7 @@ export const getActivityById = id => async dispatch => {
...
@@ -151,7 +151,7 @@ export const getActivityById = id => async dispatch => {
};
};
const
query
=
{
const
query
=
{
populate
:
[
"masterMonths"
,
"subCategory"
,
"subCategory.category"
,
"timeSlots"
,
"masterPincode"
,
"vendor"
,
"category"
]
populate
:
[
"masterMonths"
,
"subCategory"
,
"subCategory.category"
,
"timeSlots"
,
"masterPincode"
,
"vendor"
,
"category"
,
"imagesComponent"
]
};
};
const
queryString
=
qs
.
stringify
(
query
,
{
const
queryString
=
qs
.
stringify
(
query
,
{
encodeValuesOnly
:
true
encodeValuesOnly
:
true
...
@@ -319,7 +319,23 @@ export const getActivitiesForEndUser = () => async dispatch => {
...
@@ -319,7 +319,23 @@ export const getActivitiesForEndUser = () => async dispatch => {
};
};
export
const
getActivitiesByFilters
=
export
const
getActivitiesByFilters
=
({
category
,
subCategory
,
price
,
ageLowerLimit
,
duration
,
fromDate
,
toDate
,
minGroupSize
,
maxGroupSize
,
minimumDuration
,
maximumDuration
,
activityType
,
sort
,
priceLowerLimit
,
priceUpperLimit
})
=>
({
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
{
...
@@ -391,8 +407,8 @@ export const getActivitiesByFilters =
...
@@ -391,8 +407,8 @@ export const getActivitiesByFilters =
if
(
sort
)
{
if
(
sort
)
{
query
[
"sort"
]
=
sortFilter
;
query
[
"sort"
]
=
sortFilter
;
}
}
if
(
price
LowerLimit
&&
price
UpperLimit
)
{
if
(
priceUpperLimit
)
{
query
.
filters
[
"pricePerPerson"
]
=
{
$lte
:
priceUpperLimit
};
}
}
// console.log("subcategoryquery:", query);
// console.log("subcategoryquery:", query);
...
...
redux/actions/userActions.js
View file @
a216359
...
@@ -44,6 +44,7 @@ export const registerUser = userData => async dispatch => {
...
@@ -44,6 +44,7 @@ export const registerUser = userData => async dispatch => {
userFormData
.
append
(
"password"
,
userData
.
password
);
userFormData
.
append
(
"password"
,
userData
.
password
);
userFormData
.
append
(
"role"
,
userData
.
role
);
userFormData
.
append
(
"role"
,
userData
.
role
);
userFormData
.
append
(
"phone"
,
userData
.
mobile
);
userFormData
.
append
(
"phone"
,
userData
.
mobile
);
userFormData
.
append
(
"approved"
,
"pending"
);
console
.
log
(
"userFormData"
,
userFormData
);
console
.
log
(
"userFormData"
,
userFormData
);
const
response
=
await
axios
.
post
(
`
${
process
.
env
.
NEXT_PUBLIC_BACKEND_API_URL
}
/api/auth/local/register`
,
userFormData
,
config
);
const
response
=
await
axios
.
post
(
`
${
process
.
env
.
NEXT_PUBLIC_BACKEND_API_URL
}
/api/auth/local/register`
,
userFormData
,
config
);
...
...
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