Changeset 07f4e8b for frontend/src/Components/RestaurantEdit
- Timestamp:
- 01/24/24 17:42:28 (10 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- Location:
- frontend/src/Components/RestaurantEdit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/RestaurantEdit/MenuListing.js
r5528b99 r07f4e8b 6 6 import { AiOutlinePlusCircle } from "react-icons/ai" 7 7 import EditModal from "../Resources/EditModal"; 8 import AddImages from "../Resources/AddImages"; 8 9 9 10 const MenuListing = (props) => { … … 12 13 console.log(props.data) 13 14 return(<> 14 <a href="#" onClick={(e) => {e.preventDefault(); props.showModal(props.data); 15 console.log("kliknav")} } style={{textDecoration: "none", color:"black"}}> 15 <a href="#" style={{textDecoration: "none", color:"black"}}> 16 16 <Container className="py-3 px-1 my-4" 17 17 style={{ … … 23 23 <Row> 24 24 <Col className="d-flex justify-content-center"> 25 <Image 25 <Image onClick={(e) => { 26 e.preventDefault(); 27 props.showModal(props.data); 28 console.log("kliknav") 29 }} 26 30 src="https://www.tasteofhome.com/wp-content/uploads/2019/01/medium-rare-steak-shutterstock_706040446.jpg" 27 31 style={{ … … 37 41 <h6>{props.data.ingredients}</h6> 38 42 </Col> 43 <Col className="d-flex flex-column justify-content-center align-content-center"> 44 <AddImages type="menu" Id={props.data.menuId} /> 45 </Col> 39 46 40 47 <Col className="d-flex flex-column justify-content-center align-content-center"> -
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"> -
frontend/src/Components/RestaurantEdit/TableListing.js
r5528b99 r07f4e8b 41 41 42 42 <Col className="d-flex flex-column justify-content-center align-content-center"> 43 <AddAvailability type="table" table={props.data}/>43 <AddAvailability type="table" refresh={props.refresh} closeModal={props.handleClose} table={props.data}/> 44 44 </Col> 45 45
Note:
See TracChangeset
for help on using the changeset viewer.