Skip to content

Commit

Permalink
Made submit and delete buttons a group
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhPhan8803 committed Dec 4, 2022
1 parent 252792f commit f76bbae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Binary file modified src/backend/database/database_prod.db
Binary file not shown.
21 changes: 9 additions & 12 deletions src/frontend/src/components/mainpageright/AddReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Button,
Radio,
Stack,
ButtonGroup,
} from '@mui/material';

interface Props {
Expand Down Expand Up @@ -46,7 +47,7 @@ export default function AddReview({
address: apt.address,
price_min: apt.price_min,
price_max: apt.price_max,
rating: apt.rating + 1,
rating: apt.rating + vote,
};
});
}
Expand Down Expand Up @@ -132,18 +133,14 @@ export default function AddReview({
label="Downvote"
/>
</RadioGroup>
<Button type="submit" variant="contained" onClick={add}>
Submit
</Button>
{hasReview === true && (
<Button
type="submit"
variant="contained"
onClick={deleteReview}
>
Delete
<ButtonGroup variant="contained">
<Button type="submit" onClick={add}>
Submit
</Button>
)}
{hasReview === true && (
<Button onClick={deleteReview}>Delete</Button>
)}
</ButtonGroup>
</Stack>
</FormControl>
</React.Fragment>
Expand Down

3 comments on commit f76bbae

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
app.py1490100%
auth.py90100%
config.py10100%
decorators.py270100%
dataholders
   apt.py90100%
   mainpage_get.py160100%
   review.py70100%
   user.py80100%
pages
   login.py290100%
   mainpage.py1150100%
   userpage.py530100%
TOTAL4230100%

Tests Skipped Failures Errors Time
51 0 💤 0 ❌ 0 🔥 0.883s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
app.py1490100%
auth.py90100%
config.py10100%
decorators.py270100%
dataholders
   apt.py90100%
   mainpage_get.py160100%
   review.py70100%
   user.py80100%
pages
   login.py290100%
   mainpage.py1150100%
   userpage.py530100%
TOTAL4230100%

Tests Skipped Failures Errors Time
51 0 💤 0 ❌ 0 🔥 1.161s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
app.py1490100%
auth.py90100%
config.py10100%
decorators.py270100%
dataholders
   apt.py90100%
   mainpage_get.py160100%
   review.py70100%
   user.py80100%
pages
   login.py290100%
   mainpage.py1150100%
   userpage.py530100%
TOTAL4230100%

Tests Skipped Failures Errors Time
51 0 💤 0 ❌ 0 🔥 1.043s ⏱️

Please sign in to comment.