mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-11-22 16:23:20 +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
|
@Override
|
||||||
public void onAccountConnectedStateUpdatedEvent() {
|
public void onAccountConnectedStateUpdatedEvent() {
|
||||||
updateActionLock();
|
updateActionLock();
|
||||||
|
view.setCurrentAccount(model.getCurrentAccount());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,6 +31,7 @@ class SaleScreenModel {
|
|||||||
|
|
||||||
private SaleBuilder currentSaleBuilder;
|
private SaleBuilder currentSaleBuilder;
|
||||||
private long tempSaleId;
|
private long tempSaleId;
|
||||||
|
private Object currentAccount;
|
||||||
|
|
||||||
SaleScreenModel(AccountService accountService, StockService stockService, SaleService saleService) {
|
SaleScreenModel(AccountService accountService, StockService stockService, SaleService saleService) {
|
||||||
if(accountService==null || stockService==null || saleService==null)
|
if(accountService==null || stockService==null || saleService==null)
|
||||||
@ -228,4 +229,8 @@ class SaleScreenModel {
|
|||||||
else
|
else
|
||||||
return AccountLevel.getLowest();
|
return AccountLevel.getLowest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Account getCurrentAccount() {
|
||||||
|
return accountService.getCurrentAccount();
|
||||||
|
}
|
||||||
}
|
}
|
@ -221,4 +221,8 @@ class SaleScreenView implements IFXComponent {
|
|||||||
void setValidationButtonEnabled(boolean validationButtonEnabled) {
|
void setValidationButtonEnabled(boolean validationButtonEnabled) {
|
||||||
validator.setValidationButtonEnable(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