Added loading state for member subscription details

no issue
This commit is contained in:
Rish 2019-10-07 17:56:32 +05:30
parent 7313b9145f
commit 58e11f7b33
3 changed files with 84 additions and 72 deletions

View File

@ -38,10 +38,12 @@ export default Controller.extend({
},
fetchMember: task(function* (memberId) {
this.set('isLoading', true);
yield this.store.findRecord('member', memberId, {
reload: true
}).then((data) => {
this.set('member', data);
this.set('isLoading', false);
});
})

View File

@ -47,6 +47,14 @@
</div>
<h4 class="midlightgrey f-small fw5 ttu mt12">Stripe info</h4>
{{#if isLoading}}
<div class="pa20 br4 shadow-1 bg-grouped-table mt2">
<div class="flex justify-center flex-auto">
<div class="gh-loading-spinner"> </div>
</div>
</div>
{{else}}
{{#if subscriptions}}
<div class="br4 shadow-1 bg-grouped-table mt2">
{{#if hasMultipleSubscriptions}}
@ -123,3 +131,4 @@
<p class="ma0 pa0 tc midgrey">Member doesn't have Stripe subscription</p>
</div>
{{/if}}
{{/if}}

View File

@ -27,6 +27,7 @@
</div>
{{gh-member-settings-form member=member
setProperty=(action "setProperty")
isLoading=this.isLoading
showDeleteTagModal=(action "toggleDeleteTagModal")}}
</form>
<button