diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue
index 07e82abed..4cd964012 100644
--- a/src/components/common/VnInput.vue
+++ b/src/components/common/VnInput.vue
@@ -22,6 +22,10 @@ const $props = defineProps({
type: String,
default: '',
},
+ clearable: {
+ type: Boolean,
+ default: true,
+ },
});
const { t } = useI18n();
@@ -88,7 +92,7 @@ const inputRules = [
diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue
index 04ccca889..52cb68438 100644
--- a/src/components/common/VnSelect.vue
+++ b/src/components/common/VnSelect.vue
@@ -1,6 +1,5 @@
diff --git a/src/components/common/VnSmsDialog.vue b/src/components/common/VnSmsDialog.vue
index 5b192f95d..064394445 100644
--- a/src/components/common/VnSmsDialog.vue
+++ b/src/components/common/VnSmsDialog.vue
@@ -184,6 +184,7 @@ en:
minAmount: 'A minimum amount of 50€ (VAT excluded) is required for your order
{ orderId } of { shipped } to receive it without additional shipping costs.'
orderChanges: 'Order {orderId} of { shipped }: { changes }'
+ productNotAvailable: 'Verdnatura communicates: Your order {ticketFk} with reception date on {landed}. {notAvailables} not available. Sorry for the inconvenience.'
en: English
es: Spanish
fr: French
@@ -203,6 +204,7 @@ es:
Te recomendamos amplíes para no generar costes extra, provocarán un incremento de tu tarifa.
¡Un saludo!'
orderChanges: 'Pedido {orderId} con llegada estimada día { landing }: { changes }'
+ productNotAvailable: 'Verdnatura le comunica: Pedido {ticketFk} con fecha de recepción {landed}. {notAvailables} no disponible/s. Disculpe las molestias.'
en: Inglés
es: Español
fr: Francés
@@ -222,6 +224,7 @@ fr:
Montant minimum nécessaire de 50 euros pour recevoir la commande { orderId } livraison { landing }.
Merci.'
orderChanges: 'Commande {orderId} livraison {landing} indisponible/s. Désolés pour le dérangement.'
+ productNotAvailable: 'Verdnatura communique : Votre commande {ticketFk} avec date de réception le {landed}. {notAvailables} non disponible. Nous sommes désolés pour les inconvénients.'
en: Anglais
es: Espagnol
fr: Français
@@ -240,6 +243,7 @@ pt:
minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido
{ orderId } do dia { landing } para recebê-lo sem custos de envio adicionais.'
orderChanges: 'Pedido { orderId } com chegada dia { landing }: { changes }'
+ productNotAvailable: 'Verdnatura comunica: Seu pedido {ticketFk} com data de recepção em {landed}. {notAvailables} não disponível/eis. Desculpe pelo transtorno.'
en: Inglês
es: Espanhol
fr: Francês
diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue
index 37072a69e..a88c02898 100644
--- a/src/components/ui/VnImg.vue
+++ b/src/components/ui/VnImg.vue
@@ -3,22 +3,26 @@ import { ref, computed, onMounted } from 'vue';
import { useSession } from 'src/composables/useSession';
const $props = defineProps({
- collection: {
+ storage: {
type: [String, Number],
default: 'Images',
},
+ collection: {
+ type: String,
+ default: 'catalog',
+ },
size: {
type: String,
default: '200x200',
},
zoomSize: {
type: String,
- required: true,
+ required: false,
default: 'lg',
},
id: {
- type: Boolean,
- default: false,
+ type: Number,
+ required: true,
},
});
const show = ref(false);
@@ -26,9 +30,8 @@ const token = useSession().getTokenMultimedia();
const timeStamp = ref(`timestamp=${Date.now()}`);
const url = computed(
() =>
- `/api/${$props.collection}/catalog/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
+ `/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
);
-const emits = defineEmits(['refresh']);
const reload = (emit = false) => {
timeStamp.value = `timestamp=${Date.now()}`;
};
@@ -41,20 +44,25 @@ onMounted(() => {});
-
+
diff --git a/src/filters/toPercentage.js b/src/filters/toPercentage.js
index d701cb9e7..9b5e953c0 100644
--- a/src/filters/toPercentage.js
+++ b/src/filters/toPercentage.js
@@ -8,11 +8,8 @@ export default function (value, fractionSize = 2) {
const options = {
style: 'percent',
minimumFractionDigits: fractionSize,
- maximumFractionDigits: fractionSize
+ maximumFractionDigits: fractionSize,
};
- return new Intl.NumberFormat(locale, options)
- .format(parseFloat(value));
-
-
-}
\ No newline at end of file
+ return new Intl.NumberFormat(locale, options).format(parseFloat(value));
+}
diff --git a/src/pages/Account/Card/AccountDescriptor.vue b/src/pages/Account/Card/AccountDescriptor.vue
index 2ff8afa33..ddc7c077f 100644
--- a/src/pages/Account/Card/AccountDescriptor.vue
+++ b/src/pages/Account/Card/AccountDescriptor.vue
@@ -6,8 +6,8 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
import AccountDescriptorMenu from './AccountDescriptorMenu.vue';
-import { useSession } from 'src/composables/useSession';
import FetchData from 'src/components/FetchData.vue';
+import VnImg from 'src/components/ui/VnImg.vue';
const $props = defineProps({
id: {
@@ -19,7 +19,6 @@ const $props = defineProps({
const route = useRoute();
const { t } = useI18n();
-const { getTokenMultimedia } = useSession();
const entityId = computed(() => {
return $props.id || route.params.id;
});
@@ -31,10 +30,6 @@ const filter = {
fields: ['id', 'nickname', 'name', 'role'],
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
};
-function getAccountAvatar() {
- const token = getTokenMultimedia();
- return `/api/Images/user/160x160/${entityId.value}/download?access_token=${token}`;
-}
const hasAccount = ref(false);
@@ -72,7 +67,8 @@ const hasAccount = ref(false);
-
+
+
-
+
diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue
index 977a4dc5b..4656980d9 100644
--- a/src/pages/Claim/Card/ClaimBasicData.vue
+++ b/src/pages/Claim/Card/ClaimBasicData.vue
@@ -10,12 +10,13 @@ import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import axios from 'axios';
-import { useSession } from 'src/composables/useSession';
+// import { useSession } from 'src/composables/useSession';
+import VnImg from 'src/components/ui/VnImg.vue';
const route = useRoute();
const { t } = useI18n();
-const { getTokenMultimedia } = useSession();
-const token = getTokenMultimedia();
+// const { getTokenMultimedia } = useSession();
+// const token = getTokenMultimedia();
const claimStates = ref([]);
const claimStatesCopy = ref([]);
@@ -97,9 +98,11 @@ const statesFilter = {
>
-
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index b0c2d60e3..805795522 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -3,16 +3,14 @@ import { ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import { useSession } from 'src/composables/useSession';
import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
+import VnImg from 'src/components/ui/VnImg.vue';
const route = useRoute();
const { t } = useI18n();
-const { getTokenMultimedia } = useSession();
-const token = getTokenMultimedia();
const workers = ref([]);
const workersCopy = ref([]);
@@ -143,10 +141,11 @@ const filterOptions = {
>
-
diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue
index 291b828c9..5da3309d8 100644
--- a/src/pages/Entry/EntryLatestBuys.vue
+++ b/src/pages/Entry/EntryLatestBuys.vue
@@ -16,14 +16,15 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDate, toCurrency } from 'src/filters';
-import { useSession } from 'composables/useSession';
+// import { useSession } from 'composables/useSession';
import { dashIfEmpty } from 'src/filters';
import { useArrayData } from 'composables/useArrayData';
import RightMenu from 'src/components/common/RightMenu.vue';
+import VnImg from 'src/components/ui/VnImg.vue';
const router = useRouter();
-const { getTokenMultimedia } = useSession();
-const token = getTokenMultimedia();
+// const { getTokenMultimedia } = useSession();
+// const token = getTokenMultimedia();
const stateStore = useStateStore();
const { t } = useI18n();
@@ -695,14 +696,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
-
+
diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue
index 155c9eb4c..f3eba8c82 100644
--- a/src/pages/Item/Card/ItemDescriptor.vue
+++ b/src/pages/Item/Card/ItemDescriptor.vue
@@ -13,7 +13,6 @@ import ItemDescriptorImage from 'src/pages/Item/Card/ItemDescriptorImage.vue';
import { useState } from 'src/composables/useState';
import useCardDescription from 'src/composables/useCardDescription';
-import { useSession } from 'src/composables/useSession';
import { getUrl } from 'src/composables/getUrl';
import axios from 'axios';
import { dashIfEmpty } from 'src/filters';
@@ -42,14 +41,12 @@ const quasar = useQuasar();
const route = useRoute();
const router = useRouter();
const { t } = useI18n();
-const { getTokenMultimedia } = useSession();
const state = useState();
const user = state.getUser();
const entityId = computed(() => {
return $props.id || route.params.id;
});
-const image = ref(null);
const regularizeStockFormDialog = ref(null);
const item = ref(null);
const available = ref(null);
@@ -67,17 +64,10 @@ const warehouseFk = computed({
});
onMounted(async () => {
- await getItemAvatar();
warehouseFk.value = user.value.warehouseFk;
salixUrl.value = await getUrl('');
});
-const getItemAvatar = async () => {
- const token = getTokenMultimedia();
- const timeStamp = `timestamp=${Date.now()}`;
- image.value = `/api/Images/catalog/200x200/${entityId.value}/download?access_token=${token}&${timeStamp}`;
-};
-
const data = ref(useCardDescription());
const setData = (entity) => {
if (!entity) return;
diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue
index 0e40740b9..f1e3629cd 100644
--- a/src/pages/Item/ItemList.vue
+++ b/src/pages/Item/ItemList.vue
@@ -16,17 +16,15 @@ import ItemListFilter from './ItemListFilter.vue';
import { useStateStore } from 'stores/useStateStore';
import { toDateFormat } from 'src/filters/date.js';
-import { useSession } from 'composables/useSession';
import { dashIfEmpty } from 'src/filters';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { useVnConfirm } from 'composables/useVnConfirm';
import axios from 'axios';
import RightMenu from 'src/components/common/RightMenu.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
+import VnImg from 'src/components/ui/VnImg.vue';
const router = useRouter();
-const { getTokenMultimedia } = useSession();
-const token = getTokenMultimedia();
const stateStore = useStateStore();
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
@@ -491,10 +489,9 @@ onUnmounted(() => (stateStore.rightDrawer = false));
-
+import { useI18n } from 'vue-i18n';
+import { useRoute } from 'vue-router';
+import { computed } from 'vue';
+
import VnCard from 'components/common/VnCard.vue';
import TicketDescriptor from './TicketDescriptor.vue';
import TicketFilter from '../TicketFilter.vue';
+
+const { t } = useI18n();
+const route = useRoute();
+
+const routeName = computed(() => route.name);
+const searchBarDataKeys = {
+ TicketSummary: 'TicketSummary',
+ TicketSale: 'TicketSale',
+};
diff --git a/src/pages/Ticket/Card/TicketEditMana.vue b/src/pages/Ticket/Card/TicketEditMana.vue
new file mode 100644
index 000000000..721057515
--- /dev/null
+++ b/src/pages/Ticket/Card/TicketEditMana.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('New price') }}
+
+ {{ toCurrency($props.newPrice) }}
+
+
+
+
+
+
+ {{ t('globals.cancel') }}
+
+
+ {{ t('globals.save') }}
+
+
+
+
+
+
+
+
+
+es:
+ New price: Nuevo precio
+
diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue
index 02cccaff2..7cc8539cf 100644
--- a/src/pages/Ticket/Card/TicketSale.vue
+++ b/src/pages/Ticket/Card/TicketSale.vue
@@ -1 +1,779 @@
-Ticket sale
+
+
+
+ (isTicketEditable = data)"
+ />
+ (isLocked = data)"
+ />
+ (itemsWithNameOptions = data)"
+ />
+ (editableStatesOptions = data)"
+ />
+
+
+
+
+ {{ t(`Change ticket state to 'Ok'`) }}
+
+
+
+
+
+
+ {{ t('Remove lines') }}
+
+
+ {{ t('Transfer lines') }}
+
+
+
+
+
+
+
+
+
+ {{ t('ticketSale.subtotal') }}:
+
+ {{ toCurrency(store.data?.totalWithoutVat) }}
+
+
+
+ {{ t('ticketSale.tax') }}:
+
+ {{
+ toCurrency(store.data?.totalWithVat - store.data?.totalWithoutVat)
+ }}
+
+
+
+ {{ t('ticketSale.total') }}:
+
+ {{ toCurrency(store.data?.totalWithVat) }}
+
+
+
+
+
+
+
+
+
+
+ {{ t('ticketSale.claim') }}:
+ {{ row.claim?.claimFk }}
+
+
+
+
+
+ {{ t('ticketSale.visible') }}: {{ row.visible || 0 }}
+
+
+
+
+ {{ t('ticketSale.reserved') }}
+
+
+
+
+ {{ t('ticketSale.noVisible') }}
+
+
+
+
+ {{ t('ticketSale.hasComponentLack') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.visible }}
+
+
+
+
+
+
+ {{ row.available }}
+
+
+
+
+
+
+
+ {{ row.itemFk }}
+
+
+
+
+
+
+
+ #{{ scope.opt?.id }}
+ {{ scope.opt?.name }}
+
+
+
+
+
+
+
+
+
+ {{ row.quantity }}
+
+
+
+
+
+ {{ row.concept }}
+ {{ row.item?.subName }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ toCurrency(row.price) }}
+
+
+
+
+
+ {{ toCurrency(row.price) }}
+
+
+
+
+
+
+ {{ toPercentage(row.discount / 100) }}
+
+
+
+
+
+ {{ toPercentage(row.discount / 100) }}
+
+
+
+
+
+
+ {{ t('ticketSale.history') }}
+
+
+
+
+
+
+
+ {{ t('Add item') }}
+
+
+
+
+
+
+
+
+ {{ t('Add item to basket') }}
+
+
+
+
+
+es:
+ New item: Nuevo artículo
+ Add item to basket: Añadir artículo a la cesta
+ Change ticket state to 'Ok': Cambiar estado del ticket a 'Ok'
+ Remove lines: Eliminar líneas
+ Continue anyway?: ¿Continuar de todas formas?
+ You are going to delete lines of the ticket: Vas a eliminar lineas del ticket
+ Add item: Añadir artículo
+ Select lines to see the options: Selecciona líneas para ver las opciones
+ Transfer lines: Transferir líneas
+
diff --git a/src/pages/Ticket/Card/TicketSaleMoreActions.vue b/src/pages/Ticket/Card/TicketSaleMoreActions.vue
new file mode 100644
index 000000000..9ec6b303a
--- /dev/null
+++ b/src/pages/Ticket/Card/TicketSaleMoreActions.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+ {{ t('Select lines to see the options') }}
+
+
+
+
+ {{ t('Send shortage SMS') }}
+
+
+
+
+ {{ t('Recalculate price') }}
+
+
+
+
+ {{ t('Update discount') }}
+
+
+
+
+
+
+
+ {{ t('Add claim') }}
+
+
+
+
+ {{ t('Mark as reserved') }}
+
+
+
+
+ {{ t('Unmark as reserved') }}
+
+
+
+
+ {{ t('Refund...') }}
+
+
+
+
+
+
+
+
+ {{ t('with warehouse') }}
+
+
+
+
+ {{ t('without warehouse') }}
+
+
+
+
+
+
+
+
+
+
+en:
+ refundTicketCreated: 'The following refund ticket have been created {ticketId}'
+es:
+ SMS sent: SMS enviado
+ Send shortage SMS: Enviar SMS faltas
+ Recalculate price: Recalcular precio
+ Update discount: Actualizar descuento
+ Add claim: Crear reclamación
+ Mark as reserved: Marcar como reservado
+ Unmark as reserved: Desmarcar como reservado
+ Refund...: Abono...
+ with warehouse: con almacén
+ without warehouse: sin almacén
+ Claim out of time: Reclamación fuera de plazo
+ Do you want to continue?: ¿Desea continuar?
+ Do you want to create a claim?: ¿Quieres crear una reclamación?
+ refundTicketCreated: 'The following refund ticket have been created: {ticketId}'
+
diff --git a/src/pages/Ticket/Card/TicketTransfer.vue b/src/pages/Ticket/Card/TicketTransfer.vue
new file mode 100644
index 000000000..9a22c764c
--- /dev/null
+++ b/src/pages/Ticket/Card/TicketTransfer.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.nickname }}
+ {{ row.name }}
+ {{ row.street }}
+ {{ row.postalCode }}
+ {{ row.city }}
+
+
+ {{ row.nickname }}
+ {{ row.name }}
+ {{ row.street }}
+ {{ row.postalCode }}
+ {{ row.city }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Sales to transfer: Líneas a transferir
+ Destination ticket: Ticket destinatario
+ Transfer to ticket: Transferir a ticket
+ New ticket: Nuevo ticket
+
diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml
new file mode 100644
index 000000000..d63f1e29c
--- /dev/null
+++ b/src/pages/Ticket/locale/en.yml
@@ -0,0 +1,27 @@
+ticketSale:
+ id: Id
+ visible: Visible
+ available: Available
+ quantity: Quantity
+ item: Item
+ price: Price
+ discount: Disc
+ amount: Amount
+ packaging: Packaging
+ subtotal: Subtotal
+ tax: VAT
+ total: Total
+ history: History
+ claim: Claim
+ reserved: Reserved
+ noVisible: Not visible
+ hasComponentLack: Component lack
+ ok: Ok
+ state: State
+ more: More
+ shipped: Shipped
+ agency: Agency
+ address: Address
+card:
+ search: Search tickets
+ searchInfo: You can search by ticket id or alias
diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml
index 5348b29b9..4b8b70c82 100644
--- a/src/pages/Ticket/locale/es.yml
+++ b/src/pages/Ticket/locale/es.yml
@@ -1,2 +1,29 @@
Search ticket: Buscar ticket
You can search by ticket id or alias: Puedes buscar por id o alias del ticket
+ticketSale:
+ id: Id
+ visible: Visible
+ available: Disponible
+ quantity: Cantidad
+ item: Artículo
+ price: Precio
+ discount: Dto
+ amount: Importe
+ packaging: Encajado
+ subtotal: Subtotal
+ tax: IVA
+ total: Total
+ history: Historial
+ claim: Reclamación
+ reserved: Reservado
+ noVisible: No visible
+ hasComponentLack: Faltan componentes
+ ok: Ok
+ state: Estado
+ more: Más
+ shipped: F. Envío
+ agency: Agencia
+ address: Consignatario
+card:
+ search: Buscar tickets
+ searchInfo: Buscar tickets por identificador o alias
diff --git a/src/pages/Wagon/WagonCounter.vue b/src/pages/Wagon/WagonCounter.vue
index 15a1ab7ba..70bbc9803 100644
--- a/src/pages/Wagon/WagonCounter.vue
+++ b/src/pages/Wagon/WagonCounter.vue
@@ -1,14 +1,12 @@
+