General improvements

This commit is contained in:
William Buezas 2024-08-17 19:59:35 -03:00
parent 5053a908f7
commit c86c1cc0c0
7 changed files with 65 additions and 12 deletions

View File

@ -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;
}

View File

@ -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
</i18n>

View File

@ -133,13 +133,21 @@ onMounted(async () => {
() => removeAddress(address.id)
)
"
/>
>
<QTooltip>
{{ t('deleteAddress') }}
</QTooltip>
</QBtn>
<QBtn
icon="edit"
flat
rounded
@click.stop="goToAddressDetails(address.id)"
/>
>
<QTooltip>
{{ t('editAddress') }}
</QTooltip>
</QBtn>
</template>
</CardList>
</QList>
@ -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
</i18n>

View File

@ -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)
},
{

View File

@ -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"
/>
</template>
</VnConfirm>
@ -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
</i18n>

View File

@ -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';