Skip to content
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

Open
wants to merge 11 commits into
base: OP-1200-Wards-Inventory
Choose a base branch
from

Conversation

JantBogard
Copy link

@JantBogard JantBogard commented Nov 12, 2024

See OP-1193
See OP-1194
See OP-1197
See OP-1198

@mwithi
Copy link
Member

mwithi commented Nov 12, 2024

Please @JantBogard resolve conflicts with the update base branch

Copy link
Member

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

Comment on lines 333 to 337
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 -> {
Copy link
Member

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");
Copy link
Member

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);
Copy link
Member

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...

Comment on lines 634 to 646
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);
Copy link
Member

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

Copy link
Member

@mwithi mwithi left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants