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/ViewCustomer.tsx +9 -3 3.0.4 → 3.0.16 View file →
@@ -32,8 +32,9 @@
32 32 CardHeader,
33 33 CardTitle,
34 34 } from "../components/ui/card";
35 35 import { ConditionalRender } from "../components/ui/conditional-render";
36 +import { CustomerSummaryCard } from "../components/ai/CustomerSummaryCard";
36 37 import {
37 38 Table,
38 39 TableBody,
39 40 TableCell,
@@ -132,9 +133,9 @@
132 133 emergency.relationship ??
133 134 null,
134 135 } as Customer;
135 136 },
136 - enabled: !!customerId && can("yatra_view_bookings"),
137 + enabled: !!customerId && can("yatra_view_customers"),
137 138 });
138 139
139 140 // Fetch customer bookings
140 141 const { data: bookings, isLoading: isLoadingBookings } = useQuery<Booking[]>({
@@ -398,9 +399,9 @@
398 399 title={__("Customer Details", "yatra")}
399 400 description={__("View complete customer information", "yatra")}
400 401 actions={
401 402 <div className="flex gap-2">
402 - <ConditionalRender capability="yatra_edit_bookings">
403 + <ConditionalRender capability="yatra_edit_customers">
403 404 <Button onClick={handleEdit} className="flex items-center gap-2">
404 405 <Edit className="w-4 h-4" />
405 406 {__("Edit Customer", "yatra")}
406 407 </Button>
@@ -416,12 +417,17 @@
416 417 </div>
417 418 }
418 419 />
419 420
420 - <ConditionalRender capability="yatra_view_bookings">
421 + <ConditionalRender capability="yatra_view_customers">
421 422 <div className="grid grid-cols-1 lg:grid-cols-3 gap-3">
422 423 {/* Main Content */}
423 424 <div className="lg:col-span-2 space-y-3">
425 + {/* AI Customer Summary — operator-triggered 3-line
426 + snapshot. Self-gates on AI eligibility + module
427 + state, so renders nothing in non-eligible tiers. */}
428 + {customer?.id && <CustomerSummaryCard customerId={customer.id} />}
429 +
424 430 {/* Customer Overview */}
425 431 <Card>
426 432 <CardHeader className="pb-2">
427 433 <div className="flex items-center justify-between">