#6317 create vnCurrency #181

Merged
jorgep merged 16 commits from 6317-createVnCurrency into dev 2024-03-01 07:39:06 +00:00
Member
No description provided.
jorgep added 1 commit 2024-02-05 14:44:06 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
e49a9f4165
feat: refs #6317 create vnCurrency
jorgep added 1 commit 2024-02-14 12:40:08 +00:00
jorgep added 1 commit 2024-02-15 08:47:28 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
7db177ccba
feat: refs #6317 create VnCurrency & useValidNumber
jorgep changed title from WIP: #6317 create vnCurrency to #6317 create vnCurrency 2024-02-15 08:49:19 +00:00
jorgep requested review from alexm 2024-02-15 08:49:24 +00:00
jorgep reviewed 2024-02-15 08:50:22 +00:00
@ -0,0 +1,3 @@
export function useValidNumber(value) {
return /^(\d|\d+(\.)?\d+)$/.test(value);
}
Author
Member

Se puede guardar como función propia de VnCurrency, pero igual puede hacer falta más adelante en otros sitios.

Se puede guardar como función propia de VnCurrency, pero igual puede hacer falta más adelante en otros sitios.
jorgep added the
CR / Tests passed
label 2024-02-15 08:51:44 +00:00
alexm added 1 commit 2024-02-19 06:07:44 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
aa8ebe0767
Merge branch 'dev' into 6317-createVnCurrency
alexm requested changes 2024-02-19 06:26:45 +00:00
@ -0,0 +19,4 @@
return props.modelValue;
},
set(val) {
emit('update:modelValue', val.replaceAll(',', '.'));
Member

En angularjs fa aço: front/core/filters/currency.js ns si en vue hi ha algo paregut

En angularjs fa aço: front/core/filters/currency.js ns si en vue hi ha algo paregut
Author
Member

Esto con el type number no es necesario.

Esto con el type number no es necesario.
jorgep marked this conversation as resolved
@ -0,0 +25,4 @@
</script>
<template>
<VnInput
v-model="amount"
Member

Html(i quasar) te la posibilitat de gastar type="number"
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

En un component q soles accepta numeros (tambe dixa '.' i ',') seria lo mes apropiat

Html(i quasar) te la posibilitat de gastar type="number" https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number En un component q soles accepta numeros (tambe dixa '.' i ',') seria lo mes apropiat
Author
Member

Si gasto type="number" sale el banner predeterminado de html5 cuando escribes un número con coma, Una posible solución es añadir novalidate en el QForm.

https://www.w3schools.com/tags/att_form_novalidate.asp

Usando step="any" se admiten decimales con coma y punto.

Si gasto type="number" sale el banner predeterminado de html5 cuando escribes un número con coma, Una posible solución es añadir novalidate en el QForm. https://www.w3schools.com/tags/att_form_novalidate.asp Usando step="any" se admiten decimales con coma y punto.
jorgep marked this conversation as resolved
@ -0,0 +1,3 @@
export function useValidNumber(value) {
Member

Gastant type="number" ja te limita sols a numeros

Gastant type="number" ja te limita sols a numeros
jorgep marked this conversation as resolved
@ -161,1 +161,3 @@
<QInput v-model="row.amount" clearable clear-icon="close" />
<QInput
v-model="row.amount"
type="number"
Member

Aci si que el has gastat

Aci si que el has gastat
jorgep marked this conversation as resolved
jorgep added 2 commits 2024-02-19 09:49:35 +00:00
jorgep added 1 commit 2024-02-19 10:01:22 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
c6e9ae2c5f
fix: refs #6317 validation % fix e2e
jorgep requested review from alexm 2024-02-19 10:09:35 +00:00
jorgep added 1 commit 2024-02-19 14:47:24 +00:00
alexm added 1 commit 2024-02-21 08:52:28 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
330713f4df
Merge branch 'dev' into 6317-createVnCurrency
alexm added 1 commit 2024-02-23 07:32:38 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
d9a149dc70
Merge branch 'dev' into 6317-createVnCurrency
jorgep added 3 commits 2024-02-29 14:27:30 +00:00
jorgep added 1 commit 2024-02-29 14:40:46 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
3a1ba0bc17
fix: refs #6315 drop icon prop
jorgep added 1 commit 2024-02-29 14:49:56 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
4b68f5224f
fix: refs #6315 drop icon prop
jorgep added 1 commit 2024-02-29 14:56:07 +00:00
gitea/salix-front/pipeline/pr-dev This commit looks good Details
8523256faf
fix: refs #6315 remove test patch
alexm reviewed 2024-03-01 06:03:45 +00:00
@ -0,0 +11,4 @@
const { t } = useI18n();
const emit = defineEmits(['update:modelValue']);
const amount = computed({
Member

Todo esto creo que se puede sustituir por const amount = defineModel()

Todo esto creo que se puede sustituir por const amount = defineModel()
Author
Member

Por lo que he visto en internet, hace falta Vue 3.4 pero tenemos vue 3.3.4

Por lo que he visto en internet, hace falta Vue 3.4 pero tenemos vue 3.3.4
alexm approved these changes 2024-03-01 06:03:48 +00:00
jorgep merged commit d0c34e3238 into dev 2024-03-01 07:39:06 +00:00
jorgep deleted branch 6317-createVnCurrency 2024-03-01 07:39:06 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix-front#181
No description provided.