├── src ├── App.css ├── config │ └── sokect.ts ├── Components │ ├── Checkout │ │ ├── input.css │ │ └── BookingDetails.tsx │ ├── Landing_page │ │ ├── Category │ │ │ ├── cate.css │ │ │ └── Category.tsx │ │ ├── Contents │ │ │ ├── Content.css │ │ │ └── Contents.tsx │ │ ├── Header │ │ │ └── Header.css │ │ ├── Cards │ │ │ └── Package.css │ │ ├── PackageCard │ │ │ ├── package.css │ │ │ └── Package.tsx │ │ ├── Chat │ │ │ └── Chat.tsx │ │ ├── HomePage.tsx │ │ ├── Footer │ │ │ └── Footer.tsx │ │ └── Navbar │ │ │ └── Navbar.tsx │ ├── Profile │ │ ├── Componet │ │ │ ├── Package.css │ │ │ ├── PackageDetails.tsx │ │ │ └── PackageTableRows.tsx │ │ └── UI │ │ │ ├── Footer.css │ │ │ ├── Silder.css │ │ │ ├── HeaderProfile.tsx │ │ │ ├── SideBar.tsx │ │ │ ├── ContantProfile.tsx │ │ │ └── Footer.tsx │ ├── ServicePage │ │ └── Service.css │ ├── ContactPage │ │ ├── Contact.css │ │ └── Contact.tsx │ ├── Vendor_register │ │ ├── Register.css │ │ └── Register.tsx │ ├── Admin │ │ ├── Login │ │ │ ├── Login.css │ │ │ ├── Login.tsx │ │ │ └── Form.tsx │ │ ├── User │ │ │ └── User.tsx │ │ ├── Booking │ │ │ └── Booking.tsx │ │ ├── Chat │ │ │ ├── Chat.tsx │ │ │ ├── userLisit.tsx │ │ │ └── Converstion.tsx │ │ ├── Destination │ │ │ └── Destination.tsx │ │ ├── Dashoard │ │ │ ├── Bar.tsx │ │ │ ├── Pie.tsx │ │ │ └── Dashboard.tsx │ │ ├── ReactTable │ │ │ ├── PackageList.tsx │ │ │ └── UserManage.tsx │ │ ├── DataTable │ │ │ ├── catetable.tsx │ │ │ ├── actvtityTable.tsx │ │ │ └── destinTable.tsx │ │ └── Sidebar │ │ │ └── Sidebar.tsx │ ├── SinglePage │ │ ├── Header.css │ │ ├── Calendar.tsx │ │ ├── range.tsx │ │ ├── smview │ │ │ └── overView.tsx │ │ ├── Gallery.tsx │ │ ├── DestinationView.tsx │ │ ├── Overview.tsx │ │ └── Navbar.tsx │ ├── Toastify │ │ ├── Hot_toaster.tsx │ │ └── Toastify.tsx │ ├── PackageCategory │ │ └── Package.css │ ├── Loader │ │ └── Loader.tsx │ ├── DestinationPage │ │ └── Destination.css │ ├── AboutPage │ │ └── About.css │ ├── Vendor_login │ │ ├── Login.css │ │ ├── GoogleSignup.tsx │ │ └── Login.tsx │ ├── Message │ │ ├── 500.tsx │ │ ├── Success.tsx │ │ └── 401.tsx │ ├── Payment │ │ └── MobileView.tsx │ ├── Form │ │ └── authLogin.tsx │ └── AuthVerify │ │ └── VerifyPage.tsx ├── Assets │ ├── bg.jpg │ ├── k3.jpg │ ├── k4.jpg │ ├── k6.jpg │ ├── k7.jpg │ ├── k8.jpg │ ├── mo.jpg │ ├── p.jfif │ ├── p2.jpg │ ├── s.jpg │ ├── s1.jpg │ ├── 401.png │ ├── aro.png │ ├── bg.jfif │ ├── bg3.webp │ ├── bot.png │ ├── boy.png │ ├── cash.png │ ├── chat.png │ ├── city.jpg │ ├── des3.jpg │ ├── img.webp │ ├── logo.png │ ├── map.png │ ├── map_.jpg │ ├── otp.png │ ├── sea.jpg │ ├── taj.jpg │ ├── to.jfif │ ├── upi.png │ ├── visa.png │ ├── Jaipur.jpg │ ├── Paris-1.png │ ├── aboutbg.jpg │ ├── ballon.jpg │ ├── cate.3.webp │ ├── cate1.jpg │ ├── cate2.jfif │ ├── cate4.jpg │ ├── cate5.jpg │ ├── cate6.jpg │ ├── chat1.png │ ├── des1.webp │ ├── des2.webp │ ├── google.png │ ├── guests.png │ ├── images.jfif │ ├── kerala.jfif │ ├── kerala1.jpg │ ├── landing.jpg │ ├── locte.png │ ├── loginbg.png │ ├── logo1.png │ ├── logo2.png │ ├── logo3.png │ ├── logo4.png │ ├── luxu1.jpg │ ├── luxury.jpg │ ├── mainbg.jfif │ ├── manali.webp │ ├── manali1.jpg │ ├── map2.jfif │ ├── mapIcon.png │ ├── sucss.jpg │ ├── travel.png │ ├── yellow.jpg │ ├── aboutbg2.jpg │ ├── calendar.png │ ├── climbing.png │ ├── contact.webp │ ├── download.jfif │ ├── honnymoon.jpg │ ├── package.webp │ ├── package1.jpg │ ├── service1.png │ ├── service2.png │ ├── service3.png │ ├── service4.png │ ├── service5.png │ ├── service6.png │ ├── servicebg.jpg │ ├── adminlogin.jpg │ ├── destination.webp │ ├── servicebg2.jpg │ ├── abouticon1 (1).png │ ├── abouticon2 (3).png │ ├── abouticon3 (2).png │ ├── download (1).jfif │ ├── download (2).jfif │ ├── download (5).jfif │ └── world-wide-shipping-wall-mural-3.jpg ├── Interface │ ├── activity.interface.ts │ ├── category.interface.ts │ ├── headerFillter.ts │ ├── auth_interface.ts │ └── destination.interface.ts ├── index.css ├── Pages │ ├── User │ │ ├── ChatPage.tsx │ │ ├── Error401.tsx │ │ ├── AboutPage.tsx │ │ ├── Error500.tsx │ │ ├── ContactPage.tsx │ │ ├── Package.tsx │ │ ├── SuccessPage.tsx │ │ ├── ServicePage.tsx │ │ ├── Landing_page.tsx │ │ ├── Login_page.tsx │ │ ├── Register_page.tsx │ │ ├── AuthVerify.tsx │ │ ├── DestinationPage.tsx │ │ ├── BookingDetails.tsx │ │ ├── PackageView.tsx │ │ ├── Payment.tsx │ │ └── ProfilePage.tsx │ └── Admin │ │ ├── AdminLogin.tsx │ │ ├── AddDestinPage.tsx │ │ ├── EditDestinPage.tsx │ │ ├── AdminCate.tsx │ │ ├── AdminActvity.tsx │ │ ├── ChatPage.tsx │ │ ├── Dashboard.tsx │ │ ├── AdminUserManage.tsx │ │ ├── AdminDestinaton.tsx │ │ └── BookingManage.tsx ├── Api │ ├── adminCategory │ │ ├── fetchCategory.ts │ │ ├── category.ts │ │ └── adminActvity │ │ │ └── actvtiyApi.ts │ ├── Chat │ │ ├── userLisit.ts │ │ ├── fetchMessage.ts │ │ └── sendChatApi.ts │ ├── admin │ │ ├── adminLogin │ │ │ └── LoginApi.ts │ │ ├── adminBooking │ │ │ └── BookingFetch.ts │ │ ├── adminActvity │ │ │ ├── fetchActivity.ts │ │ │ └── actvtiyApi.ts │ │ ├── adminDestination │ │ │ ├── fetchData.ts │ │ │ ├── addDestination.ts │ │ │ └── editDestin.ts │ │ ├── adminUserManage │ │ │ └── userFetchApi.ts │ │ └── adminDashboard │ │ │ └── fetchCount.ts │ └── user │ │ ├── destinationApi │ │ ├── packageCateApi.ts │ │ └── destinView.ts │ │ ├── Profile │ │ ├── CancelApi.ts │ │ ├── DestinaFetchApi.ts │ │ ├── bookingDetails.ts │ │ ├── PasswordChange.ts │ │ └── UserUpdation.ts │ │ ├── fillterApi │ │ └── fillterApi.ts │ │ ├── Auth │ │ └── AuthApi.ts │ │ └── bookingApi │ │ └── bookingApi.ts ├── Axios │ └── axios.ts ├── Schema │ ├── admin │ │ └── schema.ts │ └── auth │ │ └── auth.ts ├── reportWebVitals.ts ├── Redux │ ├── slice │ │ ├── chatUserId.ts │ │ ├── fillterSlice.ts │ │ ├── actvitiesSlice.ts │ │ ├── bookingDetailsSlice.ts │ │ ├── packageSlice.ts │ │ ├── destinIdSlice.ts │ │ ├── dateSlice.ts │ │ ├── passengerSlice.ts │ │ ├── authSlice.ts │ │ ├── bookingIvoice.ts │ │ ├── destinationSlice.ts │ │ └── extraService.ts │ └── store.ts ├── Context │ └── contextApi.tsx ├── App.tsx ├── utils │ └── ErrorBoundary.tsx ├── ProtectorRouter │ ├── AdminRouter.tsx │ └── UserRouter.tsx ├── index.tsx └── Router │ ├── AdminRouter.tsx │ └── UserRouter.tsx ├── public └── robots.txt ├── .gitignore ├── tsconfig.json ├── README.md ├── tailwind.config.js └── package.json /src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/config/sokect.ts: -------------------------------------------------------------------------------- 1 | export const SOCKET_URL = process.env.REACT_APP_BASEURL as string -------------------------------------------------------------------------------- /src/Components/Checkout/input.css: -------------------------------------------------------------------------------- 1 | input::placeholder { 2 | font: 15px/3 sans-serif; 3 | } -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/Assets/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/bg.jpg -------------------------------------------------------------------------------- /src/Assets/k3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/k3.jpg -------------------------------------------------------------------------------- /src/Assets/k4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/k4.jpg -------------------------------------------------------------------------------- /src/Assets/k6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/k6.jpg -------------------------------------------------------------------------------- /src/Assets/k7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/k7.jpg -------------------------------------------------------------------------------- /src/Assets/k8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/k8.jpg -------------------------------------------------------------------------------- /src/Assets/mo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/mo.jpg -------------------------------------------------------------------------------- /src/Assets/p.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/p.jfif -------------------------------------------------------------------------------- /src/Assets/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/p2.jpg -------------------------------------------------------------------------------- /src/Assets/s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/s.jpg -------------------------------------------------------------------------------- /src/Assets/s1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/s1.jpg -------------------------------------------------------------------------------- /src/Interface/activity.interface.ts: -------------------------------------------------------------------------------- 1 | export interface activityInterface{ 2 | Activity : string 3 | } -------------------------------------------------------------------------------- /src/Assets/401.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/401.png -------------------------------------------------------------------------------- /src/Assets/aro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/aro.png -------------------------------------------------------------------------------- /src/Assets/bg.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/bg.jfif -------------------------------------------------------------------------------- /src/Assets/bg3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/bg3.webp -------------------------------------------------------------------------------- /src/Assets/bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/bot.png -------------------------------------------------------------------------------- /src/Assets/boy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/boy.png -------------------------------------------------------------------------------- /src/Assets/cash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cash.png -------------------------------------------------------------------------------- /src/Assets/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/chat.png -------------------------------------------------------------------------------- /src/Assets/city.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/city.jpg -------------------------------------------------------------------------------- /src/Assets/des3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/des3.jpg -------------------------------------------------------------------------------- /src/Assets/img.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/img.webp -------------------------------------------------------------------------------- /src/Assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/logo.png -------------------------------------------------------------------------------- /src/Assets/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/map.png -------------------------------------------------------------------------------- /src/Assets/map_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/map_.jpg -------------------------------------------------------------------------------- /src/Assets/otp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/otp.png -------------------------------------------------------------------------------- /src/Assets/sea.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/sea.jpg -------------------------------------------------------------------------------- /src/Assets/taj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/taj.jpg -------------------------------------------------------------------------------- /src/Assets/to.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/to.jfif -------------------------------------------------------------------------------- /src/Assets/upi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/upi.png -------------------------------------------------------------------------------- /src/Assets/visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/visa.png -------------------------------------------------------------------------------- /src/Assets/Jaipur.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/Jaipur.jpg -------------------------------------------------------------------------------- /src/Assets/Paris-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/Paris-1.png -------------------------------------------------------------------------------- /src/Assets/aboutbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/aboutbg.jpg -------------------------------------------------------------------------------- /src/Assets/ballon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/ballon.jpg -------------------------------------------------------------------------------- /src/Assets/cate.3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cate.3.webp -------------------------------------------------------------------------------- /src/Assets/cate1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cate1.jpg -------------------------------------------------------------------------------- /src/Assets/cate2.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cate2.jfif -------------------------------------------------------------------------------- /src/Assets/cate4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cate4.jpg -------------------------------------------------------------------------------- /src/Assets/cate5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cate5.jpg -------------------------------------------------------------------------------- /src/Assets/cate6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/cate6.jpg -------------------------------------------------------------------------------- /src/Assets/chat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/chat1.png -------------------------------------------------------------------------------- /src/Assets/des1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/des1.webp -------------------------------------------------------------------------------- /src/Assets/des2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/des2.webp -------------------------------------------------------------------------------- /src/Assets/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/google.png -------------------------------------------------------------------------------- /src/Assets/guests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/guests.png -------------------------------------------------------------------------------- /src/Assets/images.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/images.jfif -------------------------------------------------------------------------------- /src/Assets/kerala.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/kerala.jfif -------------------------------------------------------------------------------- /src/Assets/kerala1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/kerala1.jpg -------------------------------------------------------------------------------- /src/Assets/landing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/landing.jpg -------------------------------------------------------------------------------- /src/Assets/locte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/locte.png -------------------------------------------------------------------------------- /src/Assets/loginbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/loginbg.png -------------------------------------------------------------------------------- /src/Assets/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/logo1.png -------------------------------------------------------------------------------- /src/Assets/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/logo2.png -------------------------------------------------------------------------------- /src/Assets/logo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/logo3.png -------------------------------------------------------------------------------- /src/Assets/logo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/logo4.png -------------------------------------------------------------------------------- /src/Assets/luxu1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/luxu1.jpg -------------------------------------------------------------------------------- /src/Assets/luxury.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/luxury.jpg -------------------------------------------------------------------------------- /src/Assets/mainbg.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/mainbg.jfif -------------------------------------------------------------------------------- /src/Assets/manali.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/manali.webp -------------------------------------------------------------------------------- /src/Assets/manali1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/manali1.jpg -------------------------------------------------------------------------------- /src/Assets/map2.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/map2.jfif -------------------------------------------------------------------------------- /src/Assets/mapIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/mapIcon.png -------------------------------------------------------------------------------- /src/Assets/sucss.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/sucss.jpg -------------------------------------------------------------------------------- /src/Assets/travel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/travel.png -------------------------------------------------------------------------------- /src/Assets/yellow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/yellow.jpg -------------------------------------------------------------------------------- /src/Components/Landing_page/Category/cate.css: -------------------------------------------------------------------------------- 1 | 2 | .categoryMain::-webkit-scrollbar{ 3 | display: none; 4 | } -------------------------------------------------------------------------------- /src/Assets/aboutbg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/aboutbg2.jpg -------------------------------------------------------------------------------- /src/Assets/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/calendar.png -------------------------------------------------------------------------------- /src/Assets/climbing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/climbing.png -------------------------------------------------------------------------------- /src/Assets/contact.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/contact.webp -------------------------------------------------------------------------------- /src/Assets/download.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/download.jfif -------------------------------------------------------------------------------- /src/Assets/honnymoon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/honnymoon.jpg -------------------------------------------------------------------------------- /src/Assets/package.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/package.webp -------------------------------------------------------------------------------- /src/Assets/package1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/package1.jpg -------------------------------------------------------------------------------- /src/Assets/service1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/service1.png -------------------------------------------------------------------------------- /src/Assets/service2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/service2.png -------------------------------------------------------------------------------- /src/Assets/service3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/service3.png -------------------------------------------------------------------------------- /src/Assets/service4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/service4.png -------------------------------------------------------------------------------- /src/Assets/service5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/service5.png -------------------------------------------------------------------------------- /src/Assets/service6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/service6.png -------------------------------------------------------------------------------- /src/Assets/servicebg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/servicebg.jpg -------------------------------------------------------------------------------- /src/Assets/adminlogin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/adminlogin.jpg -------------------------------------------------------------------------------- /src/Assets/destination.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/destination.webp -------------------------------------------------------------------------------- /src/Assets/servicebg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/servicebg2.jpg -------------------------------------------------------------------------------- /src/Assets/abouticon1 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/abouticon1 (1).png -------------------------------------------------------------------------------- /src/Assets/abouticon2 (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/abouticon2 (3).png -------------------------------------------------------------------------------- /src/Assets/abouticon3 (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/abouticon3 (2).png -------------------------------------------------------------------------------- /src/Assets/download (1).jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/download (1).jfif -------------------------------------------------------------------------------- /src/Assets/download (2).jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/download (2).jfif -------------------------------------------------------------------------------- /src/Assets/download (5).jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/download (5).jfif -------------------------------------------------------------------------------- /src/Components/Profile/Componet/Package.css: -------------------------------------------------------------------------------- 1 | .banner{ 2 | background-image:url('../../../Assets/destination.webp'); 3 | 4 | } 5 | -------------------------------------------------------------------------------- /src/Interface/category.interface.ts: -------------------------------------------------------------------------------- 1 | export interface categoryInterface{ 2 | packageCategory? : string, 3 | file:null 4 | 5 | } -------------------------------------------------------------------------------- /src/Assets/world-wide-shipping-wall-mural-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majidkambarath/TravDestBook_React/HEAD/src/Assets/world-wide-shipping-wall-mural-3.jpg -------------------------------------------------------------------------------- /src/Interface/headerFillter.ts: -------------------------------------------------------------------------------- 1 | export interface HeaderFillterInterface{ 2 | descrption:string, 3 | activity:string, 4 | priceCategory:string, 5 | guests:string, 6 | } -------------------------------------------------------------------------------- /src/Interface/auth_interface.ts: -------------------------------------------------------------------------------- 1 | export interface authInterface { 2 | name:string, 3 | phone:number, 4 | email:string, 5 | password:string, 6 | cpassword:string 7 | } -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500&display=swap'); 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | -------------------------------------------------------------------------------- /src/Pages/User/ChatPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Chat from '../../Components/Chat/Chat' 3 | export default function ChatPage() { 4 | return ( 5 |
6 | ) 7 | } 8 | -------------------------------------------------------------------------------- /src/Components/ServicePage/Service.css: -------------------------------------------------------------------------------- 1 | .serviceImg{ 2 | width: 100%; 3 | height: 550px; 4 | background-image:url('../../Assets/bg3.webp'); 5 | background-size:cover; 6 | background-position: center; 7 | } -------------------------------------------------------------------------------- /src/Api/adminCategory/fetchCategory.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../Axios/axios"; 2 | export const fetchCategory = async () => { 3 | const fetchDataa = await axios.get("/admin/getCategory"); 4 | return fetchDataa; 5 | }; 6 | -------------------------------------------------------------------------------- /src/Components/ContactPage/Contact.css: -------------------------------------------------------------------------------- 1 | .Contacts_img{ 2 | width: 100%; 3 | height: 500px; 4 | background-image:url('../../Assets/contact.webp'); 5 | background-size:cover; 6 | background-position: center; 7 | } -------------------------------------------------------------------------------- /src/Components/Landing_page/Contents/Content.css: -------------------------------------------------------------------------------- 1 | .ContentContainer{ 2 | width: 100%; 3 | height: 550px; 4 | background-image:url('../../../Assets/map.png'); 5 | background-size:cover; 6 | background-position: center; 7 | } -------------------------------------------------------------------------------- /src/Pages/User/Error401.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Error from '../../Components/Message/401' 3 | export default function Error401() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/AboutPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import About from '../../Components/AboutPage/About' 3 | export default function AboutPage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/Error500.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Error from '../../Components/Message/500' 3 | export default function Error500() { 4 | return ( 5 |
6 | 7 | 8 |
9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/Api/Chat/userLisit.ts: -------------------------------------------------------------------------------- 1 | 2 | import axios from '../../Axios/axios' 3 | 4 | export const userLisitConversation = async()=>{ 5 | try { 6 | return axios.get('/chat/userLisit') 7 | } catch (error) { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Pages/User/ContactPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Contact from '../../Components/ContactPage/Contact' 3 | export default function ContactPage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/Package.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Packagee from '../../Components/PackageCategory/Package' 3 | export default function Package() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/SuccessPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Success from '../../Components/Message/Success' 3 | export default function SuccessPage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/ServicePage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Service from '../../Components/ServicePage/ServicePage' 3 | export default function ServicePage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Axios/axios.ts: -------------------------------------------------------------------------------- 1 | 2 | import axios from 'axios' 3 | const axiosInstance = axios.create({ 4 | baseURL:'http://localhost:2000', 5 | headers: { 6 | 'Content-Type': 'application/json' 7 | } 8 | }); 9 | 10 | export default axiosInstance 11 | -------------------------------------------------------------------------------- /src/Pages/Admin/AdminLogin.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AdminLogin from '../../Components/Admin/Login/Login' 3 | export default function AdminLoginPage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/Landing_page.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import HomePage from '../../Components/Landing_page/HomePage' 3 | export default function Landing_page() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/Login_page.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Login from'../../Components/Vendor_login/Login' 3 | function Login_page() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | 11 | export default Login_page -------------------------------------------------------------------------------- /src/Pages/User/Register_page.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Register from '../../Components/Vendor_register/Register' 3 | export default function Register_page() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Components/Vendor_register/Register.css: -------------------------------------------------------------------------------- 1 | .Parent{ 2 | width: 100%; 3 | height: 100vh; 4 | background-image: linear-gradient(rgba(0,0, 0, 0.7),rgba(0, 0,0, 0.5)),url('../../Assets/bg.jfif'); 5 | background-size:cover; 6 | background-position: center; 7 | } -------------------------------------------------------------------------------- /src/Pages/Admin/AddDestinPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AddDestin from '../../Components/Admin/Destination/addDestin' 3 | export default function AddDestinPage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/AuthVerify.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AuthVerfication from '../../Components/AuthVerify/VerifyPage' 3 | export default function AuthVerify() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Api/adminCategory/category.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../Axios/axios"; 2 | 3 | export const categoryApi = async (data:object,config:any) => { 4 | console.log(data); 5 | 6 | const resData = await axios.post("/admin/category", data,config); 7 | return resData; 8 | }; 9 | -------------------------------------------------------------------------------- /src/Components/Admin/Login/Login.css: -------------------------------------------------------------------------------- 1 | .imgDivv{ 2 | width: 100%; 3 | height: 500px; 4 | background-image: linear-gradient(rgba(0,0, 0, 0.3),rgba(0, 0,0, 0.2)),url('../../../Assets/adminlogin.jpg'); 5 | background-size:cover; 6 | background-position: center; 7 | } -------------------------------------------------------------------------------- /src/Pages/User/DestinationPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Destination from '../../Components/DestinationPage/Destination' 3 | export default function DestinationPage() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Pages/User/BookingDetails.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import BookingDetailsInput from '../../Components/Checkout/BookingDetails' 3 | export default function BookingDetails() { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/Components/SinglePage/Header.css: -------------------------------------------------------------------------------- 1 | .warapperr::-webkit-scrollbar{ 2 | width: 0; 3 | } 4 | .warapperr{ 5 | display: flex; 6 | overflow-y: scroll; 7 | 8 | } 9 | .itemss{ 10 | min-width: 400px; 11 | height: 300px; 12 | margin-right: 4px ; 13 | 14 | } -------------------------------------------------------------------------------- /src/Pages/Admin/EditDestinPage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import EditDestinpage from '../../Components/Admin/Destination/editDestin' 3 | 4 | export default function EditDestinPage() { 5 | return ( 6 |
7 | 8 |
9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/Pages/User/PackageView.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import SinglePgView from '../../Components/SinglePage/DestinationView' 3 | 4 | export default function PackageView() { 5 | return ( 6 |
7 | 8 | 9 |
10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/Api/admin/adminLogin/LoginApi.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const AdminLoginApi = async(values:object)=>{ 4 | try { 5 | return axios.post('/admin/login',values) 6 | } catch (error) { 7 | console.log(error); 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Api/admin/adminBooking/BookingFetch.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const bookingManagementApi = async()=>{ 4 | try { 5 | return axios.get('/admin/bookingMangement') 6 | } catch (error) { 7 | console.log(error); 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Api/admin/adminActvity/fetchActivity.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | export const fetchActvityAPi = async()=>{ 3 | try { 4 | return await axios.get('/admin/getActivity') 5 | 6 | } catch (error) { 7 | console.log(error); 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Components/Toastify/Hot_toaster.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Toaster } from 'react-hot-toast'; 3 | export default function Hot_toaster() { 4 | return ( 5 |
6 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/Components/PackageCategory/Package.css: -------------------------------------------------------------------------------- 1 | .package_head{ 2 | width: 100%; 3 | height: 510px; 4 | background-image:url('../../Assets/p2.jpg'); 5 | background-size:cover; 6 | background-position: center; 7 | } 8 | .banner{ 9 | background-image:url('../../Assets/destination.webp'); 10 | 11 | } -------------------------------------------------------------------------------- /src/Components/Loader/Loader.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { InfinitySpin } from "react-loader-spinner"; 3 | 4 | function Loader() { 5 | return ( 6 | <> 7 |
8 | 9 |
10 | 11 | ); 12 | } 13 | 14 | export default Loader; -------------------------------------------------------------------------------- /src/Api/admin/adminActvity/actvtiyApi.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../../Axios/axios"; 2 | 3 | export const actvtiyApi = async (data: string | undefined) => { 4 | try { 5 | const resData = axios.post("/admin/activity", { data }); 6 | return resData; 7 | } catch (error) { 8 | console.log(error); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/Api/admin/adminDestination/fetchData.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | export const fetchDestinApi = async()=>{ 3 | try { 4 | const fetchData = await axios.get('/admin/getDestin') 5 | return fetchData 6 | } catch (error) { 7 | console.log(error); 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Api/Chat/fetchMessage.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../Axios/axios' 2 | 3 | export const fetchMessageApi = async(authId:string)=>{ 4 | console.log(authId); 5 | 6 | try { 7 | return await axios.get(`/chat/messages?id=${authId}`) 8 | } catch (error) { 9 | console.log(error); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /src/Api/adminCategory/adminActvity/actvtiyApi.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../../Axios/axios"; 2 | 3 | export const actvtiyApi = async (data: string | undefined) => { 4 | try { 5 | const resData = axios.post("/admin/activity", { data }); 6 | return resData; 7 | } catch (error) { 8 | console.log(error); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /src/Api/user/destinationApi/packageCateApi.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | export const fetchPackageDestin = async(id:any)=>{ 3 | try { 4 | const resData = await axios.patch(`/package_cate?id=${id}`) 5 | return resData 6 | } catch (error) { 7 | console.log(error); 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /src/Pages/Admin/AdminCate.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Sidebar from '../../Components/Admin/Sidebar/Sidebar' 3 | import Category from '../../Components/Admin/Category/category' 4 | export default function AdminCate() { 5 | return ( 6 |
7 | 8 | 9 |
10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/Api/user/Profile/CancelApi.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../../Axios/axios"; 2 | 3 | export const bookingCancelApi = async (id: string | undefined ,userId:string) => { 4 | try { 5 | console.log(id); 6 | 7 | return await axios.patch(`/bookingCancel?id=${id}` ,{userId} ); 8 | } catch (error: any) { 9 | console.log(error); 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /src/Pages/Admin/AdminActvity.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import SiderBar from '../../Components/Admin/Sidebar/Sidebar' 3 | import Activity from '../../Components/Admin/Activity/activity' 4 | export default function AdminActvity() { 5 | return ( 6 |
7 | 8 | 9 |
10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/Components/Admin/User/User.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import UserManage from '../ReactTable/UserManage' 3 | 4 | export default function UserPage() { 5 | return ( 6 | <> 7 |
8 | 9 |
10 | 11 |
12 |
13 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Header/Header.css: -------------------------------------------------------------------------------- 1 | .landingImg{ 2 | width: 100%; 3 | height: 590px; 4 | background-image:url('../../../Assets/yellow.jpg'); 5 | background-size:cover; 6 | background-position: center; 7 | } 8 | .mainText{ 9 | font-family: 'Playfair Display SC', serif; 10 | } 11 | .subText{ 12 | font-family: 'Charmonman', cursive; 13 | } 14 | -------------------------------------------------------------------------------- /src/Pages/Admin/ChatPage.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Sidebar from "../../Components/Admin/Sidebar/Sidebar"; 3 | import ChatBox from "../../Components/Admin/Chat/Chat"; 4 | export default function ChatPage() { 5 | return ( 6 | <> 7 |
8 | 9 | 10 |
11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/Pages/Admin/Dashboard.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AdminNavbar from '../../Components/Admin/Sidebar/Sidebar' 3 | import AdminDashboard from '../../Components/Admin/Dashoard/Dashboard' 4 | export default function Dashboard() { 5 | return ( 6 |
7 | 8 | 9 |
10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Cards/Package.css: -------------------------------------------------------------------------------- 1 | .wapperDiv::-webkit-scrollbar{ 2 | width: 0; 3 | } 4 | .wapperDiv{ 5 | display: flex; 6 | overflow-x: scroll; 7 | margin-top: 30px; 8 | margin-left: 10px; 9 | height: 450px; 10 | } 11 | .itemDiv{ 12 | min-width: 400px; 13 | height: 400px; 14 | position: relative; 15 | margin-right: 4px ; 16 | } -------------------------------------------------------------------------------- /src/Pages/Admin/AdminUserManage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import User from '../../Components/Admin/User/User' 3 | import Slider from '../../Components/Admin/Sidebar/Sidebar' 4 | export default function AdminUserManage() { 5 | return ( 6 | <> 7 |
8 | 9 | 10 | 11 |
12 | 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /src/Components/DestinationPage/Destination.css: -------------------------------------------------------------------------------- 1 | .Destination_head{ 2 | width: 100%; 3 | height: 510px; 4 | background-image:url('../../Assets/destination.webp'); 5 | background-size:cover; 6 | background-position: center; 7 | } 8 | 9 | .fade{ 10 | height: 14.5rem; 11 | background-image: linear-gradient(180deg,transparent,rgba(37,37,37,.61),#111); 12 | 13 | } -------------------------------------------------------------------------------- /src/Pages/Admin/AdminDestinaton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Destination from '../../Components/Admin/Destination/Destination' 3 | import AdminNavbar from '../../Components/Admin/Sidebar/Sidebar' 4 | 5 | export default function AdminDestinaton() { 6 | return ( 7 |
8 | 9 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/Pages/Admin/BookingManage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Sidebar from "../../Components/Admin/Sidebar/Sidebar"; 3 | 4 | import Booking from '../../Components/Admin/Booking/Booking'; 5 | export default function BookingManage() { 6 | return ( 7 |
8 |
9 | 10 | 11 |
12 |
13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /src/Api/admin/adminDestination/addDestination.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | export const destinationApi = async(data:object,config:any)=>{ 3 | console.log(data); 4 | 5 | try { 6 | 7 | const resData = await axios.post('/admin/add_destin',data, config) 8 | return resData; 9 | } catch (error) { 10 | console.log(error); 11 | 12 | } 13 | } -------------------------------------------------------------------------------- /src/Components/AboutPage/About.css: -------------------------------------------------------------------------------- 1 | .aboutImg{ 2 | width: 100%; 3 | height: 510px; 4 | background-image:url('../../Assets/k8.jpg'); 5 | background-size:cover; 6 | background-position: center; 7 | } 8 | .subcontanier{ 9 | width: 100%; 10 | height: 500px; 11 | background-image:url('../../Assets/aboutbg2.jpg'); 12 | background-size:cover; 13 | background-position: center; 14 | } -------------------------------------------------------------------------------- /src/Components/Landing_page/PackageCard/package.css: -------------------------------------------------------------------------------- 1 | 2 | .warapper::-webkit-scrollbar{ 3 | width: 0; 4 | } 5 | .warapper{ 6 | display: flex; 7 | overflow-y: scroll; 8 | margin-top: 30px; 9 | margin-left: 10px; 10 | } 11 | .items{ 12 | min-width: 300px; 13 | height: 300px; 14 | position: relative; 15 | margin-right: 4px ; 16 | } 17 | .textt{ 18 | position: absolute; 19 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .env 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/Api/user/Profile/DestinaFetchApi.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../../Axios/axios"; 2 | 3 | export const BookingFetchApi = async()=>{ 4 | try { 5 | return await axios.get('/getBooking',{ 6 | headers: { 7 | Authorization: `Bearer ${localStorage.getItem("user")}` 8 | }, 9 | } 10 | ) 11 | 12 | } catch (error) { 13 | console.log(error); 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /src/Api/user/Profile/bookingDetails.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const bookingDetailsApi = async(id:string|undefined)=>{ 4 | try { 5 | return await axios.get(`/bookingDetails?id=${id}`,{ 6 | headers: { 7 | Authorization: `Bearer ${localStorage.getItem("user")}` 8 | }, 9 | }) 10 | } catch (error) { 11 | console.log(error); 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /src/Api/user/fillterApi/fillterApi.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | export const fillterApi = async(values:any)=>{ 3 | try { 4 | 5 | let{activity,descrption,guests,priceCategory}=values 6 | return await axios.get(`/fillterPackage?activity=${activity}&descrption=${descrption}&guests=${guests}&priceCategory=${priceCategory} `) 7 | } catch (error) { 8 | console.log(error); 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /src/Schema/admin/schema.ts: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | export const AdminSchema = yup.object().shape({ 3 | email: yup 4 | .string() 5 | .trim() 6 | .required("Enter you email") 7 | .test('isvalidEmail', "Enter a valid Email", (arg) => 8 | /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(arg)), 9 | password: yup 10 | .string() 11 | .trim() 12 | .required("Password can not be empty") 13 | }); -------------------------------------------------------------------------------- /src/Api/user/Profile/PasswordChange.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const userPasswordChangeApi = async(data:object)=>{ 4 | console.log(data); 5 | 6 | try { 7 | return await axios.patch('/userPasswordChange' , data,{ 8 | headers: { 9 | Authorization: `Bearer ${localStorage.getItem("user")}` 10 | }, 11 | }) 12 | } catch (error) { 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /src/Api/admin/adminUserManage/userFetchApi.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const userManageFetchApi = async()=>{ 4 | try { 5 | return await axios.get('/admin/getUser') 6 | } catch (error) { 7 | console.log(); 8 | 9 | } 10 | } 11 | 12 | export const userBlockingApi = async(id:string)=>{ 13 | try { 14 | return await axios.patch(`/admin/userBlockingApi?id=${id}`) 15 | } catch (error) { 16 | console.log(error); 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /src/Components/Toastify/Toastify.tsx: -------------------------------------------------------------------------------- 1 | import { ToastContainer } from "react-toastify"; 2 | import 'react-toastify/dist/ReactToastify.css'; 3 | 4 | function ReactToastify() { 5 | return ( 6 | 18 | ); 19 | 20 | } 21 | 22 | export default ReactToastify; -------------------------------------------------------------------------------- /src/Api/Chat/sendChatApi.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../Axios/axios' 2 | 3 | export const sendChatApi = async(id:string,data:object)=>{ 4 | try { 5 | console.log(id); 6 | console.log(data); 7 | 8 | return await axios.post(`/chat/conversations?id=${id}`,data ,{ 9 | headers: { 10 | Authorization: `Bearer ${localStorage.getItem("user")}` 11 | }, 12 | }) 13 | } catch (error) { 14 | console.log(error); 15 | 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Chat/Chat.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { NavLink } from 'react-router-dom' 3 | export default function Chat() { 4 | return ( 5 | <> 6 | 7 | 8 |
9 | chat
10 |     -img 11 |
12 |
13 | 14 | 15 | ) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/Api/user/Profile/UserUpdation.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const userDetailsUpdate = async(Data:object)=>{ 4 | console.log(Data); 5 | 6 | try { 7 | return await axios.patch('/userProfile', Data,{ 8 | headers: { 9 | Authorization: `Bearer ${localStorage.getItem("user")}`, 10 | "Content-Type": "multipart/form-data", 11 | }, 12 | params: { role: 'user' } 13 | }); 14 | } catch (error) { 15 | console.log(error); 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /src/Components/Admin/Booking/Booking.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import LisitBooking from '../ReactTable/LisitBooking' 3 | 4 | export default function Booking() { 5 | return ( 6 |
7 |
8 |

9 | Booking Management 10 |

11 | 12 |
13 |
14 | 15 |
16 |
17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/Api/admin/adminDestination/editDestin.ts: -------------------------------------------------------------------------------- 1 | import axios from "../../../Axios/axios"; 2 | 3 | export const editDestinationApi = async(data:object,config:any)=>{ 4 | console.log(data); 5 | try { 6 | return await axios.post('/admin/edit_Destin',data,config) 7 | } catch (error) { 8 | console.log(error); 9 | 10 | } 11 | } 12 | 13 | export const DestinationApi = async(id:string|undefined)=>{ 14 | try { 15 | return await axios.get(`/admin/edit_IDFetch?id=${id}`) 16 | } catch (error) { 17 | console.log(error); 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /src/Redux/slice/chatUserId.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from "@reduxjs/toolkit"; 2 | 3 | export interface authChatIDState { 4 | id:string 5 | } 6 | const initialState :authChatIDState={ 7 | id : '' 8 | } 9 | 10 | const authchatIdSlice =createSlice({ 11 | name:'authChatID', 12 | initialState, 13 | reducers:{ 14 | setAuthChatID :(state,action:PayloadAction)=>{ 15 | state.id = action.payload 16 | } 17 | } 18 | }) 19 | 20 | export const { setAuthChatID } = authchatIdSlice.actions; 21 | export default authchatIdSlice.reducer; 22 | -------------------------------------------------------------------------------- /src/Redux/slice/fillterSlice.ts: -------------------------------------------------------------------------------- 1 | import {createSlice,PayloadAction} from '@reduxjs/toolkit' 2 | 3 | export interface fillterState { 4 | fillterData:object[] 5 | } 6 | const initialState : fillterState={ 7 | fillterData:[], 8 | } 9 | 10 | const fillterSlice = createSlice({ 11 | name:'fillterSliceStore', 12 | initialState, 13 | reducers:{ 14 | fillterStoreData:(state,action:PayloadAction)=>{ 15 | state.fillterData=action.payload 16 | } 17 | } 18 | }) 19 | 20 | export const {fillterStoreData} = fillterSlice.actions 21 | export default fillterSlice.reducer -------------------------------------------------------------------------------- /src/Components/Checkout/BookingDetails.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Navbar from "../Navbar/NewNavbar" 3 | import UserDetailsForm from './UserDetailsForm'; 4 | import DestinDetails from './DestinDetails'; 5 | export default function BookingDetails() { 6 | 7 | return ( 8 | <> 9 |
10 |
11 | 12 |
13 |
14 |
15 | 16 | 17 |
18 | 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/Redux/slice/actvitiesSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from "@reduxjs/toolkit"; 2 | 3 | export interface activitiesState { 4 | Activity: object[]; 5 | } 6 | 7 | const initialState: activitiesState = { 8 | Activity: [], 9 | }; 10 | 11 | const activitesSlice = createSlice({ 12 | name: "Actvities", 13 | initialState, 14 | reducers: { 15 | actvitiesStateData: (state, action: PayloadAction) => { 16 | state.Activity = action.payload; 17 | }, 18 | }, 19 | }); 20 | 21 | export const { actvitiesStateData } = activitesSlice.actions; 22 | export default activitesSlice.reducer; 23 | -------------------------------------------------------------------------------- /src/Components/Landing_page/HomePage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | // import Cards from './Cards/Cards' 3 | import Category from './Category/Category' 4 | 5 | import Contents from './Contents/Contents' 6 | import Footer from './Footer/Footer' 7 | import Header from './Header/Header' 8 | import PackageCards from './PackageCard/Package' 9 | import Package from './Cards/package' 10 | export default function HomePage() { 11 | 12 | return ( 13 |
14 |
15 | 16 | 17 | 18 | 19 |
20 |
21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/Components/Profile/UI/Footer.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | background-color: #5b5c5c; 3 | color: #fff; 4 | display: flex; 5 | justify-content: space-between; 6 | position: fixed; 7 | bottom: 0; 8 | width: 100%; 9 | height: 80px; 10 | } 11 | 12 | .footer-item { 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | flex: 1; 17 | font-size: 24px; 18 | transition: all 0.3s ease-in-out; 19 | } 20 | 21 | .footer-item:hover { 22 | transform: translateY(-5px); 23 | } 24 | 25 | .footer-item:first-child { 26 | font-size: 32px; 27 | } 28 | -------------------------------------------------------------------------------- /src/Redux/slice/bookingDetailsSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'; 2 | 3 | export interface BookingState { 4 | bookingData: any[]; 5 | } 6 | 7 | const initialState: BookingState = { 8 | bookingData: [], 9 | }; 10 | 11 | const bookingDetailsSlice = createSlice({ 12 | name: 'bookingCollection', 13 | initialState, 14 | reducers: { 15 | setBookingDetails: (state, action: PayloadAction) => { 16 | state.bookingData = action.payload 17 | }, 18 | }, 19 | }); 20 | 21 | export const { setBookingDetails } = bookingDetailsSlice.actions; 22 | export default bookingDetailsSlice.reducer; 23 | -------------------------------------------------------------------------------- /src/Redux/slice/packageSlice.ts: -------------------------------------------------------------------------------- 1 | import {createSlice,PayloadAction} from '@reduxjs/toolkit'; 2 | 3 | export interface packageState{ 4 | packageCategory :object[] 5 | status:boolean 6 | } 7 | const initialState : packageState={ 8 | packageCategory:[], 9 | status:true 10 | } 11 | 12 | const packageSlice = createSlice({ 13 | name:" package", 14 | initialState, 15 | reducers: { 16 | packageCategoryData: (state,action:PayloadAction)=>{ 17 | state.packageCategory=action.payload 18 | } 19 | } 20 | }) 21 | 22 | export const {packageCategoryData} = packageSlice.actions 23 | export default packageSlice.reducer; 24 | -------------------------------------------------------------------------------- /src/Redux/slice/destinIdSlice.ts: -------------------------------------------------------------------------------- 1 | import {createSlice,PayloadAction} from '@reduxjs/toolkit' 2 | 3 | export interface destinationStateID{ 4 | destinationsID:string|undefined|null 5 | } 6 | const initialState : destinationStateID={ 7 | destinationsID:"", 8 | } 9 | 10 | const destinationSlice = createSlice({ 11 | name:"destinationID", 12 | initialState, 13 | reducers:{ 14 | destinationIDData:(state,action:PayloadAction)=>{ 15 | state.destinationsID=action.payload 16 | } 17 | } 18 | }) 19 | 20 | export const {destinationIDData} = destinationSlice.actions 21 | export default destinationSlice.reducer -------------------------------------------------------------------------------- /src/Components/Admin/Chat/Chat.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Converstion from "./Converstion"; 3 | import Message from "./Message"; 4 | 5 | export default function ChatPage() { 6 | return ( 7 | <> 8 |
9 |
10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /src/Redux/slice/dateSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'; 2 | 3 | interface DateState { 4 | DatePicker: { 5 | 6 | startDate: Date; 7 | endDate: Date; 8 | } 9 | 10 | } 11 | const initialState: DateState = { 12 | DatePicker:{ 13 | startDate: new Date(), 14 | endDate: new Date(), 15 | } 16 | }; 17 | 18 | const dateSlice = createSlice({ 19 | name: 'date', 20 | initialState, 21 | reducers: { 22 | setDate: (state, action: PayloadAction) => { 23 | state.DatePicker = action.payload 24 | 25 | }, 26 | }, 27 | }); 28 | 29 | export const { setDate } = dateSlice.actions; 30 | 31 | export default dateSlice.reducer; 32 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | , "src/Components/Vendor_login", "src/Pages/User/HeaderTab.tsx" ] 26 | } 27 | -------------------------------------------------------------------------------- /src/Context/contextApi.tsx: -------------------------------------------------------------------------------- 1 | // import { useState,ReactNode } from "react"; 2 | import * as React from 'react'; 3 | // import { createContext } from "react"; 4 | // import {categoryInterface} from '../Interface/category.interface' 5 | 6 | // export const CategoryContext = createContext() 7 | // type categoryProviderProps = { 8 | // children : ReactNode 9 | // } 10 | 11 | // export default function categoryProvider ({children}:categoryProviderProps){ 12 | // const [categoryState,setCategoryState] = useState([]) 13 | // console.log(categoryState) 14 | // return( 15 | // 16 | // {children} 17 | // 18 | // ) 19 | // } 20 | 21 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { BrowserRouter, Route, Routes } from "react-router-dom"; 3 | 4 | import "./App.css"; 5 | import AdminRouter from "./router/AdminRouter"; 6 | // import Login_page from './Pages/Login_page'; 7 | // import Toastify from './Components/Toastify/Toastify' 8 | import HostToast from "./Components/Toastify/Hot_toaster"; 9 | import UserRouter from "./router/UserRouter"; 10 | function App() { 11 | return ( 12 |
13 | {/* */} 14 | 15 | 16 | } /> 17 | } /> 18 | 19 | 20 | 21 |
22 | ); 23 | } 24 | 25 | export default App; 26 | -------------------------------------------------------------------------------- /src/utils/ErrorBoundary.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component, ReactNode } from 'react'; 2 | 3 | interface Props { 4 | fallback: ReactNode; 5 | children : any 6 | } 7 | 8 | interface State { 9 | hasError: boolean; 10 | } 11 | 12 | export class ErrorBoundary extends Component { 13 | constructor(props: Props) { 14 | super(props); 15 | this.state = { hasError: false }; 16 | } 17 | 18 | static getDerivedStateFromError(_: Error): State { 19 | return { hasError: true }; 20 | } 21 | 22 | componentDidCatch(error: Error, info: React.ErrorInfo): void { 23 | console.error('ErrorBoundary caught an error:', error, info); 24 | } 25 | 26 | render(): ReactNode { 27 | if (this.state.hasError) { 28 | return this.props.fallback; 29 | } 30 | return this.props.children; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Interface/destination.interface.ts: -------------------------------------------------------------------------------- 1 | export interface destinationInterface{ 2 | title:string, 3 | descrption:string, 4 | Highlights:string, 5 | price:string, 6 | guests:string, 7 | packageCategory:string, 8 | activity:string, 9 | priceCategory:string, 10 | 11 | } 12 | 13 | export interface packageService{ 14 | Hotels:string, 15 | Flight:string, 16 | Sightseeing:string, 17 | Meals:string, 18 | Transfers:string 19 | } 20 | 21 | export interface Included{ 22 | Included1:string, 23 | Included2:string, 24 | Included3:string, 25 | Included4:string, 26 | Included5:string, 27 | 28 | } 29 | export interface Excluded{ 30 | Excluded1:string, 31 | Excluded2:string, 32 | Excluded3:string, 33 | Excluded4:string, 34 | Excluded5:string, 35 | 36 | } -------------------------------------------------------------------------------- /src/Api/user/Auth/AuthApi.ts: -------------------------------------------------------------------------------- 1 | 2 | import axios from '../../../Axios/axios' 3 | export const authSignupApi = async(values:object)=>{ 4 | try { 5 | const resDate = await axios.post('/formSignup',values) 6 | return resDate 7 | } catch (error) { 8 | console.log(error); 9 | 10 | } 11 | } 12 | export const otpVerifiyApi = async(code:string,phone:number)=>{ 13 | try { 14 | console.log(code); 15 | 16 | const resData = await axios.post('/otpVerifiy',{code,phone}) 17 | return resData 18 | } catch (error) { 19 | console.log(error); 20 | 21 | } 22 | } 23 | 24 | export const authLoginApi = async(values:object)=>{ 25 | try { 26 | const resData = await axios.post('/authLogin',values) 27 | return resData 28 | } catch (error) { 29 | console.log(error); 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TravDestBook_React 2 | TravDestBook_React is your ultimate travel companion. Discover, book, and explore your dream destinations with ease. Chat with admin for assistance, filter and search travel destinations, leave reviews, change your password, and enjoy secure payments using Razorpay. 3 | 4 | ## Features 5 | 6 | - Chat with admin for assistance. 7 | - Search and filter travel destinations. 8 | - OTP-based login and signup using Twilio SMS. 9 | - Leave reviews and share your travel stories. 10 | - Change your password for account security. 11 | - Admin controls to manage users and destinations. 12 | - Revenue graphs and most popular booking destinations. 13 | - Secure payment processing with Razorpay. 14 | 15 | ## Technologies 16 | 17 | - React.js 18 | - TypeScript 19 | - Twilio (for SMS-based OTP) 20 | - Razorpay (for payments) 21 | - Redux toolkit 22 | -------------------------------------------------------------------------------- /src/Api/user/destinationApi/destinView.ts: -------------------------------------------------------------------------------- 1 | import { toast } from 'react-hot-toast'; 2 | import axios from '../../../Axios/axios'; 3 | 4 | export const destinViewApi = async ( 5 | id: string | undefined | null 6 | ): Promise => { 7 | try { 8 | const getToken = { 9 | headers: { 10 | Authorization: `Bearer ${localStorage.getItem("user")}`, 11 | "Content-Type": "multipart/form-data", 12 | }, 13 | params: { role: 'user' }, 14 | }; 15 | const resData = await axios.get(`/destinationView?id=${id}`, getToken); 16 | return resData; 17 | } catch (error: any) { 18 | if (error.response.data.action) { 19 | toast.error(error.response.data.message); 20 | setTimeout(() => { 21 | localStorage.removeItem("user"); 22 | window.location.href = '/login'; 23 | }, 2000); 24 | } 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | const withMT = require("@material-tailwind/react/utils/withMT"); 3 | module.exports = { 4 | content: [ 5 | "./src/**/*.{js,jsx,ts,tsx,html}", 6 | "./node_modules/tw-elements/dist/js/**/*.js", 7 | "path-to-your-node_modules/@material-tailwind/react/components/**/*.{js,ts,jsx,tsx}", 8 | "path-to-your-node_modules/@material-tailwind/react/theme/components/**/*.{js,ts,jsx,tsx}", 9 | "./node_modules/flowbite/**/*.js" 10 | 11 | ], 12 | theme: { 13 | fontFamily:{ 14 | 'about':['Cormorant Garamond'], 15 | 'slab':['Josefin Slab'], 16 | 'Nanum' : ['Nanum Myeongjo'], 17 | 'Yatra': ['Yatra One'], 18 | 'Ariza':['Dancing Script'], 19 | 'Asap':['Poppins'] 20 | }, 21 | extend: {}, 22 | }, 23 | plugins: [ 24 | require("tw-elements/dist/plugin"), 25 | require('flowbite/plugin') 26 | ], 27 | } 28 | -------------------------------------------------------------------------------- /src/Components/Profile/UI/Silder.css: -------------------------------------------------------------------------------- 1 | .slider-container { 2 | display: flex; 3 | justify-content: space-between; 4 | align-items: center; 5 | height: 550px; 6 | width: 100%; 7 | background-color: #ffffff; 8 | } 9 | 10 | .tab-slider { 11 | display: flex; 12 | flex-direction: column; 13 | justify-content: center; 14 | height: 100%; 15 | } 16 | 17 | .tab { 18 | cursor: pointer; 19 | margin: 10px 0; 20 | padding: 10px; 21 | width: 150px; 22 | border-bottom: 2px solid #aab5c2;; 23 | transition: all 0.3s ease-in-out; 24 | text-align: center; 25 | 26 | } 27 | 28 | .tab.active { 29 | border-bottom: 2px solid #aab5c2; 30 | } 31 | 32 | .tab-content { 33 | flex: 1; 34 | height: 100%; 35 | margin-left: 100px; 36 | } 37 | 38 | .tab-pane { 39 | display: none; 40 | } 41 | 42 | .tab-pane.active { 43 | display: block; 44 | } 45 | -------------------------------------------------------------------------------- /src/Pages/User/Payment.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import DestinView from "../../Components/Payment/DestinView"; 3 | import PaymentPage from "../../Components/Payment/Payment"; 4 | import Navbar from "../../Components/Navbar/NewNavbar"; 5 | import MobileViwe from '../../Components/Payment/MobileView' 6 | export default function Payment() { 7 | return ( 8 | <> 9 |
10 |
11 | 12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /src/ProtectorRouter/AdminRouter.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | import { useNavigate, Outlet, Navigate } from "react-router-dom"; 3 | import axios from "../Axios/axios"; 4 | 5 | function AdminProtect() { 6 | const [auth, setAuth] = useState(null); 7 | const token = localStorage.getItem("admin"); 8 | const navigate = useNavigate(); 9 | 10 | useEffect(() => { 11 | try { 12 | axios 13 | .post("/admin/verify-token", { 14 | token, 15 | }) 16 | .then((res:any) => { 17 | if (res.data.admin) { 18 | setAuth(true); 19 | } else { 20 | navigate("/admin/login"); 21 | } 22 | }); 23 | } catch (error:any) { 24 | console.log(error.message); 25 | } 26 | }, [navigate,token]); 27 | 28 | if (auth === null) return null; 29 | 30 | return auth ? : ; 31 | } 32 | 33 | export default AdminProtect; 34 | -------------------------------------------------------------------------------- /src/ProtectorRouter/UserRouter.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | import { useNavigate, Outlet, Navigate } from "react-router-dom"; 3 | import axios from "../Axios/axios"; 4 | 5 | function UserProtect() { 6 | const [auth, setAuth] = useState(null); 7 | const token = localStorage.getItem("user"); 8 | const navigate = useNavigate(); 9 | 10 | useEffect(() => { 11 | try { 12 | axios 13 | .post("/verify-token", { 14 | token, 15 | }) 16 | .then((res:any) => { 17 | console.log(res.data); 18 | 19 | if (res.data.user) { 20 | setAuth(true); 21 | } else { 22 | navigate("/login"); 23 | } 24 | }); 25 | } catch (error:any) { 26 | console.log(error.message); 27 | 28 | 29 | } 30 | }, [navigate,token]); 31 | 32 | if (auth === null) return null; 33 | 34 | return auth ? : ; 35 | } 36 | 37 | export default UserProtect; 38 | -------------------------------------------------------------------------------- /src/Components/Vendor_login/Login.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@500&family=Heebo:wght@600&family=Satisfy&display=swap'); 2 | .parentDiv{ 3 | width: 100%; 4 | height: 100vh; 5 | background-image: linear-gradient(rgba(0,0, 0, 0.7),rgba(0, 0,0, 0.5)),url('../../Assets/bg.jfif'); 6 | background-size:cover; 7 | background-position: center; 8 | } 9 | .imgDiv{ 10 | width: 100%; 11 | height: 500px; 12 | background-image: linear-gradient(rgba(0,0, 0, 0.3),rgba(0, 0,0, 0.2)),url('../../Assets/loginbg.png'); 13 | background-size:cover; 14 | background-position: center; 15 | } 16 | .First{ 17 | font-family: 'Bodoni Moda', serif; 18 | /* font-size: 18px; */ 19 | color: aliceblue; 20 | } 21 | .second{ 22 | font-family: 'Satisfy', cursive; 23 | color: aliceblue; 24 | /* font-size: 15px; */ 25 | } 26 | .forgotPassword{ 27 | font-size: 10px; 28 | } 29 | span{ 30 | font-size: 11px; 31 | font-family: 'Bodoni Moda', serif; 32 | } 33 | .butn{ 34 | font-size: 11px; 35 | } 36 | .link{ 37 | font-size: 11px; 38 | } -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import "./index.css"; 4 | import App from "./App"; 5 | import reportWebVitals from "./reportWebVitals"; 6 | // import { store } from "./Redux/store"; 7 | import { Provider } from "react-redux"; 8 | import { GoogleOAuthProvider } from '@react-oauth/google'; 9 | import { ErrorBoundary } from "./utils/ErrorBoundary"; 10 | import ServerError from './Components/Message/500' 11 | import { PersistGate } from "redux-persist/integration/react"; 12 | import {persistor,store} from './Redux/store' 13 | require("tw-elements"); 14 | 15 | const root = ReactDOM.createRoot( 16 | document.getElementById("root") as HTMLElement 17 | ); 18 | root.render( 19 | 20 | 21 | 22 | 23 | }> 24 | 25 | 26 | 27 | 28 | 29 | 30 | ); 31 | 32 | reportWebVitals(); 33 | -------------------------------------------------------------------------------- /src/Redux/slice/passengerSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from "@reduxjs/toolkit"; 2 | 3 | interface PassengerState { 4 | adultCount: number; 5 | childCount: number; 6 | infantCount: number; 7 | } 8 | 9 | const initialState: PassengerState = { 10 | adultCount: 0, 11 | childCount: 0, 12 | infantCount: 0, 13 | }; 14 | 15 | const passengerSlice = createSlice({ 16 | name: "passenger", 17 | initialState, 18 | reducers: { 19 | updateAdultCount(state, action: PayloadAction) { 20 | state.adultCount = action.payload; 21 | }, 22 | updateChildCount(state, action: PayloadAction) { 23 | state.childCount = action.payload; 24 | }, 25 | updateInfantCount(state, action: PayloadAction) { 26 | state.infantCount = action.payload; 27 | }, 28 | resetPassengerCount(state) { 29 | state.adultCount = 0; 30 | state.childCount = 0; 31 | state.infantCount = 0; 32 | }, 33 | }, 34 | }); 35 | 36 | export const { 37 | updateAdultCount, 38 | updateChildCount, 39 | updateInfantCount, 40 | resetPassengerCount, 41 | } = passengerSlice.actions; 42 | export default passengerSlice.reducer; 43 | -------------------------------------------------------------------------------- /src/Api/admin/adminDashboard/fetchCount.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | 3 | export const fetchBookingCount = async()=>{ 4 | try { 5 | return await axios.get('/admin/bookingCount') 6 | } catch (error) { 7 | console.log(error); 8 | 9 | } 10 | } 11 | 12 | export const fetchClientsCount = async()=>{ 13 | try { 14 | return await axios.get('/admin/clientsCount') 15 | } catch (error) { 16 | console.log(error); 17 | 18 | } 19 | } 20 | export const fetchTotalrevenueCount = async()=>{ 21 | try { 22 | return await axios.get('/admin/totalRevenueCount') 23 | } catch (error) { 24 | console.log(error); 25 | 26 | } 27 | } 28 | 29 | export const fetchBookingDetails = async()=>{ 30 | try { 31 | return await axios.get('/admin/fetchBookingDate') 32 | } catch (error) { 33 | console.log(error); 34 | 35 | } 36 | } 37 | 38 | export const fetchingAdminDashboard = async()=>{ 39 | try { 40 | return await axios.get('/admin/fetchAdminDashboardBookingCount') 41 | } catch (error) { 42 | console.log(error); 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /src/Redux/slice/authSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'; 2 | 3 | interface AuthData { 4 | _id:string; 5 | name: string; 6 | phone: number; 7 | email: string; 8 | profile:string; 9 | address:string; 10 | first:string; 11 | last:string 12 | } 13 | 14 | interface AuthState { 15 | authData: AuthData; 16 | } 17 | 18 | const initialState: AuthState = { 19 | authData: { 20 | _id:"", 21 | name: '', 22 | phone: 0, 23 | email: '', 24 | profile:'', 25 | address:'', 26 | first:'', 27 | last:'' 28 | }, 29 | }; 30 | 31 | const authDataStore = createSlice({ 32 | name: 'authStore', 33 | initialState, 34 | reducers: { 35 | setAuthDataStore: (state, action: PayloadAction) => { 36 | state.authData = action.payload; 37 | }, 38 | resetAuthDataStore: (state) => { 39 | state.authData = { 40 | _id: "", 41 | name: "", 42 | phone: 0, 43 | email: "", 44 | profile: "", 45 | address: "", 46 | first: "", 47 | last: "", 48 | }; 49 | }, 50 | }, 51 | }); 52 | 53 | export const {setAuthDataStore,resetAuthDataStore} = authDataStore.actions; 54 | export default authDataStore.reducer -------------------------------------------------------------------------------- /src/Components/Admin/Chat/userLisit.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useDispatch } from 'react-redux'; 3 | import { setAuthChatID } from '../../../Redux/slice/chatUserId'; 4 | export default function UserLisitPage({userLisit}:any) { 5 | console.log(userLisit); 6 | const dispatch = useDispatch() 7 | 8 | const handleClick = (id:string)=>{ 9 | dispatch(setAuthChatID(id)) 10 | 11 | } 12 | 13 | return ( 14 | <> 15 | { 16 | userLisit.map((item:any)=>{ 17 | console.log(item); 18 | 19 | return( 20 | 30 | ) 31 | }) 32 | } 33 | 34 | 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /src/Components/Message/500.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | export default function ErrorPage500() { 3 | return ( 4 | <> 5 |
6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 |
14 |
15 |

500 - Server error

16 |

Oops something went wrong. Try to refresh this page or
feel free to contact us if the problem persists.

17 |
18 |
19 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/Components/SinglePage/Calendar.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Card, Calendar } from "react-rainbow-components"; 3 | 4 | const today = new Date(); 5 | const initialState = { range: [new Date(2023,5,3), new Date(2023,5,29)] }; 6 | 7 | type props ={ 8 | DatePikker : (dateDay: any) => void 9 | } 10 | 11 | const ExampleCalendar = ({DatePikker}: props) => { 12 | 13 | const [state, setState] = useState(initialState); 14 | 15 | const dates = state.range.map((date) => date.toISOString().split('T')[0]); 16 | const daysOfWeek = state.range.map((date) => date.toLocaleDateString('en-US', { weekday: 'long' })); 17 | const dateDay = { dates, daysOfWeek }; 18 | 19 | return ( 20 |
21 |
22 | 26 | {setState({ range: value }); DatePikker(dateDay)}} 31 | 32 | /> 33 | 34 |
35 |
36 | ); 37 | }; 38 | 39 | export default ExampleCalendar; 40 | -------------------------------------------------------------------------------- /src/Redux/slice/bookingIvoice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from "@reduxjs/toolkit"; 2 | 3 | export interface destinationState { 4 | 5 | destinationsFetch: { 6 | _id:string, 7 | Title:string, 8 | priceCate : string, 9 | BookingData?:any, 10 | ArrivedDate?:any, 11 | SubTotal:number 12 | }; 13 | } 14 | const initialState: destinationState = { 15 | 16 | destinationsFetch: { 17 | _id:'', 18 | Title:'', 19 | priceCate : '', 20 | BookingData:'', 21 | ArrivedDate:'', 22 | SubTotal:0 23 | }, 24 | }; 25 | const destinationShowSlice = createSlice({ 26 | name: "destinationShow", 27 | initialState, 28 | reducers: { 29 | setDestinationShowData: (state, action: PayloadAction) => { 30 | state.destinationsFetch = action.payload; 31 | }, 32 | resetDestinationShowData: (state) => { 33 | state.destinationsFetch = { 34 | _id:'', 35 | Title:'', 36 | priceCate : '', 37 | BookingData:'', 38 | ArrivedDate:'', 39 | SubTotal:0 40 | }; 41 | }, 42 | }, 43 | 44 | }); 45 | 46 | export const { setDestinationShowData,resetDestinationShowData } = destinationShowSlice.actions; 47 | export default destinationShowSlice.reducer; 48 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Contents/Contents.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './Content.css' 3 | import Chat from '../Chat/Chat' 4 | export default function Contents() { 5 | return ( 6 |
7 |
8 |
9 |

Discover Our

10 |

Travel Guideline

11 |
The world is a book and those who do not travel read only one page
12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 | 29 | ) 30 | } 31 | -------------------------------------------------------------------------------- /src/Components/Admin/Login/Login.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './Login.css' 3 | import AdminLogin from './Form' 4 | import { Navigate } from 'react-router-dom' 5 | export default function LoginAdmin() { 6 | const token = localStorage.getItem("admin"); 7 | 8 | return token ? ( 9 | 10 | ) : ( 11 | <> 12 |
13 |
14 |
15 | Login_bg 16 |
17 |

Welcome to Travio.

18 |
19 | 20 |
21 | 22 |
23 | 24 |
25 |
26 | Login_bg 27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 | ) 35 | } 36 | -------------------------------------------------------------------------------- /src/Pages/User/ProfilePage.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | import HeaderProfile from "../../Components/Profile/UI/HeaderProfile"; 3 | import ContantProfile from "../../Components/Profile/UI/ContantProfile"; 4 | import Footer from "../../Components/Profile/UI/Footer"; 5 | import { BookingFetchApi } from "../../Api/user/Profile/DestinaFetchApi"; 6 | import { setBookingDetails } from "../../Redux/slice/bookingDetailsSlice"; 7 | import { useDispatch } from "react-redux"; 8 | import Loader from "../../Components/Loader/Loader"; 9 | export default function ProfilePage() { 10 | const [loader,setLoader]=React.useState(false) 11 | const dispatch = useDispatch() 12 | 13 | useEffect(()=>{ 14 | const get = async()=>{ 15 | setLoader(true) 16 | try { 17 | await BookingFetchApi().then((res)=>{ 18 | if(res?.data.success){ 19 | dispatch(setBookingDetails(res.data.bookingData)) 20 | setLoader(false) 21 | } 22 | 23 | }) 24 | } catch (error) { 25 | console.log(error); 26 | 27 | } 28 | } 29 | get() 30 | },[setLoader,dispatch]) 31 | return ( 32 | <> 33 | { 34 | loader &&
35 | 36 |
37 | 38 | } 39 |
40 | 41 |
42 |
43 | 44 |
45 | 46 |
47 |
48 |
49 | 50 | ); 51 | } 52 | -------------------------------------------------------------------------------- /src/Components/Message/Success.tsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect} from 'react'; 2 | import { Link, useLocation } from 'react-router-dom'; 3 | import { useNavigate } from 'react-router-dom'; 4 | const SuccessPage = () => { 5 | const navigate = useNavigate() 6 | const location = useLocation() 7 | useEffect(() => { 8 | window.onpopstate = e => { 9 | if(location?.state === "payment"){ 10 | navigate('/') 11 | } 12 | }; 13 | }); 14 | return ( 15 | <> 16 |
17 |
18 |

Thank You

19 | succuss_img 20 |
21 |

Your Payment is Successfull

22 |

23 | Thank you for your payment. An automated payment receipt will be sent to your registered email 24 |

25 | 26 | 27 | 28 | 29 |
30 |
31 | 32 |
33 | 34 | ); 35 | }; 36 | 37 | export default SuccessPage; 38 | -------------------------------------------------------------------------------- /src/Components/SinglePage/range.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { DateRange, DateRangeProps, Range } from "react-date-range"; 3 | import "react-date-range/dist/styles.css"; 4 | import "react-date-range/dist/theme/default.css"; 5 | import {useDispatch} from 'react-redux' 6 | import { setDate } from "../../Redux/slice/dateSlice"; 7 | interface State { 8 | startDate: any; 9 | endDate: any; 10 | key: string; 11 | } 12 | 13 | 14 | 15 | 16 | type Props = { 17 | onDateRangeChange: (dateRange: State) => void; 18 | }; 19 | 20 | const initialDateRange: State[] = [ 21 | { 22 | startDate: new Date(), 23 | endDate: new Date(), 24 | key: "selection", 25 | }, 26 | ]; 27 | 28 | const RangeDate = ({ onDateRangeChange }: Props) => { 29 | const dispatch = useDispatch() 30 | const [state, setState] = useState(initialDateRange); 31 | const handleDateRangeChange: DateRangeProps["onChange"] = (item: any) => { 32 | if ("startDate" in item.selection) { 33 | setState([item.selection]); 34 | dispatch(setDate(state)) 35 | onDateRangeChange(item.selection); 36 | } else { 37 | const { startDate, endDate } = item.selection as Range; 38 | const newDateRange = { startDate, endDate, key: "selection" }; 39 | dispatch(setDate([newDateRange])); 40 | dispatch(setDate(state)) 41 | onDateRangeChange(newDateRange); 42 | } 43 | }; 44 | 45 | return ( 46 | 53 | ); 54 | }; 55 | 56 | export default RangeDate; 57 | -------------------------------------------------------------------------------- /src/Router/AdminRouter.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Route, Routes} from "react-router-dom"; 3 | 4 | import AdminActvity from '../Pages/Admin/AdminActvity'; 5 | import AdminCate from '../Pages/Admin/AdminCate'; 6 | import AdminDestinaton from '../Pages/Admin/AdminDestinaton'; 7 | import Dashboard from '../Pages/Admin/Dashboard'; 8 | import AddDestin from '../Pages/Admin/AddDestinPage'; 9 | import EditDestinPage from '../Pages/Admin/EditDestinPage'; 10 | import ChatPage from '../Pages/Admin/ChatPage'; 11 | import AdminLoginPage from '../Pages/Admin/AdminLogin'; 12 | import Error401 from '../Pages/User/Error401'; 13 | import Protect from '../ProtectorRouter/AdminRouter' 14 | import AdminUserManage from '../Pages/Admin/AdminUserManage'; 15 | import BookingManage from '../Pages/Admin/BookingManage'; 16 | export default function AdminRouter() { 17 | return ( 18 |
19 | 20 | 21 | } /> 22 | }> 23 | } /> 24 | } /> 25 | } /> 26 | } /> 27 | } /> 28 | } /> 29 | } /> 30 | } /> 31 | 32 | } /> 33 | } /> 34 | 35 | 36 |
37 | ) 38 | } 39 | -------------------------------------------------------------------------------- /src/Redux/slice/destinationSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice, PayloadAction } from "@reduxjs/toolkit"; 2 | export interface destinationState { 3 | 4 | destinationsFetch: { 5 | _id:string; 6 | title: string; 7 | packageCategory: string; 8 | price:number; 9 | activity: string; 10 | descrption:string, 11 | Highlights:string, 12 | priceCategory: string; 13 | duration: { 14 | day: number; 15 | night: number; 16 | }; 17 | file:string; 18 | packageService: { 19 | Hotels: string; 20 | Flight: string; 21 | Sightseeing: string; 22 | Meals: string; 23 | Transfers: string; 24 | }; 25 | Included: []; 26 | Excluded: []; 27 | }; 28 | } 29 | const initialState: destinationState = { 30 | 31 | destinationsFetch: { 32 | _id:"", 33 | title: "", 34 | packageCategory: "", 35 | activity: "", 36 | price:0, 37 | priceCategory: "", 38 | descrption:"", 39 | Highlights:"", 40 | duration: { 41 | day: 0, 42 | night: 0, 43 | }, 44 | file: "", 45 | packageService: { 46 | Hotels: "", 47 | Flight: "", 48 | Sightseeing: "", 49 | Meals: "", 50 | Transfers: "", 51 | }, 52 | Included: [], 53 | Excluded: [], 54 | }, 55 | }; 56 | 57 | const destinationSlice = createSlice({ 58 | name: "destinations", 59 | initialState, 60 | reducers: { 61 | setDestinationData: (state, action: PayloadAction) => { 62 | state.destinationsFetch = action.payload; 63 | }, 64 | }, 65 | }); 66 | 67 | export const { setDestinationData } = destinationSlice.actions; 68 | export default destinationSlice.reducer; 69 | -------------------------------------------------------------------------------- /src/Schema/auth/auth.ts: -------------------------------------------------------------------------------- 1 | import * as yup from 'yup'; 2 | export const signupSchema = yup.object().shape({ 3 | name: yup 4 | .string() 5 | .trim() 6 | .required("Name can not be empty") 7 | .test("isPerfectString", "Enter a valid name", (arg) => 8 | /^[A-Za-z ]+$/.test(arg) 9 | ), 10 | phone: yup 11 | .string() 12 | .trim() 13 | .matches(/^[0-9]{10}$/, "Phone number is not valid") 14 | .required("Phone number is required"), 15 | email: yup 16 | .string() 17 | .trim() 18 | .required("Enter you email") 19 | .test('isvalidEmail', "Enter a valid Email", (arg) => 20 | /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(arg)), 21 | password: yup 22 | .string() 23 | .trim() 24 | .required("Password can not be empty") 25 | .min(3, "Too short password"), 26 | // .max(16, "Too long password") 27 | // .test("isPerfectPasswrod", "Enter a strong password", (arg) => 28 | // /((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\W])(?!.*\s).{8,16})/.test(arg) 29 | // ), 30 | cpassword: yup 31 | .string() 32 | .trim() 33 | .required("Confirm password can't be empty") 34 | .oneOf([yup.ref('password')], 'Passwords must match') 35 | }); 36 | export const loginSchema = yup.object().shape({ 37 | email: yup 38 | .string() 39 | .trim() 40 | .required("Enter you email") 41 | .test('isvalidEmail', "Enter a valid Email", (arg) => 42 | /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(arg)), 43 | password: yup 44 | .string() 45 | .trim() 46 | .required("Password can not be empty") 47 | }); -------------------------------------------------------------------------------- /src/Redux/slice/extraService.ts: -------------------------------------------------------------------------------- 1 | // in your reducers.ts file 2 | import { createSlice } from "@reduxjs/toolkit"; 3 | 4 | interface ExtraService { 5 | name: string; 6 | price: number; 7 | } 8 | 9 | interface ExtraServiceState { 10 | services: ExtraService[]; 11 | selectedServices: ExtraService[]; 12 | totalPrice: number; 13 | } 14 | 15 | const initialState: ExtraServiceState = { 16 | services: [ 17 | { 18 | name: "Airport pickup", 19 | price: 50, 20 | }, 21 | { 22 | name: "Equipment rental", 23 | price: 100, 24 | }, 25 | { 26 | name: "Travel insurance", 27 | price: 150, 28 | }, 29 | ], 30 | selectedServices: [], 31 | totalPrice: 0, 32 | }; 33 | 34 | const extraServiceSlice = createSlice({ 35 | name: "extraService", 36 | initialState, 37 | reducers: { 38 | addService: (state, action) => { 39 | // const { name, price } = action.payload; 40 | // console.log(typeof(price)); 41 | state.selectedServices.push(action.payload); 42 | state.totalPrice += action.payload.price; 43 | }, 44 | removeService: (state, action) => { 45 | console.log(state.selectedServices); 46 | 47 | state.selectedServices = state.selectedServices.filter( 48 | (service) => service.name !== action.payload.name 49 | ); 50 | state.totalPrice -= action.payload.price; 51 | }, 52 | resetSelectedServices: (state) => { 53 | state.services = initialState.services; 54 | state.totalPrice = initialState.totalPrice; 55 | }, 56 | }, 57 | }); 58 | 59 | export const { addService, removeService, resetSelectedServices } = 60 | extraServiceSlice.actions; 61 | 62 | export default extraServiceSlice.reducer; 63 | -------------------------------------------------------------------------------- /src/Components/Landing_page/PackageCard/Package.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { NavLink } from "react-router-dom"; 3 | import { fetchCategory } from "../../../Api/adminCategory/fetchCategory"; 4 | import "./package.css"; 5 | 6 | export default function Package() { 7 | const [fetchh, setFetch] = useState<[]>([]); 8 | useEffect(() => { 9 | const getData = async () => { 10 | try { 11 | await fetchCategory().then((res) => { 12 | setFetch(res?.data.fetch); 13 | }); 14 | } catch (error) { 15 | console.log(error); 16 | } 17 | }; 18 | getData(); 19 | }, []); 20 | 21 | return ( 22 | <> 23 |
24 |

25 | JUST GO. GO SEE ALL THE BEAUTY IN THE WORLD 26 |

27 |
28 |
29 |
30 | {fetchh.map((items: any) => { 31 | return ( 32 | 33 |
34 |

35 | {" "} 36 | {items.packageCategory} 37 |

38 | package-pic 43 |
44 |
45 | ); 46 | })} 47 |
48 | 49 | ); 50 | } 51 | -------------------------------------------------------------------------------- /src/Redux/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore,combineReducers } from '@reduxjs/toolkit'; 2 | import { persistReducer, persistStore } from 'redux-persist'; 3 | import storage from 'redux-persist/lib/storage'; 4 | 5 | import packageSlice from './slice/packageSlice'; 6 | import actvitiesSlice from './slice/actvitiesSlice'; 7 | import destinationID from './slice/destinIdSlice'; 8 | import destinationSlice from './slice/destinationSlice'; 9 | import authSlice from './slice/authSlice'; 10 | import fillterSlice from './slice/fillterSlice'; 11 | import currentSlice from './slice/dateSlice'; 12 | import passengerDetailsReducer from './slice/passengerSlice'; 13 | import extraService from './slice/extraService'; 14 | import bookingSlice from './slice/bookingDetailsSlice' 15 | import bookingInvoice from './slice/bookingIvoice' 16 | import authChatID from './slice/chatUserId' 17 | const persistConfig = { 18 | key: 'root', 19 | version: 1, 20 | storage, 21 | }; 22 | 23 | const rootReducer = combineReducers({ 24 | package: packageSlice, 25 | acitvtiy: actvitiesSlice, 26 | destinationID: destinationID, 27 | destination: destinationSlice, 28 | authData: authSlice, 29 | fillter: fillterSlice, 30 | Cdate: currentSlice, 31 | passenger: passengerDetailsReducer, 32 | extraServiceSlice: extraService, 33 | bookingdetails:bookingSlice, 34 | bookingShow:bookingInvoice, 35 | authChatId :authChatID 36 | }); 37 | 38 | 39 | const persistedReducer = persistReducer(persistConfig, rootReducer); 40 | 41 | export const store = configureStore({ 42 | reducer: persistedReducer, 43 | }); 44 | 45 | export const persistor = persistStore(store); 46 | 47 | export type RootState = ReturnType; 48 | export type AppDispatch = typeof store.dispatch; 49 | -------------------------------------------------------------------------------- /src/Components/Profile/UI/HeaderProfile.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState,useEffect } from "react"; 2 | import { RootState } from "../../../Redux/store"; 3 | import { useSelector } from "react-redux"; 4 | type userDetails={ 5 | file?:null 6 | } 7 | 8 | export default function HeaderProfile() { 9 | const AuthDetails = useSelector( 10 | (state: RootState) => state.authData.authData 11 | ); 12 | 13 | const [userDetails,setUserData] = useState({ 14 | file: AuthDetails.profile ? AuthDetails.profile : 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dXNlciUyMHByb2ZpbGV8ZW58MHx8MHx8&w=1000&q=80' 15 | 16 | }) 17 | useEffect(() => { 18 | setUserData({ 19 | file: AuthDetails.profile ? AuthDetails.profile : 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dXNlciUyMHByb2ZpbGV8ZW58MHx8MHx8&w=1000&q=80' 20 | 21 | }); 22 | }, [AuthDetails]) 23 | 24 | 25 | 26 | 27 | return ( 28 | <> 29 |
30 | {/* banner_img */} 31 |
32 |
33 | profile_img 40 |

41 | {AuthDetails.name} 42 |

43 |
44 | 45 | ); 46 | } 47 | -------------------------------------------------------------------------------- /src/Components/Payment/MobileView.tsx: -------------------------------------------------------------------------------- 1 | 2 | import React, { useState } from "react"; 3 | import { 4 | Tabs, 5 | TabsHeader, 6 | TabsBody, 7 | Tab, 8 | TabPanel, 9 | } from "@material-tailwind/react"; 10 | import DestinView from '../../Components/Payment/DestinView' 11 | import PaymentPage from '../../Components/Payment/Payment' 12 | interface TabData { 13 | label: string; 14 | value: string; 15 | component: React.ReactElement; 16 | } 17 | 18 | const Example: React.FC = () => { 19 | const [activeTab, setActiveTab] = useState("PackageDetails"); 20 | 21 | const data: TabData[] = [ 22 | { 23 | label: "PackageDetails", 24 | value: "PackageDetails", 25 | component: ( 26 | <> 27 |
28 | 29 |
30 | 31 | ), 32 | }, 33 | { 34 | label: "Payment", 35 | value: "Payment", 36 | component: ( 37 | <> 38 | 39 | 40 | ), 41 | }, 42 | 43 | ]; 44 | 45 | const handleTabClick = (value: string) => { 46 | setActiveTab(value); 47 | }; 48 | 49 | return ( 50 |
51 | 52 | 53 | {data.map(({ label, value }) => ( 54 | handleTabClick(value)} 58 | > 59 |
{label}
60 |
61 | ))} 62 |
63 | 64 | {data.map(({ value, component }) => ( 65 | 66 | {component} 67 | 68 | ))} 69 | 70 |
71 |
72 | ); 73 | }; 74 | 75 | export default Example; 76 | -------------------------------------------------------------------------------- /src/Components/Admin/Chat/Converstion.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import UserLisit from "./userLisit"; 3 | import { userLisitConversation } from "../../../Api/Chat/userLisit"; 4 | export default function Converstion() { 5 | const [userLisit,setUserLisit]=useState<[]>([]) 6 | console.log(userLisit); 7 | 8 | useEffect(()=>{ 9 | const getUserLisit = async()=>{ 10 | try { 11 | await userLisitConversation().then((res)=>{ 12 | setUserLisit(res?.data.uselisit) 13 | }) 14 | } catch (error) { 15 | console.log(error); 16 | 17 | } 18 | } 19 | getUserLisit() 20 | },[]) 21 | return ( 22 | <> 23 |
24 |
25 |
26 | Avatar 31 |
32 |
Travio
33 | 34 | 35 |
36 |
37 |
38 | Active Conversations 39 | {/* 40 | 4 41 | */} 42 |
43 |
44 | 45 |
46 | 47 | 48 |
49 |
50 |
51 |
52 | 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /src/Components/Admin/Destination/Destination.tsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect} from "react"; 2 | // import { NavLink } from "react-router-dom"; 3 | import { RootState } from "../../../Redux/store"; 4 | import {useSelector,useDispatch} from 'react-redux' 5 | import { fetchCategory } from "../../../Api/adminCategory/fetchCategory"; 6 | import { fetchActvityAPi } from "../../../Api/admin/adminActvity/fetchActivity"; 7 | import {packageCategoryData} from '../../../Redux/slice/packageSlice' 8 | import {actvitiesStateData} from '../../../Redux/slice/actvitiesSlice' 9 | import ListDestin from "../ReactTable/ListDestin"; 10 | 11 | export default function Destination() { 12 | const setpackage = useSelector((state: RootState)=> state.package.packageCategory); 13 | const setActities = useSelector((state:RootState)=>state.acitvtiy.Activity) 14 | console.log(setpackage); 15 | console.log(setActities); 16 | const dispatch = useDispatch() 17 | useEffect(()=>{ 18 | const fetchData = async()=>{ 19 | try { 20 | await fetchCategory().then((res)=>{ 21 | dispatch(packageCategoryData(res.data.fetch)) 22 | 23 | }) 24 | } catch (error) { 25 | console.log(error); 26 | 27 | } 28 | } 29 | const fetchActivity =async () => { 30 | try { 31 | await fetchActvityAPi().then((res)=>{ 32 | dispatch(actvitiesStateData(res?.data.fetch)) 33 | }) 34 | } catch (error) { 35 | console.log(error); 36 | 37 | } 38 | } 39 | fetchData() 40 | fetchActivity() 41 | },[dispatch]) 42 | 43 | 44 | return ( 45 |
46 |
47 |

48 | Destination Management 49 |

50 | 51 |
52 |
53 | 54 |
55 |
56 | ); 57 | } 58 | -------------------------------------------------------------------------------- /src/Components/Message/401.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "react-router-dom"; 3 | 4 | export default function ErrorPage() { 5 | return ( 6 | <> 7 |
8 |
9 |
10 |
11 |

Travio

12 |
13 |
14 |

15 | You seem to be lost! 16 |

17 |

The page you're looking for isn't available.

18 |

Try searching again or use the Go Back button below.

19 |
20 |
21 | 22 | 23 | 26 | 27 |
28 |
29 |
30 | 31 | 32 |
33 |
34 |
35 |
36 |
37 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /src/Components/Admin/Dashoard/Bar.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { 3 | Chart as ChartJS, 4 | CategoryScale, 5 | LinearScale, 6 | BarElement, 7 | Title, 8 | Tooltip, 9 | Legend, 10 | } from "chart.js"; 11 | import { Bar } from "react-chartjs-2"; 12 | import { fetchBookingDetails } from "../../../Api/admin/adminDashboard/fetchCount"; 13 | type dateState = { 14 | _id:Date, 15 | totalAmount : number 16 | } 17 | export default function BarChart() { 18 | const [bookingDate , setBookingDate] = useState([]) 19 | 20 | 21 | useEffect(()=>{ 22 | const getBookingDate = ()=>{ 23 | fetchBookingDetails().then((res)=>{ 24 | setBookingDate(res?.data.fetch) 25 | }) 26 | } 27 | getBookingDate() 28 | },[]) 29 | 30 | 31 | const bookingDataWithMonth = bookingDate.map((booking) => { 32 | const month = new Date(booking?._id); 33 | const options: Intl.DateTimeFormatOptions = { 34 | month: 'long' 35 | }; 36 | return { 37 | date: booking?._id, 38 | month: month.toLocaleString('en-US', options), 39 | year : month.getFullYear(), 40 | amount: booking?.totalAmount, 41 | 42 | }; 43 | }); 44 | 45 | console.log(bookingDataWithMonth); 46 | 47 | ChartJS.register( 48 | CategoryScale, 49 | LinearScale, 50 | BarElement, 51 | Title, 52 | Tooltip, 53 | Legend 54 | ); 55 | 56 | const options = { 57 | responsive: true, 58 | plugins: { 59 | legend: { 60 | position: "top" as const, 61 | }, 62 | title: { 63 | display: true, 64 | text: "Booking Report!!", 65 | }, 66 | }, 67 | }; 68 | 69 | 70 | 71 | const labels: string[] = bookingDataWithMonth.map((booking) => booking.month); 72 | const data = { 73 | labels, 74 | datasets: [ 75 | { 76 | label: "Total Amount", 77 | data: bookingDataWithMonth.map((booking) => booking.amount), 78 | backgroundColor: "rgba(355, 99, 132, 0.5)", 79 | barThickness : 30 80 | 81 | }, 82 | ], 83 | }; 84 | 85 | return ( 86 |
87 | 88 |
89 | ); 90 | } 91 | -------------------------------------------------------------------------------- /src/Router/UserRouter.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Route, Routes } from "react-router-dom"; 3 | import Register from "../Pages/User/Register_page"; 4 | import HomePage from "../Pages/User/Landing_page"; 5 | import Login from "../Pages/User/Login_page"; 6 | import AuthVerify from "../Pages/User/AuthVerify"; 7 | import AboutPage from "../Pages/User/AboutPage"; 8 | import ServicePage from "../Pages/User/ServicePage"; 9 | import ContactPage from "../Pages/User/ContactPage"; 10 | import DestinationPage from "../Pages/User/DestinationPage"; 11 | import Package from "../Pages/User/Package"; 12 | import PackageView from "../Pages/User/PackageView"; 13 | import BookingDetails from "../Pages/User/BookingDetails"; 14 | import Payment from "../Pages/User/Payment"; 15 | import ChatPage from "../Pages/User/ChatPage"; 16 | import SuccessPage from "../Pages/User/SuccessPage"; 17 | import Error401 from "../Pages/User/Error401"; 18 | import Protect from "../ProtectorRouter/UserRouter"; 19 | import ProfilePage from "../Pages/User/ProfilePage"; 20 | import BookingShow from '../Components/Profile/Componet/BillingPage' 21 | export default function UserRouter() { 22 | return ( 23 | 24 | } /> 25 | } /> 26 | } /> 27 | } /> 28 | } /> 29 | } /> 30 | } /> 31 | } /> 32 | } /> 33 | } /> 34 | }> 35 | } /> 36 | } /> 37 | } /> 38 | } /> 39 | } /> 40 | } /> 41 | 42 | } /> 43 | 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/Components/Vendor_login/GoogleSignup.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import { GoogleLogin } from 'react-google-login'; 3 | import axios, { AxiosResponse } from 'axios'; 4 | import { gapi } from 'gapi-script'; 5 | import { toast } from 'react-hot-toast'; 6 | import 'react-toastify/dist/ReactToastify.css'; 7 | import { useNavigate } from 'react-router-dom'; 8 | 9 | interface AuthResponse { 10 | token: string; 11 | user: User; 12 | action: boolean; 13 | status: boolean; 14 | } 15 | 16 | interface User { 17 | name: string; 18 | email: string; 19 | } 20 | 21 | export default function GoogleSignup() { 22 | const navigate = useNavigate(); 23 | const [user, setUser] = useState(null); 24 | const [isLoading, setIsLoading] = useState(false); 25 | console.log(user); 26 | 27 | useEffect(() => { 28 | gapi.load('client:auth2', () => { 29 | gapi.auth2.init({ clientId: process.env.REACT_APP_GOOGLE_CLIENTID }); 30 | }); 31 | }, []); 32 | 33 | const onSuccess = async (res: any) => { 34 | try { 35 | setIsLoading(true); // Start loading 36 | 37 | const result: AxiosResponse = await axios.post('http://localhost:2000/googleSign', { 38 | token: res?.tokenId, 39 | }); 40 | 41 | if (result.data.action) { 42 | setUser(result.data.user); 43 | toast.success('Login Success'); 44 | navigate('/'); 45 | } else if (result.data.status) { 46 | toast.error('Already Existing User'); 47 | } 48 | 49 | console.log(res); 50 | console.log(result.data); 51 | } catch (err) { 52 | console.log(err); 53 | } finally { 54 | setIsLoading(false); // Stop loading 55 | } 56 | }; 57 | 58 | const onError = async (res: any) => { 59 | console.log(res); 60 | }; 61 | 62 | return ( 63 | <> 64 | {isLoading ? ( 65 |
Loading...
// Replace with your loading spinner component 66 | ) : ( 67 | 75 | )} 76 | 77 | ); 78 | } 79 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Category/Category.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './cate.css' 3 | export default function Category () { 4 | return ( 5 |
6 |
7 |

Categories

8 |

Holidaymakers. These people will travel to a holiday destination for a typical resort holiday

9 |
10 |
11 |
12 | 13 |
14 | City Base 15 |
16 |
17 |
18 | 19 |
20 | Mountains 21 |
22 |
23 |
24 | 25 |
26 | Historical place 27 |
28 |
29 |
30 | 31 |
32 | Palace 33 |
34 |
35 | 36 | 37 |
38 |
39 | ) 40 | } 41 | -------------------------------------------------------------------------------- /src/Components/SinglePage/smview/overView.tsx: -------------------------------------------------------------------------------- 1 | 2 | import React, { useState } from "react"; 3 | import { 4 | Tabs, 5 | TabsHeader, 6 | TabsBody, 7 | Tab, 8 | TabPanel, 9 | } from "@material-tailwind/react"; 10 | import Overview from "../Overview"; 11 | import Calendar from "../range"; 12 | import SingleForm from "../SingleForm"; 13 | import {useDispatch} from 'react-redux' 14 | import { setDate } from "../../../Redux/slice/dateSlice"; 15 | interface TabData { 16 | label: string; 17 | value: string; 18 | component: React.ReactElement; 19 | } 20 | 21 | const Example: React.FC = () => { 22 | const [activeTab, setActiveTab] = useState("Over View"); 23 | const dispatch = useDispatch() 24 | const DateState = (dateDay: any) => { 25 | dispatch(setDate(dateDay)) 26 | } 27 | 28 | const data: TabData[] = [ 29 | { 30 | label: "Over View", 31 | value: "Over View", 32 | component: ( 33 | <> 34 |
35 | 36 |
37 | 38 | ), 39 | }, 40 | { 41 | label: "Booking Date", 42 | value: "Booking Date", 43 | component: ( 44 | <> 45 | 46 | 47 | ), 48 | }, 49 | { 50 | label: "Enquiry", 51 | value: "Enquiry", 52 | component: ( 53 | <> 54 | 55 | 56 | ), 57 | }, 58 | ]; 59 | 60 | const handleTabClick = (value: string) => { 61 | setActiveTab(value); 62 | }; 63 | 64 | return ( 65 |
66 | 67 | 68 | {data.map(({ label, value }) => ( 69 | handleTabClick(value)} 73 | > 74 |
{label}
75 |
76 | ))} 77 |
78 | 79 | {data.map(({ value, component }) => ( 80 | 81 | {component} 82 | 83 | ))} 84 | 85 |
86 |
87 | ); 88 | }; 89 | 90 | export default Example; 91 | -------------------------------------------------------------------------------- /src/Components/SinglePage/Gallery.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Drawer } from "react-rainbow-components"; 3 | const initialState = { 4 | isOpen: false, 5 | size: null, 6 | }; 7 | 8 | export default function Gallery() { 9 | const [state, setState] = useState(initialState); 10 | return ( 11 |
12 | 13 |
14 | 34 |
35 | setState({ isOpen: false })} 42 | /> 43 |
44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /src/Components/Admin/Dashoard/Pie.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js'; 3 | import { Pie } from 'react-chartjs-2'; 4 | import { fetchingAdminDashboard } from '../../../Api/admin/adminDashboard/fetchCount'; 5 | type bookingCount = { 6 | destinationName:string, 7 | count:number, 8 | 9 | 10 | } 11 | export function PieChart() { 12 | const [count,setCount] = useState([]) 13 | useEffect(()=>{ 14 | const bookingData = ()=>{ 15 | fetchingAdminDashboard().then((res)=>{ 16 | setCount(res?.data.fetch) 17 | 18 | 19 | 20 | }) 21 | } 22 | bookingData() 23 | },[]) 24 | 25 | const bookingDataWithMonth = count.map((count) => { 26 | 27 | return { 28 | Title: count.destinationName, 29 | Count:count.count, 30 | 31 | 32 | }; 33 | }); 34 | 35 | console.log(bookingDataWithMonth); 36 | 37 | ChartJS.register(ArcElement, Tooltip, Legend); 38 | 39 | const labels: string[] = bookingDataWithMonth.map((booking) => booking.Title); 40 | const data = { 41 | labels, 42 | datasets: [ 43 | { 44 | 45 | data: bookingDataWithMonth.map((booking) => booking.Count), 46 | backgroundColor: [ 47 | 'rgba(255, 99, 132, 0.2)', 48 | 'rgba(54, 162, 235, 0.2)', 49 | 'rgba(255, 206, 86, 0.2)', 50 | 'rgba(75, 192, 192, 0.2)', 51 | 'rgba(153, 102, 255, 0.2)', 52 | 'rgba(255, 159, 64, 0.2)', 53 | ], 54 | borderColor: [ 55 | 'rgba(255, 99, 132, 1)', 56 | 'rgba(54, 162, 235, 1)', 57 | 'rgba(255, 206, 86, 1)', 58 | 'rgba(75, 192, 192, 1)', 59 | 'rgba(153, 102, 255, 1)', 60 | 'rgba(255, 159, 64, 1)', 61 | ], 62 | borderWidth: 1, 63 | }, 64 | ], 65 | }; 66 | 67 | const options = { 68 | responsive: true, 69 | plugins: { 70 | legend: { 71 | position: "top" as const, 72 | }, 73 | title: { 74 | display: true, 75 | text: "Most popular booking Destinations!!", 76 | }, 77 | }, 78 | }; 79 | 80 | 81 | return ; 82 | } 83 | -------------------------------------------------------------------------------- /src/Components/SinglePage/DestinationView.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import Header from "./Header"; 3 | import Overview from "./Overview"; 4 | import SingleForm from "./SingleForm"; 5 | import { useSelector, useDispatch } from "react-redux"; 6 | import { useParams } from "react-router-dom"; 7 | import Example from "./smview/overView"; 8 | import { RootState } from "../../Redux/store"; 9 | import { setDestinationData } from "../../Redux/slice/destinationSlice"; 10 | import { destinViewApi } from "../../Api/user/destinationApi/destinView"; 11 | import Loader from "../Loader/Loader"; 12 | import Chat from "../Landing_page/Chat/Chat"; 13 | export default function DestinationView() { 14 | const setDestination = useSelector( 15 | (state: RootState) => state.destination.destinationsFetch 16 | ); 17 | console.log(setDestination); 18 | const [packageCategory, setPackage] = useState(); 19 | const [activtiesData, setActivities] = useState(); 20 | const { id } = useParams(); 21 | console.log(id); 22 | const [loader, setLodaer] = useState(false); 23 | const dispatch = useDispatch(); 24 | useEffect(() => { 25 | setLodaer(true); 26 | const fetchDestination = async () => { 27 | try { 28 | await destinViewApi(id).then((res) => { 29 | console.log(res?.data); 30 | 31 | dispatch(setDestinationData(res?.data.fetch)); 32 | setPackage(res?.data.packageCategory); 33 | setActivities(res?.data.activities); 34 | setLodaer(false); 35 | }); 36 | } catch (error) { 37 | console.log(error+'oi9u9oy8yiu'); 38 | 39 | } 40 | }; 41 | fetchDestination(); 42 | }, [dispatch, id]); 43 | return ( 44 |
45 | {loader && ( 46 |
47 | 48 |
49 | )} 50 |
51 |
52 |
53 | 54 |
55 |
56 | 57 |
58 |
59 |
60 | 61 |
62 |
63 |
64 | 65 |
66 |
67 |
68 | ); 69 | } 70 | -------------------------------------------------------------------------------- /src/Components/Vendor_login/Login.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './Login.css' 3 | import AuthLogin from '../Form/authLogin' 4 | import { NavLink,Navigate } from 'react-router-dom' 5 | import GoogleSignup from './GoogleSignup' 6 | function Login_page() { 7 | const token = localStorage.getItem("user"); 8 | 9 | return token ? ( 10 | 11 | ) : ( 12 |
13 |
14 |
15 | Login_bg 16 |
17 |

Welcome to Travio.

18 |
19 | 20 |
21 | 22 |
23 |
24 |

OR

25 |
26 |
27 |
28 | 29 |
30 |
31 | 32 |
Not a member ? 33 | SIGN UP NOW
34 |
35 |
36 |
37 | 38 |
39 |
40 | Login_bg 41 |
42 |

Dare to live

43 |

the life

44 |

you've always

45 |

wanted

46 |
47 | 48 |
49 |
50 |
51 | ) 52 | } 53 | 54 | export default Login_page -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vandor", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.10.6", 7 | "@emotion/styled": "^11.10.6", 8 | "@fortawesome/free-solid-svg-icons": "^6.4.0", 9 | "@fortawesome/react-fontawesome": "^0.2.0", 10 | "@heroicons/react": "^2.0.17", 11 | "@material-tailwind/react": "^1.4.2", 12 | "@mui/material": "^5.11.16", 13 | "@mui/styled-engine-sc": "^5.11.11", 14 | "@react-icons/all-files": "^4.1.0", 15 | "@react-oauth/google": "^0.10.0", 16 | "@reduxjs/toolkit": "^1.9.3", 17 | "@testing-library/jest-dom": "^5.16.5", 18 | "@testing-library/react": "^13.4.0", 19 | "@testing-library/user-event": "^13.5.0", 20 | "@types/jest": "^27.5.2", 21 | "@types/node": "^16.18.14", 22 | "@types/react": "^18.0.28", 23 | "@types/react-calendar": "^4.1.0", 24 | "@types/react-dom": "^18.0.11", 25 | "@types/react-star-rating-component": "^1.4.1", 26 | "@types/yup": "^0.32.0", 27 | "axios": "^1.3.4", 28 | "chart.js": "^4.3.0", 29 | "flowbite": "^1.6.5", 30 | "formik": "^2.2.9", 31 | "gapi-script": "^1.2.0", 32 | "mdb-react-ui-kit": "^6.0.0", 33 | "react": "^18.2.0", 34 | "react-chartjs-2": "^5.2.0", 35 | "react-data-table-component": "^7.5.3", 36 | "react-date-range": "^1.4.0", 37 | "react-dom": "^18.2.0", 38 | "react-google-login": "^5.2.2", 39 | "react-hot-toast": "^2.4.1", 40 | "react-icons": "^4.8.0", 41 | "react-loader-spinner": "^5.3.4", 42 | "react-rainbow-components": "^1.32.0", 43 | "react-redux": "^8.0.5", 44 | "react-router-dom": "^6.9.0", 45 | "react-scripts": "5.0.1", 46 | "react-toastify": "^9.1.2", 47 | "redux-persist": "^6.0.0", 48 | "socket.io-client": "^4.6.1", 49 | "styled-components": "^5.3.9", 50 | "sweetalert2": "^11.7.3", 51 | "tw-elements": "^1.0.0-beta1", 52 | "typescript": "^4.9.5", 53 | "web-vitals": "^2.1.4", 54 | "yup": "^1.1.1" 55 | }, 56 | "scripts": { 57 | "start": "react-scripts start", 58 | "build": "react-scripts build", 59 | "test": "react-scripts test", 60 | "eject": "react-scripts eject" 61 | }, 62 | "eslintConfig": { 63 | "extends": [ 64 | "react-app", 65 | "react-app/jest" 66 | ] 67 | }, 68 | "browserslist": { 69 | "production": [ 70 | ">0.2%", 71 | "not dead", 72 | "not op_mini all" 73 | ], 74 | "development": [ 75 | "last 1 chrome version", 76 | "last 1 firefox version", 77 | "last 1 safari version" 78 | ] 79 | }, 80 | "devDependencies": { 81 | "@types/react-date-range": "^1.4.4", 82 | "@types/styled-components": "^5.1.26", 83 | "tailwindcss": "^3.2.7" 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/Components/Vendor_register/Register.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './Register.css' 3 | import { BsInstagram,BsFacebook} from "react-icons/bs"; 4 | import { SiWhatsapp} from "react-icons/si"; 5 | import AuthForm from '../Form/authForm'; 6 | 7 | export default function Register() { 8 | 9 | 10 | return ( 11 | 12 |
13 |
14 |
15 | resgister_img 16 |
    17 |
  • 18 |
  • 19 |
  • 20 |
21 |
22 |
23 | logo_image 24 |

Experience The best trip ever

25 |

Life is short and the world is wide. I better get started

26 |
27 | 28 |
29 |
    30 |
  • 31 |
  • 32 |
  • 33 |
34 | 35 | 36 |
37 | 38 | 39 |
40 | 41 |
42 | 43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /src/Components/Profile/UI/SideBar.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import { AiOutlineUser } from "react-icons/ai"; 4 | import { GrMapLocation } from "react-icons/gr"; 5 | import { AiFillHome} from "react-icons/ai"; 6 | import {IoMdLogOut} from "react-icons/io"; 7 | import {FaHistory} from "react-icons/fa"; 8 | 9 | export default function SideBarProfile() { 10 | return ( 11 | <> 12 | 13 |
14 |
15 |
16 | UserDetails 17 |
18 |
19 | UserDetails 20 |
21 |
22 | UserDetails 23 |
24 |
25 | UserDetails 26 |
27 |
28 | UserDetails 29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 |
39 |
40 |
41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 | 58 |
59 |
60 | 61 | 62 | ) 63 | } 64 | -------------------------------------------------------------------------------- /src/Components/Profile/UI/ContantProfile.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import "./Silder.css"; 3 | import UserDetails from "../Componet/UserDetails"; 4 | import PackageDetails from "../Componet/PackageDetails"; 5 | import { useNavigate } from "react-router-dom"; 6 | import { useDispatch } from "react-redux"; 7 | import { resetAuthDataStore } from "../../../Redux/slice/authSlice"; 8 | import Stroy from "../Componet/Stroy"; 9 | interface TabData { 10 | label: string; 11 | value: string; 12 | component: React.ReactElement; 13 | } 14 | export default function ContantProfile() { 15 | const navigate = useNavigate() 16 | const dispatch = useDispatch() 17 | const [activeTab, setActiveTab] = useState("UserDetails"); 18 | 19 | const data: TabData[] = [ 20 | { 21 | label: "User Details", 22 | value: "UserDetails", 23 | component:
24 | 25 |
26 | }, 27 | 28 | { 29 | label: "Package Details", 30 | value: "PackageDetails", 31 | component:
32 | 33 |
, 34 | }, 35 | { 36 | label: "Tell Your Story", 37 | value: "TellYourStroy", 38 | component:
39 | 40 |
, 41 | }, 42 | 43 | 44 | { 45 | label: "Logout", 46 | value: "Logout", 47 | component: ( 48 |
49 | Payment 50 |
51 | ) 52 | }, 53 | ]; 54 | const handleLogout = ()=>{ 55 | localStorage.removeItem("user"); 56 | dispatch(resetAuthDataStore()) 57 | navigate("/"); 58 | 59 | } 60 | const handleTabClick = (value: string) => { 61 | setActiveTab(value); 62 | }; 63 | const LOGOUT = 'Logout' 64 | return ( 65 | <> 66 | 67 |
68 |
69 | {data.map(({ label, value }) => ( 70 | 71 |
LOGOUT===value ? handleLogout(): handleTabClick(value)} 75 | > 76 | {label} 77 |
78 | ))} 79 |
80 |
81 |
82 |
83 | {data.map(({ value, component }) => ( 84 |
88 | {component} 89 |
90 | ))} 91 |
92 |
93 | 94 | ); 95 | } 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/Components/Admin/ReactTable/PackageList.tsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect} from 'react' 2 | import DataTable, { TableColumn } from 'react-data-table-component'; 3 | import { NavLink } from 'react-router-dom'; 4 | import {fetchCategory} from '../../../Api/adminCategory/fetchCategory' 5 | import { AiFillEdit } from 'react-icons/ai' 6 | interface DataRow { 7 | priceCategory:string; 8 | file: string; 9 | 10 | 11 | 12 | } 13 | 14 | const columns :TableColumn[]= [ 15 | { 16 | name: 'Image', 17 | cell: tableProps =>( 18 |
19 | imge 20 |
21 | ) 22 | }, 23 | 24 | { 25 | name: 'PriceCategory', 26 | selector: (row:any) => row.packageCategory, 27 | }, 28 | 29 | { 30 | name: 'Action', 31 | selector: (row:any) => 32 |
33 | 34 | 35 | 36 |
37 | 38 | }, 39 | 40 | 41 | ]; 42 | 43 | const handleEdit = (id:string)=>{ 44 | console.log(id); 45 | 46 | } 47 | 48 | export default function ListDestin() { 49 | const [fetchData,setFetchData] = React.useState<[]>([]) 50 | const[search,setsearch]=React.useState() 51 | const [filter,setFilterData] = React.useState<[]>([]) 52 | console.log(fetchData); 53 | 54 | useEffect(()=>{ 55 | const getData = async()=>{ 56 | try { 57 | await fetchCategory().then((res)=>{ 58 | setFetchData(res?.data.fetch) 59 | setFilterData(res?.data.fetch) 60 | 61 | }) 62 | } catch (error) { 63 | console.log(error); 64 | 65 | } 66 | 67 | } 68 | getData() 69 | },[]) 70 | useEffect(() => { 71 | const result:any = fetchData.filter((item:any) => { 72 | console.log(item); 73 | 74 | return item.packageCategory.toLowerCase().match(search); 75 | }); 76 | setFilterData(result); 77 | }, [search,fetchData]); 78 | return ( 79 | 81 |

Lisit PackageCategory

82 | } 83 | data={filter} 84 | columns={columns} 85 | pagination 86 | fixedHeader 87 | subHeader 88 | subHeaderComponent={ 89 | setsearch(e.target.value)} 95 | /> 96 | } 97 | 98 | /> 99 | ) 100 | } 101 | 102 | -------------------------------------------------------------------------------- /src/Components/SinglePage/Overview.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {useSelector} from 'react-redux' 3 | import { RootState } from '../../Redux/store' 4 | export default function Overview() { 5 | const destinData = useSelector( 6 | (state: RootState) => state.destination.destinationsFetch 7 | ); 8 | return ( 9 | <> 10 |
11 |

Overview

12 |
13 |

{destinData?.descrption}

14 |
15 |

Tour Highlights

16 |
17 |

{destinData?.Highlights}

18 |
19 |

Included/Excluded

20 |

21 | Included 22 |

23 |
24 |
25 |
    26 | { 27 | destinData?.Included.map((items)=>{ 28 | return( 29 |
  • 30 |

    * {items}.

    31 |
  • 32 | 33 | ) 34 | }) 35 | } 36 |
37 |
38 |

39 | Excluded 40 |

41 |
42 |
    43 | { 44 | destinData?.Excluded.map((items)=>{ 45 | return( 46 |
  • 47 |

    * {items}.

    48 |
  • 49 | 50 | ) 51 | }) 52 | } 53 |
54 |
55 | 56 |
57 |

Company Travel Policy

58 |
59 |

A company travel policy is designed to outline a business's travel arrangement procedures and guidelines, stipulating which travel expenses are paid for by the company and how to manage the reimbursement process. A company travel policy should include a purpose statement, scope, authorization and reimbursement section, and travel arrangement processes. 60 | 61 | Creating a detailed company travel policy will help ensure all business trips run smoothly, are secured ahead of time, and adhere to all company requirements..

62 |
63 |
64 | 65 | ) 66 | } 67 | -------------------------------------------------------------------------------- /src/Api/user/bookingApi/bookingApi.ts: -------------------------------------------------------------------------------- 1 | import axios from '../../../Axios/axios' 2 | import Swal from 'sweetalert2'; 3 | export const bookingAPi = async(Data:object)=>{ 4 | try { 5 | 6 | console.log(Data); 7 | return await axios.patch('/userPatch', Data,{ 8 | headers: { 9 | Authorization: `Bearer ${localStorage.getItem("user")}`, 10 | "Content-Type": "multipart/form-data", 11 | }, 12 | params: { role: 'user' } 13 | }); 14 | 15 | } catch (error:any) { 16 | if(error.response && error.response.status === 500){ 17 | Swal.fire({ 18 | icon: 'error', 19 | title: 'Error', 20 | text:'Your session has expired. Please log in again.', 21 | confirmButtonText: 'OK', 22 | confirmButtonColor: '#3085d6', 23 | }).then((result) => { 24 | if (result.isConfirmed) { 25 | localStorage.removeItem("user"); 26 | window.location.href = '/login'; 27 | } 28 | }); 29 | } 30 | 31 | } 32 | } 33 | 34 | 35 | 36 | export const paymentApi = async(subTotal:number)=>{ 37 | 38 | try { 39 | console.log(subTotal); 40 | 41 | return await axios.post('/payment',{total:subTotal},{ 42 | headers: { 43 | Authorization: `Bearer ${localStorage.getItem("user")}` 44 | }, 45 | }) 46 | 47 | } catch (error:any) { 48 | if(error.response && error.response.status === 500){ 49 | Swal.fire({ 50 | icon: 'error', 51 | title: 'Error', 52 | text:'Your session has expired. Please log in again.', 53 | confirmButtonText: 'OK', 54 | confirmButtonColor: '#3085d6', 55 | }).then((result) => { 56 | if (result.isConfirmed) { 57 | localStorage.removeItem("user"); 58 | window.location.href = '/login'; 59 | } 60 | }); 61 | } 62 | 63 | } 64 | } 65 | 66 | export const paymentSuccessApi = async(paymentData:object)=>{ 67 | try { 68 | console.log(paymentData); 69 | 70 | return await axios.post('/paymentSuccess' ,paymentData,{ 71 | headers: { 72 | Authorization: `Bearer ${localStorage.getItem("user")}` 73 | }, 74 | }) 75 | 76 | } catch (error:any) { 77 | if(error.response && error.response.status === 500){ 78 | Swal.fire({ 79 | icon: 'error', 80 | title: 'Error', 81 | text:'Your session has expired. Please log in again.', 82 | confirmButtonText: 'OK', 83 | confirmButtonColor: '#3085d6', 84 | }).then((result) => { 85 | if (result.isConfirmed) { 86 | localStorage.removeItem("user"); 87 | window.location.href = '/login'; 88 | } 89 | }); 90 | } 91 | 92 | } 93 | } -------------------------------------------------------------------------------- /src/Components/Admin/DataTable/catetable.tsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect, useState} from 'react' 2 | import {fetchCategory} from '../../../Api/adminCategory/fetchCategory' 3 | export default function CategoryTable() { 4 | const [fetchData,setFetchData] = useState([]) 5 | console.log(fetchData); 6 | 7 | useEffect(()=>{ 8 | const getData = async()=>{ 9 | try { 10 | await fetchCategory().then((res)=>{ 11 | setFetchData(res.data.fetch) 12 | }) 13 | } catch (error) { 14 | console.log(error); 15 | 16 | } 17 | 18 | } 19 | getData() 20 | },[]) 21 | return ( 22 |
23 |
24 |
25 | 26 |
27 |
28 | 29 |
30 | 31 |
32 |
33 | 34 | 35 | 36 | 39 | 42 | 43 | 46 | 47 | 48 | 49 | { 50 | fetchData?.map((data,i)=>{ 51 | return( 52 | 53 | 54 | 57 | 58 | 61 | 62 | 66 | 67 | 68 | ) 69 | }) 70 | 71 | 72 | } 73 | 74 |
37 | 38 | 40 | Package Category 41 | 44 | Action 45 |
55 | 56 | 59 | {data.packageCategory} 60 | 63 |

Edit

64 | 65 |
75 |
76 | 77 |
78 | 79 | ) 80 | } 81 | -------------------------------------------------------------------------------- /src/Components/Admin/Login/Form.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useNavigate } from "react-router-dom"; 3 | import { Formik, Form, Field } from "formik"; 4 | import { AdminSchema } from "../../../Schema/admin/schema"; 5 | import toast from "react-hot-toast"; 6 | import "react-toastify/dist/ReactToastify.css"; 7 | 8 | import { AdminLoginApi } from "../../../Api/admin/adminLogin/LoginApi"; 9 | export default function AdminLogin() { 10 | const navigate = useNavigate(); 11 | return ( 12 | <> 13 | { 20 | try { 21 | AdminLoginApi(values).then((res)=>{ 22 | if(res?.data.success){ 23 | localStorage.setItem("admin", res.data.token); 24 | navigate('/admin/dashboard') 25 | toast.success('login Success') 26 | 27 | } if(res?.data.action){ 28 | toast.error('Invalid Credentials') 29 | } if(res?.data.success=== false) { 30 | toast.error('password not match') 31 | } 32 | 33 | 34 | }) 35 | 36 | } catch (error) { 37 | console.log(error); 38 | 39 | } 40 | 41 | }} 42 | > 43 | {({ errors, touched }) => ( 44 |
45 |
46 | 47 | 53 | {errors.email && touched.email ? ( 54 |
55 | {errors.email} 56 |
57 | ) : null} 58 | 59 | 60 | 66 | {errors.password && touched.password ? ( 67 |
68 | {errors.password} 69 |
70 | ) : null} 71 | 72 | 79 |
80 |
81 | )} 82 |
83 | 84 | ); 85 | } 86 | -------------------------------------------------------------------------------- /src/Components/Form/authLogin.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useNavigate } from "react-router-dom"; 3 | import { Formik, Form, Field } from "formik"; 4 | import { loginSchema } from "../../Schema/auth/auth"; 5 | import toast from "react-hot-toast"; 6 | import "react-toastify/dist/ReactToastify.css"; 7 | import { authLoginApi } from "../../Api/user/Auth/AuthApi"; 8 | 9 | import { setAuthDataStore } from "../../Redux/slice/authSlice"; 10 | import { useDispatch } from "react-redux"; 11 | export default function AuthLogin() { 12 | const navigate = useNavigate(); 13 | const dispatch = useDispatch() 14 | return ( 15 | <> 16 | { 23 | authLoginApi(values).then((res) => { 24 | 25 | if(res?.data.userData && res.data.token){ 26 | localStorage.setItem("user", res.data.token); 27 | dispatch(setAuthDataStore(res?.data.userData)) 28 | toast.success('Welcome') 29 | navigate('/') 30 | } 31 | if(res?.data.success===false){ 32 | toast.error('Password Not Matching') 33 | 34 | } if (res?.data.action===false){ 35 | toast.error('Invalid Credentials') 36 | } else if(res?.data.action===true){ 37 | toast.error('The User is Blocked') 38 | } 39 | }); 40 | }} 41 | > 42 | {({ errors, touched }) => ( 43 |
44 |
45 | 46 | 52 | {errors.email && touched.email ? ( 53 |
54 | {errors.email} 55 |
56 | ) : null} 57 | 58 | 59 | 65 | {errors.password && touched.password ? ( 66 |
67 | {errors.password} 68 |
69 | ) : null} 70 | 71 | 78 |
79 |
80 | )} 81 |
82 | 83 | ); 84 | } 85 | -------------------------------------------------------------------------------- /src/Components/Admin/Dashoard/Dashboard.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { fetchBookingCount, fetchClientsCount, fetchTotalrevenueCount } from "../../../Api/admin/adminDashboard/fetchCount"; 3 | import BarChart from "./Bar"; 4 | import { PieChart } from "./Pie"; 5 | 6 | 7 | export default function Dashboard() { 8 | const [bookingCount, setBookingCount] = useState(); 9 | const [client, setClient] = useState(); 10 | const [revenue, setRevenue] = useState(); 11 | 12 | useEffect(() => { 13 | async function fetchData() { 14 | try { 15 | const [bookingRes, clientsRes, totalRes] = await Promise.all([ 16 | fetchBookingCount(), 17 | fetchClientsCount(), 18 | fetchTotalrevenueCount() 19 | ]); 20 | 21 | setBookingCount(bookingRes?.data.bookingCount); 22 | setClient(clientsRes?.data.ClientsCount); 23 | setRevenue(totalRes?.data.totalRevenue); 24 | 25 | 26 | } catch (error) { 27 | console.log(error); 28 | } 29 | } 30 | 31 | fetchData(); 32 | }, []); 33 | 34 | 35 | 36 | return ( 37 |
38 |

OverView

39 |
40 |
41 |
42 |

43 | {bookingCount} 44 |

45 | 46 |
47 |

48 | Total Booking 49 |

50 |
51 |
52 | 53 | 54 |
55 |
56 |
57 |

58 | {client} 59 |

60 | 61 |
62 |

63 | Total Clients 64 |

65 |
66 |
67 | 68 | 69 | 70 |
71 |
72 |
73 |

74 | {revenue} 75 |

76 | 77 |
78 |

79 | Total Revenue 80 |

81 |
82 |
83 | 84 |
85 | 86 |
87 |
88 |
89 | 90 |
91 |
92 | 93 |
94 |
95 |
96 | ); 97 | } 98 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Footer/Footer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { BsInstagram,BsFacebook} from "react-icons/bs"; 3 | import { SiWhatsapp} from "react-icons/si"; 4 | export default function Footer() { 5 | return ( 6 |
7 |
8 |
9 |
10 |

TraVio.

11 | There are many variations of passages of Lorem the Ipsum available but it is the majority of suffered that a alteration in that some dummy text. 12 |
    13 |
  • 14 |
  • 15 |
  • 16 |
17 |
18 |
19 | Desgined by @tarvio 20 |
21 |
22 |
23 |
24 |

Support

25 |
    26 | 27 |
  • 28 | Customer Support 29 |
  • 30 |
  • 31 | Privacy & Policy 32 |
  • 33 |
  • 34 | Contact Channels 35 |
  • 36 |
37 |
38 |
39 |

About Us

40 |
    41 | 42 |
  • 43 | Our Story 44 |
  • 45 |
  • 46 | Travel Blog & Tips 47 |
  • 48 |
  • 49 | Working With Us 50 |
  • 51 | 52 |
53 |
54 |
55 |

Contact Info

56 |
    57 | 58 |
  • 59 | +088 (006) 992-99-10 60 |
  • 61 |
  • 62 | tavio@gamil.com 63 |
  • 64 | 65 |
66 |
67 | 68 |
69 | 70 | 71 |
72 | 73 |
74 | ) 75 | } 76 | -------------------------------------------------------------------------------- /src/Components/Admin/DataTable/actvtityTable.tsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect,useState} from 'react' 2 | import {fetchActvityAPi} from '../../../Api/admin/adminActvity/fetchActivity' 3 | export default function ActvtityTable() { 4 | const [fetchData,setFetchData] = useState([]) 5 | console.log(fetchData); 6 | 7 | useEffect(()=>{ 8 | const getData = async()=>{ 9 | try { 10 | await fetchActvityAPi().then((res)=>{ 11 | setFetchData(res?.data.fetch) 12 | console.log(res?.data.fetch); 13 | 14 | }) 15 | } catch (error) { 16 | console.log(error); 17 | 18 | } 19 | 20 | } 21 | getData() 22 | },[]) 23 | return ( 24 |
25 |
26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 |
35 | 36 | 37 | 38 | 41 | 44 | 45 | 48 | 49 | 50 | 51 | { 52 | fetchData?.map((data,i)=>{ 53 | return( 54 | 55 | 56 | 59 | 60 | 63 | 64 | 68 | 69 | 70 | ) 71 | }) 72 | 73 | 74 | } 75 | 76 |
39 | 40 | 42 | Activity 43 | 46 | Action 47 |
57 | 58 | 61 | {data.activtiy} 62 | 65 |

Edit

66 | 67 |
77 |
78 | 79 |
80 | ) 81 | } 82 | -------------------------------------------------------------------------------- /src/Components/AuthVerify/VerifyPage.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useRef, useState } from 'react'; 2 | import { CodeInput } from 'react-rainbow-components'; 3 | import { AiOutlineArrowLeft} from "react-icons/ai"; 4 | import { NavLink } from 'react-router-dom'; 5 | import { useSelector } from 'react-redux'; 6 | import { RootState } from "../../Redux/store"; 7 | import { otpVerifiyApi } from '../../Api/user/Auth/AuthApi'; 8 | import { useNavigate } from "react-router-dom"; 9 | import { toast } from 'react-hot-toast'; 10 | export default function VerifyPage() { 11 | const navigate = useNavigate() 12 | const authData = useSelector((state: RootState)=> state.authData.authData); 13 | const [code, setCode] = useState(); 14 | 15 | console.log(code); 16 | 17 | const codeInputRef = useRef(null); 18 | 19 | useEffect(() => { 20 | if (codeInputRef.current) { 21 | codeInputRef.current.focus(); 22 | } 23 | }, []); 24 | // const handleSumbit = async () => { 25 | // try { 26 | // await otpVerifiyApi(code).then((res)=>{ 27 | // console.log(res?.data); 28 | 29 | // }) 30 | // } catch (error) { 31 | // console.log(error); 32 | 33 | // } 34 | // } 35 | useEffect(()=>{ 36 | if (code && code.length === 4) { 37 | const handleSumbit = async()=>{ 38 | try { 39 | await otpVerifiyApi(code,authData.phone).then((res)=>{ 40 | if(res?.data.success===true){ 41 | toast.success('Success ') 42 | navigate('/login') 43 | } else if(res?.data.action===false){ 44 | toast.error('OTP INVALID') 45 | } 46 | 47 | }) 48 | } catch (error) { 49 | console.log(error); 50 | 51 | } 52 | } 53 | handleSumbit() 54 | } 55 | 56 | },[code,authData.phone,navigate]) 57 | return ( 58 |
59 | 60 |
61 | 62 | 63 |
64 | 65 |
66 |
67 |

OTP VERIFICATION

68 |
69 | 70 |
71 | 72 |
73 |
74 | image_Loading 75 |
76 |
77 |

we will send you are time Password on This Mobile Number +91 {authData.phone}

78 | 79 |
80 |
81 | 88 | {/* */} 89 | 90 |
91 |
92 |
93 |
94 | ) 95 | } 96 | -------------------------------------------------------------------------------- /src/Components/Admin/DataTable/destinTable.tsx: -------------------------------------------------------------------------------- 1 | 2 | import React,{useEffect,useState} from 'react' 3 | import {fetchDestinApi} from '../../../Api/admin/adminDestination/fetchData' 4 | export default function DestinTable() { 5 | const [fetchData,setFetchData] = useState([]) 6 | console.log(fetchData); 7 | 8 | useEffect(()=>{ 9 | const getData = async()=>{ 10 | try { 11 | await fetchDestinApi().then((res)=>{ 12 | setFetchData(res?.data.fetch) 13 | 14 | 15 | }) 16 | } catch (error) { 17 | console.log(error); 18 | 19 | } 20 | 21 | } 22 | getData() 23 | },[]) 24 | return ( 25 |
26 |
27 |
28 | 29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 | 37 | 38 | 39 | 42 | 45 | 48 | 49 | 52 | 53 | 54 | 55 | { 56 | fetchData?.map((data,i)=>{ 57 | 58 | return( 59 | 60 | 61 | 64 | 67 | 70 | 71 | 75 | 76 | 77 | 78 | ) 79 | // } 80 | }) 81 | 82 | 83 | } 84 | 85 |
40 | Image 41 | 43 | Title 44 | 46 | Price 47 | 50 | Action 51 |
62 | destin_page 63 | 65 | {data.title} 66 | 68 | {data.price} 69 | 72 |

Edit

73 | 74 |
86 |
87 | 88 |
89 | ) 90 | } 91 | -------------------------------------------------------------------------------- /src/Components/Admin/ReactTable/UserManage.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | import DataTable, { TableColumn } from "react-data-table-component"; 3 | import { userBlockingApi, userManageFetchApi } from "../../../Api/admin/adminUserManage/userFetchApi"; 4 | import { AiFillLock } from "react-icons/ai"; 5 | import { toast } from "react-hot-toast"; 6 | import { AiFillUnlock } from "react-icons/ai"; 7 | interface DataRow { 8 | name: string; 9 | profile: string; 10 | address: string; 11 | email: string; 12 | phone: number; 13 | idCard: { 14 | number: string; 15 | image: string; 16 | }; 17 | } 18 | 19 | 20 | export default function UserManage() { 21 | const [fetchData, setFetchData] = React.useState<[]>([]); 22 | console.log(fetchData); 23 | 24 | const [search, setsearch] = React.useState(); 25 | const [filter, setFilterData] = React.useState<[]>([]); 26 | 27 | useEffect(() => { 28 | const getData = () => { 29 | try { 30 | userManageFetchApi().then((res) => { 31 | setFetchData(res?.data.fetch); 32 | setFilterData(res?.data.fetch); 33 | }); 34 | } catch (error) { 35 | console.log(error); 36 | } 37 | }; 38 | getData(); 39 | }, []); 40 | 41 | useEffect(() => { 42 | const result: any = fetchData?.filter((item: any) => { 43 | return item.name?.toLowerCase().match(search); 44 | }); 45 | setFilterData(result); 46 | }, [search, fetchData]); 47 | 48 | const columns: TableColumn[] = [ 49 | { 50 | name: "Profile", 51 | cell: (tableProps: any) => ( 52 |
53 | imge 62 |
63 | ), 64 | }, 65 | { 66 | name: "User Name", 67 | selector: (row: any) => row.name, 68 | }, 69 | { 70 | name: "Address", 71 | selector: (row: any) => row.address, 72 | }, 73 | { 74 | name: "Email", 75 | selector: (row: any) => row.email, 76 | }, 77 | { 78 | name: "Phone", 79 | selector: (row: any) => row.phone, 80 | }, 81 | 82 | { 83 | name: "Action", 84 | selector: (row: any) => ( 85 |
handleBlock(row._id)}> 86 | 87 | { 88 | row.action===true ? : 93 | } 94 | 95 | 96 | 97 |
98 | ), 99 | }, 100 | ]; 101 | const handleBlock = (id:string)=>{ 102 | userBlockingApi(id).then((res)=>{ 103 | if(res?.data.check){ 104 | setFetchData(res?.data.fetch) 105 | setFilterData(res?.data.fetch) 106 | toast.success('User UnBlocked') 107 | 108 | 109 | }else{ 110 | setFetchData(res?.data.fetch) 111 | setFilterData(res?.data.fetch) 112 | toast.error('User Blocked') 113 | } 114 | 115 | 116 | }) 117 | 118 | } 119 | 120 | return ( 121 | 124 |

User Management

125 | 126 | } 127 | data={filter} 128 | columns={columns} 129 | fixedHeader 130 | subHeader 131 | subHeaderComponent={ 132 | setsearch(e.target.value)} 138 | /> 139 | } 140 | /> 141 | ); 142 | } 143 | -------------------------------------------------------------------------------- /src/Components/Landing_page/Navbar/Navbar.tsx: -------------------------------------------------------------------------------- 1 | import React, { MouseEventHandler } from 'react' 2 | import {NavLink} from 'react-router-dom' 3 | import { AiOutlineUser} from "react-icons/ai"; 4 | 5 | type props = { 6 | onClick: MouseEventHandler 7 | } 8 | 9 | function Navbar({onClick}:props) { 10 | 11 | return ( 12 | 72 | 73 | ) 74 | } 75 | 76 | export default Navbar -------------------------------------------------------------------------------- /src/Components/Admin/Sidebar/Sidebar.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useNavigate } from "react-router-dom"; 3 | import { useState, useEffect } from "react"; 4 | import { HiMenuAlt3 } from "react-icons/hi"; 5 | import { MdOutlineDashboard } from "react-icons/md"; 6 | import { AiOutlineUsergroupAdd } from "react-icons/ai"; 7 | import { GrMapLocation } from "react-icons/gr"; 8 | 9 | import { TbBrandBooking } from "react-icons/tb"; 10 | import { GrAttraction } from "react-icons/gr"; 11 | import { BsFillChatDotsFill } from "react-icons/bs"; 12 | import { BsBuildingAdd } from "react-icons/bs"; 13 | import { MdOutlineLogout } from "react-icons/md"; 14 | import { Link } from "react-router-dom"; 15 | 16 | const AdminNavbar = () => { 17 | 18 | const navigate = useNavigate() 19 | 20 | 21 | const menus = [ 22 | { name: "Dashboard", link: "/admin/dashboard", icon: MdOutlineDashboard }, 23 | { name: "User", link: "/admin/user", icon: AiOutlineUsergroupAdd }, 24 | { name: "Destination ", link: "/admin/destination", icon: GrMapLocation }, 25 | { name: "Category", link: "/admin/category", icon: BsBuildingAdd }, 26 | { name: "Actvtity", link: "/admin/actvtity", icon: GrAttraction }, 27 | { name: "Booking", link: "/admin/booking", icon: TbBrandBooking }, 28 | { name: "Chat", link: "/admin/chat", icon: BsFillChatDotsFill }, 29 | { name: "Logout", link:'/admin/login',icon: MdOutlineLogout , onClick: ()=>{ 30 | localStorage.removeItem("admin"); 31 | navigate("/admin/login"); 32 | } }, 33 | ]; 34 | const [open, setOpen] = useState(true); 35 | 36 | useEffect(() => { 37 | function handleResize() { 38 | if (window.innerWidth < 640) { 39 | setOpen(false); 40 | } else { 41 | setOpen(true); 42 | } 43 | } 44 | handleResize(); 45 | window.addEventListener("resize", handleResize); 46 | return () => window.removeEventListener("resize", handleResize); 47 | }, []); 48 | 49 | 50 | 51 | return ( 52 |
53 |
58 |
59 |
60 | setOpen(!open)} 64 | /> 65 |
66 |
67 |
68 | Travio Admin 69 |
70 | 71 | 72 | 73 |
74 | {menus?.map((menu, i) => ( 75 | 81 |
{React.createElement(menu?.icon, { size: "20" })}
82 |

90 | {menu?.name} 91 |

92 |

98 | {menu?.name} 99 |

100 | 101 | ))} 102 |
103 |
104 |
105 | ); 106 | }; 107 | 108 | export default AdminNavbar; -------------------------------------------------------------------------------- /src/Components/SinglePage/Navbar.tsx: -------------------------------------------------------------------------------- 1 | import React, { MouseEventHandler } from 'react' 2 | import {NavLink} from 'react-router-dom' 3 | import { AiOutlineUser} from "react-icons/ai"; 4 | 5 | type props = { 6 | onClick: MouseEventHandler 7 | } 8 | 9 | function Navbar({onClick}:props) { 10 | 11 | return ( 12 | 72 | 73 | ) 74 | } 75 | 76 | export default Navbar -------------------------------------------------------------------------------- /src/Components/Profile/UI/Footer.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { AiOutlineUser } from "react-icons/ai"; 3 | import { GrMapLocation } from "react-icons/gr"; 4 | import { AiFillHome } from "react-icons/ai"; 5 | import { IoMdLogOut } from "react-icons/io"; 6 | import { VscPreview } from "react-icons/vsc"; 7 | 8 | import UserDetails from "../Componet/UserDetails"; 9 | import BookingDetails from '../Componet/PackageDetails' 10 | import Stroy from "../Componet/Stroy"; 11 | import { useNavigate } from "react-router-dom"; 12 | import { useDispatch } from "react-redux"; 13 | import { resetAuthDataStore } from "../../../Redux/slice/authSlice"; 14 | import { toast } from "react-hot-toast"; 15 | interface TabData { 16 | label: string; 17 | value: string; 18 | component: React.ReactElement; 19 | icon: React.ReactElement; 20 | } 21 | 22 | export default function Footer() { 23 | const navigate = useNavigate() 24 | const dispatch = useDispatch() 25 | const [activeTab, setActiveTab] = useState("UserDetails"); 26 | const handleLogout = ()=>{ 27 | localStorage.removeItem("user"); 28 | dispatch(resetAuthDataStore()) 29 | toast.success('logout Success') 30 | navigate("/"); 31 | 32 | } 33 | const data: TabData[] = [ 34 | { 35 | label: "User Details", 36 | value: "UserDetails", 37 | component:
38 | 39 |
, 40 | icon: , 41 | }, 42 | { 43 | label: "Location Details", 44 | value: "LocationDetails", 45 | component:
46 | 47 |
, 48 | icon: , 49 | }, 50 | { 51 | label: "Home", 52 | value: "Home", 53 | component:
Home
, 54 | icon: navigate('/')} className="text-4xl -mt-2" />, 55 | }, 56 | { 57 | label: "story", 58 | value: "story", 59 | component:
, 60 | icon: , 61 | }, 62 | { 63 | label: "Logout", 64 | value: "Logout", 65 | component:
Logout
, 66 | icon: handleLogout()} />, 67 | }, 68 | ]; 69 | 70 | const handleTabClick = (value: string) => { 71 | setActiveTab(value); 72 | }; 73 | return ( 74 | <> 75 |
76 |
77 | {data.map(({ label, value, icon }) => ( 78 |
handleTabClick(value)} 84 | > 85 | {icon} 86 | {label} 87 |
88 | ))} 89 |
90 |
91 | {data.map(({ value, component }) => ( 92 |
96 | {component} 97 |
98 | ))} 99 |
100 |
101 |
102 |
103 |
104 | {data.map(({ value, icon }) => ( 105 |
handleTabClick(value)} 109 | > 110 | {icon} 111 |
112 | ))} 113 |
114 |
115 |
116 | 117 | ); 118 | } 119 | -------------------------------------------------------------------------------- /src/Components/Profile/Componet/PackageDetails.tsx: -------------------------------------------------------------------------------- 1 | import React,{useEffect, useState} from "react"; 2 | import './Package.css' 3 | import { RootState } from "../../../Redux/store"; 4 | import { Link } from "react-router-dom"; 5 | import { useSelector } from "react-redux"; 6 | import { BookingFetchApi } from "../../../Api/user/Profile/DestinaFetchApi"; 7 | import { setBookingDetails } from "../../../Redux/slice/bookingDetailsSlice"; 8 | import { useDispatch } from "react-redux"; 9 | import Loader from "../../../Components/Loader/Loader"; 10 | import PackageTableRows from "./PackageTableRows"; 11 | export default function PackageDetails() { 12 | const BookingState = useSelector( 13 | (state: RootState) => state.bookingdetails.bookingData 14 | ); 15 | console.log(BookingState); 16 | 17 | const [loader,setLoader]=React.useState(false) 18 | const [check , setCheck] = useState([]) 19 | console.log(check); 20 | 21 | const dispatch = useDispatch() 22 | useEffect(()=>{ 23 | const get = async()=>{ 24 | setLoader(true) 25 | try { 26 | BookingFetchApi().then((res)=>{ 27 | if(res?.data.success){ 28 | 29 | dispatch(setBookingDetails(res.data.bookingData)) 30 | setLoader(false) 31 | } 32 | 33 | }) 34 | } catch (error) { 35 | console.log(error); 36 | 37 | } 38 | } 39 | get() 40 | },[]) 41 | return ( 42 | <> 43 | { 44 | BookingState?.length===0 ? 45 |
46 |

Booking Now

47 |
48 |
49 |

Limit Offer

50 |

Welcome to the world

51 |

Explore The World

52 | 53 | 54 | 55 | 56 |
57 |
58 | 59 |
:
60 | { 61 | loader &&
62 | 63 |
64 | 65 | } 66 |
67 |
68 |
69 | 70 | 71 | 72 | 75 | 78 | 81 | 84 | 87 | 90 | 93 | 96 | 97 | 98 | 99 | 100 | {BookingState?.map((data, i):any => { 101 | 102 | console.log(data); 103 | return ( 104 | 109 | ); 110 | })} 111 | 112 |
73 | # 74 | 76 | Title 77 | 79 | Price Category 80 | 82 | Booking Date 83 | 85 | Arrived Date 86 | 88 | Price 89 | 91 | Status 92 | 94 | info 95 |
113 |
114 |
115 |
116 |
117 | } 118 | 119 | 120 | 121 | 122 | ); 123 | } 124 | -------------------------------------------------------------------------------- /src/Components/ContactPage/Contact.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './Contact.css' 3 | import Navbar from '../Navbar/Navbar' 4 | import Footer from '../Landing_page/Footer/Footer'; 5 | import Chat from '../Landing_page/Chat/Chat' 6 | export default function Contact() { 7 | 8 | return ( 9 |
10 |
11 |
12 | 13 |
14 |
15 | Contacts 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 |

CONTACTS

24 |
25 |
26 |

Contact Us For More Information

27 |
28 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | 37 |
38 | 39 | 42 |
43 |
44 | 45 | 48 |
49 |
50 |
51 | 52 | 56 |
57 |
58 | 59 | 62 |
63 |
64 |
65 | 66 |
67 | 68 |
69 |
70 |
71 |
72 | 73 | 74 |
75 | 76 |
77 |
78 |
79 |
80 | 81 |
82 |
83 |
84 | ) 85 | } 86 | -------------------------------------------------------------------------------- /src/Components/Profile/Componet/PackageTableRows.tsx: -------------------------------------------------------------------------------- 1 | import React,{useState} from "react"; 2 | import { NavLink } from "react-router-dom"; 3 | import { FcInfo } from "react-icons/fc"; 4 | import Swal from "sweetalert2"; 5 | import { GiCancel } from "react-icons/gi"; 6 | import { bookingCancelApi } from "../../../Api/user/Profile/CancelApi"; 7 | import { useDispatch } from "react-redux"; 8 | import { resetDestinationShowData } from "../../../Redux/slice/bookingIvoice"; 9 | import { setBookingDetails } from "../../../Redux/slice/bookingDetailsSlice" 10 | import { toast } from "react-hot-toast"; 11 | function PackageTableRows({ data ,i }: any) { 12 | const dispatch = useDispatch(); 13 | const [check , setCheck] = useState([]) 14 | console.log(check); 15 | 16 | const handleCancel = async (id: string,userId:string) => { 17 | Swal.fire({ 18 | title: "Are you sure?", 19 | text: "This action cannot be undone", 20 | icon: "warning", 21 | showCancelButton: true, 22 | confirmButtonColor: "#3085d6", 23 | cancelButtonColor: "#d33", 24 | confirmButtonText: "Yes, do it!", 25 | cancelButtonText: "Cancel", 26 | }).then((result: any) => { 27 | if (result.isConfirmed) { 28 | try { 29 | console.log(userId+'-----------------'); 30 | 31 | bookingCancelApi(id,userId).then((res) => { 32 | 33 | if (res?.data.success) { 34 | // setCanceledClicked(true); 35 | console.log(res.data.bookingData); 36 | // setCheck(res.data.bookingData) 37 | 38 | 39 | dispatch(setBookingDetails(res.data.bookingData)) 40 | dispatch(resetDestinationShowData()); 41 | toast.success("Your Booking is Cancelled"); 42 | } 43 | }); 44 | } catch (error) { 45 | console.log(error); 46 | } 47 | } else if (result.dismiss === Swal.DismissReason.cancel) { 48 | 49 | } 50 | }); 51 | }; 52 | return ( 53 | <> 54 | 55 | 56 | {i + 1} 57 | 58 | 59 |
{data?.Title.slice(0, 15)}
60 |
{data?.Title}
61 | 62 | 63 | {data?.priceCate} 64 | 65 | 2/5/2023 66 | 4/5/2023 67 | {data?.SubTotal} 68 | 69 | {data?.BookingStatus === "Success" && ( 70 |
71 | Success 72 |
73 | )} 74 | {data?.BookingStatus === "Cancelled" && ( 75 |
76 | Cancelled 77 |
78 | )} 79 | {data.BookingStatus === "Processing" && ( 80 |
81 | processng 82 |
83 | )} 84 | 85 | 86 | {/* {!cancelClicked && ( */} 87 | <> 88 | 89 | 90 | {data.BookingStatus === "Success" ? ( 91 | 92 | 93 | 94 | ) : null} 95 | 96 | 97 | 98 | {data.BookingStatus === "Success" ? ( 99 |
100 | handleCancel(`${data._id}`,`${data.userDetails}`)} /> 101 |
102 | ) : null} 103 | 104 | 105 | {/* )} */} 106 | 107 | 108 | ); 109 | } 110 | 111 | export default PackageTableRows; 112 | --------------------------------------------------------------------------------