diff --git a/src/css/app.scss b/src/css/app.scss
index d802cb22..4a800f63 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -42,3 +42,12 @@ a.link {
.no-padding {
padding: 0 !important;
}
+input[type='number'] {
+ -moz-appearance: textfield;
+}
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+ appearance: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+}
diff --git a/src/pages/Account/AddressDetails.vue b/src/pages/Account/AddressDetails.vue
index 33bbcfb4..d706cfed 100644
--- a/src/pages/Account/AddressDetails.vue
+++ b/src/pages/Account/AddressDetails.vue
@@ -75,7 +75,7 @@ onMounted(() => getCountries());
}"
:pks="pks"
:isEditMode="isEditMode"
- :title="t('addEditAddress')"
+ :title="t(isEditMode ? 'editAddress' : 'addAddress')"
table="myAddress"
schema="hedera"
@onDataSaved="goBack()"
@@ -114,7 +114,6 @@ onMounted(() => getCountries());
en-US:
back: Back
accept: Accept
- addEditAddress: Add or edit address
name: Consignee
address: Address
city: City
@@ -122,21 +121,23 @@ en-US:
country: Country
province: Province
addressChangedSuccessfully: Address changed successfully
+ addAddress: Add address
+ editAddress: Edit address
es-ES:
back: Volver
accept: Aceptar
- addEditAddress: Añadir o modificar dirección
name: Consignatario
- address: Morada
+ address: Dirección
city: Ciudad
postalCode: Código postal
country: País
- province: Distrito
+ province: Provincia
addressChangedSuccessfully: Dirección modificada correctamente
+ addAddress: Añadir dirección
+ editAddress: Modificar dirección
ca-ES:
back: Tornar
accept: Acceptar
- addEditAddress: Afegir o modificar adreça
name: Consignatari
address: Direcció
city: Ciutat
@@ -144,10 +145,11 @@ ca-ES:
country: País
province: Província
addressChangedSuccessfully: Adreça modificada correctament
+ addAddress: Afegir adreça
+ editAddress: Modificar adreça
fr-FR:
back: Retour
accept: Accepter
- addEditAddress: Ajouter ou modifier l'adresse
name: Destinataire
address: Numéro Rue
city: Ville
@@ -155,10 +157,11 @@ fr-FR:
country: Pays
province: Province
addressChangedSuccessfully: Adresse modifié avec succès
+ addAddress: Ajouter adresse
+ editAddress: Modifier adresse
pt-PT:
back: Voltar
accept: Aceitar
- addEditAddress: Adicionar ou modificar morada
name: Consignatario
address: Morada
city: Concelho
@@ -166,4 +169,6 @@ pt-PT:
country: País
province: Distrito
addressChangedSuccessfully: Morada modificada corretamente
+ addAddress: Adicionar morada
+ editAddress: Modificar morada
diff --git a/src/pages/Account/AddressList.vue b/src/pages/Account/AddressList.vue
index 812cf19a..974c5022 100644
--- a/src/pages/Account/AddressList.vue
+++ b/src/pages/Account/AddressList.vue
@@ -133,13 +133,21 @@ onMounted(async () => {
() => removeAddress(address.id)
)
"
- />
+ >
+
+ {{ t('deleteAddress') }}
+
+
+ >
+
+ {{ t('editAddress') }}
+
+
@@ -151,20 +159,30 @@ en-US:
addAddress: Add address
defaultAddressModified: Default address modified
confirmDeleteAddress: Are you sure you want to delete the address?
+ editAddress: Edit address
+ deleteAddress: Delete address
es-ES:
addAddress: Añadir dirección
defaultAddressModified: Dirección por defecto modificada
confirmDeleteAddress: ¿Estás seguro de que quieres borrar la dirección?
+ editAddress: Modificar dirección
+ deleteAddress: Borrar dirección
ca-ES:
addAddress: Afegir adreça
defaultAddressModified: Adreça per defecte modificada
confirmDeleteAddress: Estàs segur que vols esborrar l'adreça?
+ editAddress: Modificar adreça
+ deleteAddress: Esborrar adreça
fr-FR:
addAddress: Ajouter une adresse
defaultAddressModified: Adresse par défaut modifiée
confirmDeleteAddress: Êtes-vous sûr de vouloir supprimer l'adresse?
+ editAddress: Modifier adresse
+ deleteAddress: Supprimer adresse
pt-PT:
addAddress: Adicionar Morada
defaultAddressModified: Endereço padrão modificado
confirmDeleteAddress: Tem a certeza de que deseja excluir o endereço?
+ editAddress: Modificar morada
+ deleteAddress: Eliminar morada
diff --git a/src/pages/Ecomerce/InvoicesView.vue b/src/pages/Ecomerce/InvoicesView.vue
index c21ac9ce..5c49eb63 100644
--- a/src/pages/Ecomerce/InvoicesView.vue
+++ b/src/pages/Ecomerce/InvoicesView.vue
@@ -17,18 +17,26 @@ const years = ref([]);
const invoices = ref([]);
const columns = computed(() => [
- { name: 'ref', label: t('invoice'), field: 'ref', align: 'left' },
+ {
+ name: 'ref',
+ label: t('invoice'),
+ field: 'ref',
+ align: 'left',
+ sortable: true
+ },
{
name: 'issued',
label: t('issued'),
field: 'issued',
align: 'left',
+ sortable: true,
format: val => formatDate(val, 'D MMM YYYY')
},
{
name: 'amount',
label: t('amount'),
field: 'amount',
+ sortable: true,
format: val => currency(val)
},
{
diff --git a/src/pages/Ecomerce/OrdersView.vue b/src/pages/Ecomerce/OrdersView.vue
index 75eb6003..c010545c 100644
--- a/src/pages/Ecomerce/OrdersView.vue
+++ b/src/pages/Ecomerce/OrdersView.vue
@@ -7,12 +7,14 @@ import CardList from 'src/components/ui/CardList.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnConfirm from 'src/components/ui/VnConfirm.vue';
+import useNotify from 'src/composables/useNotify.js';
import { currency, formatDateTitle } from 'src/lib/filters.js';
import { tpvStore } from 'stores/tpv';
const { t } = useI18n();
const route = useRoute();
const jApi = inject('jApi');
+const { notify } = useNotify();
const showAmountToPayDialog = ref(null);
const amountToPay = ref(null);
@@ -36,6 +38,10 @@ const onPayClick = async () => {
};
const onConfirmPay = async () => {
+ if (amountToPay.value <= 0) {
+ notify(t('amountError'), 'negative');
+ return;
+ }
if (amountToPay.value) {
const amount = amountToPay.value.toString().replace('.', ',');
amountToPay.value = parseFloat(amount);
@@ -126,6 +132,8 @@ const onConfirmPay = async () => {
v-model="amountToPay"
:clearable="false"
class="full-width"
+ type="number"
+ min="0"
/>
@@ -170,6 +178,7 @@ en-US:
equal to or greater than 0. If you want to make a down payment, click the
payment button, delete the suggested amount and enter the amount you want.
amountToPay: 'Amount to pay (€):'
+ amountError: The amount must be a positive number less than or equal to the outstanding amount
es-ES:
startOrder: Empezar pedido
noOrdersFound: No se encontrado pedidos
@@ -183,6 +192,7 @@ es-ES:
cuenta, pulsa el botón de pago, borra la cantidad sugerida e introduce la
cantidad que desees.
amountToPay: 'Cantidad a pagar (€):'
+ amountError: La cantidad debe ser un número positivo e inferior o igual al importe pendiente
ca-ES:
startOrder: Començar encàrrec
noOrdersFound: No s'han trobat comandes
@@ -196,6 +206,7 @@ ca-ES:
lliurament a compte, prem el botó de pagament, esborra la quantitat suggerida
e introdueix la quantitat que vulguis.
amountToPay: 'Quantitat a pagar (€):'
+ amountError: La quantitat ha de ser un nombre positiu i inferior o igual a l'import pendent
fr-FR:
startOrder: Acheter
noOrdersFound: Aucune commande trouvée
@@ -209,6 +220,7 @@ fr-FR:
voulez faire un versement, le montant suggéré effacé et entrez le montant que
vous souhaitez.
amountToPay: 'Montant à payer (€):'
+ amountError: La quantité doit être un neméro positif et inférieur ou égal à la somme restant à payer
pt-PT:
startOrder: Iniciar encomenda
noOrdersFound: Nenhum pedido encontrado
@@ -222,4 +234,5 @@ pt-PT:
conta, clique no botão de pagamento, apague a quantidade sugerida e introduza
a quantidade que deseje.
amountToPay: 'Valor a pagar (€):'
+ amountError: A quantidade deve ser um número positivo e inferior ou igual ao importe pendiente
diff --git a/src/components/ui/TicketDetails.vue b/src/pages/Ecomerce/TicketDetails.vue
similarity index 100%
rename from src/components/ui/TicketDetails.vue
rename to src/pages/Ecomerce/TicketDetails.vue
diff --git a/src/pages/Ecomerce/TicketView.vue b/src/pages/Ecomerce/TicketView.vue
index 5aecfa35..637166bd 100644
--- a/src/pages/Ecomerce/TicketView.vue
+++ b/src/pages/Ecomerce/TicketView.vue
@@ -3,7 +3,7 @@ import { onMounted, inject, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import TicketDetails from 'src/components/ui/TicketDetails.vue';
+import TicketDetails from 'src/pages/Ecomerce/TicketDetails.vue';
import { userStore as useUserStore } from 'stores/user';