user activity link to payments
This commit is contained in:
parent
53ed40bfc3
commit
8264930e92
|
@ -92,8 +92,13 @@ export default Ember.Controller.extend({
|
|||
bootbox.alert(result.error.message || result.error);
|
||||
} else {
|
||||
this.alert(`${type}.success`);
|
||||
|
||||
const success_route = this.planTypeIsSelected
|
||||
? "user.subscriptions"
|
||||
: "userActivity.payments";
|
||||
|
||||
this.transitionToRoute(
|
||||
"user.subscriptions",
|
||||
success_route,
|
||||
Discourse.User.current().username.toLowerCase()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
resource: "user.userActivity",
|
||||
map() {
|
||||
this.route("payments");
|
||||
}
|
||||
};
|
|
@ -0,0 +1,7 @@
|
|||
import Route from "@ember/routing/route";
|
||||
|
||||
export default Route.extend({
|
||||
model() {
|
||||
console.log(999);
|
||||
}
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
{{#link-to 'userActivity.payments'}}
|
||||
{{d-icon "credit-card"}} {{i18n 'discourse_subscriptions.navigation.user_activity.payments'}}
|
||||
{{/link-to}}
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
|
||||
PAYMENTS
|
|
@ -21,7 +21,8 @@ en:
|
|||
navigation:
|
||||
subscriptions: Subscriptions
|
||||
subscribe: Subscribe
|
||||
billing: Billing
|
||||
user_activity:
|
||||
payments: Payments
|
||||
plans:
|
||||
purchase: Purchase a subscription
|
||||
select: Select subscription plan
|
||||
|
|
|
@ -24,5 +24,6 @@ DiscourseSubscriptions::Engine.routes.draw do
|
|||
resources :products, only: [:index, :show]
|
||||
resources :subscriptions, only: [:create]
|
||||
|
||||
get '/' => 'patrons#index'
|
||||
get '/:id' => 'patrons#index'
|
||||
end
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import componentTest from "helpers/component-test";
|
||||
import EmberObject from "@ember/object";
|
||||
|
||||
moduleForComponent("payment-options", { integration: true });
|
||||
|
||||
|
|
Loading…
Reference in New Issue