Commit a216359b by jaymehta

.

1 parent 2b663a1a
......@@ -84,12 +84,13 @@ const VendorListing = () => {
let initialData =
allVendors &&
allVendors.map(item => {
console.log("item", item.attributes.user.data);
return {
key: item.id,
name: item.attributes.name,
businessName: item.attributes.businessName,
status: [item.attributes.user.data.attributes.approved],
confirmed: item.attributes.user.data.attributes.confirmed
status: [item.attributes.user.data?.attributes.approved],
confirmed: item.attributes.user.data?.attributes.confirmed
};
});
console.log("initialData", initialData);
......@@ -153,7 +154,7 @@ const VendorListing = () => {
// console.log("color", color);
return (
<Tag color={color} key={tag}>
{tag.toString().toUpperCase()}
{tag?.toString().toUpperCase()}
</Tag>
);
})}
......
......@@ -83,6 +83,9 @@ const ListingInner = ({ allActivitiesData, loading }) => {
if (activityFilters.sorting) {
filters["sort"] = activityFilters.sorting;
}
if (activityFilters.priceUpperLimit) {
filters["priceUpperLimit"] = activityFilters.priceUpperLimit;
}
// console.log("subcategory >>", filters);
dispatch(
getActivitiesByFilters({
......@@ -96,7 +99,8 @@ const ListingInner = ({ allActivitiesData, loading }) => {
minGroupSize: filters.minGroupSize,
maxGroupSize: filters.maxGroupSize,
ageLowerLimit: filters.ageLowerLimit,
sort: filters.sort
sort: filters.sort,
priceUpperLimit: filters.priceUpperLimit
})
);
}, [activityFilters]);
......
......@@ -12,6 +12,7 @@
"@ant-design/icons": "^5.3.6",
"@stripe/stripe-js": "^1.35.0",
"antd": "^5.15.3",
"antd-img-crop": "^4.22.0",
"axios": "^0.27.2",
"dayjs": "^1.11.10",
"easyinvoice": "^2.3.3",
......
......@@ -151,7 +151,7 @@ export const getActivityById = id => async dispatch => {
};
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, {
encodeValuesOnly: true
......@@ -319,7 +319,23 @@ export const getActivitiesForEndUser = () => async dispatch => {
};
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 => {
let sortFilter = [];
try {
......@@ -391,8 +407,8 @@ export const getActivitiesByFilters =
if (sort) {
query["sort"] = sortFilter;
}
if (priceLowerLimit && priceUpperLimit) {
if (priceUpperLimit) {
query.filters["pricePerPerson"] = { $lte: priceUpperLimit };
}
// console.log("subcategoryquery:", query);
......
......@@ -44,6 +44,7 @@ export const registerUser = userData => async dispatch => {
userFormData.append("password", userData.password);
userFormData.append("role", userData.role);
userFormData.append("phone", userData.mobile);
userFormData.append("approved", "pending");
console.log("userFormData", userFormData);
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/auth/local/register`, userFormData, config);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!