diff --git a/src/components/AutocompleteAdditives.vue b/src/components/AutocompleteAdditives.vue
index cb2fc9d..1142b07 100644
--- a/src/components/AutocompleteAdditives.vue
+++ b/src/components/AutocompleteAdditives.vue
@@ -2,16 +2,16 @@
-
+
-
+
-
+
-
+
diff --git a/src/components/OpenFoodFactsSearch.vue b/src/components/OpenFoodFactsSearch.vue
new file mode 100644
index 0000000..4723a60
--- /dev/null
+++ b/src/components/OpenFoodFactsSearch.vue
@@ -0,0 +1,207 @@
+
+
+
{{ $t(`Open Food Facts search`) }}
+
+
+
+
+ {{ $t("Search")}}
+
+
+
+ {{ localtime(new Date(item.last_updated_t*1000).toISOString()) }}
+
+
+
+
+
+ mdi-plus
+ mdi-plus
+ mdi-search-web
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Products.vue b/src/components/Products.vue
index d5d9883..f53073e 100644
--- a/src/components/Products.vue
+++ b/src/components/Products.vue
@@ -78,6 +78,12 @@
+
+
+
+
+
+
@@ -90,12 +96,14 @@
import SystemProductsCRUD from './SystemProductsCRUD.vue'
import TableElaboratedProducts from './TableElaboratedProducts.vue'
import { useStore } from '@/store.js'
+ import OpenFoodFactsSearch from './OpenFoodFactsSearch.vue'
export default {
components: {
MyMenuInline,
ProductsCRUD,
SystemProductsCRUD,
TableElaboratedProducts,
+ OpenFoodFactsSearch,
},
data(){
return {
@@ -164,6 +172,9 @@
system_product:null,
system_product_cu_mode:null,
dialog_system_products_crud:false,
+
+ //DIALOG OPEN FOOD FACTS
+ dialog_off:false,
}
},
methods:{
@@ -219,6 +230,19 @@
]
})
}
+
+ r.push({
+ subheader: this.$t("Open Food Facts Search"),
+ children: [
+ {
+ name: this.$t("Search in Open Food Facts"),
+ icon: "mdi-magnify",
+ code: function(){
+ this.dialog_off=true
+ }.bind(this),
+ },
+ ]
+ })
return r
},
on_ProductsCRUD_cruded(){
@@ -241,6 +265,9 @@
this.parseResponseError(error)
});
},
+ on_OFF_cruded(){
+ this.update_all()
+ },
editProduct(item){
this.product=item
this.product_cu_mode="U"
diff --git a/src/components/ProductsCRUD.vue b/src/components/ProductsCRUD.vue
index d54b6cd..0c3ac21 100644
--- a/src/components/ProductsCRUD.vue
+++ b/src/components/ProductsCRUD.vue
@@ -1,7 +1,8 @@
-
{{ title() }}
-
+ {{ title() }}
+
+
@@ -38,13 +39,18 @@
-
+
{{ $t("Add a format") }}
{{ button() }}
{{ $t("Close") }}
+
+
+
+
+
@@ -77,12 +83,22 @@
mode: {
required: true
},
+ info:{//Used to show info
+ required:false,
+ default:""
+ },
+
+ showinfo:{
+ required: false,
+ default:true
+ }
},
data(){
return{
form_valid:false,
newproduct: null,
key:0,
+
formats_headers: [
{ title: this.$t('Format'), sortable: true, key: 'formats'},
diff --git a/src/components/SystemProductsCRUD.vue b/src/components/SystemProductsCRUD.vue
index 6b39401..6fa1af3 100644
--- a/src/components/SystemProductsCRUD.vue
+++ b/src/components/SystemProductsCRUD.vue
@@ -1,7 +1,8 @@
-
{{ title() }}
-
+ {{ title() }}
+
+
@@ -41,15 +42,19 @@
-
+
{{ $t("Add a format") }}
{{ button() }}
{{ $t("Cancel") }}
+
+
+
+
@@ -66,7 +71,7 @@
import AutocompleteProducts from './AutocompleteProducts.vue'
import FormatsCRUD from './FormatsCRUD.vue'
import { empty_formats } from '../empty_objects.js'
- import {RulesString,RulesSelection,RulesFloatGEZ} from 'vuetify_rules'
+ import { RulesString,RulesSelection,RulesFloatGEZ } from 'vuetify_rules'
import { useStore } from '@/store.js'
export default {
components: {
@@ -83,6 +88,10 @@
mode: {
required: true
},
+ info:{//Used to show info
+ required:false,
+ default:""
+ },
},
data(){
return{