-
Couldn't load subscription status.
- Fork 1.8k
enh: Moving Order_Expiry_Time into Admin/Settings #3228
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
Conversation
app/templates/components/forms/admin/settings/system/order-expiry-form.hbs
Outdated
Show resolved
Hide resolved
app/templates/components/forms/admin/settings/system/order-expiry-form.hbs
Outdated
Show resolved
Hide resolved
app/templates/components/forms/admin/settings/system/order-expiry-form.hbs
Outdated
Show resolved
Hide resolved
app/components/forms/admin/settings/system/order-expiry-form.js
Outdated
Show resolved
Hide resolved
|
@niranjan94 @CosmicCoder96 Please Review ! |
|
|
||
| getRemainingTime: computed('data', function() { | ||
| let orderExpiryTime = this.get('data.event.orderExpiryTime'); | ||
| getRemainingTime: computed('settings', function() { |
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.
The computed property should be observing everything you are using. settings.orderExpiryTime, data.createdAt and data.identifier.
Please pay more attention to detail
|
|
||
| getRemainingTime: computed('data', function() { | ||
| let orderExpiryTime = this.get('data.event.orderExpiryTime'); | ||
| getRemainingTime: computed('settings', function() { |
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.
And what is this computer property returning ? I see no return statement at all.
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.
@niranjan94 , Same but it was implemented earlier this way, It's just used to calculate remaining time and this calls timer in it to calculate, But still no return it has
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.
@niranjan94 I tried to return getRemaining but alas it was of no use due to the re-rendering of a rendered value, That's why I think this.set is used to overcome this challenge
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.
This is very incorrect usage of a computed property. And a computed property should also never be reset by something else. Please refactor this correctly.
|
|
||
| getRemainingTime: computed('data', function() { | ||
| let orderExpiryTime = this.get('data.event.orderExpiryTime'); | ||
| getRemainingTime: computed('settings', function() { |
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.
This is very incorrect usage of a computed property. And a computed property should also never be reset by something else. Please refactor this correctly.
|
@kushthedude any update on this? |
|
I don't know what went wrong, All of my opened PR's are orphan, Will open a new one with a response to it |
Closed in favour of #3283 |
Fixes #3161
Short description of what this resolves:
Order_Expiry_TimeintoAdmin DashboardChecklist
developmentbranch.