@@ -9,7 +9,6 @@ import SrcPage from "@/components/src-page"
99
1010function BookingsCustom ( ) {
1111 const { currency } = useFormatters ( )
12- const [ coupon , setCoupon ] = useState < any > ( null )
1312
1413 return ( < Page title = "Bookings CRUD (Custom Columns)" >
1514
@@ -22,6 +21,7 @@ function BookingsCustom() {
2221 < div className = "mt-4 flex flex-col " >
2322 < AutoQueryGrid
2423 type = "Booking"
24+ hide = { [ 'copyApiUrl' , 'downloadCsv' ] }
2525 selectedColumns = { [ 'id' , 'name' , 'cost' , 'bookingStartDate' , 'bookingEndDate' , 'roomNumber' , 'createdBy' , 'discount' ] }
2626 visibleFrom = { {
2727 name : 'xl' ,
@@ -39,21 +39,6 @@ function BookingsCustom() {
3939 ) ,
4040 createdBy : ( { createdBy } : any ) => (
4141 < span dangerouslySetInnerHTML = { { __html : createdBy } } />
42- ) ,
43- discount : ( { discount } : any ) => (
44- discount ? (
45- < TextLink
46- className = "flex items-end"
47- onClick = { ( e : React . MouseEvent ) => {
48- e . stopPropagation ( )
49- setCoupon ( discount )
50- } }
51- title = { discount . id }
52- >
53- < Icon className = "w-5 h-5 mr-1" type = "Coupon" />
54- < PreviewFormat value = { discount . description } />
55- </ TextLink >
56- ) : null
5742 )
5843 } }
5944 headerSlots = { {
@@ -70,15 +55,6 @@ function BookingsCustom() {
7055 } }
7156 />
7257
73- { coupon && (
74- < AutoEditForm
75- type = "UpdateCoupon"
76- value = { coupon }
77- onDone = { ( ) => setCoupon ( null ) }
78- onSave = { ( ) => setCoupon ( null ) }
79- />
80- ) }
81-
8258 < div className = "mt-4 text-center text-gray-400 flex justify-center -ml-6" >
8359 < SrcPage path = "bookings-custom/page.tsx" />
8460 </ div >
0 commit comments