refs #4974 Minor changes

This commit is contained in:
Guillermo Bonet 2023-02-09 13:16:47 +01:00
parent e59bd6365d
commit c863737092
1 changed files with 15 additions and 12 deletions

View File

@ -127,18 +127,21 @@ var App = {
this.refreshLogout(); this.refreshLogout();
// Branch options // Branch options
this.request('GET', 'mdbBranches', null, function(err, res) { try {
if (err) this.request('GET', 'mdbBranches', null, function(err, res) {
throw new Error ('Version could not be retrieved: '+ err.message +': '); var selectBranch = document.querySelector('#branch');
var selectBranch = document.querySelector('#branch'); var option = [];
var option = []; for (var x in res) {
for (var x in res) { option[x] = document.createElement('option');
option[x] = document.createElement('option'); option[x].text = res[x].name
option[x].text = res[x].name option[x].value = res[x].name
option[x].value = res[x].name selectBranch.options.add(option[x])
selectBranch.options.add(option[x]) }
} });
}); } catch (err) {
this.catchError(err);
}
var branch = this.mdbGetValue( var branch = this.mdbGetValue(
'SELECT branch FROM tblVariables', 'SELECT branch FROM tblVariables',
'branch', String 'branch', String