-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: updates the status for orders #2955
Conversation
@uds5501 there will be a server side PR required just to make few changes -
Edit: Will be pushing server side code in few minutes. Till then can you please verify if you are able to place orders with this changes. |
app/controllers/orders/new.js
Outdated
} | ||
await order.save() | ||
.then(order => { | ||
if (order.status === 'placed') { | ||
if (order.status === 'pending' || order.status === 'placed') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyanshdwivedi If the order status is placed, ergo it was an order via bank cheques or something, why would we ask t fill payment details?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CosmicCoder96 I agree. It was present earlier. I'll update it :)
9f424df
to
6887b74
Compare
@CosmicCoder96 @pradeepgangwar I've updated the color scheme like we decided
Please review |
@CosmicCoder96 as corresponding server PR (fossasia/open-event-server#5926) is merged, can you please review this asap, otherwise the changes applied on server might break on local without these changes :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use ES6 getters insted of this.get
I don't see the colour schema change logic for making initializing state orders as yellow?
@shreyanshdwivedi
<div class="ui inverted mini statistic horizontal"> | ||
<div class="value"> | ||
Success | ||
{{#if (eq data.status 'completed')}} | ||
Success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translation helpers.
{{#if (eq data.status 'completed')}} | ||
Success | ||
{{else}} | ||
Placed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translation helpers.
<div class="ui inverted mini statistic horizontal"> | ||
<div class="value"> | ||
Placed | ||
Pending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translation helpers.
@CosmicCoder96 I've added missing translation helpers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added missing translation helpers.
Initializing is just an intermediate status. Once the form is submitted, the status is updated to either Pending, Placed or Completed.
What if I start an order, the timer starts, and then I close the tab. Then I login back and go to my tickets. The order will have a status?
Also if you didn't add any new getters yourself then leave them be, they are already being refactored by a different PR.
@CosmicCoder96 you're absolutely right. I just checked, the status is getting updated to initializing. Pushing the changes |
Yeah please change only the new ones.
…On Tue, 21 May 2019 at 5:27 PM, Shreyansh Dwivedi ***@***.***> wrote:
@CosmicCoder96 <https://github.com/CosmicCoder96> you're absolutely
right. I just checked, the status is getting updated to initializing.
Pushing the changes
Also, I've added 3 new getters. Should I update it or will it be covered
in the refactoring PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2955?email_source=notifications&email_token=AEDUDRME4B6OVRQTXAH5JATPWO577A5CNFSM4HN24HFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV3KDWQ#issuecomment-494313946>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEDUDRPYCNC3ZIISYJDDA7DPWO577ANCNFSM4HN24HFA>
.
|
@CosmicCoder96 I've pushed changes. BTW what I thought to be getters are not exactly getters. They all are something like - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix merge conflicts.
app/routes/orders/view.js
Outdated
@@ -3,7 +3,11 @@ import Route from '@ember/routing/route'; | |||
export default Route.extend({ | |||
titleToken(model) { | |||
var order = model.order.get('identifier'); | |||
return this.get('l10n').t(`Completed Order -${order}`); | |||
if (model.order.status === 'completed') { | |||
return this.get('l10n').t(`Completed Order -${order}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this.l10n.t(...)
app/routes/orders/view.js
Outdated
if (model.order.status === 'completed') { | ||
return this.get('l10n').t(`Completed Order -${order}`); | ||
} else if (model.order.status === 'placed') { | ||
return this.get('l10n').t(`Placed Order -${order}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this.l10n.t(...)
d307a0d
to
18ca97d
Compare
fixes route issues and few condition checks updates status of new orders changes to orders.view template for completed and placed orders Updates the color scheme of order status Adds missing translation helpers Update route and schema for initializing status use ES6 getters
18ca97d
to
a1934f6
Compare
@CosmicCoder96 I've fixed the merge conflicts. Please review |
@pradeepgangwar @ritikamotwani please review |
Fixes #2951
Short description of what this resolves:
Tickets that are unpaid are showing up as placed. Expected: Should show up as "Pending" and Expire after 3 days
Changes proposed in this pull request:
Placed
Pending
till payment is made.Completed Order

Placed Order

Pending Order

Expired Order

Checklist
development
branch.