-
Notifications
You must be signed in to change notification settings - 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
Changes from 1 commit
fce9075
d03c3a3
3516c9f
979d63b
395d201
ea1792b
eaf1b1b
5924e2b
bd4add7
0f6e44f
ef61d61
18ffdbf
c3a1b68
9b9c048
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import Component from '@ember/component'; | ||
|
|
||
| export default Component.extend({ | ||
|
|
||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import Component from '@ember/component'; | ||
|
|
||
| export default Component.extend({ | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,8 +37,8 @@ export default Component.extend(FormMixin, { | |
| }), | ||
| sameAsBuyer: false, | ||
|
|
||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. The computed property should be observing everything you are using. Please pay more attention to detail There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe 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. |
||
| let orderExpiryTime = this.get('settings.orderExpiryTime'); | ||
| let willExpireAt = this.get('data.createdAt').add(orderExpiryTime, 'minutes'); | ||
| this.timer(willExpireAt, this.get('data.identifier')); | ||
| }), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <h3 class="ui header"> | ||
| {{t 'Order Expiry Time'}} | ||
| <div class="sub header"> | ||
| {{t 'Set registration time limit for your order'}} | ||
kushthedude marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </div> | ||
| </h3> | ||
| <div class="field"> | ||
| <label class="required">{{t 'REGISTRATION TIME LIMIT'}}</label> | ||
kushthedude marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <div class="{{unless device.isMobile 'two wide'}} field"> | ||
kushthedude marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {{input type='number' id='orderExpiryTime' name='order_expiry_time' value=settings.orderExpiryTime min="1" max="60" step="1"}} | ||
| </div> | ||
| </div> | ||
Uh oh!
There was an error while loading. Please reload this page.