Skip to content

Commit

Permalink
Merge pull request #100 from itsalb3rt/feature/general
Browse files Browse the repository at this point in the history
Feature/general
  • Loading branch information
itsalb3rt authored Sep 2, 2023
2 parents 99b63d3 + 29128e8 commit 12eab42
Show file tree
Hide file tree
Showing 10 changed files with 461 additions and 364 deletions.
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
:color="$store.state.snackbar.snackbar.color"
>
{{ $store.state.snackbar.snackbar.message }}
<v-btn v-if="$store.state.snackbar.snackbar.showClose" dark text @click="$store.commit('snackbar/setSnackbarShow', false)">Cerrar</v-btn>
</v-snackbar>
</v-app>
</template>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Interface/Dialogs/Delete.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template>
<v-dialog max-width="400px" v-model="show" persistent>
<v-card>
<v-card-title class="headline">{{ $t('products.delete_product_modal_title') }}</v-card-title>
<v-card-text>{{ $t('products.delete_product_modal_message') }}</v-card-text>
<v-card-title class="headline">{{headerMessage || $t('products.delete_product_modal_title') }}</v-card-title>
<v-card-text>{{ bodyMessage || $t('products.delete_product_modal_message') }}</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn class="delete" color="error" @click="$emit('confirm')">{{ $t('call_action_buttons.delete') }}</v-btn>
<v-btn class="cancel" color="primary" text @click="$emit('cancel')">{{ $t('products.keep_item') }}</v-btn>
<v-btn class="delete" color="error" @click="$emit('confirm')">{{ confirmMessage || $t('call_action_buttons.delete') }}</v-btn>
<v-btn class="cancel" color="primary" text @click="$emit('cancel')">{{ cancelMessage || $t('products.keep_item') }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
export default {
props:['show']
props:['show','headerMessage', 'bodyMessage', 'confirmMessage', 'cancelMessage'],
};
</script>
14 changes: 11 additions & 3 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@
"cancel": "Cancel",
"go_to_resume":"Go to resume",
"action":"Action",
"done": "Done"
"done": "Done",
"addMeasurementUnit":"Add measurement unit",
"delete_measurement_unit":"Delete measurement unit",
"no_go_back": "No, go back",
"addCategory": "Add category",
"delete_category": "Delete category"
},
"messages": {
"save": "Item save",
Expand Down Expand Up @@ -137,7 +142,10 @@
"password_length":"Password must be less than",
"characters":"characters",
"invalid_token":"the token is not valid, please request a new account recovery email",
"select_or_add_brand":"Select or write a brand name"
"select_or_add_brand":"Select or write a brand name",
"measurement_units_description": "Units of measure are the units in which the product is measured, for example, unit, package, box, etc.",
"delete_measurement_unit": "Are you sure you want to delete this unit of measure?",
"delete_category": "Are you sure you want to delete this category?"
},
"category":{
"name":"Name",
Expand All @@ -151,7 +159,7 @@
"name":"Name",
"measurement_description_section":"The categories help you to carry out deeper analyzes to know which categories you consume more",
"measurement":"Measurement unit",
"measurement_placeholder":"Unit, Sixpack",
"measurement_placeholder":"Unit, package, box, etc.",
"registered_measurement":"Registered measurement unit",
"forbiden_delete":"This unit of measure cannot be eliminated because it has associated products"
},
Expand Down
16 changes: 12 additions & 4 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@
"cancel": "Cancelar",
"go_to_resume": "Ir al resumen",
"action": "Acción",
"done": "Listo"
"done": "Listo",
"addMeasurementUnit": "Agregar unidad de medida",
"delete_measurement_unit": "Eliminar unidad de medida",
"no_go_back": "No, regresar",
"addCategory": "Agregar categoria",
"delete_category": "Eliminar categoria"
},
"messages": {
"save": "Item guardado",
Expand Down Expand Up @@ -137,11 +142,14 @@
"password_length": "La contraseña no debe tener menos de",
"characters": "caracteres",
"invalid_token": "El token no es válido, solicite un nuevo correo electrónico de recuperación de cuenta",
"select_or_add_brand": "Seleccione o escriba el nombre de una marca"
"select_or_add_brand": "Seleccione o escriba el nombre de una marca",
"measurement_units_description": "Las unidades de medida son las unidades en las que se mide el producto, por ejemplo, unidad, paquete, caja, etc.",
"delete_measurement_unit": "¿Estás seguro de que deseas eliminar esta unidad de medida?",
"delete_category": "¿Estás seguro de que deseas eliminar esta categoría?"
},
"category": {
"name": "Nombre",
"category_description_section": "TLas categorías lo ayudan a realizar análisis más profundos para saber qué categorías consume más",
"category_description_section": "Las categorías lo ayudan a realizar análisis más profundos para saber qué categorías consume más",
"category": "Categoria",
"category_placeholder": "Gastable, Legumbres",
"registered_categories": "Categorias registradas",
Expand All @@ -150,7 +158,7 @@
"measurement_unit": {
"name": "Nombre",
"measurement": "Unidad de medida",
"measurement_placeholder": "Unidad, Sixpack",
"measurement_placeholder": "Unidad, Libras, Paquete, Caja, etc.",
"registered_measurement": "Unidad de medida registrada",
"forbiden_delete": "Esta unidad de medida no se puede eliminar porque tiene productos asociados."
},
Expand Down
4 changes: 2 additions & 2 deletions src/store/Modules/Snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const snackbar = {
state.snackbar.message = snackbar.message;
state.snackbar.color = snackbar.color;
state.snackbar.top = snackbar.top === undefined ? null : snackbar.top;
state.snackbar.showClose = snackbar.showClose === undefined ? true : snackbar.showClose;
state.snackbar.showClose = false
state.snackbar.bottom =
snackbar.bottom === undefined ? null : snackbar.bottom;
setTimeout(() => {
state.snackbar.show = false;
}, 5000);
}, snackbar.color === 'error' ? 5000 : 2000);
},
setSnackbarShow(state, value) {
state.snackbar.show = value;
Expand Down
Loading

0 comments on commit 12eab42

Please sign in to comment.