diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java index 6bdfb43f..32f7d6ec 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java @@ -43,6 +43,7 @@ class SaleScreenController { @Override public void onAccountConnectedStateUpdatedEvent() { updateActionLock(); + view.setCurrentAccount(model.getCurrentAccount()); } @Override diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java index 2aeed7e0..c3b0fd75 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java @@ -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(); + } } \ No newline at end of file diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenView.java b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenView.java index f3595839..6b883bd7 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenView.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenView.java @@ -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))); + } }