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 { .no-padding {
padding: 0 !important; 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" :pks="pks"
:isEditMode="isEditMode" :isEditMode="isEditMode"
:title="t('addEditAddress')" :title="t(isEditMode ? 'editAddress' : 'addAddress')"
table="myAddress" table="myAddress"
schema="hedera" schema="hedera"
@onDataSaved="goBack()" @onDataSaved="goBack()"
@ -114,7 +114,6 @@ onMounted(() => getCountries());
en-US: en-US:
back: Back back: Back
accept: Accept accept: Accept
addEditAddress: Add or edit address
name: Consignee name: Consignee
address: Address address: Address
city: City city: City
@ -122,21 +121,23 @@ en-US:
country: Country country: Country
province: Province province: Province
addressChangedSuccessfully: Address changed successfully addressChangedSuccessfully: Address changed successfully
addAddress: Add address
editAddress: Edit address
es-ES: es-ES:
back: Volver back: Volver
accept: Aceptar accept: Aceptar
addEditAddress: Añadir o modificar dirección
name: Consignatario name: Consignatario
address: Morada address: Dirección
city: Ciudad city: Ciudad
postalCode: Código postal postalCode: Código postal
country: País country: País
province: Distrito province: Provincia
addressChangedSuccessfully: Dirección modificada correctamente addressChangedSuccessfully: Dirección modificada correctamente
addAddress: Añadir dirección
editAddress: Modificar dirección
ca-ES: ca-ES:
back: Tornar back: Tornar
accept: Acceptar accept: Acceptar
addEditAddress: Afegir o modificar adreça
name: Consignatari name: Consignatari
address: Direcció address: Direcció
city: Ciutat city: Ciutat
@ -144,10 +145,11 @@ ca-ES:
country: País country: País
province: Província province: Província
addressChangedSuccessfully: Adreça modificada correctament addressChangedSuccessfully: Adreça modificada correctament
addAddress: Afegir adreça
editAddress: Modificar adreça
fr-FR: fr-FR:
back: Retour back: Retour
accept: Accepter accept: Accepter
addEditAddress: Ajouter ou modifier l'adresse
name: Destinataire name: Destinataire
address: Numéro Rue address: Numéro Rue
city: Ville city: Ville
@ -155,10 +157,11 @@ fr-FR:
country: Pays country: Pays
province: Province province: Province
addressChangedSuccessfully: Adresse modifié avec succès addressChangedSuccessfully: Adresse modifié avec succès
addAddress: Ajouter adresse
editAddress: Modifier adresse
pt-PT: pt-PT:
back: Voltar back: Voltar
accept: Aceitar accept: Aceitar
addEditAddress: Adicionar ou modificar morada
name: Consignatario name: Consignatario
address: Morada address: Morada
city: Concelho city: Concelho
@ -166,4 +169,6 @@ pt-PT:
country: País country: País
province: Distrito province: Distrito
addressChangedSuccessfully: Morada modificada corretamente addressChangedSuccessfully: Morada modificada corretamente
addAddress: Adicionar morada
editAddress: Modificar morada
</i18n> </i18n>

View File

@ -133,13 +133,21 @@ onMounted(async () => {
() => removeAddress(address.id) () => removeAddress(address.id)
) )
" "
/> >
<QTooltip>
{{ t('deleteAddress') }}
</QTooltip>
</QBtn>
<QBtn <QBtn
icon="edit" icon="edit"
flat flat
rounded rounded
@click.stop="goToAddressDetails(address.id)" @click.stop="goToAddressDetails(address.id)"
/> >
<QTooltip>
{{ t('editAddress') }}
</QTooltip>
</QBtn>
</template> </template>
</CardList> </CardList>
</QList> </QList>
@ -151,20 +159,30 @@ en-US:
addAddress: Add address addAddress: Add address
defaultAddressModified: Default address modified defaultAddressModified: Default address modified
confirmDeleteAddress: Are you sure you want to delete the address? confirmDeleteAddress: Are you sure you want to delete the address?
editAddress: Edit address
deleteAddress: Delete address
es-ES: es-ES:
addAddress: Añadir dirección addAddress: Añadir dirección
defaultAddressModified: Dirección por defecto modificada defaultAddressModified: Dirección por defecto modificada
confirmDeleteAddress: ¿Estás seguro de que quieres borrar la dirección? confirmDeleteAddress: ¿Estás seguro de que quieres borrar la dirección?
editAddress: Modificar dirección
deleteAddress: Borrar dirección
ca-ES: ca-ES:
addAddress: Afegir adreça addAddress: Afegir adreça
defaultAddressModified: Adreça per defecte modificada defaultAddressModified: Adreça per defecte modificada
confirmDeleteAddress: Estàs segur que vols esborrar l'adreça? confirmDeleteAddress: Estàs segur que vols esborrar l'adreça?
editAddress: Modificar adreça
deleteAddress: Esborrar adreça
fr-FR: fr-FR:
addAddress: Ajouter une adresse addAddress: Ajouter une adresse
defaultAddressModified: Adresse par défaut modifiée defaultAddressModified: Adresse par défaut modifiée
confirmDeleteAddress: Êtes-vous sûr de vouloir supprimer l'adresse? confirmDeleteAddress: Êtes-vous sûr de vouloir supprimer l'adresse?
editAddress: Modifier adresse
deleteAddress: Supprimer adresse
pt-PT: pt-PT:
addAddress: Adicionar Morada addAddress: Adicionar Morada
defaultAddressModified: Endereço padrão modificado defaultAddressModified: Endereço padrão modificado
confirmDeleteAddress: Tem a certeza de que deseja excluir o endereço? confirmDeleteAddress: Tem a certeza de que deseja excluir o endereço?
editAddress: Modificar morada
deleteAddress: Eliminar morada
</i18n> </i18n>

View File

@ -17,18 +17,26 @@ const years = ref([]);
const invoices = ref([]); const invoices = ref([]);
const columns = computed(() => [ 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', name: 'issued',
label: t('issued'), label: t('issued'),
field: 'issued', field: 'issued',
align: 'left', align: 'left',
sortable: true,
format: val => formatDate(val, 'D MMM YYYY') format: val => formatDate(val, 'D MMM YYYY')
}, },
{ {
name: 'amount', name: 'amount',
label: t('amount'), label: t('amount'),
field: 'amount', field: 'amount',
sortable: true,
format: val => currency(val) 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 VnInput from 'src/components/common/VnInput.vue';
import VnConfirm from 'src/components/ui/VnConfirm.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 { currency, formatDateTitle } from 'src/lib/filters.js';
import { tpvStore } from 'stores/tpv'; import { tpvStore } from 'stores/tpv';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const jApi = inject('jApi'); const jApi = inject('jApi');
const { notify } = useNotify();
const showAmountToPayDialog = ref(null); const showAmountToPayDialog = ref(null);
const amountToPay = ref(null); const amountToPay = ref(null);
@ -36,6 +38,10 @@ const onPayClick = async () => {
}; };
const onConfirmPay = async () => { const onConfirmPay = async () => {
if (amountToPay.value <= 0) {
notify(t('amountError'), 'negative');
return;
}
if (amountToPay.value) { if (amountToPay.value) {
const amount = amountToPay.value.toString().replace('.', ','); const amount = amountToPay.value.toString().replace('.', ',');
amountToPay.value = parseFloat(amount); amountToPay.value = parseFloat(amount);
@ -126,6 +132,8 @@ const onConfirmPay = async () => {
v-model="amountToPay" v-model="amountToPay"
:clearable="false" :clearable="false"
class="full-width" class="full-width"
type="number"
min="0"
/> />
</template> </template>
</VnConfirm> </VnConfirm>
@ -170,6 +178,7 @@ en-US:
equal to or greater than 0. If you want to make a down payment, click the 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. payment button, delete the suggested amount and enter the amount you want.
amountToPay: 'Amount to pay (€):' amountToPay: 'Amount to pay (€):'
amountError: The amount must be a positive number less than or equal to the outstanding amount
es-ES: es-ES:
startOrder: Empezar pedido startOrder: Empezar pedido
noOrdersFound: No se encontrado pedidos 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 cuenta, pulsa el botón de pago, borra la cantidad sugerida e introduce la
cantidad que desees. cantidad que desees.
amountToPay: 'Cantidad a pagar (€):' amountToPay: 'Cantidad a pagar (€):'
amountError: La cantidad debe ser un número positivo e inferior o igual al importe pendiente
ca-ES: ca-ES:
startOrder: Començar encàrrec startOrder: Començar encàrrec
noOrdersFound: No s'han trobat comandes noOrdersFound: No s'han trobat comandes
@ -196,6 +206,7 @@ ca-ES:
lliurament a compte, prem el botó de pagament, esborra la quantitat suggerida lliurament a compte, prem el botó de pagament, esborra la quantitat suggerida
e introdueix la quantitat que vulguis. e introdueix la quantitat que vulguis.
amountToPay: 'Quantitat a pagar (€):' amountToPay: 'Quantitat a pagar (€):'
amountError: La quantitat ha de ser un nombre positiu i inferior o igual a l'import pendent
fr-FR: fr-FR:
startOrder: Acheter startOrder: Acheter
noOrdersFound: Aucune commande trouvée 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 voulez faire un versement, le montant suggéré effacé et entrez le montant que
vous souhaitez. vous souhaitez.
amountToPay: 'Montant à payer (€):' amountToPay: 'Montant à payer (€):'
amountError: La quantité doit être un neméro positif et inférieur ou égal à la somme restant à payer
pt-PT: pt-PT:
startOrder: Iniciar encomenda startOrder: Iniciar encomenda
noOrdersFound: Nenhum pedido encontrado noOrdersFound: Nenhum pedido encontrado
@ -222,4 +234,5 @@ pt-PT:
conta, clique no botão de pagamento, apague a quantidade sugerida e introduza conta, clique no botão de pagamento, apague a quantidade sugerida e introduza
a quantidade que deseje. a quantidade que deseje.
amountToPay: 'Valor a pagar (€):' amountToPay: 'Valor a pagar (€):'
amountError: A quantidade deve ser um número positivo e inferior ou igual ao importe pendiente
</i18n> </i18n>

View File

@ -3,7 +3,7 @@ import { onMounted, inject, ref } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; 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'; import { userStore as useUserStore } from 'stores/user';