diff --git a/ESPD/examples/startComponent.js b/ESPD/examples/startComponent.js
index b5b2dad..8e8ec67 100644
--- a/ESPD/examples/startComponent.js
+++ b/ESPD/examples/startComponent.js
@@ -3,9 +3,11 @@ Vue.component("startComponent", {
return {
raw_data: null,
versions: [{ value: null, text: 'Select an option' }],
- espd_version: null,
- role: null,
- country: null,
+ exp: {
+ espd_version: null,
+ role: null,
+ country: null
+ },
role_opt: [
{ value: 'ca', text: 'Contracting authority - ESPD Request' },
{ value: 'eo', text: 'Economic operator - ESPD Response' }
@@ -17,22 +19,10 @@ Vue.component("startComponent", {
}
},
- watch: {
- espd_version: function (oldV, newV) {
- window.espd_doc.espd_version = oldV
- },
- country: function (oldV, newV) {
- window.espd_doc.country = oldV
- },
- role: function (oldV, newV) {
- window.espd_doc.role = oldV
- }
- },
-
methods: {
selectVersion(event){
- this.espd_version = event
- window.espd_doc.espd_version = this.espd_version
+ this.exp.espd_version = event
+ window.espd_doc.espd_version = this.exp.espd_version
const getData = async () => {
try {
@@ -51,7 +41,7 @@ Vue.component("startComponent", {
},
beforeDestroy(){
- console.log(this.espd_version);
+ console.log(this.exp);
},
@@ -68,12 +58,12 @@ Vue.component("startComponent", {
for (const key in window.raw_data) {
if (Object.hasOwn(window.raw_data, key)) {
this.versions.push(key)
- this.espd_version = this.versions[0]
- window.espd_doc.espd_version = this.espd_version
+ this.exp.espd_version = this.versions[0]
+ window.espd_doc.espd_version = this.exp.espd_version
}
}
- this.role = 'ca'
- this.country = 'EUR'
+ this.exp.role = 'ca'
+ this.exp.country = 'EUR'
//load the model too
thecall = await fetch(`${window.raw_data[window.espd_doc.espd_version].model.source}`)
@@ -111,15 +101,15 @@ Vue.component("startComponent", {
-
+
-
+
-
+
diff --git a/index.html b/index.html
index 427a375..0ad8650 100644
--- a/index.html
+++ b/index.html
@@ -48,20 +48,12 @@
-
+
+
+
-
+
+
diff --git a/src/js/utils.js b/src/js/utils.js
index 840caf8..05d7b5b 100644
--- a/src/js/utils.js
+++ b/src/js/utils.js
@@ -753,3 +753,11 @@ function deleteHTML(part) {
console.log(part);
window.app.$children[6].$refs['procedureComponent'].$refs['v4.0.0-C61'][0]._data[`html_${stringToProperty(part)}`]=''
}
+
+
+/**
+ * Save global state for ESPD Example
+ */
+function saveData(data){
+
+}
\ No newline at end of file