PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.17
Yatra – Travel Booking & Tour Operator Software v3.0.17
3.0.17 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 All 85 releases
← All changes | resources/js/pages/ViewEnquiry.tsx +10 -1 3.0.8 → 3.0.17 View file →
@@ -18,8 +18,9 @@
18 18 Send,
19 19 Loader2,
20 20 } from "lucide-react";
21 21 import { __ } from "../lib/i18n";
22 +import { toDateValue } from "../lib/dateFormat";
22 23 import { apiService } from "../lib/api-client";
23 24 import { usePermissions } from "../hooks/usePermissions";
24 25 import { Button } from "../components/ui/button";
25 26 import { PageHeader } from "../components/common/PageHeader";
@@ -104,9 +105,11 @@
104 105 },
105 106 });
106 107
107 108 const formatDate = (dateString: string) => {
108 - return new Date(dateString).toLocaleDateString("en-US", {
109 + // toDateValue: a date-only travel_date must not roll back a day in a
110 + // behind-UTC zone (datetime values like created_at pass through unchanged).
111 + return toDateValue(dateString).toLocaleDateString("en-US", {
109 112 weekday: "long",
110 113 year: "numeric",
111 114 month: "long",
112 115 day: "numeric",
@@ -129,8 +132,13 @@
129 132 className:
130 133 "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400",
131 134 label: __("Responded", "yatra"),
132 135 },
136 + completed: {
137 + className:
138 + "bg-teal-100 text-teal-700 dark:bg-teal-900/20 dark:text-teal-400",
139 + label: __("Completed", "yatra"),
140 + },
133 141 converted: {
134 142 className:
135 143 "bg-green-100 text-green-700 dark:bg-green-900/20 dark:text-green-400",
136 144 label: __("Converted", "yatra"),
@@ -301,8 +309,9 @@
301 309 </Button>
302 310 <ConditionalRender capability="yatra_respond_to_enquiries">
303 311 <div className="flex items-center gap-2">
304 312 {enquiry.status !== "responded" &&
313 + enquiry.status !== "completed" &&
305 314 enquiry.status !== "closed" && (
306 315 <Button
307 316 variant="outline"
308 317 onClick={handleRespond}