Skip to content

Modular logistics and supply chain operating system (LSOS)

merged with latest changes for next release

Ronald A. Richardsond1d5b87c2189
diff --cc console/app/components/two-fa-enforcement-alert.hbs
index 00000000,5d70975c..6cb44d34
mode 000000,100644..100644
--- a/console/app/components/two-fa-enforcement-alert.hbs
+++ b/console/app/components/two-fa-enforcement-alert.hbs
@@@ -1,0 -1,15 +1,14 @@@
+ {{#if this.shouldRender}}
+ <InfoBlock @icon="triangle-exclamation" class="two-fa-enforcement-alert bg-yellow-100 border-2 border-yellow-600 dark:border-yellow-500 rounded-lg py-3.5 px-5">
+ <div class="flex flex-row justify-between">
+ <div class="flex-1 pr-2">
+ <p class="text-sm dark:text-yellow-900 mb-2">
- To enhance the security of your account, your organization requires Two-Factor Authentication (2FA). Enable 2FA in your account settings for an additional layer of
- protection.
++ {{t "component.two-fa-enforcement-alert.message"}}
+ </p>
+ </div>
+ <div class="flex-shrink-0">
- <Button id="two-fa-setup-button" @text="Setup 2FA" @icon="shield-halved" @type="warning" @buttonType="button" @onClick={{this.transitionToTwoFactorSettings}} />
++ <Button id="two-fa-setup-button" @text={{t "component.two-fa-enforcement-alert.button-text"}} @icon="shield-halved" @type="warning" @buttonType="button" @onClick={{this.transitionToTwoFactorSettings}} />
+ </div>
+ </div>
+ </InfoBlock>
+ {{/if}}
diff --cc console/app/controllers/auth/login.js
index 0b81846e,a5228544..23f90999
--- a/console/app/controllers/auth/login.js
+++ b/console/app/controllers/auth/login.js
@@@ -40,13 -40,13 +40,20 @@@ export default class AuthLoginControlle
*/
@service router;
+ /**
+ * Inject the `intl` service
+ *
+ * @var {Service}
+ */
+ @service intl;
+
+ /**
+ * Inject the `fetch` service
+ *
+ * @var {Service}
+ */
+ @service fetch;
+
/**
* Whether or not to remember the users session
*
@@@ -111,9 -108,18 +115,18 @@@
@action async login(event) {
// firefox patch
event.preventDefault();
-
// get user credentials
- const { email, password, rememberMe } = this;
+ const { identity, password, rememberMe } = this;
+
+ // If no password error
+ if (!identity) {
- return this.notifications.warning('Did you forget to enter your email?');
++ return this.notifications.warning(this.intl.t('auth.login.no-identity-notification'));
+ }
+
+ // If no password error
+ if (!password) {
- return this.notifications.warning('Did you forget to enter your password?');
++ return this.notifications.warning(this.intl.t('auth.login.no-identity-notification'));
+ }
// start loader
this.set('isLoading', true);
@@@ -152,6 -185,30 +192,30 @@@
});
}
+ /**
+ * Creates an email verification session and transitions user to verification route.
+ *
+ * @param {String} email
+ * @return {Promise<Transition>}
+ * @memberof AuthLoginController
+ */
+ sendUserForEmailVerification(email) {
+ return this.fetch.post('auth/create-verification-session', { email, send: true }).then(({ token }) => {
+ return this.session.store.persist({ email }).then(() => {
- this.notifications.warning('Your account needs to be verified to proceed.');
++ this.notifications.warning(this.intl.t('auth.login.unverified-notification'));
+ return this.router
+ .transitionTo('auth.verification', {
+ queryParams: {
+ token,
+ },
+ })
+ .then(() => {
+ this.reset('error');
+ });
+ });
+ });
+ }
+
/**
* Sets correct route to send user to after login.
*
diff --cc console/app/router.js
index c9ce8122,2ab65374..962833ee
--- a/console/app/router.js
+++ b/console/app/router.js
@@@ -43,28 -47,9 +47,29 @@@ Router.map(function ()
});
this.route('branding');
this.route('notifications');
+ this.route('two-fa-settings');
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'
+ });
});
this.route('install');
});
diff --cc console/app/templates/auth/login.hbs
index fc011a3a,7a43053f..764bb1a8
--- a/console/app/templates/auth/login.hbs
+++ b/console/app/templates/auth/login.hbs
@@@ -25,10 -26,30 +25,30 @@@
<input type="hidden" name="remember" value="true" />
<div class="rounded-md shadow-sm">
<div>
- <Input @value={{this.email}} aria-label={{t "auth.login.form.email-label"}} name="email" @type="email" autocomplete="username" required class="relative block w-full px-3 py-2 text-gray-900 placeholder-gray-500 border border-gray-300 rounded-none appearance-none rounded-t-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm sm:leading-5 dark:text-white dark:bg-gray-700 dark:border-gray-900" placeholder={{t "auth.login.form.email-label"}} disabled={{this.isLoading}} />
+ <Input
+ @value={{this.identity}}
- aria-label="Email or Phone Number"
++ aria-label={{t "auth.login.form.email-label"}}
+ name="email"
+ @type="email"
+ autocomplete="username"
+ required
+ class="relative block w-full px-3 py-2 text-gray-900 placeholder-gray-500 border border-gray-300 rounded-none appearance-none rounded-t-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm sm:leading-5 dark:text-white dark:bg-gray-700 dark:border-gray-900"
- placeholder="Email or Phone Number"
++ placeholder={{t "auth.login.form.email-label"}}
+ disabled={{this.isLoading}}
+ />
</div>
<div class="-mt-px">
- <Input @value={{this.password}} aria-label={{t "auth.login.form.password-label"}} name="password" @type="password" autocomplete="current-password" required class="relative block w-full px-3 py-2 text-gray-900 placeholder-gray-500 border border-gray-300 rounded-none appearance-none rounded-b-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm sm:leading-5 dark:text-white dark:bg-gray-700 dark:border-gray-900" placeholder={{t "auth.login.form.password-label"}} disabled={{this.isLoading}} />
+ <Input
+ @value={{this.password}}
- aria-label="Password"
++ aria-label={{t "auth.login.form.password-label"}}
+ name="password"
+ @type="password"
+ autocomplete="current-password"
+ required
+ class="relative block w-full px-3 py-2 text-gray-900 placeholder-gray-500 border border-gray-300 rounded-none appearance-none rounded-b-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm sm:leading-5 dark:text-white dark:bg-gray-700 dark:border-gray-900"
- placeholder="Password"
++ placeholder{{t "auth.login.form.password-label"}}
+ disabled={{this.isLoading}}
+ />
</div>
</div>
@@@ -41,8 -62,13 +61,13 @@@
</div>
<div class="text-sm leading-5">
- <a href="javascript:;" {{on "click" this.forgotPassword}} disabled={{this.isLoading}} class="font-medium transition duration-150 ease-in-out text-sky-600 hover:text-sky-500 focus:outline-none focus:underline">
+ <a
+ href="javascript:;"
+ {{on "click" this.forgotPassword}}
+ disabled={{this.isLoading}}
+ class="font-medium transition duration-150 ease-in-out text-sky-600 hover:text-sky-500 focus:outline-none focus:underline"
+ >
- Forgot your password?
+ {{t "auth.login.form.forgot-password-label"}}
</a>
</div>
</div>
diff --cc console/app/templates/console/account.hbs
index 299b03cc,bab2ebfe..540af9b2
--- a/console/app/templates/console/account.hbs
+++ b/console/app/templates/console/account.hbs
@@@ -1,7 -1,8 +1,8 @@@
{{page-title "Account"}}
<EmberWormhole @to="sidebar-menu-items">
- <Layout::Sidebar::Panel @open={{true}} @title="Account">
+ <Layout::Sidebar::Panel @open={{true}} @title={{t "common.account"}}>
<Layout::Sidebar::Item @route="console.account.index" @icon="user">Profile</Layout::Sidebar::Item>
+ <Layout::Sidebar::Item @route="console.account.auth" @icon="key">Auth</Layout::Sidebar::Item>
{{#each this.universe.accountMenuItems as |menuItem|}}
<Layout::Sidebar::Item @onClick={{fn this.universe.transitionMenuItem "console.account.virtual" menuItem}} @item={{menuItem}} @icon={{menuItem.icon}}>{{menuItem.title}}</Layout::Sidebar::Item>
{{/each}}
diff --cc console/app/templates/console/admin.hbs
index ddf03f7e,3e436953..e56afa40
--- a/console/app/templates/console/admin.hbs
+++ b/console/app/templates/console/admin.hbs
@@@ -1,9 -1,10 +1,10 @@@
{{page-title "Admin"}}
<EmberWormhole @to="sidebar-menu-items">
- <Layout::Sidebar::Item @route="console.admin.index" @icon="rectangle-list">Overview</Layout::Sidebar::Item>
- <Layout::Sidebar::Item @route="console.admin.branding" @icon="palette">Branding</Layout::Sidebar::Item>
- <Layout::Sidebar::Item @route="console.admin.notifications" @icon="bell">Notifications</Layout::Sidebar::Item>
- <Layout::Sidebar::Item @route="console.admin.two-fa-settings" @icon="shield">2FA Config</Layout::Sidebar::Item>
+ <Layout::Sidebar::Item @route="console.admin.index" @icon="rectangle-list">{{t "common.overview"}}</Layout::Sidebar::Item>
+ <Layout::Sidebar::Item @route="console.admin.branding" @icon="palette">{{t "common.branding"}}</Layout::Sidebar::Item>
+ <Layout::Sidebar::Item @route="console.admin.notifications" @icon="bell">{{t "common.notifications"}}</Layout::Sidebar::Item>
++ <Layout::Sidebar::Item @route="console.admin.two-fa-settings" @icon="shield">{{t "common.2fa-config"}}</Layout::Sidebar::Item>
{{#each this.universe.adminMenuItems as |menuItem|}}
<Layout::Sidebar::Item @onClick={{fn this.universe.transitionMenuItem "console.admin.virtual" menuItem}} @item={{menuItem}} @icon={{menuItem.icon}}>{{menuItem.title}}</Layout::Sidebar::Item>
{{/each}}
diff --cc console/app/templates/console/admin/branding.hbs
index aa205394,17a9b72d..47fc8852
--- a/console/app/templates/console/admin/branding.hbs
+++ b/console/app/templates/console/admin/branding.hbs
@@@ -1,18 -1,18 +1,18 @@@
--{{page-title "Branding"}}
-<Layout::Section::Header @title="Branding">
- <Button @type="primary" @size="sm" @icon="save" @text="Save Changes" @onClick={{this.save}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
++{{page-title (t "console.admin.branding.title")}}
+<Layout::Section::Header @title={{t "console.admin.branding.title"}}>
+ <Button @type="primary" @size="sm" @icon="save" @text={{t "common.save-button-text"}} @onClick={{this.save}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
</Layout::Section::Header>
<Layout::Section::Body class="overflow-y-scroll h-full">
<div class="container mx-auto h-screen" {{increase-height-by 300}}>
- <div class="max-w-3xl my-10 mx-auto space-y-">
+ <div class="max-w-3xl my-10 mx-auto space-y-6">
- <ContentPanel @title="Branding" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
+ <ContentPanel @title={{t "console.admin.branding.title"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
<form class="flex flex-col" {{on "submit" this.save}}>
<div class="input-group">
- <label>Icon</label>
+ <label>{{t "console.admin.branding.icon-text"}}</label>
<div class="flex flex-row items-center space-x-2">
<Image src={{@model.icon_url}} @fallbackSrc="/images/icon.png" alt={{t "app.name"}} width="32" height="32" class="w-8 h-8 shadow-sm" />
- <FileUpload @name="icon" @accept="image/*" @onFileAdded={{this.uploadIcon}} @labelClass="flex flex-row items-center justify-center mb-0i" as |queue|>
+ <FileUpload @name={{t "console.admin.branding.icon-text"}} @accept="image/*" @onFileAdded={{this.uploadIcon}} @labelClass="flex flex-row items-center justify-center mb-0i" as |queue|>
<a tabindex={{0}} class="flex items-center px-0 text-xs no-underline truncate btn btn-sm btn-default" disabled={{queue.files.length}}>
{{#if queue.files.length}}
<div class="mr-1.5">
diff --cc console/app/templates/console/settings.hbs
index 8506c822,f91e0a6d..60912342
--- a/console/app/templates/console/settings.hbs
+++ b/console/app/templates/console/settings.hbs
@@@ -1,9 -1,14 +1,14 @@@
--{{page-title "Settings"}}
++{{page-title (t "common.settings")}}
<EmberWormhole @to="sidebar-menu-items">
- <Layout::Sidebar::Panel @open={{true}} @title="Settings">
- <Layout::Sidebar::Item @route="console.settings.index" @icon="cog">Organization</Layout::Sidebar::Item>
- <Layout::Sidebar::Item @route="console.settings.two-fa" @icon="shield">Two Factor</Layout::Sidebar::Item>
+ <Layout::Sidebar::Panel @open={{true}} @title={{t "common.settings"}}>
+ <Layout::Sidebar::Item @route="console.settings.index" @icon="cog">{{t "common.organization"}}</Layout::Sidebar::Item>
++ <Layout::Sidebar::Item @route="console.settings.two-fa" @icon="shield-halved">{{t "common.two-factor"}}</Layout::Sidebar::Item>
{{#each this.universe.settingsMenuItems as |menuItem|}}
- <Layout::Sidebar::Item @onClick={{fn this.universe.transitionMenuItem "console.settings.virtual" menuItem}} @item={{menuItem}} @icon={{menuItem.icon}}>{{menuItem.title}}</Layout::Sidebar::Item>
+ <Layout::Sidebar::Item
+ @onClick={{fn this.universe.transitionMenuItem "console.settings.virtual" menuItem}}
+ @item={{menuItem}}
+ @icon={{menuItem.icon}}
+ >{{menuItem.title}}</Layout::Sidebar::Item>
{{/each}}
</Layout::Sidebar::Panel>
{{#each this.universe.settingsMenuPanels as |menuPanel|}}
diff --cc console/app/templates/onboard/verify-email.hbs
index d8f49b5c,f65cfd81..099cd1e3
--- a/console/app/templates/onboard/verify-email.hbs
+++ b/console/app/templates/onboard/verify-email.hbs
@@@ -1,8 -1,9 +1,9 @@@
+ {{page-title "Account Verification"}}
<div class="bg-white dark:bg-gray-800 py-8 px-4 shadow rounded-lg w-full">
<div class="mb-8">
-- <img class="mx-auto h-12 w-auto " src="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}}>
++ <img class="mx-auto h-12 w-auto" src="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}}>
<h2 class="mt-6 text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
- Verify your email address
+ {{t "onboard.verify-email.title"}}
</h2>
</div>
diff --cc console/translations/en-us.yaml
index 1559542e,ff071c6e..e7a5f299
--- a/console/translations/en-us.yaml
+++ b/console/translations/en-us.yaml
@@@ -1,186 -1,33 +1,199 @@@
app:
name: Fleetbase
-layout:
- header:
- menus:
- organization:
- settings: Organization settings
- create-or-join: Create or join organizations
- explore-extensions: Explore extensions
- user:
- view-profile: View profile
- keyboard-shortcuts: Show keyboard shortcuts
- changelog: Changelog
-
+ terms:
+ new: New
+ sort: Sort
+ filter: Filer
+ columns: Columns
+ settings: Settings
+ home: Home
+ admin: Admin
+ logout: Logout
+ dashboard: Dashboard
+ search: Search
+ search-input: Search Input
-
-common:
+common:
+ save-button-text: Save Changes
+ new: New
+ delete: Delete
+ sort: Sort
+ filter: Filer
+ columns: Columns
+ settings: Settings
+ home: Home
+ admin: Admin
+ logout: Logout
+ dashboard: Dashboard
search: Search
+ search-input: Search Input
+ uploading: Uploading...
+ profile: Profile
+ your-profile: Your Profile
+ name: Name
+ email: Email
+ phone: Your phone number
+ date-of-birth: Date of Birth
+ overview: Overview
+ account: Account
+ branding: Branding
+ notifications: Notifications
+ services: Services
+ mail: Mail
+ filesystem: Filesystem
+ queue: Queue
+ socket: Socket
+ notification-channels: Notification Channels
++ 2fa-config: 2FA Config
++ two-factor: Two Factor
++component:
++ two-fa-enforcement-alert:
++ message: To enhance the security of your account, your organization requires Two-Factor Authentication (2FA). Enable 2FA in your account settings for an additional layer of protection.
++ button-text: Setup 2FA
+auth:
+ forgot-password:
+ success-message: Check your email to continue!
+ is-sent:
+ title: Almost Done!
+ message: <strong>Check your email!</strong><br> We've sent you a magic link to your email which will allow you to reset your password. The link expires in 15 minutes.
+ not-sent:
+ title: Forgot your password?
+ message: <strong>Don't worry, we've got your back.</strong><br> Enter the email you use to login to {appName} and we will send you a secure link to reset your password.
+ form:
+ email-label: Your email address
+ submit-button: OK, Send me a magic link!
+ nevermind-button: Nevermind
+ login:
+ title: Sign in to your account
++ no-identity-notification: Did you forget to enter your email?
++ no-password-notification: Did you forget to enter your password?
++ unverified-notification: Your account needs to be verified to proceed.
+ failed-attempt:
+ message: <strong>Forgot your password?</strong><br> Click the button below to reset your password.
+ button-text: Ok, help me reset!
+ form:
+ email-label: Email address
+ password-label: Password
+ remember-me-label: Remember me
+ forgot-password-label: Forgot your password?
+ sign-in-button: Sign in
+ create-account-button: Create a new Account
+ slow-connection-message: Experiencing connectivity issues.
+ reset-password:
+ success-message: Your password has been reset! Login to continue.
+ title: Reset your password
+ form:
+ code:
+ label: Your reset code
+ help-text: The verification code you received in your email.
+ password:
+ label: New Password
+ help-text: Enter a password at-least 6 characters to continue.
+ confirm-password:
+ label: Confirm new Password
+ help-text: Enter a password at-least 6 characters to continue.
+ submit-button: Reset Password
+ back-button: Back
+console:
+ account:
+ index:
+ upload-new: Upload new
+ phone: Your phone number.
+ photos: photos
+ admin:
+ config:
+ database:
+ title: Database Configuration
+ filesystem:
+ title: Filesystem Configuration
+ mail:
+ title: Mail Configuration
+ notification-channels:
+ title: Notification Channels Configuration
+ queue:
+ title: Queue Configuration
+ services:
+ title: Services Configuration
+ socket:
+ title: Socket Configuration
+ branding:
+ title: Branding
+ icon-text: Icon
+ upload-new: Upload new
+ reset-default: Reset to default
+ logo-text: Logo
+ theme: Default Theme
+ index:
+ total-users: Total Users
+ total-organizations: Total Organizations
+ total-transactions: Total Transactions
+ notification:
+ title: Notifications
+ notification-settings: Notification Settings
+
+ settings:
+ index:
+ title: Organization Settings
+ organization-name: Organization name
+ organization-description: Organization description
+ organization-phone: Organization phone number
+ organization-currency: Organization currency
+ organization-id: Organization ID
+ organization-branding: Organization Branding
+ logo: Logo
+ logo-help-text: Logo for your organization.
+ upload-new-logo: Upload new logo
+ backdrop: Backdrop
+ backdrop-help-text: Optional banner or background image for your organization.
+ upload-new-backdrop: Upload new backdrop
+ extensions:
+ title: Extensions are coming soon!
+ message: Please check back in the upcoming versions as we prepare to launch the Extensions repository and marketplace.
+ notifications:
+ select-all:
+ mark-as-read:
-
-
-
+invite:
+ for-users:
+ invitation-message: You've been invited to join {companyName}
+ invitation-sent-message: You've been invited to join the {companyName} organization on {appName}. To accept this invitation, input your invitation code received by email and click continue.
+ invitation-code-sent-text: Your invitiation code
+ accept-invitation-text: Accept Invitation
+onboard:
+ index:
+ title: Create your account
+ welcome-title: <strong>Welcome to {companyName}!</strong><br />
+ welcome-text: Complete the details required below to get started.
+ fullname: Your full name.
+ email: Your email address.
+ phone: Your phone number.
+ organization-name: Your organization name, all your services and resources will be managed under this organization, later you can create as many organizations as you want or need.
+ password: Your password, make sure it's a good one.
+ confirm-password: Just to confirm the password you entered above.
+ continue-button: Continue
+ verify-email:
+ title: Verify your email address
+ message-text: <strong>Almost done!</strong><br> Check your email for a verification code.
+ verification-code-text: Enter the verification code you received via email.
+ verify-button-text: Verify & Continue
+ not-sent:
+ message: Didn't receive an email yet?
+ alternative-choice: Use alternaitve options below to verify your account.
+ resent-button-text: Resend Email
+ sms-button-text: Send by SMS
+install:
+ failed-message-sent: The install failed! Click the button below to retry the install.
+ retry-install: Retry Install
+ start-install: Start Install
+layout:
+ header:
+ menus:
+ organization:
+ settings: Organization settings
+ create-or-join: Create or join organizations
+ explore-extensions: Explore extensions
+ user:
+ view-profile: View profile
+ keyboard-shortcuts: Show keyboard shortcuts
+ changelog: Changelog
-
-
- phrases:
- search-input: Search Input
-
-