forked from verdnatura/hedera-web
Resolve conflicts and simplyfy localeDates
This commit is contained in:
commit
dedb8a73a5
3
.npmrc
3
.npmrc
|
@ -1,3 +0,0 @@
|
|||
# pnpm-related options
|
||||
shamefully-hoist=true
|
||||
strict-peer-dependencies=false
|
|
@ -15,9 +15,10 @@ Launch application for development.
|
|||
$ quasar dev
|
||||
```
|
||||
|
||||
Launch project backend.
|
||||
Launch Salix backend.
|
||||
|
||||
```
|
||||
|
||||
pnpm run back
|
||||
```
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web-back",
|
||||
"version": "24.50.12",
|
||||
"version": "24.50.14",
|
||||
"description": "Verdnatura web page backend",
|
||||
"license": "GPL-3.0",
|
||||
"author": "Verdnatura Levante SL"
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
const { defineConfig } = require('cypress');
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:8080/',
|
||||
supportFile: 'src/test/cypress/support/index.js',
|
||||
fixturesFolder: 'src/test/cypress/fixtures',
|
||||
specPattern: 'src/test/cypress/integration/**/*.spec.js',
|
||||
viewportHeight: 660,
|
||||
viewportWidth: 1240,
|
||||
experimentalMemoryManagement: true,
|
||||
numTestsKeptInMemory: 0,
|
||||
video: false,
|
||||
screenshotOnRunFailure: false,
|
||||
reporter: 'cypress-mochawesome-reporter',
|
||||
reporterOptions: {
|
||||
charts: true,
|
||||
reportPageTitle: 'Hedera-Web E2E Reporter',
|
||||
embeddedScreenshots: true,
|
||||
reportDir: 'src/test/cypress/reports',
|
||||
inlineAssets: true
|
||||
},
|
||||
setupNodeEvents(on, config) {
|
||||
require('cypress-mochawesome-reporter/plugin')(on);
|
||||
on('after:spec', (spec, results) => {
|
||||
console.log('Finished running', spec.relative);
|
||||
console.log('❌spec:', results.stats.failures);
|
||||
console.log('✅spec:', results.stats.passes);
|
||||
});
|
||||
}
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:8080/',
|
||||
supportFile: 'src/test/cypress/support/index.js',
|
||||
fixturesFolder: 'src/test/cypress/fixtures',
|
||||
specPattern: 'src/test/cypress/integration/**/*.spec.js',
|
||||
viewportHeight: 660,
|
||||
viewportWidth: 1240,
|
||||
experimentalMemoryManagement: true,
|
||||
numTestsKeptInMemory: 0,
|
||||
video: false,
|
||||
screenshotOnRunFailure: false,
|
||||
reporter: 'cypress-mochawesome-reporter',
|
||||
reporterOptions: {
|
||||
charts: true,
|
||||
reportPageTitle: 'Hedera-Web E2E Reporter',
|
||||
embeddedScreenshots: true,
|
||||
reportDir: 'src/test/cypress/reports',
|
||||
inlineAssets: true
|
||||
},
|
||||
setupNodeEvents (on, config) {
|
||||
require('cypress-mochawesome-reporter/plugin')(on);
|
||||
on('after:spec', (spec, results) => {
|
||||
console.log('Finished running', spec.relative);
|
||||
console.log('❌spec:', results.stats.failures);
|
||||
console.log('✅spec:', results.stats.passes);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hedera-web (24.50.12) stable; urgency=low
|
||||
hedera-web (24.50.14) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -8,6 +8,5 @@ back/rest usr/share/hedera-web/back
|
|||
back/package.json usr/share/hedera-web/back
|
||||
dist/spa/* usr/share/hedera-web/spa
|
||||
build-deps/node_modules usr/share/hedera-web/spa
|
||||
utils usr/share/hedera-web
|
||||
back/utils usr/share/hedera-web
|
||||
README.md usr/share/hedera-web
|
||||
doc/* usr/share/doc/hedera-web
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
usr/share/hedera-web/hedera-web.php usr/bin/hedera-web.php
|
||||
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
|
||||
etc/hedera-web/php.ini etc/php/7.0/apache2/conf.d/99-hedera-web.ini
|
||||
usr/share/hedera-web/back/hedera-web.php usr/bin/hedera-web.php
|
||||
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
|
||||
etc/hedera-web/php.ini etc/php/7.0/apache2/conf.d/99-hedera-web.ini
|
||||
|
|
85
import.js
85
import.js
|
@ -1,85 +0,0 @@
|
|||
export const locales = {
|
||||
ca: cb => require([],
|
||||
() => cb(require.context('js', true, /locale\/ca.yml$/))),
|
||||
es: cb => require([],
|
||||
() => cb(require.context('js', true, /locale\/es.yml$/))),
|
||||
fr: cb => require([],
|
||||
() => cb(require.context('js', true, /locale\/fr.yml$/))),
|
||||
mn: cb => require([],
|
||||
() => cb(require.context('js', true, /locale\/mn.yml$/))),
|
||||
pt: cb => require([],
|
||||
() => cb(require.context('js', true, /locale\/pt.yml$/)))
|
||||
};
|
||||
|
||||
export const routes = {
|
||||
account: {
|
||||
address:
|
||||
() => import('account/address'),
|
||||
addressList:
|
||||
() => import('account/address-list'),
|
||||
conf:
|
||||
() => import('account/conf')
|
||||
},
|
||||
admin: {
|
||||
accessLog:
|
||||
() => import('admin/access-log'),
|
||||
connections:
|
||||
() => import('admin/connections'),
|
||||
items:
|
||||
() => import('admin/items'),
|
||||
links:
|
||||
() => import('admin/links'),
|
||||
photos:
|
||||
() => import('admin/photos'),
|
||||
queries:
|
||||
() => import('admin/queries'),
|
||||
users:
|
||||
() => import('admin/users'),
|
||||
visits:
|
||||
() => import('admin/visits')
|
||||
},
|
||||
agencies: {
|
||||
packages:
|
||||
() => import('agencies/packages'),
|
||||
provinces:
|
||||
() => import('agencies/provinces')
|
||||
},
|
||||
cms: {
|
||||
about:
|
||||
() => import('cms/about'),
|
||||
contact:
|
||||
() => import('cms/contact'),
|
||||
home:
|
||||
() => import('cms/home'),
|
||||
location:
|
||||
() => import('cms/location'),
|
||||
why:
|
||||
() => import('cms/why')
|
||||
},
|
||||
ecomerce: {
|
||||
basket:
|
||||
() => import('ecomerce/basket'),
|
||||
catalog:
|
||||
() => import('ecomerce/catalog'),
|
||||
checkout:
|
||||
() => import('ecomerce/checkout'),
|
||||
confirm:
|
||||
() => import('ecomerce/confirm'),
|
||||
invoices:
|
||||
() => import('ecomerce/invoices'),
|
||||
orders:
|
||||
() => import('ecomerce/orders'),
|
||||
ticket:
|
||||
() => import('ecomerce/ticket')
|
||||
},
|
||||
news: {
|
||||
new:
|
||||
() => import('news/new'),
|
||||
news:
|
||||
() => import('news/news')
|
||||
},
|
||||
reports: {
|
||||
shelves:
|
||||
() => import('reports/shelves')
|
||||
}
|
||||
};
|
18
package.json
18
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "24.50.12",
|
||||
"version": "24.50.14",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"productName": "Verdnatura",
|
||||
|
@ -15,11 +15,13 @@
|
|||
"@babel/preset-env": "^7.20.2",
|
||||
"@intlify/vue-i18n-loader": "^4.2.0",
|
||||
"@quasar/app-webpack": "^3.0.0",
|
||||
"@quasar/cli": "^2.4.1",
|
||||
"cypress": "^13.6.6",
|
||||
"cypress-mochawesome-reporter": "^3.8.2",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-cypress": "^4.1.0",
|
||||
"eslint-plugin-cypress": "^2.13.3",
|
||||
"eslint-plugin-import": "^2.19.1",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
|
@ -28,16 +30,16 @@
|
|||
"eslint-webpack-plugin": "^3.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"json-loader": "^0.5.7",
|
||||
"tinymce": "^6.3.0",
|
||||
"yaml-loader": "^0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quasar/cli": "^2.3.0",
|
||||
"@quasar/extras": "^1.16.9",
|
||||
"axios": "^0.21.1",
|
||||
"core-js": "^3.6.5",
|
||||
"pinia": "^2.0.11",
|
||||
"quasar": "^2.14.5",
|
||||
"require-yaml": "0.0.1",
|
||||
"require-yaml": "^0.0.1",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-router": "^4.0.0"
|
||||
|
@ -46,11 +48,9 @@
|
|||
"front": "quasar dev",
|
||||
"back": "cd back && php -S 127.0.0.1:3002 -t . index.php",
|
||||
"salix": "cd ../salix && gulp back",
|
||||
"resetDatabase": "cd ../salix && gulp docker",
|
||||
"cy:open": "npm run resetDatabase && cd ../hedera-web && cypress open",
|
||||
"test:e2e": "npm run resetDatabase && cd ../hedera-web && cypress run",
|
||||
"cy:open-mindshore": "npm run resetDatabase && cd ../hedera-web-mindshore && cypress open",
|
||||
"test:e2e-mindshore": "npm run resetDatabase && cd ../hedera-web-mindshore && cypress run",
|
||||
"db": "cd ../salix && gulp docker",
|
||||
"cy:open": "npm run db && cypress open",
|
||||
"test:e2e": "npm run db && cypress run",
|
||||
"build": "rm -rf dist/ ; quasar build",
|
||||
"clean": "rm -rf dist/",
|
||||
"lint": "eslint --ext .js,.vue ./"
|
||||
|
|
24912
pnpm-lock.yaml
24912
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,27 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { api } from 'boot/axios';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
const user = ref('');
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const onSend = async () => {
|
||||
const params = {
|
||||
user: user.value,
|
||||
app: 'hedera'
|
||||
};
|
||||
await api.post('VnUsers/recoverPassword', params);
|
||||
notify(t('weHaveSentEmailToRecover'), 'positive');
|
||||
router.push('/login');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QPage class="text-center">
|
||||
<div>
|
||||
|
@ -46,30 +70,6 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { api } from 'boot/axios';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
const user = ref('');
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const onSend = async () => {
|
||||
const params = {
|
||||
user: user.value,
|
||||
app: 'hedera'
|
||||
};
|
||||
await api.post('VnUsers/recoverPassword', params);
|
||||
notify(t('weHaveSentEmailToRecover'), 'positive');
|
||||
router.push('/login');
|
||||
};
|
||||
</script>
|
||||
|
||||
<i18n lang="yaml">
|
||||
en-US:
|
||||
inputEmail: Input email
|
||||
|
|
|
@ -174,12 +174,9 @@ export const useAppStore = defineStore('hedera', {
|
|||
},
|
||||
localeDates() {
|
||||
const { messages, locale } = i18n.global;
|
||||
return {
|
||||
days: messages.value[locale.value].date.days,
|
||||
months: messages.value[locale.value].date.months,
|
||||
daysShort: messages.value[locale.value].date.daysShort,
|
||||
monthsShort: messages.value[locale.value].date.monthsShort
|
||||
};
|
||||
const { days, months, daysShort, monthsShort } =
|
||||
messages.value[locale.value].date;
|
||||
return { days, months, daysShort, monthsShort };
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue