use of de.symeda.sormas.ui.visit.VisitGrid in project SORMAS-Project by hzi-braunschweig.
the class ContactVisitsView method initView.
// private void updateActiveStatusButtonCaption() {
// if (activeStatusButton != null) {
// activeStatusButton.setCaption(statusButtons.get(activeStatusButton) + LayoutUtil.spanCss(CssStyles.BADGE, String.valueOf(grid.getContainer().size())));
// }
// }
// private void processStatusChangeVisuals(Button button) {
// statusButtons.keySet().forEach(b -> {
// CssStyles.style(b, CssStyles.BUTTON_FILTER_LIGHT);
// b.setCaption(statusButtons.get(b));
// });
// CssStyles.removeStyles(button, CssStyles.BUTTON_FILTER_LIGHT);
// activeStatusButton = button;
// updateActiveStatusButtonCaption();
// }
@Override
protected void initView(String params) {
// Hide the "New visit" button for converted contacts
if (newButton != null && FacadeProvider.getContactFacade().getByUuid(getContactRef().getUuid()).getContactStatus() == ContactStatus.CONVERTED) {
newButton.setVisible(false);
}
criteria.contact(getContactRef());
if (grid == null) {
grid = new VisitGrid(criteria);
gridLayout = new DetailSubComponentWrapper(() -> null);
gridLayout.setSizeFull();
gridLayout.setMargin(true);
gridLayout.setSpacing(false);
gridLayout.addComponent(createTopBar());
gridLayout.addComponent(grid);
gridLayout.setExpandRatio(grid, 1);
setSubComponent(gridLayout);
}
grid.reload();
// updateActiveStatusButtonCaption();
setContactEditPermission(gridLayout);
}
use of de.symeda.sormas.ui.visit.VisitGrid in project SORMAS-Project by hzi-braunschweig.
the class CaseVisitsView method initView.
@Override
protected void initView(String params) {
criteria.caze(getCaseRef());
if (grid == null) {
grid = new VisitGrid(criteria);
gridLayout = new DetailSubComponentWrapper(() -> null);
gridLayout.setSizeFull();
gridLayout.setMargin(true);
gridLayout.setSpacing(false);
gridLayout.addComponent(createTopBar());
gridLayout.addComponent(grid);
gridLayout.setExpandRatio(grid, 1);
setSubComponent(gridLayout);
}
grid.reload();
setCaseEditPermission(gridLayout);
}
Aggregations