-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OP-1193 | OP-1194 | OP-1197 | OP-1198 | Update, Delete and validate Ward inventory #2085
base: OP-1200-Wards-Inventory
Are you sure you want to change the base?
OP-1193 | OP-1194 | OP-1197 | OP-1198 | Update, Delete and validate Ward inventory #2085
Conversation
Please @JantBogard resolve conflicts with the update base branch |
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardBrowser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
src/main/java/org/isf/medicalinventory/gui/InventoryWardEdit.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation of new parts looks wrong
private JButton getUpdateButton() { | ||
updateButton = new JButton(MessageBundle.getMessage("angal.common.update.btn")); | ||
updateButton.setMnemonic(MessageBundle.getMnemonic("angal.common.update.btn.key")); | ||
updateButton.setEnabled(false); | ||
updateButton.addActionListener(actionEvent -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change everything "update" to more application standard "edit"
MessageDialog.error(null, "angal.inventory.inventorymustsavebeforevalidation.msg"); | ||
return; | ||
} | ||
int reset = MessageDialog.yesNo(null, "angal.inventory.doyoureallywanttovalidatethisinventory.msg"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing bundle (coming along with OP-1199?)
// validate inventory | ||
int inventoryRowsSize = inventoryRowSearchList.size(); | ||
try { | ||
medicalInventoryManager.validateMedicalInventoryRow(inventory, inventoryRowSearchList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ward inventory cannot use the same validation method for main inventory... it makes no sense...
MovementType charge = (MovementType) chargeComboBox.getSelectedItem(); | ||
inventory.setChargeType(charge != null ? charge.getCode() : null); | ||
|
||
MovementType discharge = (MovementType) dischargeComboBox.getSelectedItem(); | ||
inventory.setDischargeType(discharge != null ? discharge.getCode() : null); | ||
|
||
Supplier supplier1 = (Supplier) supplierComboBox.getSelectedItem(); | ||
inventory.setSupplier(supplier1 != null ? supplier1.getSupId() : null); | ||
|
||
Ward destination = (Ward) destinationComboBox.getSelectedItem(); | ||
inventory.setDestination(destination != null ? destination.getCode() : null); | ||
|
||
inventory = medicalInventoryManager.updateMedicalInventory(inventory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ward inventory we don't have charge type, discharge type and supplier, so it doesn't make sense ask them to the user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole feature must be tailored for wards, cannot be same as main inventory
…rd/openhospital-gui into OP-1193_OP-1194_OP-1197
See OP-1193
See OP-1194
See OP-1197
See OP-1198