Pedidos stepper #80

Merged
jsegarra merged 16 commits from wbuezas/hedera-web-mindshore:feature/PedidosStepper into 4922-vueMigration 2024-09-03 14:06:02 +00:00
3 changed files with 25 additions and 8 deletions
Showing only changes of commit 020e0afc96 - Show all commits
src
lib
pages/Ecomerce
stores

View File

@ -1,6 +1,7 @@
import { i18n } from 'src/boot/i18n';
import { date as qdate, format } from 'quasar';
const { pad } = format;
import { useAppStore } from 'stores/app';
export function currency(val) {
return typeof val === 'number' ? val.toFixed(2) + '€' : val;
@ -16,14 +17,9 @@ export function date(val, format = 'YYYY-MM-DD') {
export const formatDate = (timeStamp, format = 'YYYY-MM-DD') => {
if (!timeStamp) return '';
const { messages, locale } = i18n.global;
const appStore = useAppStore();
return qdate.formatDate(timeStamp, format, {
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
});
return qdate.formatDate(timeStamp, format, appStore.localeDates);
};
/**

View File

@ -8,6 +8,7 @@ import VnSelect from 'src/components/common/VnSelect.vue';
import { formatDateTitle, formatDate } from 'src/lib/filters.js';
import useNotify from 'src/composables/useNotify.js';
import { useAppStore } from 'stores/app';
import { storeToRefs } from 'pinia';
const jApi = inject('jApi');
const { t } = useI18n();
@ -15,6 +16,7 @@ const route = useRoute();
const router = useRouter();
const { notify } = useNotify();
const appStore = useAppStore();
const { localeDates } = storeToRefs(appStore);
const stepperRef = ref(null);
@ -352,6 +354,7 @@ onMounted(async () => {
v-model="orderForm.date"
class="margin-auto"
color="accent"
:locale="localeDates"
/>
jsegarra marked this conversation as resolved Outdated

Este step no tiene titulo?

Este step no tiene titulo?

Corregido.

Commit: f2bd3c2fa6

Corregido. Commit: https://gitea.verdnatura.es/verdnatura/hedera-web/commit/f2bd3c2fa6f6db469205c772612d1b1b28cde459
</div>
jsegarra marked this conversation as resolved Outdated
jsegarra commented 2024-08-30 21:34:54 +00:00
Outdated
Review

Con el segundo metodo, he podido avvanzar sin seleccionar una dirección. Esto en los otros pasos no ocurre.

Con el segundo metodo, he podido avvanzar sin seleccionar una dirección. Esto en los otros pasos no ocurre.

Validación agregada.

Commit: 3a21292030

Validación agregada. Commit: https://gitea.verdnatura.es/verdnatura/hedera-web/commit/3a21292030bc7b091de789e8771cd69114e09602
<!-- Address step -->

View File

@ -1,6 +1,7 @@
import { defineStore } from 'pinia';
import { jApi } from 'boot/axios';
import useNotify from 'src/composables/useNotify.js';
import { i18n } from 'src/boot/i18n';
const { notify } = useNotify();
@ -13,7 +14,13 @@ export const useAppStore = defineStore('hedera', {
rightDrawerOpen: false,
isHeaderMounted: false,
menuEssentialLinks: [],
basketOrderId: null
basketOrderId: null,
localeDates: {
days: [],
months: [],
daysShort: [],
monthsShort: []
}
}),
actions: {
@ -48,8 +55,19 @@ export const useAppStore = defineStore('hedera', {
this.$patch({ imageUrl });
},
getLocaleDates() {
const { messages, locale } = i18n.global;
this.localeDates = {
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
};
},
async init() {
this.getBasketOrderId();
this.getLocaleDates();
},
getBasketOrderId() {