-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: companies can now quick edit their offers
- Loading branch information
1 parent
0cab005
commit 9e433e6
Showing
7 changed files
with
525 additions
and
164 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/components/Company/Offers/Manage/CollapsedQuickOfferEdit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { useState } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Box, Button, Collapse, Typography } from "@material-ui/core"; | ||
import { KeyboardArrowDown, KeyboardArrowUp } from "@material-ui/icons"; | ||
import { QuickOfferEditForm } from "./QuickOfferEditForm"; | ||
|
||
const CollapsedQuickOfferEdit = ({ offerId, isMobile }) => { | ||
const [collapse, setCollapse] = useState(false); | ||
|
||
return isMobile ? ( | ||
<> | ||
<Box | ||
display="flex" | ||
alignSelf="center" | ||
alignItems="center" | ||
flexDirection="row" | ||
> | ||
<Typography align="center">Quick Edit Offer</Typography> | ||
<Button | ||
onClick={() => setCollapse(!collapse)} | ||
size="small" | ||
margin="dense" | ||
endIcon={collapse ? <KeyboardArrowUp /> : <KeyboardArrowDown />} | ||
/> | ||
</Box> | ||
<Collapse in={collapse}> | ||
<QuickOfferEditForm offerId={offerId} /> | ||
</Collapse> | ||
</> | ||
) : ( | ||
<QuickOfferEditForm offerId={offerId} showTitle={true} /> | ||
); | ||
}; | ||
|
||
CollapsedQuickOfferEdit.propTypes = { | ||
offerId: PropTypes.string.isRequired, | ||
isMobile: PropTypes.bool.isRequired, | ||
}; | ||
|
||
export default CollapsedQuickOfferEdit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.