Skip to content

Commit

Permalink
fixing some issues with the offers and notifications about interest
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Magno Teles Zimerer committed Jan 5, 2019
1 parent cfc7c39 commit fe62e4c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ API_HOST="http://localhost:3000"
FACEBOOK_ID=123
FACEBOOK_SECRET=123

SENDGRID_API_KEY=
SENDGRID_USERNAME=
SENDGRID_PASSWORD=

GOOGLE_ID=123
GOOGLE_SECRET=123

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/translations/br.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"task.bounties.interested.input.amount": "Sugira uma recompensa para essa tarefa",
"task.bounties.interested.leaveItFor": "Ou deixe isso por",
"task.bounties.interested.iAmStarter": "Ou eu sou um iniciante e gostaria de ganhar experiência",
"task.bounties.interested.comment.value": "Você pode deixar um comentário",
"task.bounties.interested.comment.value": "Fale um pouco como você deseja realizar esta tarefa, um plano inicial e comente sobre seu interesse",
"task.bounties.interested.input.comment": "Eu realmente gostaria de explorar praticar minhas habilitadas de Node.Js nessa tarefa",
"task.bounties.actions.cancel": "Cancelar",
"task.bounties.actions.work": "Quero trabalhar nesta tarefa!",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
"task.bounties.interested.input.amount": "Price insert a value for this task",
"task.bounties.interested.leaveItFor": "Or leave it for",
"task.bounties.interested.iAmStarter": "Or I'm starter and I just want to gain experience",
"task.bounties.interested.comment.value": "You can leave a comment",
"task.bounties.interested.comment.value": "Tell about your interest in solve this task and any plan in mind",
"task.bounties.interested.input.comment": "I really would like to explore my Node.js experience on this",
"task.bounties.actions.cancel": "Cancel",
"task.bounties.actions.work": "I want to work on this task!",
Expand Down
5 changes: 4 additions & 1 deletion locales/br.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"mail.statement.yes": "Sim",
"mail.statement.no": "Não",
"mail.offer.nocomment": "Sem comentários",
"mail.payment.success.subject": "Um pagamento foi realizado por uma tarefa no Gitpay",
"mail.payment.success.content.main": "Você realizou um pagamento de $ {{value}} para a tarefa <a href=\"{{url}}\">{{url}}</a> e terá acesso ao recibo. Você pode atribuir essa tarefa a alguém que, por sua vez, enviará uma solução dentro do período que você definir",
"mail.payment.sign.thanks": "Obrigado",
Expand All @@ -11,7 +14,7 @@
"mail.assign.owner.subject": "Alguém demonstrou interesse por uma tarefa sua no Gitpay",
"mail.assign.owner.hello": "Olá",
"mail.assign.owner.main": "{{name}} está interessado na sua tarefa <a href=\"{{url}}\">{{url}}</a>. Você pode entrar em contato com ele pelo e-mail {{email}} para saber mais.",
"mail.assign.owner.suggest": "Recompensa sugerida: {{value}}, data sugerida: {{suggestedDate}}, para aprender: {{learn}}, comentários: {{comment}}",
"mail.assign.owner.suggest": "<p>Recompensa sugerida: ${{value}}</p><p>Data para entrega sugerida: {{suggestedDate}}</p><p>Quero esta tarefa como aprendizado: {{learn}}</p> <p>Comentários: {{comment}}</p>",
"mail.assign.owner.sec": "Você pode atribuir esta tarefa na aba 'INTERESSADOS'. Assim ele receberá o valor quando que a tarefa for concluída.",
"mail.interested.owner.subject": "Você demonstrou interesse em realizar uma tarefa no Gitpay",
"mail.interested.main": "Você demonstrou interesse em realizar a tarefa <a href=\"{{url}}\"</a> no Gitpay",
Expand Down
5 changes: 4 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"mail.statement.yes": "Yes",
"mail.statement.no": "No",
"mail.offer.nocomment": "No comments",
"mail.payment.success.subject": "You paid for a task on Gitpay",
"mail.payment.success.content.main": "You paid $ {{value}} for the task <a href=\"{{url}}\">{{url}}</a> on Gitpay. You are going to receive a receipt from the provider about this payment and you can assign this task to someone interested. He will send the solution until the date you defined.",
"mail.payment.sign.thanks": "Thanks",
Expand All @@ -11,7 +14,7 @@
"mail.assign.owner.subject": "Someone is interested in a task that you created on Gitpay",
"mail.assign.owner.hello": "Hello",
"mail.assign.owner.main": "{{name}} is interested in the task <a href=\"{{url}}\">{{url}}</a>. You can contact him on {{email}} to know more.",
"mail.assign.owner.suggest": "Suggested bounty: {{value}}, suggested date: {{suggestedDate}}, for learn: {{learn}}, comment: {{comment}}",
"mail.assign.owner.suggest": "<p>Suggested bounty: ${{value}}</p> <p>Suggested date: {{suggestedDate}}</p> <p>For learning purposes: {{learn}}</p><p>Comment: {{comment}}</p>",
"mail.assign.owner.sec": "You can assign this user for this task going in 'interested' tab and he will receive the bounty when the task is done.",
"mail.interested.owner.subject": "You're interested in this task",
"mail.interested.main": "You're interested to work in the task <a href=\"{{url}}\"</a> on Gitpay",
Expand Down
2 changes: 1 addition & 1 deletion modules/mail/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if (constants.canSendEmail) {
value: `
<p>${i18n.__('mail.assign.owner.hello')},</p>
<p>${i18n.__('mail.assign.owner.main', { email: interested.email, name: interested.name || interested.username, url: `${process.env.FRONTEND_HOST}/#/task/${task.id}` })}</p>
<p>${i18n.__('mail.assign.owner.suggest', { value: offer.value, suggestedDate: offer.suggestedDate, learn: offer.learn, comment: offer.comment })}</p>
<p>${i18n.__('mail.assign.owner.suggest', { value: offer.value, suggestedDate: offer.suggestedDate ? offer.suggestedDate : i18n.__('mail.assigned.nodate'), learn: offer.learn ? i18n.__('mail.statement.yes') : i18n.__('mail.statement.no'), comment: offer.comment ? offer.comment : i18n.__('mail.offer.nocomment') })}</p>
<p>${i18n.__('mail.assign.owner.sec')}</p>
<p>${Signatures.sign(language)}</p>`
},
Expand Down
2 changes: 1 addition & 1 deletion modules/tasks/taskUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const postCreateOrUpdateOffer = Promise.method((task, offer) => {
if (offer) {
return models.User.findOne({
where: {
id: task.dataValues.userId
id: offer.userId
}
}).then((user) => {
const usermail = user.dataValues.email
Expand Down

0 comments on commit fe62e4c

Please sign in to comment.