- Timestamp:
- 01/24/24 17:42:28 (5 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/RestaurantEdit/RestaurantEditTab.js
r5528b99 r07f4e8b 10 10 import TableListing from "./TableListing"; 11 11 import EditModal from "../Resources/EditModal"; 12 import ReservationListing from "../HotelEdit/ReservationListing"; 13 import useGet from "../Hooks/useGet"; 12 14 13 15 function RestaurantEditTab(props) { … … 35 37 setActiveTab(eventKey); 36 38 }; 39 40 const { 41 data, 42 isLoading, 43 setData, 44 getData, 45 setChanged: dhanged 46 } = useGet(`/restaurant/${props.displayMenu.restaurantID}/reservations/active`) 37 47 38 48 console.log(props.displayMenu.restaurantID) … … 100 110 return <MenuListing key={menu.menuId} data={menu} showModal={showModal}/> 101 111 })} 102 {activeTab === '/hotel' && <EditModal show={show} handleClose={handleClose} type="menu" menu={modalData}></EditModal>}112 {activeTab === '/hotel' && <EditModal show={show} refresh={props.refresh} handleClose={handleClose} type="menu" menu={modalData}></EditModal>} 103 113 <AddNew Id={props.displayMenu.restaurantID} refresh={props.refresh} type="menu"/> 104 114 </Tab.Pane> 105 115 <Tab.Pane eventKey="/masi"> 106 116 {props.displayMenu.tables.map((table) => { 107 return <TableListing key={table.tableId} showModal={showModal} data={table}/>117 return <TableListing key={table.tableId} refresh={props.refresh} showModal={showModal} handleClose={handleClose} data={table}/> 108 118 })} 109 119 {activeTab === '/masi' && <EditModal show={show} handleClose={handleClose} refresh={props.refresh} type="table" … … 112 122 </Tab.Pane> 113 123 <Tab.Pane eventKey="/restaurant"> 114 <AddNew type="restaurant"/> 124 {!isLoading && data.map((res) => { 125 return ( 126 <ReservationListing type={'restaurant'} data={res}/> 127 ) 128 })} 115 129 </Tab.Pane> 116 130 <Tab.Pane eventKey="/transport">
Note:
See TracChangeset
for help on using the changeset viewer.