Commit e3463031 authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Fix : some bug in interface

parent 5e54f6b5
......@@ -92,6 +92,7 @@ class BankAccount {
this.bankAccount.Type = document.getElementById("account-type").value;
this.bankAccount.Amount = 0;
this.bankAccount.BankOverdraft = 0;
this.bankAccount.Operations = [];
this.isNew = true;
this.handleDom();
}
......@@ -143,6 +144,7 @@ class BankAccount {
throw new Error(`Banker could not be updated (status ${response.status})`);
}
await this.parent.updateBankAccounts();
this.bankAccount = await response.json();
document.getElementById(`accounts-account-edit-${this.bankAccount.ID}`).click();
} catch (e) {
Messages.Show("is-warning", e.message);
......
......@@ -102,7 +102,8 @@ class Operation {
}
async displayOperations(bankAccount) {
this.bankAccount = await this.updateBankAccount(bankAccount.ID);
if (bankAccount.ID != 0) this.bankAccount = await this.updateBankAccount(bankAccount.ID);
else this.bankAccount = bankAccount;
const markup = this.bankAccount.Operations.map((operation) => this.operationTemplate(operation)).join("");
document.getElementById("operations-table").innerHTML = markup;
......
......@@ -79,7 +79,7 @@ class Users {
}
cleanUser(user) {
let props = ["password", "name", "surname", "memberOf"];
let props = ["password", "name", "surname", "memberOf", "displayName"];
for (const prop of props) {
user[prop] = user[prop] === undefined ? "" : user[prop];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment