Skip to content

Modular logistics and supply chain operating system (LSOS)

fixed reset-password flow

TemuulenBMfdcd3bb805ef
diff --git a/console/app/router.js b/console/app/router.js
index 962833ee..3bcfb21e 100644
--- a/console/app/router.js
+++ b/console/app/router.js
@@ -10,7 +10,7 @@ Router.map(function () {
this.route('auth', function () {
this.route('login', { path: '/' });
this.route('forgot-password');
- this.route('reset-password');
+ this.route('reset-password', { path: '/reset-password/:id' });
this.route('two-fa');
this.route('verification');
});
@@ -51,24 +51,9 @@ Router.map(function () {
this.route('virtual', { path: '/:slug/:view' });
});
- this.mount('@fleetbase/dev-engine', {
- as: 'developers',
- path: 'developers'
- });
-
this.mount('@fleetbase/fleetops-engine', {
as: 'fleet-ops',
- path: 'fleet-ops'
- });
-
- this.mount('@fleetbase/iam-engine', {
- as: 'iam',
- path: 'iam'
- });
-
- this.mount('@fleetbase/storefront-engine', {
- as: 'storefront',
- path: 'storefront'
+ path: 'fleet-ops',
});
});
this.route('install');
diff --git a/console/app/routes/auth/reset-password.js b/console/app/routes/auth/reset-password.js
index 8f4cc220..42ca6523 100644
--- a/console/app/routes/auth/reset-password.js
+++ b/console/app/routes/auth/reset-password.js
@@ -4,7 +4,14 @@ import { inject as service } from '@ember/service';
export default class AuthResetPasswordRoute extends Route {
@service store;
- model() {
- return this.store.findRecord('brand', 1);
+ async model(params) {
+ return params;
+ }
+
+ async setupController(controller) {
+ super.setupController(...arguments);
+
+ // set brand to controller
+ this.brand = await this.store.findRecord('brand', 1);
}
}
diff --git a/console/app/templates/auth/reset-password.hbs b/console/app/templates/auth/reset-password.hbs
index bd3bf99c..b27f313d 100644
--- a/console/app/templates/auth/reset-password.hbs
+++ b/console/app/templates/auth/reset-password.hbs
@@ -1,6 +1,6 @@
<div class="bg-white dark:bg-gray-800 py-8 px-4 shadow rounded-lg">
<div class="mb-4">
- <Image src={{@model.logo_url}} @fallbackSrc="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}} width="160" height="56" class="w-40 h-14 mx-auto" />
+ <Image src={{this.brand.logo_url}} @fallbackSrc="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}} width="160" height="56" class="w-40 h-14 mx-auto" />
<h2 class="text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
{{t "auth.reset-password.title"}}
</h2>
diff --git a/console/router.map.js b/console/router.map.js
index 2ab65374..1f08753b 100644
--- a/console/router.map.js
+++ b/console/router.map.js
@@ -10,7 +10,7 @@ Router.map(function () {
this.route('auth', function () {
this.route('login', { path: '/' });
this.route('forgot-password');
- this.route('reset-password');
+ this.route('reset-password', { path: '/reset-password/:id' });
this.route('two-fa');
this.route('verification');
});