Skip to content

Commit

Permalink
Align canceled method name with Laravel model change
Browse files Browse the repository at this point in the history
  • Loading branch information
rudowastaken committed Sep 3, 2022
1 parent fb40bc0 commit 8fdbba8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"lint": "eslint resources/js --fix --ext js,vue"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.2.38",
"eslint": "^7.28.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-vue": "^7.11.1",
"laravel-mix": "^6.0",
"prettier": "^2.3.1",
"postcss": "^8.3.11",
"prettier": "^2.3.1",
"vue-loader": "^16.8.3"
},
"dependencies": {}
}
}
6 changes: 3 additions & 3 deletions resources/js/components/DatabaseDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
<display-row v-if="subscription" class="remove-bottom-border" label="Status">
<span v-if="subscription.on_grace_period"> On Grace Period </span>
<span
v-if="subscription.cancelled || subscription.ends_at"
v-if="subscription.canceled || subscription.ends_at"
class="ml-4 text-red-600 dark:text-red-400"
>
Cancelled
Canceled
</span>
<span
v-if="subscription.active && !subscription.cancelled && !subscription.ends_at"
v-if="subscription.active && !subscription.canceled && !subscription.ends_at"
class="text-green-600 dark:text-green-400"
>
Active
Expand Down
8 changes: 4 additions & 4 deletions resources/js/components/StripeDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@
<display-row v-if="subscription" label="Status">
<span v-if="subscription.on_grace_period">On Grace Period</span>
<span
v-if="subscription.cancelled || subscription.cancel_at_period_end"
v-if="subscription.canceled || subscription.cancel_at_period_end"
class="ml-4 text-red-600 dark:text-red-400"
>Cancelled</span
>Canceled</span
>
<span
v-if="
subscription.active && !subscription.cancelled && !subscription.cancel_at_period_end
subscription.active && !subscription.canceled && !subscription.cancel_at_period_end
"
class="text-green-600 dark:text-green-400"
>Active</span
>

<button
v-if="
subscription.active && !subscription.cancelled && !subscription.cancel_at_period_end
subscription.active && !subscription.canceled && !subscription.cancel_at_period_end
"
class="mt-2 ml-4 inline-flex h-9 flex-shrink-0 flex-shrink-0 items-center rounded bg-red-500 px-4 text-sm font-bold text-white shadow hover:bg-red-300 focus:outline-none focus:ring active:bg-red-600 dark:text-gray-800"
@click="$emit('cancel-subscription')"
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Subscription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default {
Nova.request()
.post(`${this.baseEndpoint}subscriptions/${this.databaseSubscription.id}/cancel`)
.then(() => {
Nova.success('Cancelled successfully!');
Nova.success('Canceled successfully!');
this.fetchDatabaseSubscription();
this.fetchStripeSubscription();
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/DatabaseSubscriptionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function formatSubscription(Subscription $subscription)
return array_merge($subscription->toArray(), [
'plan' => $subscription->stripe_price,
'ended' => $subscription->ended(),
'cancelled' => $subscription->cancelled(),
'canceled' => $subscription->canceled(),
'active' => $subscription->active(),
'on_trial' => $subscription->onTrial(),
'on_grace_period' => $subscription->onGracePeriod(),
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/StripeSubscriptionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function formatSubscription(Subscription $subscription)
'plan' => $subscription->stripe_plan,
'stripe_plan' => $stripeSubscription->plan->id,
'ended' => $subscription->ended(),
'cancelled' => $subscription->cancelled(),
'canceled' => $subscription->canceled(),
'active' => $subscription->active(),
'on_trial' => $subscription->onTrial(),
'on_grace_period' => $subscription->onGracePeriod(),
Expand Down

0 comments on commit 8fdbba8

Please sign in to comment.