diff --git a/clientui/src/components/ReadCodeEntry.vue b/clientui/src/components/ReadCodeEntry.vue
index 9069c25f..4aa0c98b 100644
--- a/clientui/src/components/ReadCodeEntry.vue
+++ b/clientui/src/components/ReadCodeEntry.vue
@@ -146,6 +146,29 @@
+
+
+ Use Templating (Yes/No)
+
+
+
+
+
+
+
+
Select a Template
+
Selected Template: {{ templateSelectedValue }}
+
+
+
+
+
+
+
@@ -189,10 +212,10 @@
- {{ this.rightOptions }}
+ {{ this.selectedPropertiesWindow }}
@@ -307,6 +330,9 @@ export default {
templateYesNoFlag: '',
selectedPropertiesWindow: '',
selectedPropertiesWindowCt: 0,
+ typeValue: [],
+ templatePropertiesValue: 'FULL SYN, ALT_DEFINITION, DEFINITION',
+ templateCodeDesc: ''
};
},
@@ -381,6 +407,7 @@ export default {
this.newTag = ""; // Vue 3 reset newTag
this.tagCounter = this.tagCounter + 1;
this.newTagCounter = this.newTagCounter + 1;
+ this.loadTemplateValues(this.tags)
}
} else {
tempStatus = data[x].queryStatus
@@ -396,6 +423,7 @@ export default {
duration: 6000,
position: "left bottom"
});
+ this.loadTemplateValues(this.tags)
}
}
} else {
@@ -416,6 +444,7 @@ export default {
duration: 6000,
position: "left bottom"
});
+ this.loadTemplateValues(this.tags)
}
}
})
@@ -448,6 +477,7 @@ export default {
this.rightOptions.splice(idx, 1);
this.availableProperties.push(this.rightSelectedOptions[i - 1])
this.rightSelectedOptions.pop();
+ this.selectedPropertiesWindowCt = Object.keys(this.selectedPropertiesWindow).length
}
},
@@ -460,6 +490,8 @@ export default {
this.rightOptions.push(this.leftSelectedOptions[i - 1]);
this.tempListClear.push(this.leftSelectedOptions[i - 1]);
this.leftSelectedOptions.pop();
+ this.selectedPropertiesWindow = this.rightOptions
+ this.selectedPropertiesWindowCt = Object.keys(this.selectedPropertiesWindow).length
}
},
@@ -519,6 +551,9 @@ export default {
document.getElementById("backButton").style.display = "none";
document.getElementById("exportStep").style.display = "none";
document.getElementById("exportButton").style.display = "none";
+ document.getElementById("Templating").style.display = "none";
+ document.getElementById("TemplateOption").style.display = "none";
+
api.getProperties(this.$baseURL)
.then((data)=> {
@@ -549,7 +584,7 @@ export default {
document.getElementById("exportStep").style.display = ""; //Show Export dropdown
document.getElementById("SelectProperties1").style.display = "none"; //Hide list boxes from step 2
document.getElementById("exportButton").style.display = ""; //Show Export button
- document.getElementById("nextButton").style.display = ""; //Hides next button
+ document.getElementById("nextButton").style.display = ""; //Shows next button
this.WaitTimeIndicatorPause()
}
@@ -557,7 +592,7 @@ export default {
this.validatePropertyStep();
}
- //Vue 3 (Builds screen on step 2)
+ //Vue 3 (Shows second screen with properties windows and template dropdown)
if (selectNextOptionBTN_counter === 1) {
if (this.tags.length > 0) { // checks to make sure that a code was entered before proceeding to next screen
document.getElementById("waitTimeIndicator").style.display = ""; //Show wait time indicator
@@ -566,6 +601,29 @@ export default {
document.getElementById("entityLabelId").style.display = "none"; //Hides label on main screen
document.getElementById("SelectProperties1").style.display = ""; //Shows listboxs on second screen
document.getElementById("backButton").style.display = ""; //Shows back button
+ document.getElementById("TemplateOption").style.display = "none"; //Hides Template options radio buttons
+ document.getElementById("Templating").style.display = ""; // Shows Template dropdown
+
+ //Refreshes the template options when a selection is made
+ if (this.templateYesNoFlag === "Yes")
+ {
+ document.getElementById("TemplateOption").style.display = ""; //shows Template option
+ document.getElementById("SelectProperties1").style.display = "none";
+ this.templateCodeDesc = this.tags + ", " + this.templatePropertiesValue
+ this.selectedPropertiesWindow = this.templateCodeDesc
+ if (this.templateSelectedValue != "") {
+ this.templateSelectedValue = this.templateCodeDesc
+ }
+ }
+
+ if (this.templateYesNoFlag === "No" && this.rightOptions.length < 1)
+ {
+ this.templateCodeDesc = this.tags + ", " + this.templatePropertiesValue
+ this.templateSelectedValue = this.templateCodeDesc
+ this.selectedPropertiesWindow = ""
+ this.selectedPropertiesWindowCt = 0
+ }
+
selectNextOptionBTN_counter = selectNextOptionBTN_counter + 1 // Counter controls navigating between steps 1 -3
this.WaitTimeIndicatorPause()
}
@@ -576,18 +634,26 @@ export default {
validatePropertyStep() {
// make sure the user has selected at least one property
//Hides objects on screen that shouldn't appear in step 2
- if (this.rightOptions.length > 0) {
+ //(Shows 3rd screen export functionality)
+ if ((this.rightOptions.length > 0) || ((this.templateValueCount > 0) && (this.templateYesNoFlag === "Yes"))) {
document.getElementById("waitTimeIndicator").style.display = ""; //Show wait time indicator
document.getElementById("exportStep").style.display = ""; //Show Export dropdown
document.getElementById("SelectProperties1").style.display = "none"; //Hide list boxes from step 2
document.getElementById("exportButton").style.display = ""; //Show Export button
document.getElementById("nextOption").style.display = "none"; //Hides next option button
+ document.getElementById("Templating").style.display = "none"; //Hides Templating dropdown
+ document.getElementById("TemplateOption").style.display = "none"; //Hides Template option
this.WaitTimeIndicatorPause()
if (Object.keys(this.rightOptions).length > 0) {
selectNextOptionBTN_counter = selectNextOptionBTN_counter + 1;
return Object.keys(this.rightOptions).length > 0
}
+
+ if (this.templateValueCount > 0)
+ {
+ selectNextOptionBTN_counter = selectNextOptionBTN_counter + 1;
+ }
}
},
@@ -602,6 +668,8 @@ export default {
document.getElementById("entityLabelId").style.display = ""; //Shows label on main screen
document.getElementById("backButton").style.display = "none"; //Hides back button on main screen
document.getElementById("nextOption").style.display = ""; //Shows next button
+ document.getElementById("Templating").style.display = "none"; //Hides Templating dropdown
+ document.getElementById("TemplateOption").style.display = "none"; //Hides Template options radio buttons
selectNextOptionBTN_counter = selectNextOptionBTN_counter - 1;
this.WaitTimeIndicatorPause()
}
@@ -614,6 +682,27 @@ export default {
document.getElementById("exportButton").style.display = "none"; //Hides Export button
document.getElementById("nextOption").style.display = ""; //Shows next button
document.getElementById("exportStep").style.display = "none"; //Hides Export Step
+ document.getElementById("Templating").style.display = ""; //Show Templating dropdown
+ document.getElementById("TemplateOption").style.display = ""; //Hides Template options radio buttons
+
+
+ if (this.templateYesNoFlag === "Yes")
+ {
+ document.getElementById("TemplateOption").style.display = ""; //shows Template option
+ document.getElementById("SelectProperties1").style.display = "none"; //Hides listboxes on second screen
+
+ // refreshes selected template if changes to the selected codes were made
+ if (this.templateSelectedValue != "")
+ {
+ this.templateSelectedValue = this.tags + ", " + this.templatePropertiesValue
+ }
+ }
+
+ if ((this.templateYesNoFlag === "No") || (this.templateYesNoFlag === ""))
+ {
+ document.getElementById("SelectProperties1").style.display = ""; //Hides listboxes on second screen
+ document.getElementById("TemplateOption").style.display = "none"; //hides Template option
+ }
selectNextOptionBTN_counter = selectNextOptionBTN_counter - 1;
this.WaitTimeIndicatorPause()
}
@@ -662,6 +751,47 @@ export default {
}
},
+ //function controls template dropdown on second screen and would allow the properties list boxes
+ //to appear and be removed depending on what option was selected from the list box
+ addTemplating(event){
+ this.templateYesNoFlag = event.target.value
+
+ if (event.target.value === "Yes")
+ {
+ document.getElementById("SelectProperties1").style.display = "none";
+ document.getElementById("TemplateOption").style.display = "";
+
+ if (this.templateSelectedOptions.length > 0) {
+ this.selectedPropertiesWindow = this.tags + ", " + this.templatePropertiesValue
+ this.selectedPropertiesWindowCt = this.templateValueCount
+ this.templateCodeDesc = this.tags + ", " + this.templatePropertiesValue
+ this.templateSelectedValue = this.templateCodeDesc
+ }
+ }
+
+ if (event.target.value === "No")
+ {
+ document.getElementById("SelectProperties1").style.display = "";
+ document.getElementById("TemplateOption").style.display = "none";
+
+ if (this.rightOptions.length > 0){
+ this.selectedPropertiesWindow = this.rightOptions
+ this.selectedPropertiesWindowCt = Object.keys(this.selectedPropertiesWindow).length
+ }
+
+ if (this.rightOptions.length < 1){
+ this.selectedPropertiesWindow = ""
+ this.selectedPropertiesWindowCt = 0
+ }
+ }
+ },
+
+ changeTemplateSelectedVal(selectionLength){
+ this.templateValueCount = selectionLength
+ this.templateSelectedOptions = this.templateCodeDesc
+ this.selectedPropertiesWindow = this.templateCodeDesc
+ this.selectedPropertiesWindowCt = selectionLength
+ },
// Vue 3 method to download file
downloadFile() {
@@ -694,13 +824,20 @@ export default {
//alert("SelectedFormat: " + this.fileFormat);
//alert("filename: " + this.filename);
//alert("selectedFormat Extension: " + this.userSelectedFormat);
- //alert (this.queryEntitySelection);
+ if ((this.rightOptions.length > 0) && (this.templateYesNoFlag === "No" || this.templateYesNoFlag === ""))
+ {
+ this.selectedExportOptions = this.rightOptions
+ }
+ else
+ {
+ this.selectedExportOptions = this.templatePropertiesValue
+ }
axios({
url: this.$baseURL + 'download/get-file-for-readCodes/' +
this.userEnteredCodes + '/' +
- this.rightOptions + '/' +
+ this.selectedExportOptions + '/' +
this.fileFormat + '/'+
this.filename + '.' +
this.userSelectedFormat,
@@ -721,6 +858,10 @@ export default {
//.finally(function() { loader.hide()});
this.WaitTimeIndicatorPause()
},
+ loadTemplateValues(codeDesc){
+ this.templateCodeDesc = codeDesc
+ this.templateCodeDesc = this.templateCodeDesc + ", " + this.templatePropertiesValue
+ }
},
created() {
@@ -904,4 +1045,8 @@ ul {
margin-left: 277px;
width: 158px;
}
+
+.templateSelection {
+ color: rgb(0, 125, 188);
+}
\ No newline at end of file