Skip to content

Commit

Permalink
open existing offers
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanmtz committed Nov 25, 2024
1 parent e5d3cb5 commit c024b43
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
5 changes: 5 additions & 0 deletions frontend/src/components/profile/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ class Profile extends Component {
path='/profile/task/:id'
component={ (props) => <TaskContainer noTopBar noBottomBar { ...props } /> }
/>
<Route
exact
path='/profile/task/:id/offers'
component={ (props) => <TaskContainer noTopBar noBottomBar { ...props } /> }
/>
<Route
exact
path='/profile/task/:id/:slug'
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/task/offers/task-offer-drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect } from 'react';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import OfferDrawer, { type OfferDrawerProps } from '../../design-library/templates/offer-drawer/offer-drawer';
import OfferDrawer from '../../design-library/templates/offer-drawer/offer-drawer';
import { makeStyles, Typography, } from '@material-ui/core';
import TaskOrderInvoiceConfirm from '../task-order-invoice-confirm';
import MessageAssignment from '../assignment/messageAssignment';
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/components/task/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ import {
Close as CloseIcon,
ExpandLess,
ExpandMore,
BugReport as BugReportIcon,
AttachMoney as MoneyIcon,
HowToReg as HowToRegIcon,
CreditCard as BountyIcon,
Gavel as OfferIcon,
Redeem as RedeemIcon,
Delete as DeleteIcon,
AssignmentInd as AssignmentIcon,
EmojiFoodBeverage as CoffeeIcon,
} from '@material-ui/icons'

Expand All @@ -53,7 +50,6 @@ import TopBarContainer from '../../containers/topbar'
import Bottom from '../bottom/bottom'
import TaskPayment from './task-payment'
import LoginButton from '../session/login-button'
import TaskAssignment from './task-assignment'
import TaskSolve from './task-solve'
import TaskPaymentForm from './task-payment-form'
import TaskPayments from './task-payments'
Expand Down Expand Up @@ -442,6 +438,12 @@ class Task extends Component {
}
const assign_id = this.props.match.params.interested_id
const hash = this.props.location.hash
const isOfferPage = this.props.match.path === '/profile/task/:id/offers'

if(isOfferPage) {
this.setState({ assignDialog: true })
}

if(hash === '#task-solution-dialog') {
this.setState({ taskSolveDialog: true })

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default props => (
<Route exact path='/task/:id/:slug/interested' component={ TaskContainer } />
<Route exact path='/task/:id/interested/:interested_id' component={ TaskContainer } />
<Route exact path='/task/:id/members' component={ TaskContainer } />
<Route exact path='/task/:id/offers' component={ TaskContainer } />

<Route exact path='/task/:id/history' component={ TaskContainer } />
<Route exact path='/task/:id/claim' component={ TaskContainer } />
<Route exact path='/stats' component={ Stats } />
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"mail.assign.owner.main": "{{name}} is interested in working on the issue <a href=\"{{url}}\">{{title}}</a>.",
"mail.assign.owner.suggest": "<p>Suggested bounty: <strong>${{value}}</strong></p> <p>Suggested date: <strong>{{suggestedDate}}</strong></p> <p>For learning purposes: <strong>{{learn}}</strong></p><p>Comment: {{comment}}</p>",
"mail.assign.owner.sec": "You can accept or reject this proposal.",
"mail.assign.owner.button.primary": "Accept work and assign them to this issue",
"mail.assign.owner.button.primary": "Check offer",
"mail.messageInterested.subject": "You received a message about an issue you're interested in on Gitpay",
"mail.messageInterested.intro": "{{name}} wrote about the issue <a href=\"{{url}}\">{{title}}</a> you're interested in on Gitpay:",
"mail.messageInterested.message": "{{message}}",
Expand Down
6 changes: 1 addition & 5 deletions modules/mail/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ if (constants.canSendEmail) {
<p>${i18n.__('mail.assign.owner.sec')}</p>
${Signatures.buttons(language, {
primary: {
label: 'mail.assign.owner.button.primary',
label: 'mail.assign.owner.button.offer',
title: task.title,
url: `${process.env.FRONTEND_HOST}/#/task/${task.id}/offers`
},
secondary: {
label: 'mail.assign.owner.button.secondary',
url: `${process.env.FRONTEND_HOST}/#/task/${task.id}/interested`
}
})}`)
},
Expand Down

0 comments on commit c024b43

Please sign in to comment.