Fixes for group settings

This commit is contained in:
David Bomba 2023-08-08 17:14:24 +10:00
commit da52841698
3 changed files with 10 additions and 2 deletions

View File

@ -424,7 +424,7 @@ class BillingPortalPurchasev2 extends Component
$client_repo = new ClientRepository(new ClientContactRepository()); $client_repo = new ClientRepository(new ClientContactRepository());
$data = [ $data = [
'name' => '', 'name' => '',
'group_settings_id' => $this->encodePrimaryKey($this->subscription->group_id), 'group_settings_id' => $this->subscription->group_id,
'contacts' => [ 'contacts' => [
['email' => $this->email], ['email' => $this->email],
], ],

View File

@ -64,6 +64,9 @@ class PaymentMethod
if ($company_gateways || $company_gateways == '0') { if ($company_gateways || $company_gateways == '0') {
$transformed_ids = $this->transformKeys(explode(',', $company_gateways)); $transformed_ids = $this->transformKeys(explode(',', $company_gateways));
if($company_gateways == '0')
$transformed_ids = [];
$this->gateways = $this->client $this->gateways = $this->client
->company ->company
->company_gateways ->company_gateways
@ -93,6 +96,11 @@ class PaymentMethod
if ($company_gateways || $company_gateways == '0') { if ($company_gateways || $company_gateways == '0') {
$transformed_ids = $this->transformKeys(explode(',', $company_gateways)); $transformed_ids = $this->transformKeys(explode(',', $company_gateways));
if($company_gateways == '0') {
$transformed_ids = [];
}
$this->gateways = $this->client $this->gateways = $this->client
->company ->company
->company_gateways ->company_gateways

View File

@ -29,7 +29,7 @@
@yield('quote-not-approved-right-side') @yield('quote-not-approved-right-side')
<div class="inline-flex rounded-md shadow-sm"> <div class="inline-flex rounded-md shadow-sm">
<input type="hidden" name="action" value="payment"> <input type="hidden" name="action" value="approve">
<button onclick="setTimeout(() => this.disabled = true, 0); return true;" type="button" <button onclick="setTimeout(() => this.disabled = true, 0); return true;" type="button"
class="button button-primary bg-primary" class="button button-primary bg-primary"
id="approve-button">{{ ctrans('texts.approve') }}</button> id="approve-button">{{ ctrans('texts.approve') }}</button>