diff --git a/.vscode/settings.json b/.vscode/settings.json
index 59aa4abd3..ecc1d50d7 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -2,7 +2,7 @@
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": true,
"editor.formatOnSave": true,
- "editor.defaultFormatter": "johnsoncodehk.volar",
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
"json.schemas": [
@@ -11,9 +11,6 @@
"url": "https://on.cypress.io/cypress.schema.json"
}
],
- "[javascript]": {
- "editor.defaultFormatter": "vscode.typescript-language-features"
- },
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
diff --git a/quasar.config.js b/quasar.config.js
index 9aefa9fda..83a3abf3e 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -38,8 +38,9 @@ module.exports = configure(function (ctx) {
// 'line-awesome',
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
- 'roboto-font', // optional, you are not bound to it
- 'material-icons', // optional, you are not bound to it
+ 'roboto-font',
+ 'material-icons-outlined',
+ 'material-symbols-outlined',
],
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-build
diff --git a/src/App.vue b/src/App.vue
index f381d2576..9cdc1d791 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -19,6 +19,11 @@ quasar.iconMapFn = (iconName) => {
cls: `icon-${name}`,
};
}
+
+ return {
+ cls: 'material-symbols-outlined',
+ content: iconName,
+ };
};
function responseError(error) {
diff --git a/src/components/FavoriteModules.vue b/src/components/FavoriteModules.vue
deleted file mode 100644
index a2b9648dd..000000000
--- a/src/components/FavoriteModules.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
- Test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue
index 889c47868..4055b1312 100644
--- a/src/components/LeftMenu.vue
+++ b/src/components/LeftMenu.vue
@@ -1,15 +1,16 @@
-
- {{ t('globals.favoriteModules') }}
-
-
-
-
-
+
+
-
-
-
-
-
- {{ t(item.title) }}
-
-
- Pin this module to favorites
-
-
+
+
+
+ {{ t('components.leftMenu.removeFromPinned') }}
+
+
+ {{ t('components.leftMenu.addToPinned') }}
+
-
-
-
-
-
-
-
-
- {{ t(section.title) }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t(item.title) }}
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/components/LeftMenuItem.vue b/src/components/LeftMenuItem.vue
new file mode 100644
index 000000000..2713f434c
--- /dev/null
+++ b/src/components/LeftMenuItem.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+ {{ t(item.title) }}
+
+
diff --git a/src/components/LeftMenuItemGroup.vue b/src/components/LeftMenuItemGroup.vue
new file mode 100644
index 000000000..8305c2ec4
--- /dev/null
+++ b/src/components/LeftMenuItemGroup.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+ {{ t(item.title) }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
index ec407ace5..cb1283eb5 100644
--- a/src/components/Navbar.vue
+++ b/src/components/Navbar.vue
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
import { useState } from 'src/composables/useState';
import { useSession } from 'src/composables/useSession';
import UserPanel from 'components/UserPanel.vue';
-import FavoriteModules from './FavoriteModules.vue';
+import PinnedModules from './PinnedModules.vue';
const { t } = useI18n();
const session = useSession();
@@ -43,11 +43,11 @@ function onToggleDrawer() {
-
+
- {{ t('globals.favoriteModules') }}
+ {{ t('globals.pinnedModules') }}
-
+
diff --git a/src/components/PinnedModules.vue b/src/components/PinnedModules.vue
new file mode 100644
index 000000000..27767a248
--- /dev/null
+++ b/src/components/PinnedModules.vue
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+ {{ t(item.title) }}
+
+
+
+
+
+
+
diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue
index 6c061284d..c6264f07f 100644
--- a/src/components/UserPanel.vue
+++ b/src/components/UserPanel.vue
@@ -45,7 +45,7 @@ onMounted(async () => {
});
function updatePreferences() {
- if (user.value.darkMode) {
+ if (user.value.darkMode !== null) {
darkMode.value = user.value.darkMode;
}
if (user.value.lang) {
diff --git a/src/composables/useNavigation.js b/src/composables/useNavigation.js
deleted file mode 100644
index 3eaf32392..000000000
--- a/src/composables/useNavigation.js
+++ /dev/null
@@ -1,96 +0,0 @@
-// import routes from 'src/router/routes';
-// import { ref } from 'vue';
-import axios from 'axios';
-
-// const favorites = ref([]);
-//const modules = ref([]);
-
-// const mainRoute = routes.find((route) => route.path === '/');
-// const moduleRoutes = (mainRoute && mainRoute.children) || [];
-//
-// for (const route of moduleRoutes) {
-// const module = {
-// stateName: route.name,
-// name: route.name.toLowerCase(),
-// roles: [],
-// };
-//
-// if (route.meta) {
-// Object.assign(module, route.meta);
-// }
-//
-// if (route.children && route.children.length) {
-// const [moduleMain] = route.children;
-// const routes = moduleMain.children;
-//
-// module.children = routes.map((route) => {
-// const submodule = {
-// stateName: route.name,
-// name: route.name,
-// };
-//
-// Object.assign(submodule, route.meta);
-//
-// return submodule;
-// });
-// }
-// modules.value.push(module);
-// }
-
-export function useNavigation() {
- const modules = [
- 'customer',
- 'claim',
- 'ticket'
- ];
-
- // const salixModules = {
- // customer: 'Clients',
- // claim: 'Claims',
- // entry: 'Entries',
- // invoiceIn: 'Invoices In',
- // invoiceOut: 'Invoices Out',
- // item: 'Items',
- // monitor: 'Monitors',
- // order: 'Orders',
- // route: 'Routes',
- // supplier: 'Suppliers',
- // ticket: 'Tickets',
- // travel: 'Travels',
- // user: 'Users',
- // worker: 'Workers',
- // zone: 'Zones',
- // };
-
- // async function fetchFavorites() {
- // const response = await axios.get('StarredModules/getStarredModules');
- //
- // const filteredModules = modules.value.filter((module) => {
- // return response.data.find((element) => element.moduleFk == salixModules[module.name]);
- // });
- //
- // return (favorites.value = filteredModules);
- // }
- //
- async function togglePinned(moduleName, event) {
- if (event.defaultPrevented) return;
- event.preventDefault();
- event.stopPropagation();
-
- await axios.post('StarredModules/toggleStarredModule', { moduleName });
-
- // updateFavorites(moduleName);
- }
-
- // function updateFavorites(name) {
- // if (!favorites.value.find((module) => module.name == name)) {
- // const newStarreModule = modules.value.find((module) => module.name == name);
- // favorites.value.push(newStarreModule);
- // } else {
- // const moduleToRemove = favorites.value.find((module) => module.name == name);
- // favorites.value.splice(favorites.value.indexOf(moduleToRemove), 1);
- // }
- // }
-
- return { modules, togglePinned };
-}
diff --git a/src/filters/index.js b/src/filters/index.js
index 459087e8e..70b0edc82 100644
--- a/src/filters/index.js
+++ b/src/filters/index.js
@@ -2,9 +2,11 @@ import toLowerCase from './toLowerCase';
import toDate from './toDate';
import toCurrency from './toCurrency';
import toPercentage from './toPercentage';
+import toLowerCamel from './toLowerCamel';
export {
toLowerCase,
+ toLowerCamel,
toDate,
toCurrency,
toPercentage,
diff --git a/src/filters/toLowerCamel.js b/src/filters/toLowerCamel.js
new file mode 100644
index 000000000..ebfe28bc2
--- /dev/null
+++ b/src/filters/toLowerCamel.js
@@ -0,0 +1,5 @@
+export default function toLowerCamel(value) {
+ if (!value) return;
+ if (typeof (value) !== 'string') return value;
+ return value.charAt(0).toLowerCase() + value.slice(1);
+}
\ No newline at end of file
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index 88fae5bb7..31da55081 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -9,7 +9,7 @@ export default {
backToDashboard: 'Return to dashboard',
notifications: 'Notifications',
userPanel: 'User panel',
- favoriteModules: 'Favorite modules',
+ pinnedModules: 'Pinned modules',
darkMode: 'Dark mode',
logOut: 'Log out',
dataSaved: 'Data saved',
@@ -268,5 +268,9 @@ export default {
summary: 'Summary',
moreOptions: 'More options',
},
+ leftMenu: {
+ addToPinned: 'Add to pinned',
+ removeFromPinned: 'Remove from pinned',
+ },
},
};
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 0103b1a92..ce613b32a 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -9,7 +9,7 @@ export default {
backToDashboard: 'Volver al tablón',
notifications: 'Notificaciones',
userPanel: 'Panel de usuario',
- favoriteModules: 'Módulos favoritos',
+ pinnedModules: 'Módulos fijados',
darkMode: 'Modo oscuro',
logOut: 'Cerrar sesión',
dataSaved: 'Datos guardados',
@@ -267,5 +267,9 @@ export default {
summary: 'Resumen',
moreOptions: 'Más opciones',
},
+ leftMenu: {
+ addToPinned: 'Añadir a fijados',
+ removeFromPinned: 'Eliminar de fijados',
+ },
},
};
diff --git a/src/pages/Dashboard/Dashboard.vue b/src/pages/Dashboard/Dashboard.vue
index 4fe1a91cd..107e3fd3b 100644
--- a/src/pages/Dashboard/Dashboard.vue
+++ b/src/pages/Dashboard/Dashboard.vue
@@ -1,12 +1,19 @@
@@ -15,38 +22,34 @@ const state = useState();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
{{ t('globals.pinnedModules') }}
+
+
+
+
+ {{ t(item.title) }}
+
+
+
+
+
+
+
+