diff --git a/jetset/src/components/Admin/ChangePasswordForm.js b/jetset/src/components/Admin/ChangePasswordForm.js new file mode 100644 index 0000000..6c504b5 --- /dev/null +++ b/jetset/src/components/Admin/ChangePasswordForm.js @@ -0,0 +1,67 @@ +import React, { useState } from "react"; +import axios from "axios"; + +const ChangePasswordForm = ({ touristId }) => { + const [oldPassword, setOldPassword] = useState(""); + const [newPassword, setNewPassword] = useState(""); + const [confirmPassword, setConfirmPassword] = useState(""); + const [message, setMessage] = useState(""); + + const handleChangePassword = async (e) => { + e.preventDefault(); + + if (newPassword !== confirmPassword) { + setMessage("New passwords do not match"); + return; + } + + try { + const response = await axios.put(`http://localhost:3000/cpAdmin/66fabf44cd7601258892778b`, { + oldPassword, + newPassword, + }); + setMessage(response.data.message); + } catch (error) { + setMessage(error.response?.data.message || "Error updating password"); + } + }; + + return ( +
{message}
} +No tags available to update, delete, or display.
)} + + + {/* Button to toggle ChangePasswordForm */} + + + {/* Conditionally render ChangePasswordForm */} + {showChangePasswordForm &&Loading categories...
} diff --git a/jetset/src/components/Advertiser/ChangePasswordForm.js b/jetset/src/components/Advertiser/ChangePasswordForm.js new file mode 100644 index 0000000..36cf69a --- /dev/null +++ b/jetset/src/components/Advertiser/ChangePasswordForm.js @@ -0,0 +1,67 @@ +import React, { useState } from "react"; +import axios from "axios"; + +const ChangePasswordForm = ({ touristId }) => { + const [oldPassword, setOldPassword] = useState(""); + const [newPassword, setNewPassword] = useState(""); + const [confirmPassword, setConfirmPassword] = useState(""); + const [message, setMessage] = useState(""); + + const handleChangePassword = async (e) => { + e.preventDefault(); + + if (newPassword !== confirmPassword) { + setMessage("New passwords do not match"); + return; + } + + try { + const response = await axios.put(`http://localhost:3000/cpAdvertiser/6701a2e8077eb6e57b56801f`, { + oldPassword, + newPassword, + }); + setMessage(response.data.message); + } catch (error) { + setMessage(error.response?.data.message || "Error updating password"); + } + }; + + return ( +{message}
} +{message}
} +You are accepted as a {role}!
+// +//You are accepted as a {role}!
- +Please read and accept the terms and conditions to proceed.
+
+ 1. Introduction
+ Welcome to JetSet! By using our website and services, you agree to these Terms and Conditions...
+ 1. Use of the Website
+Eligibility: You must be at least 18 years old to use our services. By accessing our site, you confirm that you are of legal age.
+Account Registration: Some features may require you to register an account. You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account.
+Accuracy of Information: You agree to provide accurate and complete information when registering or using any part of our site.
+
2. Services Offered
+Our website provides tools to plan virtual and real-world trips, including but not limited to itinerary building, virtual tours, trip bookings, and destination guides. Our services are for informational purposes and should be used at your own discretion.
+
+
3. User Responsibilities
+Compliance with Laws: You agree to comply with all applicable laws when using our website and services.
+Content Sharing: Any content shared on our site, such as reviews, photos, and travel stories, must be your original work and must not infringe on any third-party rights.
+Prohibited Activities: You agree not to use our services for any fraudulent, unlawful, or harmful activities.
+
4. Booking and Payment Terms
+Third-Party Providers: Our site may feature third-party service providers (e.g., hotels, airlines). We are not responsible for any issues or disputes arising from these third-party services.
+Payment Processing: Payments for any trip-related services may be processed by third-party payment systems. By using these services, you agree to their terms.
+Cancellations and Refunds: Please review the specific cancellation and refund policies for each booking. These policies vary depending on the provider and may be subject to fees.
+
5. Limitation of Liability
+No Guarantees: While we strive to offer accurate and reliable information, we make no guarantees regarding the completeness, accuracy, or availability of our services.
+Assumption of Risk: You agree that you are using our site at your own risk and that we are not liable for any losses, damages, or injuries resulting from the use of our services or the reliance on any information provided.
+
6. Privacy Policy
+Your privacy is important to us. Please review our Privacy Policy, which outlines how we collect, use, and protect your information.
+
+
7. Intellectual Property
+All content on this website, including text, images, graphics, and logos, is the property of JetSet and is protected by copyright and intellectual property laws. Unauthorized use of our content is prohibited.
+
+
8. Changes to the Terms
+We reserve the right to modify or update these Terms and Conditions at any time. Changes will be effective immediately upon posting. Your continued use of the site constitutes acceptance of the new terms.
+
+
9. Governing Law
+These Terms and Conditions are governed by the laws of Egypt, and any disputes will be resolved in the courts of Egypt.
+
+
10. Contact Us
+If you have any questions or concerns regarding these Terms and Conditions, please contact us at 12339.
+
+
By using our website and services, you acknowledge that you have read and agreed to these Terms and Conditions.
+
{message}
} +{message}
} +{message}
} +