Skip to content

Edit item #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function App() {

<Route path="/appointmentScheduler" element={<AppointmentScheduler/>}/>

<Route path="addFood" element={<AddFood/>}/>
<Route path="/addFood" element={<AddFood/>} />

</Routes>
</Router>
Expand Down
8 changes: 6 additions & 2 deletions client/src/components/Food.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import './Food.css'
import Tags from './Tags.js'
import edit_item from './../images/edit_item.png'
import pen from './../images/pen.svg'
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";


function Food(props) {
function editItem () {
Expand All @@ -25,13 +27,15 @@ function Food(props) {
</div>
</div>
<div className = "editIn">
{/* <Link to="/thankyou" state={{date: selectedDate.label, time: selectedTime.label}} onClick= {submitForm} className = "submit-button" style = {{textDecoration: 'none'}}>Submit</Link> */}
<div>
<button className="editButton" onClick={editItem}>
{/* <button className="editButton" onClick={editItem}> */}
<Link to="/addFood" state = {{name: props.name, tags: props.tags, inStock: true, image: props.image}} className = "editButton">
<img src={pen} className="penFormat" alt="pen"/>
<div className="editItem">
Edit Item
</div>
</button>
</Link>
</div>
<div style={{paddingLeft: "6%"}} className ="inStock">
<span style={{paddingRight: "11%"}}>In Stock</span>
Expand Down
148 changes: 137 additions & 11 deletions client/src/pages/AddFood.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@
border-radius: 10px 10px 10px 10px;
}

/* .save-item-button-container {
display: flex;
justify-content: center;
align-items: center;
width: 15vw;
height: 5.5vh;
margin-top: 43%;
margin-right: 27%;
border-radius: 40px;
color: white;
background-color: #264425;
font-size: 2.25vh;
font-weight: 800;
font-family: 'Montserrat';
} */

.save-item-button-container {
display: flex;
justify-content: center;
Expand All @@ -52,7 +68,73 @@
font-family: 'Montserrat';
}

.item-selections {
.save-item-button-container-2 {
display: flex;
justify-content: center;
align-items: center;
width: 15vw;
height: 5.5vh;
margin-top: 43%;
margin-left: -33%;
border-radius: 40px;
color: white;
background-color: #264425;
font-size: 2.25vh;
font-weight: 800;
font-family: 'Montserrat';
}

.delete-item-button-container {
display: flex;
justify-content: center;
align-items: center;
width: 15vw;
height: 5.5vh;
margin-top: 43%;
margin-left: -17%;
border-radius: 40px;
color: white;
background-color: #264425;
font-size: 2.25vh;
font-weight: 800;
font-family: 'Montserrat';
}

.delete-item-button-container {
display: flex;
justify-content: center;
align-items: center;
width: 15vw;
height: 5.5vh;
margin-top: 43%;
margin-right: 27%;
border-radius: 40px;
color: white;
background-color: #264425;
font-size: 2.25vh;
font-weight: 800;
font-family: 'Montserrat';

/* display: flex;
align-items: center;
margin-left: 1%;
justify-content: center;
width: 10vw;
height: 5.5vh;
border-radius: 20px;
border: #588157 solid 1px;
background-color: red;
color: #588157;
font-size: 2.25vh;
font-family: 'Montserrat'; */
}

.add-item-image-display {
display: flex;
justify-content: center;
}

.add-item-selections {
display: flex;
flex-direction: column;
align-items: center;
Expand All @@ -62,29 +144,30 @@

.upload-image {
display: flex;
justify-content: column;
justify-content: center;
flex-direction: column;
height: 80%;
width: 40%;
padding-left: 10%;
/* padding-left: 10%; */
font-family: "Montserrat";
font-size: 150%;
}

.stock-dropdown {
.add-item-stock-dropdown {
display: flex;
flex-direction: column;
align-items: flex-start;
padding-bottom: 2vh;
width: 30vw;
}

.categories-dropdown {
.add-item-categories-dropdown {
display: flex;
flex-direction: column;
align-items: flex-start;
padding-bottom: 2vh;
width: 30vw;

}

p#filterControlLabel {
Expand All @@ -105,14 +188,20 @@ p#filterControlLabel {
width: 30vw;
}

.item-name-textbox {
.add-item-button-container {
display: flex;
flex-direction: row;
background-color: blue;
}

.add-item-name-textbox {
width: 30vw;
height: 5vh;
border-radius: .5vw;
border: solid #ACB9AC;
}

label, input {
label.add-item-name-input, input {
display:flex;
flex-direction: column;
border-radius: 4px 4px 4px 4px;
Expand Down Expand Up @@ -146,7 +235,8 @@ label, input {
border-radius: 100px;
border: #264425 solid 1px;
margin-top: 8%;
margin-left: -10%;
margin-left: 20%;
/* margin-left: -10%; */
background-color: white;
}

Expand Down Expand Up @@ -189,13 +279,15 @@ label, input {

.right-side-container {
display: flex;
justify-content: center;
align-items: center;
height: 50vh;
width: 50vw;
flex-direction: column;
}

.upload-image-header {
margin-top: 2.5%;
display: flex;
justify-content: center;
font-weight: 450;
height: 5%;
font: 'inter';
Expand All @@ -207,8 +299,40 @@ label, input {
color:#B8B8B8;
margin-top: 2.5%;
font-weight: 300;
}

.addTagsFormat {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-content: left;
flex-wrap: wrap;
overflow-x: scroll;
}

.imgFormat {
display: flex;
justify-content: center;
height: 50px;
width: 50px;
}
.add-item-custom-dropdown {
/* overflow-x: auto;
overflow-y: hidden; */
display: flex;
flex-direction: row;
height: 20%;

/* overflow-x: scroll; */
/* overflow-y: hidden; */
/* flex-wrap: nowrap; */
/* justify-content: start; */
}

.app {
height: 40px;
overflow-x: scroll;
}

@media screen and (orientation: portrait) {
.add-food-component-container {
Expand Down Expand Up @@ -257,6 +381,9 @@ label, input {
width: 80vw;
font-weight: 600;
padding-top: 2vh;
/* display: inline-block;
white-space: nowrap;
text-overflow: ellipsis; */
}
.right-side-container {
display: flex;
Expand All @@ -276,5 +403,4 @@ label, input {
margin-top: 5%;
margin-left: 20%;
}

}
Loading