diff --git a/common/app/routes/Jobs/components/GoToPayPal.jsx b/common/app/routes/Jobs/components/GoToPayPal.jsx index cba6075c81..8455f3fc47 100644 --- a/common/app/routes/Jobs/components/GoToPayPal.jsx +++ b/common/app/routes/Jobs/components/GoToPayPal.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { Button, Col, Panel, Row } from 'react-bootstrap'; +import { Button, Col, Panel, Row, Well } from 'react-bootstrap'; import { contain } from 'thundercats-react'; const paypalIds = { @@ -9,26 +9,17 @@ const paypalIds = { highlightedDiscount: 'QGWTUZ9XEE6EL' }; -function getPaypalButton(isHighlighted, isNonprofit) { - if (isHighlighted) { - return isNonprofit ? paypalIds.highlightedDiscount : paypalIds.highlighted; - } - return isNonprofit ? paypalIds.regularDiscount : paypalIds.regular; -} - -function getPrice(isHighlighted, isNonprofit) { - if (isHighlighted) { - return isNonprofit ? 150 : 250; - } - return isNonprofit ? 100 : 200; -} - export default contain( { store: 'JobsStore', actions: 'JobActions', - map({ job: { id, isHighlighted } = {} }) { - return { id, isHighlighted }; + map({ + job: { id, isHighlighted } = {}, + buttonId = paypalIds.regular, + price = 200, + discountAmount = 0 + }) { + return { id, isHighlighted, buttonId, price, discountAmount }; } }, React.createClass({ @@ -36,11 +27,12 @@ export default contain( propTypes: { id: PropTypes.string, - isHighlighted: PropTypes.bool + isHighlighted: PropTypes.bool, + buttonId: PropTypes.string }, render() { - const { id, isHighlighted } = this.props; + const { id, isHighlighted, buttonId, price, discountAmount } = this.props; return (
@@ -63,13 +55,42 @@ export default contain( Clicking on the link below will redirect to paypal. - - - { getPrice(isHighlighted, true) } - - +
+ + + +

Job Posting

+ + +

+{ price }

+ +
+ + +

Discount

+ + +

-{ discountAmount }

+ +
+ + +

Total

+ + +

${ price - discountAmount }

+ +
+
+ value={ buttonId } />