PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | resources/js/pages/BookingForm.tsx +9 -4 3.0.13 → 3.0.16 View file →
@@ -180,13 +180,15 @@
180 180 document.addEventListener("mousedown", handleClickOutside);
181 181 return () => document.removeEventListener("mousedown", handleClickOutside);
182 182 }, []);
183 183
184 - // Fetch booking form configuration
184 + // Fetch booking form configuration, resolved for the selected trip so a
185 + // per-trip form version (Pro conditions) shows the right fields here too.
186 + const selectedTripId = formData.trip_id ? Number(formData.trip_id) : null;
185 187 const { data: formConfig } = useQuery<BookingFormConfig>({
186 - queryKey: ["booking-form-config"],
188 + queryKey: ["booking-form-config", selectedTripId],
187 189 queryFn: async () => {
188 - const response = await apiService.getSettings();
190 + const response = await apiService.getBookingFormConfig(selectedTripId);
189 191 return (
190 192 response?.data?.booking_form_config ||
191 193 response?.booking_form_config ||
192 194 null
@@ -1633,9 +1635,12 @@
1633 1635 placeholder={
1634 1636 field.placeholder ||
1635 1637 __("Select Country", "yatra")
1636 1638 }
1637 - searchPlaceholder={__("Search country", "yatra")}
1639 + searchPlaceholder={__(
1640 + "Search country",
1641 + "yatra",
1642 + )}
1638 1643 />
1639 1644 ) : field.type === "textarea" ? (
1640 1645 <textarea
1641 1646 id={`emergency-${field.id}`}