diff --git a/src/css/app.scss b/src/css/app.scss index b742dae2f..e7be2ddf2 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -67,3 +67,13 @@ body.body--dark { .q-field.required .q-field__label:after { content: ' *'; } + +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/i18n/en/index.js b/src/i18n/en/index.js index 1a7a4c27e..eb257e0c9 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -266,6 +266,7 @@ export default { buys: 'Buys', notes: 'Notes', log: 'Log', + create: 'Create', }, list: { newEntry: 'New entry', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 83de42ee0..5141fff4e 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -265,6 +265,7 @@ export default { buys: 'Compras', notes: 'Notas', log: 'Historial', + create: 'Crear', }, list: { newEntry: 'Nueva entrada', diff --git a/src/pages/Entry/Card/EntryBasicData.vue b/src/pages/Entry/Card/EntryBasicData.vue index a5565fbf6..9dc59ec21 100644 --- a/src/pages/Entry/Card/EntryBasicData.vue +++ b/src/pages/Entry/Card/EntryBasicData.vue @@ -163,8 +163,9 @@ const currenciesOptions = ref([]); :label="t('entry.basicData.observation')" type="textarea" v-model="data.observation" + :maxlength="45" + counter fill-input - autogrow /> diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue index 5eee14d29..c4427c09a 100644 --- a/src/pages/Entry/Card/EntryBuys.vue +++ b/src/pages/Entry/Card/EntryBuys.vue @@ -256,6 +256,33 @@ const deleteBuys = async () => { const importBuys = () => { router.push({ name: 'EntryBuysImport' }); }; + +const toggleGroupingMode = async (buy, mode) => { + try { + const grouping = 1; + const packing = 2; + const groupingMode = mode === 'grouping' ? grouping : packing; + + const newGroupingMode = buy.groupingMode === groupingMode ? 0 : groupingMode; + + const params = { + groupingMode: newGroupingMode, + }; + + await axios.patch(`Buys/${buy.id}`, params); + buy.groupingMode = newGroupingMode; + } catch (err) { + console.error('Error toggling grouping mode'); + } +}; + +const showLockIcon = (groupingMode, mode) => { + if (mode === 'packing') { + return groupingMode === 2 ? 'lock' : 'lock_open'; + } else { + return groupingMode === 1 ? 'lock' : 'lock_open'; + } +};