Commit f58d44fd by Ravindra Kanojiya
2 parents e4bc11cc 5ff3e0ee
......@@ -8,8 +8,7 @@ import SignUpToExperienceOurPlatform from '../home/SignUpToExperienceOurPlatform
import PageBanner from './PageBanner.js'
const AboutUs = () => {
return (
<>
<>
<PageBanner />
<MissionVision />
<Offers />
......
import { signOut } from "next-auth/react";
import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/router";
import React, { Fragment, useEffect, useState } from "react";
import { renderImage } from "../../services/imageHandling";
const DropdownUserProfile = () => {
const router = useRouter();
const logoutHandler = () => {
signOut();
};
return (
<Fragment>
<div className="row">
<div className="col-12 col-lg-12">
<div>
<ul className="link-list">
<li>
<Link href="/personal-details">
<a>
Personal Info <i className="arrow-right"></i>
</a>
</Link>
</li>
</ul>
</div>
</div>
</div>
</Fragment>
);
};
export default DropdownUserProfile;
......@@ -24,7 +24,7 @@ const Login = props => {
<div className="row">
<div className="col-11 col-lg-4 login-div">
<div className="">
<h2>{props.type == "vendor" ? "Vendor Login" : "Login to Experience"}</h2>
<h2>{props.type == "user" ? "Login to Experience" : (props.type == "vendor" ? "Vendor Login" : "Admin Login")}</h2>
<div className="form-container">
<Formik
initialValues={{
......
This diff could not be displayed because it is too large.
......@@ -10,6 +10,7 @@
},
"dependencies": {
"@stripe/stripe-js": "^1.35.0",
"antd": "^5.15.3",
"axios": "^0.27.2",
"easyinvoice": "^2.3.3",
"formik": "^2.2.9",
......@@ -41,7 +42,7 @@
"redux": "^4.2.0",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.1",
"swiper": "^11.0.7",
"swiper": "^11.1.0",
"validator": "^13.7.0",
"yup": "^0.32.11"
},
......
import React from "react";
import Layout from "../../../components/layout/Layout";
import ActivityDetails from "../../../components/vendor/ActivityDetails";
import { getAllCategories, getAllSubCategories } from "../../../redux/actions/categoriesAction";
import { loadUser } from "../../../redux/actions/userActions";
import { getLoggedInVendor } from "../../../redux/actions/vendorActions";
import { wrapper } from "../../../redux/store";
export default function ActivityDetailsPage () {
......@@ -9,4 +13,19 @@ export default function ActivityDetailsPage () {
<ActivityDetails />
</Layout>
);
};
\ No newline at end of file
};
/** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
await store.dispatch(loadUser());
await store.dispatch(getAllCategories())
// await store.dispatch(getLoggedInVendor())
// await store.dispatch(getAllSubCategories())
return {
props: {}
};
});
\ No newline at end of file
......@@ -3,6 +3,7 @@ import { getSession } from "next-auth/react";
import { CREATE_ACTIVITY_FAIL, CREATE_ACTIVITY_REQUEST, CREATE_ACTIVITY_SUCCESS } from "../constants/activitiesConstants";
export const createActivity = data => async dispatch => {
console.log("data", data);
const session = await getSession();
try {
if (!session) {
......@@ -26,7 +27,7 @@ export const createActivity = data => async dispatch => {
}
};
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/experiences`);
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/experiences`, activityData, config);
dispatch({
type: CREATE_ACTIVITY_SUCCESS,
......@@ -40,3 +41,14 @@ export const createActivity = data => async dispatch => {
});
}
};
// export const getMasterDays = async () => {
// const config = {
// headers: {
// "Content-Type": "application/json"
// }
// };
// const response = await axios.get(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/master-days`, config);
// console.log("response",response.data);
// return response.data;
// };
import axios from "axios";
import qs from "qs";
import {
GET_CATEGORIES_FAIL,
GET_CATEGORIES_REQUEST,
GET_CATEGORIES_SUCCESS,
GET_SUB_CATEGORIES_FAIL,
GET_SUB_CATEGORIES_REQUEST,
GET_SUB_CATEGORIES_SUCCESS
} from "../constants/categoryConstants";
export const getAllCategories = () => async dispatch => {
try {
dispatch({
type: GET_CATEGORIES_REQUEST
});
const config = {
headers: {
"Content-Type": "application/json"
}
};
const response = await axios.get(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/categories`, config);
dispatch({
type: GET_CATEGORIES_SUCCESS,
payload: response.data
});
return response.data;
} catch (error) {
dispatch({
type: GET_CATEGORIES_FAIL,
payload: error.response.data
});
}
};
export const getAllSubCategories = categoryName => async dispatch => {
try {
dispatch({
type: GET_SUB_CATEGORIES_REQUEST
});
const config = {
headers: {
"Content-Type": "application/json"
}
};
const query = {
filters: {
category: {
name: { $eq: categoryName }
}
},
populate: ["category"]
};
const queryString = qs.stringify(query, {
encodeValuesOnly: true
});
const response = await axios.get(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/sub-categories/?${queryString}`, config);
dispatch({
type: GET_SUB_CATEGORIES_SUCCESS,
payload: response.data
});
return response.data;
} catch (error) {
dispatch({
type: GET_SUB_CATEGORIES_FAIL,
payload: error.response.data
});
}
};
......@@ -119,7 +119,8 @@ export const getLoggedInVendor = () => async dispatch => {
const response = await axios.get(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/vendors/?${queryString}`, config);
console.log("response", response.data.data[0]);
dispatch({
type: GET_LOGGED_IN_VENDOR_SUCCESS
type: GET_LOGGED_IN_VENDOR_SUCCESS,
payload: response.data.data[0]
});
return response.data.data[0];
} catch (error) {
......
export const GET_CATEGORIES_REQUEST = "GET_CATEGORIES_REQUEST"
export const GET_CATEGORIES_SUCCESS = "GET_CATEGORIES_SUCCESS"
export const GET_CATEGORIES_FAIL = "GET_CATEGORIES_FAIL"
export const GET_SUB_CATEGORIES_REQUEST = "GET_SUB_CATEGORIES_REQUEST"
export const GET_SUB_CATEGORIES_SUCCESS = "GET_SUB_CATEGORIES_SUCCESS"
export const GET_SUB_CATEGORIES_FAIL = "GET_SUB_CATEGORIES_FAIL"
export const CLEAR_ERRORS = "CLEAR_ERRORS";
\ No newline at end of file
import { GET_CATEGORIES_REQUEST, CLEAR_ERRORS, GET_CATEGORIES_SUCCESS, GET_CATEGORIES_FAIL, GET_SUB_CATEGORIES_REQUEST, GET_SUB_CATEGORIES_FAIL, GET_SUB_CATEGORIES_SUCCESS } from "../constants/categoryConstants";
export const getAllCategoriesReducer = (state = { loading: true, success: false, categories: null }, action) => {
switch (action.type) {
case GET_CATEGORIES_REQUEST:
return {
loading: true,
};
case GET_CATEGORIES_SUCCESS:
return {
loading: false,
categories: action.payload
};
case GET_CATEGORIES_FAIL:
return {
loading: false,
error: action.payload.error.message
};
case CLEAR_ERRORS:
return {
...state,
error: null
};
default:
return state;
}
};
export const getAllSubCategoriesReducer = (state = { loading: true, success: false, subCategories: null }, action) => {
switch (action.type) {
case GET_SUB_CATEGORIES_REQUEST:
return {
loading: true,
};
case GET_SUB_CATEGORIES_SUCCESS:
return {
loading: false,
subCategories: action.payload
};
case GET_SUB_CATEGORIES_FAIL:
return {
loading: false,
error: action.payload.error.message
};
case CLEAR_ERRORS:
return {
...state,
error: null
};
default:
return state;
}
};
\ No newline at end of file
......@@ -6,6 +6,7 @@ import { enquiryReducer } from "./enquiryReducer";
import { displayEnquireNowReducer } from "./enquireNowModalReducer";
import { getVendorDetailsReducer, loggedInVendorReducer, updateVendorReducer } from "./vendorReducers";
import { createActivityReducer } from "./activitiesReducer";
import { getAllCategoriesReducer, getAllSubCategoriesReducer } from "./categoryReducer";
const reducers = combineReducers({
townships: townshipsReducer,
......@@ -24,6 +25,8 @@ const reducers = combineReducers({
updatedVendorData: updateVendorReducer,
vendorDetails: getVendorDetailsReducer,
activityData: createActivityReducer,
categories: getAllCategoriesReducer,
subCategories: getAllSubCategoriesReducer,
});
export default reducers;
......@@ -6,7 +6,7 @@ export const cleanImage = originalImage => {
if (originalImage.url.startsWith("http")) {
imageUrl = originalImage.url;
} else {
/** If now S3, then images are stored under the public/uploads directory of Strapi */
/** If now S3, then images are stored under the public/uploads directory of Strapi */
imageUrl = `${process.env.NEXT_PUBLIC_BACKEND_API_URL}${originalImage.url}`;
}
}
......@@ -14,7 +14,6 @@ export const cleanImage = originalImage => {
return imageUrl;
};
export const renderImage = imagePath => {
let imageUrl = "/images/default.svg";
......@@ -32,3 +31,17 @@ export const renderImage = imagePath => {
return imageUrl;
};
export const sanitizeTimeFormat = ({ data }) => {
console.log("here sant 1")
if (!data.fromHours || !data.fromMins || !data.toHours || !data.toMins) {
console.log("here sant")
return null
}
const fromTime = `${data.fromHours}:${data.fromMins}:00`;
const toTime = `${data.toHours}:${data.toMins}:00`;
const day = data.day;
return { fromTime, toTime, day };
// const day
};
......@@ -394,25 +394,25 @@ header {
margin-right: 2rem;
font-size: 15px;
}
.home-banner-bg{
.home-banner-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.home-banner-bg>span{
.home-banner-bg > span {
height: 100%;
display: block;
}
.home-banner-bg>span>span{
.home-banner-bg > span > span {
height: 100% !important;
}
.home-banner-bg>span>span .image{
.home-banner-bg > span > span .image {
object-fit: cover !important;
border-radius: 0 0 136px 136px;
}
.banner-bg{
.banner-bg {
position: absolute;
left: 0;
top: 0;
......@@ -1428,23 +1428,21 @@ span.form-error,
border: 1px solid #0070bd;
}
.btnAdd:hover,
.btnAdd:focus,
.btnAdd:active {
border: 1px solid #0070BD;
border: 1px solid #0070bd;
}
.activityDetails .accordionItem {
padding: 1rem;
border-bottom: 1px solid #ECECEC;
border-bottom: 1px solid #ececec;
}
.activityDetails .accordionItem:last-child {
border-bottom: none;
}
/* The radioContainer */
.radioContainer {
display: block;
......@@ -1480,19 +1478,19 @@ span.form-error,
transform: translateY(-55%);
height: 20px;
width: 20px;
background-color: #FFF;
background-color: #fff;
border-radius: 50%;
border: 1px solid #75777B;
border: 1px solid #75777b;
}
/* On mouse-over, add a grey background color */
.radioContainer:hover input~.checkmark {
background-color: #FFF;
.radioContainer:hover input ~ .checkmark {
background-color: #fff;
}
/* When the radio button is checked, add a blue background */
.radioContainer input:checked~.checkmark {
color: #0070BD;
.radioContainer input:checked ~ .checkmark {
color: #0070bd;
}
/* Create the indicator (the dot/circle - hidden when not checked) */
......@@ -1503,7 +1501,7 @@ span.form-error,
}
/* Show the indicator (dot/circle) when checked */
.radioContainer input:checked~.checkmark:after {
.radioContainer input:checked ~ .checkmark:after {
display: block;
}
......@@ -1514,7 +1512,7 @@ span.form-error,
width: 12px;
height: 12px;
border-radius: 50%;
background: #0070BD;
background: #0070bd;
transform: translate(-50%, -50%);
}
......@@ -1565,7 +1563,7 @@ span.form-error,
.customUploadImage {
position: relative;
display: inline-block;
border: .81px solid #000;
border: 0.81px solid #000;
border-radius: 10px;
width: 51px;
height: 51px;
......@@ -1605,14 +1603,13 @@ span.form-error,
font-size: 15px !important;
line-height: 15.17px !important;
text-align: left;
color: #0070BD;
color: #0070bd;
text-decoration: underline;
text-wrap: nowrap;
margin-top: 10px;
cursor: pointer;
}
/*--------- orders listing -----------*/
.rightContent h2 {
font-family: "Sofia Pro Bold";
......@@ -1633,9 +1630,9 @@ span.form-error,
}
.listingTable thead tr th {
background-color: #E9EEF0;
background-color: #e9eef0;
padding: 12px;
color: #1C1C1E;
color: #1c1c1e;
font-family: "Poppins SemiBold";
font-size: 16px;
line-height: 25px;
......@@ -1651,7 +1648,7 @@ span.form-error,
.listingTable .check-container .checkmark {
top: 5px;
border: 1px solid rgba(218, 220, 224, 1)
border: 1px solid rgba(218, 220, 224, 1);
}
.listingTable .check-container .checkmark:after {
......@@ -1676,7 +1673,7 @@ span.form-error,
font-family: "Poppins Regular";
font-size: 15px;
line-height: 22px;
color: #1C1C1E;
color: #1c1c1e;
}
.listingTable tbody tr td span {
......@@ -1695,19 +1692,17 @@ span.form-error,
}
.statusDiv.processing {
background-color: #DFF3FB;
border: 1px solid #01A7DB;
color: #3198F3;
background-color: #dff3fb;
border: 1px solid #01a7db;
color: #3198f3;
}
.statusDiv.completed {
background-color: #F1FFEB;
border: 1px solid #5ED028;
color: #5ED028;
background-color: #f1ffeb;
border: 1px solid #5ed028;
color: #5ed028;
}
/*--------------------------*/
.let-discover-carousal a {
......@@ -2600,8 +2595,47 @@ footer hr {
background-size: 100%;
display: block;
}
.mySwiper01 .swiper-button-prev:after {
background: url(/images/icons/arrow-left.svg) no-repeat center;
.multi-select {
width: 100%;
border: 1px solid #000;
border-radius: 10px;
}
@media (min-width: 992px) {
.navbar-expand-lg .navbar-nav .nav-link {
margin: 0 2rem;
}
.navbar-expand-lg .navbar-collapse {
display: flex !important;
flex-basis: auto;
align-items: center;
justify-content: flex-end;
}
.navbar-expand-lg .navbar-nav .nav-link.gift-card {
display: flex;
align-items: center;
position: relative;
}
.navbar-expand-lg .navbar-nav .nav-link.gift-card::after {
content: "";
background: #000;
height: 2px;
width: 100%;
bottom: 0;
left: 0;
position: absolute;
}
.navbar-expand-lg .navbar-nav .nav-link.gift-card .image-container {
width: 21px;
margin-left: 10px;
}
.mySwiper01 .swiper-button-prev:after {
background: url(/images/icons/arrow-left.svg) no-repeat center;
}
}
.mySwiper01 .swiper-button-next:after {
background: url(/images/icons/arrow-right.svg) no-repeat center;
......@@ -2873,14 +2907,14 @@ footer hr {
height: 220px;
position: relative;
}
.blog-item .img-wrapper .image-container{
.blog-item .img-wrapper .image-container {
height: 100%;
display: block;
}
.blog-item .img-wrapper .image-container>span{
.blog-item .img-wrapper .image-container > span {
height: 100% !important;
}
.blog-item .img-wrapper .image-container>span>.image{
.blog-item .img-wrapper .image-container > span > .image {
object-fit: cover;
border-radius: 25px 25px 0 0;
}
......@@ -2907,7 +2941,7 @@ footer hr {
.blog-item .info .read-row .image-container {
margin-right: 0.5rem;
width: 12px;
margin-top: -3px;
margin-top: -3px;
}
.blog-item .info .title {
font-size: 20px;
......@@ -2929,7 +2963,7 @@ footer hr {
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.blog-item .info .read-more .btn{
.blog-item .info .read-more .btn {
font-size: 13px;
line-height: 15px;
padding-top: 0.675rem;
......@@ -2950,117 +2984,118 @@ footer hr {
padding: 0;
border-top: 0;
}
.blogs-filter .btn.btn-primary{
.blogs-filter .btn.btn-primary {
padding-top: 0.475rem;
padding-bottom: 0.475rem;
}
.blog-detail-inner-session .profile{
.blog-detail-inner-session .profile {
display: flex;
align-items: center;
}
.blog-detail-inner-session .profile .image-container{
.blog-detail-inner-session .profile .image-container {
width: 56px;
display: inline-block;
margin-right: 0.5rem;
}
.blog-detail-inner-session .date{
.blog-detail-inner-session .date {
display: flex;
align-items: center;
justify-content: flex-end;
}
.blog-detail-inner-session .date .image-container{
.blog-detail-inner-session .date .image-container {
width: 29px;
display: inline-block;
margin-right: 0.5rem;
}
.blog-detail-inner-session .flag-list{
.blog-detail-inner-session .flag-list {
padding: 2rem 0;
}
.blog-detail-inner-session .flag-list li{
.blog-detail-inner-session .flag-list li {
display: inline-block;
margin-right: 1rem;
}
.blog-detail-inner-session .flag-list li a{
background: #F7F5F1;
.blog-detail-inner-session .flag-list li a {
background: #f7f5f1;
border-radius: 5px;
color: #000;
padding: 0.5rem 1rem;
display: block;
}
.blog-detail-inner-session h2{
.blog-detail-inner-session h2 {
font-size: 32px;
line-height: 38px;
font-weight: 400;
margin-bottom: 2rem;
}
.blog-detail-inner-session p{
margin-bottom: 1.5rem;
.blog-detail-inner-session p {
margin-bottom: 1.5rem;
}
.blog-detail-inner-session{
.blog-detail-inner-session {
padding-bottom: 3rem;
}
.s-page-session{
.s-page-session {
margin: 5rem 0;
}
.s-page-session h2{
.s-page-session h2 {
font-size: 32px;
line-height: 40px;
font-weight: 400;
margin-bottom: 1rem;
}
.s-page-session p{
.s-page-session p {
margin-bottom: 1.5rem;
}
.s-page-session ul{
.s-page-session ul {
list-style-type: disc;
list-style-position: inside;
margin-left: 2rem;
margin-bottom: 2rem;
}
.gift-card-session{
.gift-card-session {
padding: 5rem 0;
}
.gift-card-lt{
.gift-card-lt {
text-align: center;
width: 354px;
height: 228px;
}
.gift-card-lt .gift-box{
.gift-card-lt .gift-box {
height: 100%;
background: #F7F5F1;
background: #f7f5f1;
display: flex;
align-items: center;
justify-content: center;
border-radius: 13px;
margin-bottom: 1rem;
}
.gift-card-rt{
border-left: 2px solid #E9E9E9;
.gift-card-rt {
border-left: 2px solid #e9e9e9;
padding-left: 3rem;
}
.gift-card-session .back-btn .image-container{
.gift-card-session .back-btn .image-container {
width: 15px;
display: inline-block;
}
.gift-card-amt ul li{
.gift-card-amt ul li {
display: inline-block;
vertical-align: top;
}
.gift-card-amt ul li input[type=radio] {
.gift-card-amt ul li input[type="radio"] {
display: none;
}
.gift-card-amt ul li a,.gift-card-amt ul li label {
.gift-card-amt ul li a,
.gift-card-amt ul li label {
cursor: pointer;
padding: .5rem 1rem;
padding: 0.5rem 1rem;
display: inline-block;
/* border: 1px solid #000; */
border-radius: 12px;
font-size: 22px;
line-height: 22px;
margin: .5rem;
margin: 0.5rem;
min-width: 155px;
text-align: center;
background: #F7F5F1;
background: #f7f5f1;
display: flex;
flex-direction: column;
line-height: 13px;
......@@ -3068,25 +3103,27 @@ footer hr {
align-items: center;
justify-content: center;
}
.gift-card-amt ul li a,.gift-card-amt ul li label>span{
.gift-card-amt ul li a,
.gift-card-amt ul li label > span {
font-size: 14px;
}
.gift-card-amt ul li input[type=radio]:checked+label {
background: #0070BD;
color: #fff
.gift-card-amt ul li input[type="radio"]:checked + label {
background: #0070bd;
color: #fff;
}
.gift-card-amt ul li a,.gift-card-amt ul li label {
padding: 1.5rem 2rem
.gift-card-amt ul li a,
.gift-card-amt ul li label {
padding: 1.5rem 2rem;
}
.tooltip-wrapper{
.tooltip-wrapper {
position: relative;
}
.tooltips {
display: block;
position: absolute;
background: #fff;
box-shadow: 0px 3.2603139877319336px 15.81252384185791px 0px #0000001A;
box-shadow: 0px 3.2603139877319336px 15.81252384185791px 0px #0000001a;
color: #808080;
padding: 5px;
border-radius: 5px;
......@@ -3099,7 +3136,7 @@ footer hr {
.tooltip-btn {
position: relative;
}
.tooltip-btn .image-container{
.tooltip-btn .image-container {
width: 12px;
display: inline-block;
}
......@@ -3110,25 +3147,24 @@ footer hr {
.tooltip-btn:hover {
cursor: pointer;
}
.cl-gry{
.cl-gry {
color: #808080 !important;
}
.gift-card-rt .back-btn{
.gift-card-rt .back-btn {
margin-bottom: 1rem;
}
.gift-card-rt .title{
.gift-card-rt .title {
font-size: 32px;
margin-bottom: 0.5rem;
}
.gift-card-amt{
.gift-card-amt {
margin: 1rem 0;
}
.gift-card-rt .form-01 .form-control{
.gift-card-rt .form-01 .form-control {
border: 1px solid #000;
border-radius: 9px;
}
.gift-card-rt .form-01 .link-a{
.gift-card-rt .form-01 .link-a {
}
.gift-card-session .result-box {
text-align: center;
......@@ -3138,7 +3174,7 @@ footer hr {
align-items: center;
justify-content: center;
}
.gift-card-session .result-box p{
.gift-card-session .result-box p {
font-size: 32px;
line-height: 40px;
margin-bottom: 2rem;
......@@ -3277,31 +3313,32 @@ img:hover {
}
@media (max-width: 767px) {
.home-banner-bg>span>span .image {
.home-banner-bg > span > span .image {
border-radius: 0 0 20px 20px;
}
.gift-card-rt .title,.gift-card-rt .cl-gry {
}
.gift-card-rt .title,
.gift-card-rt .cl-gry {
padding-left: 1rem;
}
.gift-card-rt .back-btn{
}
.gift-card-rt .back-btn {
display: none;
}
.gift-card-amt ul{
.gift-card-amt ul {
text-align: center;
}
.gift-card-rt {
border-left: 0;
padding-left: 0;
padding-top: 2rem;
border-top: 2px solid #E9E9E9;
border-top: 2px solid #e9e9e9;
margin-top: 4rem;
}
}
.gift-card-lt {
margin: 0 auto;
}
}
.d-table-cell {
padding-top: 2rem;
}
}
.filter-dd {
justify-content: space-between;
}
......
This diff could not be displayed because it is too large.
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!