stay_commerce-frontend 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +8 -0
- data/app/assets/builds/404error-RVKQJ4S4.digested.jpg +0 -0
- data/app/assets/builds/Facebook-5HJUILVR.digested.svg +3 -0
- data/app/assets/builds/Google-CZ3UPVSC.digested.svg +6 -0
- data/app/assets/builds/application.js +95 -0
- data/app/assets/builds/application.js.map +7 -0
- data/app/assets/builds/beach-KAZW5GM3.digested.jpg +0 -0
- data/app/assets/builds/beach2-3ARC34NS.digested.jpg +0 -0
- data/app/assets/builds/beach3-PSTOH5FV.digested.jpg +0 -0
- data/app/assets/builds/beach4-PWNRPD3S.digested.jpg +0 -0
- data/app/assets/builds/beach5-SBOKKRHF.digested.jpg +0 -0
- data/app/assets/builds/beach6-SXZ5Y5AI.digested.jpg +0 -0
- data/app/assets/builds/beach7-FNBMFVKK.digested.jpg +0 -0
- data/app/assets/builds/beach8-TD7LTRQM.digested.jpg +0 -0
- data/app/assets/builds/bg-image-H7UGUMV2.digested.jpg +0 -0
- data/app/assets/builds/bgimage-DU3PCXKN.digested.jpg +0 -0
- data/app/assets/builds/bundle.css +30914 -0
- data/app/assets/builds/bundle.css.map +7 -0
- data/app/assets/builds/bundle.js +74569 -0
- data/app/assets/builds/bundle.js.map +7 -0
- data/app/assets/builds/hotel1-HGBXPKJK.digested.jpg +0 -0
- data/app/assets/builds/logo_updated-KQWAXLYL.digested.png +0 -0
- data/app/assets/builds/styles.css +6422 -0
- data/app/assets/builds/styles.css.map +7 -0
- data/app/assets/config/manifest.js +2 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/stay_commerce/frontend/beach-666122_1280 (1).jpg +0 -0
- data/app/assets/images/stay_commerce/frontend/beach-666122_1280.jpg +0 -0
- data/app/assets/stylesheets/stay_commerce/frontend/application.css +15 -0
- data/app/controllers/stay_commerce/frontend/application_controller.rb +8 -0
- data/app/controllers/stay_commerce/frontend/welcome_controller.rb +6 -0
- data/app/helpers/stay_commerce/frontend/application_helper.rb +6 -0
- data/app/javascript/Images/404error.jpg +0 -0
- data/app/javascript/Images/Facebook.svg +3 -0
- data/app/javascript/Images/Google.svg +6 -0
- data/app/javascript/Images/beach-2245867_1280.jpg +0 -0
- data/app/javascript/Images/beach.jpg +0 -0
- data/app/javascript/Images/beach2.jpg +0 -0
- data/app/javascript/Images/beach3.jpg +0 -0
- data/app/javascript/Images/beach4.jpg +0 -0
- data/app/javascript/Images/beach5.jpg +0 -0
- data/app/javascript/Images/beach6.jpg +0 -0
- data/app/javascript/Images/beach7.jpg +0 -0
- data/app/javascript/Images/beach8.jpg +0 -0
- data/app/javascript/Images/bg-image.jpg +0 -0
- data/app/javascript/Images/bgimage.jpg +0 -0
- data/app/javascript/Images/blog-1.jpg +0 -0
- data/app/javascript/Images/gallery.png +0 -0
- data/app/javascript/Images/home 5.jpg +0 -0
- data/app/javascript/Images/home1.jpg +0 -0
- data/app/javascript/Images/home2.jpg +0 -0
- data/app/javascript/Images/home3.jpg +0 -0
- data/app/javascript/Images/home6.jpg +0 -0
- data/app/javascript/Images/hotel1.jpg +0 -0
- data/app/javascript/Images/room1.jpg +0 -0
- data/app/javascript/Images/room2.jpg +0 -0
- data/app/javascript/Images/room3.jpg +0 -0
- data/app/javascript/Images/room4.jpg +0 -0
- data/app/javascript/Images/wine-4520213_1280.jpg +0 -0
- data/app/javascript/application.js +1 -0
- data/app/javascript/react/Api/apiConstants.js +47 -0
- data/app/javascript/react/assets/beach-2245867_1280.jpg +0 -0
- data/app/javascript/react/assets/logo.png +0 -0
- data/app/javascript/react/assets/logo_updated.png +0 -0
- data/app/javascript/react/components/AboutUsPage/AboutPage.jsx +41 -0
- data/app/javascript/react/components/AboutusFront/About.jsx +37 -0
- data/app/javascript/react/components/Accommodation/Accommodation.jsx +32 -0
- data/app/javascript/react/components/Accommodation/NormalListing.jsx +50 -0
- data/app/javascript/react/components/Accommodation/SpecialListing.jsx +51 -0
- data/app/javascript/react/components/Accountpage/AccountInfo.jsx +217 -0
- data/app/javascript/react/components/Accountpage/AccountPage.jsx +27 -0
- data/app/javascript/react/components/Accountpage/CommonPage.jsx +24 -0
- data/app/javascript/react/components/AddNewProperty/CommonLayout.jsx +68 -0
- data/app/javascript/react/components/AddNewProperty/Description.jsx +229 -0
- data/app/javascript/react/components/AddNewProperty/Details.jsx +234 -0
- data/app/javascript/react/components/AddNewProperty/Images.jsx +196 -0
- data/app/javascript/react/components/AddNewProperty/Location.jsx +239 -0
- data/app/javascript/react/components/AddNewProperty/Room.jsx +1132 -0
- data/app/javascript/react/components/AvatarDropdown/AvatarDropDown.jsx +142 -0
- data/app/javascript/react/components/BlogDesign/BlogsLatest.jsx +67 -0
- data/app/javascript/react/components/ContactUs/Contact.jsx +89 -0
- data/app/javascript/react/components/FacilitiesSection/Facilities.jsx +66 -0
- data/app/javascript/react/components/FixedNavbar/FixedNav.jsx +88 -0
- data/app/javascript/react/components/ForgetPassword/ForgetPassword.jsx +103 -0
- data/app/javascript/react/components/Gallery/Gallery.jsx +164 -0
- data/app/javascript/react/components/GalleryModalLight/GalleryModalLight.jsx +35 -0
- data/app/javascript/react/components/GallerySlider/GallerySlider.jsx +58 -0
- data/app/javascript/react/components/Headers/PropertyCard.jsx +46 -0
- data/app/javascript/react/components/HeroSectionDesign/BookingForm.jsx +178 -0
- data/app/javascript/react/components/HeroSectionDesign/HeroSection.jsx +29 -0
- data/app/javascript/react/components/HeroSectionDesign/MyPropertiesListing.jsx +104 -0
- data/app/javascript/react/components/HeroSectionDesign/PropertiesPage.jsx +122 -0
- data/app/javascript/react/components/HotelListing/Listing.jsx +48 -0
- data/app/javascript/react/components/Layout/Layout.js +18 -0
- data/app/javascript/react/components/Listing-stay-Detail/AmenitiesFeatures.jsx +58 -0
- data/app/javascript/react/components/Listing-stay-Detail/AmenitiesModal.jsx +250 -0
- data/app/javascript/react/components/Listing-stay-Detail/ApartmentCard.jsx +120 -0
- data/app/javascript/react/components/Listing-stay-Detail/BookingModal.jsx +398 -0
- data/app/javascript/react/components/Listing-stay-Detail/CheckoutForm.jsx +296 -0
- data/app/javascript/react/components/Listing-stay-Detail/ListingStayDetailPage.jsx +512 -0
- data/app/javascript/react/components/Listing-stay-Detail/PropertyDescription.jsx +76 -0
- data/app/javascript/react/components/Listing-stay-Detail/PropertyDetailsCard.jsx +62 -0
- data/app/javascript/react/components/Listing-stay-Detail/Reviews.jsx +132 -0
- data/app/javascript/react/components/Listing-stay-Detail/RoomDescriptionModal.jsx +105 -0
- data/app/javascript/react/components/Listing-stay-Detail/Rules.jsx +23 -0
- data/app/javascript/react/components/ListingImageGallery/ListingImageGallery.jsx +30 -0
- data/app/javascript/react/components/LoginPage/LoginPage.jsx +115 -0
- data/app/javascript/react/components/MobileNav/MobileMenu.jsx +47 -0
- data/app/javascript/react/components/Navbar/Navbar.jsx +25 -0
- data/app/javascript/react/components/Page404/Page404.jsx +30 -0
- data/app/javascript/react/components/PropertyListing/MyProperties.jsx +146 -0
- data/app/javascript/react/components/PropertyListing/StayBooking/BookingDetails.jsx +178 -0
- data/app/javascript/react/components/PropertyListing/StayBooking/MyBooking.jsx +83 -0
- data/app/javascript/react/components/ResetPassword/ResetPassword.jsx +117 -0
- data/app/javascript/react/components/SignupPage/SignupPage.jsx +185 -0
- data/app/javascript/react/components/SmallNavbar/SmallNav.jsx +51 -0
- data/app/javascript/react/components/SocialAuth/SocialAuth.jsx +21 -0
- data/app/javascript/react/components/StayCard/StayCard.jsx +69 -0
- data/app/javascript/react/components/StayCard/StayCard2.jsx +45 -0
- data/app/javascript/react/components/StayCard/StayCard3.jsx +45 -0
- data/app/javascript/react/components/TestimonialSection/Testimonial.jsx +113 -0
- data/app/javascript/react/components/Unauthorized/Unauthorized.jsx +12 -0
- data/app/javascript/react/data/jsons/__countryListing.json +201 -0
- data/app/javascript/react/packs/App.js +26 -0
- data/app/javascript/react/packs/index.jsx +38 -0
- data/app/javascript/react/packs/routes/ParentRoute.jsx +14 -0
- data/app/javascript/react/packs/routes/Route.jsx +163 -0
- data/app/javascript/react/pages/AccommodationList.jsx +21 -0
- data/app/javascript/react/pages/Home.jsx +32 -0
- data/app/javascript/react/redux/slices/AuthSlice/AuthSlice.jsx +100 -0
- data/app/javascript/react/redux/slices/PropertySlice/PropertySlice.jsx +722 -0
- data/app/javascript/react/redux/slices/PropertySlice/Searchslice.jsx +36 -0
- data/app/javascript/react/redux/slices/UserSlice/UserSlice.jsx +215 -0
- data/app/javascript/react/redux/store.js +35 -0
- data/app/javascript/react/shared/Avatar/Avatar.jsx +32 -0
- data/app/javascript/react/shared/Badge/Badge.jsx +33 -0
- data/app/javascript/react/shared/Button/Button.jsx +67 -0
- data/app/javascript/react/shared/Button/ButtonPrimary.jsx +11 -0
- data/app/javascript/react/shared/Button/ButtonSelect.jsx +9 -0
- data/app/javascript/react/shared/Checkbox/Checkbox.jsx +38 -0
- data/app/javascript/react/shared/CurrencySymbol.jsx +6 -0
- data/app/javascript/react/shared/DateField/CustomDatePicker.jsx +69 -0
- data/app/javascript/react/shared/FooterSection/Footer.jsx +75 -0
- data/app/javascript/react/shared/FormField/FormField.jsx +75 -0
- data/app/javascript/react/shared/FormItem/FormItem.jsx +20 -0
- data/app/javascript/react/shared/Input/Input.jsx +27 -0
- data/app/javascript/react/shared/Label/Label.jsx +12 -0
- data/app/javascript/react/shared/Modal.jsx +20 -0
- data/app/javascript/react/shared/NcImage/NcImage.jsx +101 -0
- data/app/javascript/react/shared/NcImage/PlaceIcon.jsx +31 -0
- data/app/javascript/react/shared/NcImage/placecImageIcon.svg +6 -0
- data/app/javascript/react/shared/Select/Select.jsx +20 -0
- data/app/javascript/react/styles/404error.scss +58 -0
- data/app/javascript/react/styles/ApartmentCard.scss +126 -0
- data/app/javascript/react/styles/BookingDetails.scss +457 -0
- data/app/javascript/react/styles/Modal.scss +36 -0
- data/app/javascript/react/styles/PropertiesPage.scss +219 -0
- data/app/javascript/react/styles/RenderSection.scss +480 -0
- data/app/javascript/react/styles/about.scss +97 -0
- data/app/javascript/react/styles/accountinfo.scss +67 -0
- data/app/javascript/react/styles/accountpage.scss +36 -0
- data/app/javascript/react/styles/amenitiesfeatures.scss +223 -0
- data/app/javascript/react/styles/application.scss +87 -0
- data/app/javascript/react/styles/avatar.scss +39 -0
- data/app/javascript/react/styles/avatardropdown.scss +57 -0
- data/app/javascript/react/styles/badge.scss +90 -0
- data/app/javascript/react/styles/blog.scss +100 -0
- data/app/javascript/react/styles/bookingform.scss +124 -0
- data/app/javascript/react/styles/button.scss +44 -0
- data/app/javascript/react/styles/buttonprimary.scss +32 -0
- data/app/javascript/react/styles/checkbox.scss +37 -0
- data/app/javascript/react/styles/commonlayout.scss +83 -0
- data/app/javascript/react/styles/commonpage.scss +51 -0
- data/app/javascript/react/styles/contact.scss +173 -0
- data/app/javascript/react/styles/customdatepicker.scss +120 -0
- data/app/javascript/react/styles/description.scss +21 -0
- data/app/javascript/react/styles/details.scss +88 -0
- data/app/javascript/react/styles/facilities.scss +131 -0
- data/app/javascript/react/styles/fixednavbar.scss +137 -0
- data/app/javascript/react/styles/fonts.scss +22 -0
- data/app/javascript/react/styles/footer.scss +300 -0
- data/app/javascript/react/styles/forgetpassword.scss +68 -0
- data/app/javascript/react/styles/formfield.scss +39 -0
- data/app/javascript/react/styles/formitem.scss +20 -0
- data/app/javascript/react/styles/gallery.scss +142 -0
- data/app/javascript/react/styles/gallerymodallight.scss +137 -0
- data/app/javascript/react/styles/galleryslider.scss +114 -0
- data/app/javascript/react/styles/header.scss +49 -0
- data/app/javascript/react/styles/herosection.scss +61 -0
- data/app/javascript/react/styles/images.scss +112 -0
- data/app/javascript/react/styles/input.scss +58 -0
- data/app/javascript/react/styles/label.scss +11 -0
- data/app/javascript/react/styles/listing.scss +94 -0
- data/app/javascript/react/styles/listingimagegallery.scss +57 -0
- data/app/javascript/react/styles/listingstaydetailpage.scss +887 -0
- data/app/javascript/react/styles/location.scss +66 -0
- data/app/javascript/react/styles/loginpage.scss +150 -0
- data/app/javascript/react/styles/mobilemenu.scss +53 -0
- data/app/javascript/react/styles/mybooking.scss +104 -0
- data/app/javascript/react/styles/myproperty.scss +51 -0
- data/app/javascript/react/styles/ncimage.scss +24 -0
- data/app/javascript/react/styles/normallisting.scss +95 -0
- data/app/javascript/react/styles/property-description.scss +75 -0
- data/app/javascript/react/styles/propertycard.scss +48 -0
- data/app/javascript/react/styles/propertydetailscard.scss +302 -0
- data/app/javascript/react/styles/resetpassword.scss +79 -0
- data/app/javascript/react/styles/reviews.scss +185 -0
- data/app/javascript/react/styles/room.scss +275 -0
- data/app/javascript/react/styles/rooms.scss +0 -0
- data/app/javascript/react/styles/select.scss +44 -0
- data/app/javascript/react/styles/signuppage.scss +132 -0
- data/app/javascript/react/styles/smallnav.scss +94 -0
- data/app/javascript/react/styles/socialauth.scss +62 -0
- data/app/javascript/react/styles/speciallisting.scss +94 -0
- data/app/javascript/react/styles/staycard.scss +77 -0
- data/app/javascript/react/styles/staycard2.scss +115 -0
- data/app/javascript/react/styles/testimonial.scss +216 -0
- data/app/javascript/react/styles/unauthorized.scss +22 -0
- data/app/javascript/react/styles/variables.scss +3 -0
- data/app/javascript/react/styles/wrapper.scss +4 -0
- data/app/javascript/react/utils/formSchema.js +120 -0
- data/app/javascript/react/utils/helpers/APIHelper.jsx +55 -0
- data/app/javascript/react/utils/helpers/ErrorHandler.js +21 -0
- data/app/javascript/react/utils/helpers/InfoHandler.js +15 -0
- data/app/javascript/react/utils/helpers/SuccessHandler.js +12 -0
- data/app/javascript/react/utils/helpers/isInViewPortIntersectionObserver.jsx +39 -0
- data/app/jobs/stay_commerce/frontend/application_job.rb +6 -0
- data/app/mailers/stay_commerce/frontend/application_mailer.rb +8 -0
- data/app/models/stay_commerce/frontend/application_record.rb +7 -0
- data/app/views/layouts/stay_commerce/frontend/application.html.erb +61 -0
- data/app/views/stay_commerce/frontend/welcome/index.html.erb +2 -0
- data/config/initializers/cors.rb +6 -0
- data/config/initializers/devise.rb +359 -0
- data/config/routes.rb +11 -0
- data/lib/stay_commerce/frontend/engine.rb +14 -0
- data/lib/stay_commerce/frontend/version.rb +5 -0
- data/lib/stay_commerce/frontend.rb +8 -0
- data/lib/tasks/stay_commerce/frontend_tasks.rake +4 -0
- metadata +370 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
// export const API_BASE_URL = "http://localhost:5000/stay";
|
2
|
+
|
3
|
+
// export const ENDPOINTS = {
|
4
|
+
// SIGN_UP: `${API_BASE_URL}/users/tokens/sign_up`,
|
5
|
+
// SIGN_IN: `${API_BASE_URL}/users/tokens/sign_in`,
|
6
|
+
// USER_INFO: `${API_BASE_URL}/users/tokens/info`,
|
7
|
+
// USER_UPDATE: (id) => `${API_BASE_URL}/api/v1/profiles/${id}`,
|
8
|
+
// CREATE_PROPERTIES: `${API_BASE_URL}/api/v1/properties`,
|
9
|
+
// PROPERTY_CATEGORIES: `${API_BASE_URL}/api/v1/property_categories`,
|
10
|
+
// PROPERTY_TYPES: `${API_BASE_URL}/api/v1/property_types`,
|
11
|
+
// UPDATE_PROPERTIES: (id) => `${API_BASE_URL}/api/v1/properties/${id}`,
|
12
|
+
// GET_PROPERTy_LISTING: `${API_BASE_URL}/api/v1/properties/my_properties`,
|
13
|
+
// GET_ALL_UPDATE_PROPERTY: `${API_BASE_URL}/api/v1/properties`,
|
14
|
+
|
15
|
+
// };
|
16
|
+
|
17
|
+
export const API_BASE_URL = "http://localhost:5000/stay";
|
18
|
+
|
19
|
+
export const ENDPOINTS = {
|
20
|
+
SIGN_UP: `${API_BASE_URL}/users/tokens/sign_up`,
|
21
|
+
SIGN_IN: `${API_BASE_URL}/users/tokens/sign_in`,
|
22
|
+
USER_INFO: `${API_BASE_URL}/users/tokens/info`,
|
23
|
+
USER_UPDATE: (id) => `${API_BASE_URL}/api/v1/profiles/${id}`,
|
24
|
+
EDIT_PASSWORD: `${API_BASE_URL}/users/password`,
|
25
|
+
UPDATE_PROPERTIES: `${API_BASE_URL}/api/v1/properties`,
|
26
|
+
GET_ALL_UPDATE_PROPERTY_DETAILS: `${API_BASE_URL}/api/v1/properties`,
|
27
|
+
PROPERTY_CATEGORY: `${API_BASE_URL}/api/v1/property_categories`,
|
28
|
+
GET_ALL_PROPERTY_TYPE: `${API_BASE_URL}/api/v1/property_types`,
|
29
|
+
GET_PROPERTY_Listing: `${API_BASE_URL}/api/v1/properties/my_properties`,
|
30
|
+
CREATE_PROPERTIES: `${API_BASE_URL}/api/v1/properties`,
|
31
|
+
GET_ALL_FEATURES_STATUS: "api/v1/features/property",
|
32
|
+
AMENITIES_PROPERTIES: "/api/v1/amenities/property",
|
33
|
+
ROOM_AMENITIES_PROPERTIES: "/api/v1/amenities/room",
|
34
|
+
ROOM_FEATURES_PROPERTIES: "/api/v1/features/room",
|
35
|
+
ROOM_BED_TYPE: "api/v1/bed_types",
|
36
|
+
ROOM_TYPE: "api/v1/room_types",
|
37
|
+
HOST_BOOKING_DETAILS: (page) => `/api/v1/bookings/host_booking?page=${page}`,
|
38
|
+
GET_BOOKING_DEATAILS: (page, query) => `/api/v1/bookings?page=${page}`,
|
39
|
+
DELETEIMAGE: "/api/v1/image_destroy",
|
40
|
+
BOOKING: "/api/v1/bookings",
|
41
|
+
SIMILAR_PROPERTIES: "/api/v1/properties/similar_property",
|
42
|
+
BOOKING_DETAILS: "/api/v1/bookings",
|
43
|
+
PAYMENT_SUCCESS: (bookingId) => `/api/v1/bookings/${bookingId}`,
|
44
|
+
PAYMENT_METHODS: "/api/v1/payments/payment_method",
|
45
|
+
GET_ALL_PROPERTIES: (page) => `/api/v1/properties?page=${page}`,
|
46
|
+
SEARCH_PROPERTIES: (query) => `/api/v1/properties/search?${query}`
|
47
|
+
};
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import React from "react";
|
2
|
+
// import Navbar from "../Navbar/Navbar";
|
3
|
+
import AboutUs from "../AboutusFront/About";
|
4
|
+
import Features from "../FacilitiesSection/Facilities";
|
5
|
+
import TestimonialSection from "../TestimonialSection/Testimonial";
|
6
|
+
import Bg from "../../../Images/bgimage.jpg";
|
7
|
+
import { Link } from "react-router-dom";
|
8
|
+
import "../../styles/header.scss";
|
9
|
+
|
10
|
+
const AboutPage = () => {
|
11
|
+
return (
|
12
|
+
<>
|
13
|
+
<div
|
14
|
+
className="header-hero"
|
15
|
+
style={{ backgroundImage: `url(${Bg})` }}
|
16
|
+
>
|
17
|
+
<h1 className="header-title">
|
18
|
+
About Us
|
19
|
+
</h1>
|
20
|
+
<div className="breadcrumb">
|
21
|
+
<Link to="/" className="breadcrumb-link">
|
22
|
+
Home
|
23
|
+
</Link>
|
24
|
+
<span className="breadcrumb-separator">→</span>
|
25
|
+
<span className="breadcrumb-current">About us</span>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div className="header-content">
|
29
|
+
{/* Add content here */}
|
30
|
+
</div>
|
31
|
+
<div>
|
32
|
+
<AboutUs />
|
33
|
+
<Features />
|
34
|
+
<TestimonialSection />
|
35
|
+
</div>
|
36
|
+
</>
|
37
|
+
);
|
38
|
+
};
|
39
|
+
|
40
|
+
export default AboutPage;
|
41
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import Img from "../../../Images/hotel1.jpg";
|
3
|
+
import "../../styles/wrapper.scss";
|
4
|
+
|
5
|
+
|
6
|
+
const AboutUs = () => {
|
7
|
+
return (
|
8
|
+
<section className="about-section">
|
9
|
+
<div className="wrapper">
|
10
|
+
<div className="about-container">
|
11
|
+
{/* Left Content */}
|
12
|
+
<div className="about-content">
|
13
|
+
<h2>
|
14
|
+
About Us <br />
|
15
|
+
Our History <br />
|
16
|
+
Mission & Vision
|
17
|
+
</h2>
|
18
|
+
<p>
|
19
|
+
Inappropriate behavior is often laughed off as “boys will be boys,” women face higher conduct standards
|
20
|
+
especially in the workplace. That’s why it’s crucial that, as women, our behavior on the job is beyond
|
21
|
+
reproach. Inappropriate behavior is often laughed.
|
22
|
+
</p>
|
23
|
+
<button>REQUEST CUSTOM PRICE</button>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
{/* Right Image */}
|
27
|
+
<div className="about-image">
|
28
|
+
<img src={Img} alt="Hotel Fountain" />
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</section>
|
33
|
+
);
|
34
|
+
};
|
35
|
+
|
36
|
+
export default AboutUs;
|
37
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import Navbar from "../Navbar/Navbar";
|
3
|
+
import Footer from "../../shared/FooterSection/Footer";
|
4
|
+
import { Link } from "react-router-dom";
|
5
|
+
import Bg from "../../../Images/bgimage.jpg";
|
6
|
+
import "../../styles/header.scss";
|
7
|
+
|
8
|
+
const Accommodation = () => {
|
9
|
+
return (
|
10
|
+
<>
|
11
|
+
<div
|
12
|
+
className="header-hero"
|
13
|
+
style={{ backgroundImage: `url(${Bg})` }}
|
14
|
+
>
|
15
|
+
<h1 className="header-title">Accommodation</h1>
|
16
|
+
|
17
|
+
<div className="breadcrumb">
|
18
|
+
<Link to="/" className="breadcrumb-link">
|
19
|
+
Home
|
20
|
+
</Link>
|
21
|
+
<span className="breadcrumb-separator">→</span>
|
22
|
+
<span className="breadcrumb-current">Accommodation</span>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div className="header-content">
|
26
|
+
{/* Add content here */}
|
27
|
+
</div>
|
28
|
+
</>
|
29
|
+
);
|
30
|
+
};
|
31
|
+
|
32
|
+
export default Accommodation;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import Img1 from "../../../Images/room1.jpg";
|
3
|
+
import Img2 from "../../../Images/room2.jpg";
|
4
|
+
import Img3 from "../../../Images/wine-4520213_1280.jpg";
|
5
|
+
import Img4 from "../../../Images/room4.jpg";
|
6
|
+
import "../../styles/normallisting.scss";
|
7
|
+
import "../../styles/wrapper.scss";
|
8
|
+
|
9
|
+
const rooms = [
|
10
|
+
{ id: 1, name: "Double Deluxe Room", price: 250, image: Img1 },
|
11
|
+
{ id: 2, name: "Single Deluxe Room", price: 200, image: Img2 },
|
12
|
+
{ id: 3, name: "Honeymoon Suit", price: 750, image: Img3 },
|
13
|
+
{ id: 4, name: "Economy Double", price: 200, image: Img4 },
|
14
|
+
{ id: 5, name: "Double Deluxe Room", price: 200, image: Img1 },
|
15
|
+
{ id: 6, name: "Single Deluxe Room", price: 200, image: Img2 },
|
16
|
+
{ id: 7, name: "Honeymoon Suit", price: 200, image: Img3 },
|
17
|
+
{ id: 8, name: "Economy Double", price: 200, image: Img4 },
|
18
|
+
];
|
19
|
+
|
20
|
+
function NormalListing() {
|
21
|
+
return (
|
22
|
+
<section className="normal-listing">
|
23
|
+
<div className="wrapper">
|
24
|
+
<h2>Normal Accommodation</h2>
|
25
|
+
<p>
|
26
|
+
We all live in an age that belongs to the young at heart. Life that is
|
27
|
+
becoming extremely fast.
|
28
|
+
</p>
|
29
|
+
|
30
|
+
<div className="room-listings">
|
31
|
+
{rooms.map((room) => (
|
32
|
+
<div className="room-card" key={room.id}>
|
33
|
+
<div className="room-image-wrapper">
|
34
|
+
<img src={room.image} alt={room.name} />
|
35
|
+
<button>BOOK NOW</button>
|
36
|
+
</div>
|
37
|
+
<h3>{room.name}</h3>
|
38
|
+
<p>
|
39
|
+
${room.price}
|
40
|
+
<span>/night</span>
|
41
|
+
</p>
|
42
|
+
</div>
|
43
|
+
))}
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</section>
|
47
|
+
);
|
48
|
+
}
|
49
|
+
|
50
|
+
export default NormalListing;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
2
|
+
import "../../styles/speciallisting.scss";
|
3
|
+
import "../../styles/wrapper.scss";
|
4
|
+
import { useDispatch } from "react-redux";
|
5
|
+
import { getAllProperties } from "../../redux/slices/PropertySlice/PropertySlice";
|
6
|
+
import StayCard2 from "../StayCard/StayCard2";
|
7
|
+
|
8
|
+
function SpecialListing() {
|
9
|
+
const dispatch = useDispatch();
|
10
|
+
const [page, setPage] = useState(1);
|
11
|
+
const [properties, setProperties] = useState([]);
|
12
|
+
|
13
|
+
const fetchProperties = async (pageNumber) => {
|
14
|
+
try {
|
15
|
+
const res = await dispatch(getAllProperties(pageNumber));
|
16
|
+
if (res?.payload?.properties) {
|
17
|
+
setProperties(res.payload.properties);
|
18
|
+
}
|
19
|
+
} catch (error) {
|
20
|
+
console.error("Failed to fetch properties", error);
|
21
|
+
}
|
22
|
+
};
|
23
|
+
|
24
|
+
useEffect(() => {
|
25
|
+
fetchProperties(page);
|
26
|
+
}, [page]);
|
27
|
+
return (
|
28
|
+
<section className="special-listing">
|
29
|
+
<div className="wrapper">
|
30
|
+
<div className="my-booking-container">
|
31
|
+
<div className="my-booking-content">
|
32
|
+
<h1 className="heading">Hotel Accommodation</h1>
|
33
|
+
<p className="subheading">
|
34
|
+
We all live in an age that belongs to the young at heart. Life
|
35
|
+
that is becoming extremely fast.
|
36
|
+
</p>
|
37
|
+
<div className="stay-cards">
|
38
|
+
{properties?.length > 0 ? (
|
39
|
+
properties?.map((room) => <StayCard2 booking={room} />)
|
40
|
+
) : (
|
41
|
+
<p className="no-results">No Property Found found.</p>
|
42
|
+
)}
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</section>
|
48
|
+
);
|
49
|
+
}
|
50
|
+
|
51
|
+
export default SpecialListing;
|
@@ -0,0 +1,217 @@
|
|
1
|
+
import React, { useEffect } from "react";
|
2
|
+
import { useFormik } from "formik";
|
3
|
+
import Avatar from "../../shared/Avatar/Avatar";
|
4
|
+
import FormField from "../../shared/FormField/FormField";
|
5
|
+
import __countryListing from "../../data/jsons/__countryListing.json";
|
6
|
+
import "../../styles/accountinfo.scss";
|
7
|
+
import {
|
8
|
+
getCurrentUser,
|
9
|
+
updateUser,
|
10
|
+
updateProfileImage,
|
11
|
+
} from "../../redux/slices/UserSlice/UserSlice";
|
12
|
+
import { useDispatch, useSelector } from "react-redux";
|
13
|
+
import { UpdateUser } from "../../utils/formSchema";
|
14
|
+
import ButtonPrimary from "../../shared/Button/ButtonPrimary";
|
15
|
+
import successHandler from "../../utils/helpers/SuccessHandler";
|
16
|
+
import moment from "moment";
|
17
|
+
|
18
|
+
const AccountInfo = () => {
|
19
|
+
const dispatch = useDispatch();
|
20
|
+
const { data: currentUser, loading } = useSelector((state) => state.user);
|
21
|
+
const fileInputRef = React.useRef(null);
|
22
|
+
useEffect(() => {
|
23
|
+
if (currentUser) {
|
24
|
+
dispatch(getCurrentUser());
|
25
|
+
}
|
26
|
+
}, [dispatch]);
|
27
|
+
|
28
|
+
const formik = useFormik({
|
29
|
+
initialValues: {
|
30
|
+
first_name: currentUser?.first_name || "",
|
31
|
+
last_name: currentUser?.last_name || "",
|
32
|
+
email: currentUser?.email || "",
|
33
|
+
phone: currentUser?.phone || "",
|
34
|
+
date_of_birth: currentUser
|
35
|
+
? moment(currentUser.date_of_birth).format("YYYY-MM-DD")
|
36
|
+
: "",
|
37
|
+
country: currentUser?.country || "",
|
38
|
+
about_me: currentUser?.about_me || "",
|
39
|
+
image: null,
|
40
|
+
},
|
41
|
+
enableReinitialize: true,
|
42
|
+
validationSchema: UpdateUser,
|
43
|
+
onSubmit: (values, { setSubmitting }) => {
|
44
|
+
setSubmitting(true);
|
45
|
+
const updatedData = {
|
46
|
+
profile: {
|
47
|
+
id: currentUser?.id,
|
48
|
+
first_name: values.first_name,
|
49
|
+
last_name: values.last_name,
|
50
|
+
email: values.email,
|
51
|
+
phone: values.phone,
|
52
|
+
date_of_birth: values.date_of_birth,
|
53
|
+
country: values.country,
|
54
|
+
about_me: values.about_me,
|
55
|
+
},
|
56
|
+
};
|
57
|
+
|
58
|
+
dispatch(updateUser(updatedData))
|
59
|
+
.unwrap()
|
60
|
+
.then(() => {
|
61
|
+
// alert("Profile updated successfully!");
|
62
|
+
successHandler("User information updated successfully");
|
63
|
+
dispatch(getCurrentUser()); // Refresh user data after update
|
64
|
+
})
|
65
|
+
.catch((error) => {
|
66
|
+
alert("Failed to update profile: " + error);
|
67
|
+
})
|
68
|
+
.finally(() => {
|
69
|
+
setSubmitting(false);
|
70
|
+
});
|
71
|
+
},
|
72
|
+
});
|
73
|
+
|
74
|
+
const handleImageUpload = async (event) => {
|
75
|
+
const file = event.target.files[0];
|
76
|
+
|
77
|
+
if (!file || !currentUser?.id) {
|
78
|
+
console.error("User ID or file is missing.");
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
|
82
|
+
const formData = new FormData();
|
83
|
+
formData.append("profile_image", file);
|
84
|
+
|
85
|
+
try {
|
86
|
+
await dispatch(
|
87
|
+
updateProfileImage({ userId: currentUser.id, file })
|
88
|
+
).unwrap();
|
89
|
+
successHandler("Profile image updated successfully");
|
90
|
+
dispatch(getCurrentUser());
|
91
|
+
} catch (error) {
|
92
|
+
console.error("Error updating profile image:", error);
|
93
|
+
alert("Failed to update profile image: " + error);
|
94
|
+
}
|
95
|
+
};
|
96
|
+
|
97
|
+
return (
|
98
|
+
<div className="account-info-container">
|
99
|
+
<div className="avatar-section">
|
100
|
+
<div className="avatar-section">
|
101
|
+
{/* Clickable Avatar */}
|
102
|
+
<div
|
103
|
+
className="avatar-wrapper"
|
104
|
+
onClick={() => fileInputRef.current.click()}
|
105
|
+
>
|
106
|
+
<Avatar sizeClass="large-avatar" />
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<input
|
110
|
+
type="file"
|
111
|
+
ref={fileInputRef}
|
112
|
+
className="file-input"
|
113
|
+
accept="image/*"
|
114
|
+
onChange={handleImageUpload}
|
115
|
+
hidden
|
116
|
+
/>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<form onSubmit={formik.handleSubmit} className="account-form">
|
121
|
+
<div className="grid-container">
|
122
|
+
<FormField
|
123
|
+
label="First Name"
|
124
|
+
name="first_name"
|
125
|
+
placeholder="John"
|
126
|
+
type="text"
|
127
|
+
value={formik.values.first_name}
|
128
|
+
onChange={formik.handleChange}
|
129
|
+
onBlur={formik.handleBlur}
|
130
|
+
error={formik.touched.first_name && formik.errors.first_name}
|
131
|
+
/>
|
132
|
+
|
133
|
+
<FormField
|
134
|
+
label="Last Name"
|
135
|
+
name="last_name"
|
136
|
+
placeholder="Doe"
|
137
|
+
type="text"
|
138
|
+
value={formik.values.last_name}
|
139
|
+
onChange={formik.handleChange}
|
140
|
+
onBlur={formik.handleBlur}
|
141
|
+
error={formik.touched.last_name && formik.errors.last_name}
|
142
|
+
/>
|
143
|
+
|
144
|
+
<FormField
|
145
|
+
label="Email"
|
146
|
+
name="email"
|
147
|
+
placeholder="john.doe@example.com"
|
148
|
+
type="email"
|
149
|
+
value={formik.values.email}
|
150
|
+
onChange={formik.handleChange}
|
151
|
+
onBlur={formik.handleBlur}
|
152
|
+
error={formik.touched.email && formik.errors.email}
|
153
|
+
disabled // Email should not be editable
|
154
|
+
/>
|
155
|
+
|
156
|
+
<FormField
|
157
|
+
label="Phone Number"
|
158
|
+
name="phone"
|
159
|
+
placeholder="+1 (123) 456-7890"
|
160
|
+
type="text"
|
161
|
+
value={formik.values.phone}
|
162
|
+
onChange={formik.handleChange}
|
163
|
+
onBlur={formik.handleBlur}
|
164
|
+
error={formik.touched.phone && formik.errors.phone}
|
165
|
+
/>
|
166
|
+
|
167
|
+
<FormField
|
168
|
+
label="Date of Birth"
|
169
|
+
name="date_of_birth"
|
170
|
+
placeholder="YYYY-MM-DD"
|
171
|
+
type="date"
|
172
|
+
value={formik.values.date_of_birth}
|
173
|
+
onChange={formik.handleChange}
|
174
|
+
onBlur={formik.handleBlur}
|
175
|
+
error={formik.touched.date_of_birth && formik.errors.date_of_birth}
|
176
|
+
/>
|
177
|
+
|
178
|
+
<FormField
|
179
|
+
label="Country"
|
180
|
+
name="country"
|
181
|
+
placeholder="Select country"
|
182
|
+
type="select"
|
183
|
+
value={formik.values.country}
|
184
|
+
onChange={formik.handleChange}
|
185
|
+
onBlur={formik.handleBlur}
|
186
|
+
error={formik.touched.country && formik.errors.country}
|
187
|
+
options={__countryListing.map((country) => ({
|
188
|
+
value: country.name,
|
189
|
+
label: country.name,
|
190
|
+
}))}
|
191
|
+
/>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<FormField
|
195
|
+
label="About Me"
|
196
|
+
name="about_me"
|
197
|
+
placeholder="Tell us about yourself"
|
198
|
+
type="textarea"
|
199
|
+
value={formik.values.about_me}
|
200
|
+
onChange={formik.handleChange}
|
201
|
+
onBlur={formik.handleBlur}
|
202
|
+
error={formik.touched.about_me && formik.errors.about_me}
|
203
|
+
/>
|
204
|
+
|
205
|
+
<ButtonPrimary
|
206
|
+
type="submit"
|
207
|
+
className="submit-btn"
|
208
|
+
disabled={formik.isSubmitting}
|
209
|
+
>
|
210
|
+
{formik.isSubmitting ? "Saving..." : "Save"}
|
211
|
+
</ButtonPrimary>
|
212
|
+
</form>
|
213
|
+
</div>
|
214
|
+
);
|
215
|
+
};
|
216
|
+
|
217
|
+
export default AccountInfo;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import CommonPage from "./CommonPage";
|
3
|
+
import AccountInfo from "./AccountInfo";
|
4
|
+
import { useSelector } from "react-redux";
|
5
|
+
import "../../styles/accountpage.scss";
|
6
|
+
|
7
|
+
const AccountPage = () => {
|
8
|
+
return (
|
9
|
+
<>
|
10
|
+
<CommonPage>
|
11
|
+
{/* title="Account || Booking React Template" */}
|
12
|
+
<div className="container">
|
13
|
+
<div className="account_deatils">
|
14
|
+
<h2 className="account-title">Account Information</h2>
|
15
|
+
<p className="account-description">
|
16
|
+
View and update your account information here.
|
17
|
+
</p>
|
18
|
+
<div className="divider"></div>
|
19
|
+
<AccountInfo />
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</CommonPage>
|
23
|
+
</>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
|
27
|
+
export default AccountPage;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { NavLink } from "react-router-dom";
|
3
|
+
import { useSelector } from "react-redux";
|
4
|
+
import "../../styles/commonpage.scss";
|
5
|
+
|
6
|
+
const CommonPage = ({ children }) => {
|
7
|
+
|
8
|
+
return (
|
9
|
+
<div className="commonPageWrapper">
|
10
|
+
<div className="navbarWrapper">
|
11
|
+
<div className="container">
|
12
|
+
<div className="navLinks">
|
13
|
+
<NavLink to="/account" className={({ isActive }) => isActive ? "activeLink" : "link"}>
|
14
|
+
Account info
|
15
|
+
</NavLink>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div className="contentContainer">{children}</div>
|
20
|
+
</div>
|
21
|
+
);
|
22
|
+
};
|
23
|
+
|
24
|
+
export default CommonPage;
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import React, { FC, useEffect } from "react";
|
2
|
+
import { useNavigate, useLocation, Link } from "react-router-dom";
|
3
|
+
import "../../styles/commonlayout.scss";
|
4
|
+
const CommonLayout = ({ children, PropertyID }) => {
|
5
|
+
const navigate = useNavigate();
|
6
|
+
const location = useLocation();
|
7
|
+
|
8
|
+
useEffect(() => {
|
9
|
+
if (!PropertyID) {
|
10
|
+
navigate("/property-1");
|
11
|
+
}
|
12
|
+
}, [PropertyID, navigate]);
|
13
|
+
|
14
|
+
// Define your steps
|
15
|
+
const pathArray = [
|
16
|
+
{ path: 1, type: "Description", href: "/property-1" },
|
17
|
+
{ path: 2, type: "Images", href: "/property-2" },
|
18
|
+
{ path: 3, type: "Details", href: "/property-3" },
|
19
|
+
{ path: 4, type: "Location", href: "/property-4" },
|
20
|
+
{ path: 5, type: "Rooms", href: "/property-5" },
|
21
|
+
].map((step) => {
|
22
|
+
if (PropertyID) {
|
23
|
+
return { ...step, href: `${step.href}/${PropertyID}` };
|
24
|
+
}
|
25
|
+
return step;
|
26
|
+
});
|
27
|
+
const activeStepIndex = pathArray.findIndex((step) => {
|
28
|
+
const basePath = step.href.split("/").slice(0, 2).join("/");
|
29
|
+
return location.pathname.includes(basePath);
|
30
|
+
});
|
31
|
+
|
32
|
+
return (
|
33
|
+
<div className="common-layout">
|
34
|
+
<div className="steps-container">
|
35
|
+
{pathArray.map((step, index) => (
|
36
|
+
<div key={step.path} className="step">
|
37
|
+
<div className="step-circle-wrapper">
|
38
|
+
<Link
|
39
|
+
to={step.href}
|
40
|
+
className={`step-circle ${
|
41
|
+
index <= activeStepIndex ? "active" : ""
|
42
|
+
}`}
|
43
|
+
/>
|
44
|
+
{index < pathArray.length - 1 && (
|
45
|
+
<div
|
46
|
+
className={`step-line ${
|
47
|
+
index < activeStepIndex ? "active" : ""
|
48
|
+
}`}
|
49
|
+
></div>
|
50
|
+
)}
|
51
|
+
</div>
|
52
|
+
<Link
|
53
|
+
to={step.href}
|
54
|
+
className={`step-label ${
|
55
|
+
index === activeStepIndex ? "active" : ""
|
56
|
+
}`}
|
57
|
+
>
|
58
|
+
{step.type}
|
59
|
+
</Link>
|
60
|
+
</div>
|
61
|
+
))}
|
62
|
+
</div>
|
63
|
+
<div className="content">{children}</div>
|
64
|
+
</div>
|
65
|
+
);
|
66
|
+
};
|
67
|
+
|
68
|
+
export default CommonLayout;
|