Updated to remove stripe_connect_integration references

refs #10318
This commit is contained in:
Fabien O'Carroll 2020-06-30 11:50:43 +02:00
parent 1c886d56a1
commit 8ffcb9ee23
2 changed files with 3 additions and 20 deletions

View File

@ -55,7 +55,7 @@
<div class="flex justify-between">
<div>
<h4 class="gh-setting-title">Connect to Stripe</h4>
{{#if this.stripeConnectIntegration}}
{{#if this.stripeConnectAccountId}}
<p class="gh-setting-desc pa0 ma0">
{{#if this.stripeConnectSuccess}}
{{svg-jar "check-circle" class="stroke-green w4 h4 nudge-top--3"}} <span class="green-d1">Successfully connected to {{this.stripeConnectAccountName}}</span>
@ -77,7 +77,7 @@
{{/if}}
</div>
<div>
{{#if this.stripeConnectIntegration}}
{{#if this.stripeConnectAccountId}}
<button type="button" class="gh-btn" {{action "openDisconnectStripeModal"}}><span>Disconnect</span></button>
{{else}}
<button type="button" class="gh-btn" {{action (toggle "membersStripeOpen" this)}} data-test-toggle-membersstripe><span>{{if this.membersStripeOpen "Close" "Expand"}}</span></button>

View File

@ -55,26 +55,9 @@ export default Component.extend({
stripeDirectSecretKey: reads('settings.stripeSecretKey'),
stripeConnectAccountId: reads('settings.stripeConnectAccountId'),
stripeConnectAccountName: reads('settings.stripeConnectAccountName'),
stripeConnectAccountName: reads('settings.stripeConnectDisplayName'),
stripeConnectLivemode: reads('settings.stripeConnectLivemode'),
stripeConnectIntegration: computed('settings.stripeConnectIntegration', function () {
try {
const integration = JSON.parse(this.get('settings.stripeConnectIntegration'));
if (!integration || !integration.account_id) {
return null;
}
return {
id: integration.account_id,
name: integration.display_name,
livemode: integration.livemode
};
} catch (err) {
return null;
}
}),
selectedCurrency: computed('stripePlans.monthly.currency', function () {
return CURRENCIES.findBy('value', this.get('stripePlans.monthly.currency'));
}),