mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 23:41:09 +00:00
Module Client, écran SaleScreen : le nom du compte actuellement connecté est désormais correctement mis à jour à la connexion
This commit is contained in:
parent
a179081501
commit
563154eb30
@ -43,6 +43,7 @@ class SaleScreenController {
|
||||
@Override
|
||||
public void onAccountConnectedStateUpdatedEvent() {
|
||||
updateActionLock();
|
||||
view.setCurrentAccount(model.getCurrentAccount());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,6 +31,7 @@ class SaleScreenModel {
|
||||
|
||||
private SaleBuilder currentSaleBuilder;
|
||||
private long tempSaleId;
|
||||
private Object currentAccount;
|
||||
|
||||
SaleScreenModel(AccountService accountService, StockService stockService, SaleService saleService) {
|
||||
if(accountService==null || stockService==null || saleService==null)
|
||||
@ -228,4 +229,8 @@ class SaleScreenModel {
|
||||
else
|
||||
return AccountLevel.getLowest();
|
||||
}
|
||||
|
||||
public Account getCurrentAccount() {
|
||||
return accountService.getCurrentAccount();
|
||||
}
|
||||
}
|
@ -221,4 +221,8 @@ class SaleScreenView implements IFXComponent {
|
||||
void setValidationButtonEnabled(boolean validationButtonEnabled) {
|
||||
validator.setValidationButtonEnable(validationButtonEnabled);
|
||||
}
|
||||
|
||||
public void setCurrentAccount(Account currentAccount) {
|
||||
Platform.runLater(()->saleMakerAccountDisplayer.setText(GUIStringTool.getAccountStringConverter().toString(currentAccount)));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user