diff --git a/package.json b/package.json index 934cb11..f05270a 100755 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "chart.js": "^4.4.0", "cookie-es": "^1.0.0", "date-fns": "^3.0.6", - "export-from-json": "^1.7.3", + "export-from-json": "^1.7.4", "jwt-decode": "^3.1.2", "mapbox-gl": "2.15.0", "ofetch": "^1.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 992cb2a..fc00613 100755 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,8 +71,8 @@ dependencies: specifier: ^3.0.6 version: 3.0.6 export-from-json: - specifier: ^1.7.3 - version: 1.7.3 + specifier: ^1.7.4 + version: 1.7.4 jwt-decode: specifier: ^3.1.2 version: 3.1.2 @@ -4119,8 +4119,8 @@ packages: strip-final-newline: 3.0.0 dev: true - /export-from-json@1.7.3: - resolution: {integrity: sha512-Xg0L0saYz+CBz2MnaZvSEAHr17hWtHAfFWXw/frllG9t6aijuQukiU40ElOeM9nDTrtQPhLJMLN0q8lo897FYg==} + /export-from-json@1.7.4: + resolution: {integrity: sha512-FjmpluvZS2PTYyhkoMfQoyEJMfe2bfAyNpa5Apa6C9n7SWUWyJkG/VFnzERuj3q9Jjo3iwBjwVsDQ7Z7sczthA==} dev: false /external-editor@3.1.0: diff --git a/src/@core/initCore.ts b/src/@core/initCore.ts index 2cf2ecf..2b5d888 100755 --- a/src/@core/initCore.ts +++ b/src/@core/initCore.ts @@ -1,8 +1,10 @@ import { useStorage } from '@vueuse/core' +import flatpickr from 'flatpickr' +import { French } from 'flatpickr/dist/l10n/fr' import { useTheme } from 'vuetify' -import { useConfigStore } from '@core/stores/config' -import { cookieRef, namespaceConfig } from '@layouts/stores/config' import { themeConfig } from '@themeConfig' +import { cookieRef, namespaceConfig } from '@layouts/stores/config' +import { useConfigStore } from '@core/stores/config' const _syncAppRtl = () => { const configStore = useConfigStore() @@ -14,6 +16,15 @@ const _syncAppRtl = () => { if (locale.value !== storedLang.value && storedLang.value) locale.value = storedLang.value + if (locale.value === 'fr') { + if (flatpickr.l10ns.fr) + flatpickr.localize(French) + } + else { + if (flatpickr.l10ns.en) + flatpickr.localize(flatpickr.l10ns.en) + } + // watch and change lang attribute of html on language change watch( locale, @@ -25,6 +36,15 @@ const _syncAppRtl = () => { // Store selected language in cookie storedLang.value = val as string + if (storedLang.value === 'fr') { + if (flatpickr.l10ns.fr) + flatpickr.localize(flatpickr.l10ns.fr) + } + else { + if (flatpickr.l10ns.en) + flatpickr.localize(flatpickr.l10ns.en) + } + // set isAppRtl value based on selected language if (themeConfig.app.i18n.langConfig && themeConfig.app.i18n.langConfig.length) { themeConfig.app.i18n.langConfig.forEach(lang => { diff --git a/src/navigation/horizontal/index.ts b/src/navigation/horizontal/index.ts index 14f896c..8f84945 100755 --- a/src/navigation/horizontal/index.ts +++ b/src/navigation/horizontal/index.ts @@ -33,8 +33,8 @@ export default [ icon: { icon: 'tabler-database-star' }, children: [ { - title: 'Application Log', - to: { name: 'xadmin-application-log' }, + title: 'Logs', + to: { name: 'xadmin-log' }, icon: { icon: 'tabler-bug' }, }, ], diff --git a/src/navigation/vertical/index.ts b/src/navigation/vertical/index.ts index 14f896c..8f84945 100755 --- a/src/navigation/vertical/index.ts +++ b/src/navigation/vertical/index.ts @@ -33,8 +33,8 @@ export default [ icon: { icon: 'tabler-database-star' }, children: [ { - title: 'Application Log', - to: { name: 'xadmin-application-log' }, + title: 'Logs', + to: { name: 'xadmin-log' }, icon: { icon: 'tabler-bug' }, }, ], diff --git a/src/pages/store/list/index.vue b/src/pages/store/list/index.vue index 0738fee..077d095 100644 --- a/src/pages/store/list/index.vue +++ b/src/pages/store/list/index.vue @@ -125,9 +125,9 @@ const reloadStores = async () => { - + { - +
{ color="secondary" @click="isDialogVisible = false" > - Close + {{ $t("Close") }} - +
diff --git a/src/pages/xadmin/application/log/index.vue b/src/pages/xadmin/application/log/index.vue deleted file mode 100644 index 039379b..0000000 --- a/src/pages/xadmin/application/log/index.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - diff --git a/src/pages/xadmin/log/index.vue b/src/pages/xadmin/log/index.vue new file mode 100644 index 0000000..709f17f --- /dev/null +++ b/src/pages/xadmin/log/index.vue @@ -0,0 +1,485 @@ + + + diff --git a/src/plugins/i18n/locales/ar.json b/src/plugins/i18n/locales/ar.json index 8c8dd7c..ccfa2ba 100755 --- a/src/plugins/i18n/locales/ar.json +++ b/src/plugins/i18n/locales/ar.json @@ -56,7 +56,7 @@ "Minimum 5 characters long": "Minimum 5 characters long", "Filters": "Filters", "XADMIN": "XADMIN", - "Application Log": "Application Log", + "Logs": "Logs", "Level": "level", "loggerCategory": "loggerCategory", "Thread": "Thread", @@ -65,6 +65,10 @@ "Select date": "Select date", "ExcelData is empty, cannot export": "ExcelData is empty, cannot export", "Logs list": "Logs list", + "Business Date": "Business Date", + "Dates range error": "With a date range, a text of at least 5 characters must be specified", + "Close": "Close", + "Connect to invidual POS": "Connect to invidual POS", "---------------------------": "---------------------------", "UI Elements": "ุนู†ุงุตุฑ ูˆุงุฌู‡ุฉ ุงู„ู…ุณุชุฎุฏู…", "Forms & Tables": "ุงู„ู†ู…ุงุฐุฌ ูˆุงู„ุฌุฏุงูˆู„", diff --git a/src/plugins/i18n/locales/en.json b/src/plugins/i18n/locales/en.json index 826e964..d481257 100755 --- a/src/plugins/i18n/locales/en.json +++ b/src/plugins/i18n/locales/en.json @@ -56,7 +56,7 @@ "Minimum 5 characters long": "Minimum 5 characters long", "Filters": "Filters", "XADMIN": "XADMIN", - "Application Log": "Application Log", + "Logs": "Logs", "Level": "level", "loggerCategory": "loggerCategory", "Thread": "Thread", @@ -65,6 +65,10 @@ "Select date": "Select date", "ExcelData is empty, cannot export": "No data, cannot export", "Logs list": "Logs list", + "Business Date": "Business Date", + "Dates range error": "With a date range, a text of at least 5 characters must be specified", + "Close": "Close", + "Connect to invidual POS": "Connect to invidual POS", "---------------------------": "---------------------------", "UI Elements": "UI Elements", "Forms & Tables": "Forms & Tables", diff --git a/src/plugins/i18n/locales/fr.json b/src/plugins/i18n/locales/fr.json index 0be7fde..92ebe9d 100755 --- a/src/plugins/i18n/locales/fr.json +++ b/src/plugins/i18n/locales/fr.json @@ -56,7 +56,7 @@ "Minimum 5 characters long": "Minimum 5 caractรจres", "Filters": "Filtres", "XADMIN": "XADMIN", - "Application Log": "Application Log", + "Logs": "Logs", "Level": "Niveau", "loggerCategory": "Categorie log", "Thread": "Thread", @@ -65,6 +65,10 @@ "Select date": "Selectionner une date", "ExcelData is empty, cannot export": "Aucune donnรฉe, impossible d'exporter", "Logs list": "Liste des logs", + "Business Date": "Date ouverture", + "Dates range error": "Dans le cas d'une plage de dates, un texte d'au moins 5 caractรจres doit รชtre spรฉcifiรฉ.", + "Close": "Fermer", + "Connect to invidual POS": "Connexion ร  une caisse individuelle", "---------------------------": "---------------------------", "UI Elements": "ร‰Lร‰MENTS DE L'UI", "Forms & Tables": "Formulaires et tableaux", diff --git a/src/views/pages/store/view/StoreTabLog.vue b/src/views/pages/store/view/StoreTabLog.vue index 6ba6fff..534af72 100644 --- a/src/views/pages/store/view/StoreTabLog.vue +++ b/src/views/pages/store/view/StoreTabLog.vue @@ -1,7 +1,6 @@ + + +