Skip to content

Commit

Permalink
auto-populate review assignee. close #2065
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Oct 29, 2023
1 parent f088378 commit 49bf02a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
Binary file modified j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar
Binary file not shown.
21 changes: 2 additions & 19 deletions j-lawyer-client/src/de/costache/calendar/CalendarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1155,30 +1155,13 @@ public void eventAdded(final ModelChangedEvent event) {
dlg2.setEventType(ArchiveFileReviewsBean.EVENTTYPE_EVENT);
dlg2.setBeginDate(event.getIntervalStart());
dlg2.setEndDate(event.getIntervalEnd());
dlg2.setReviewAssignee(sel.getAssistant());

FrameUtils.centerDialog(dlg2, EditorsRegistry.getInstance().getMainWindow());
dlg2.setVisible(true);

});

// popup.addPopupMenuListener(new PopupMenuListener() {
//
// @Override
// public void popupMenuWillBecomeVisible(PopupMenuEvent arg0) {
//// mnuOpenCase.setEnabled(jCalendar.getSelectedEvents().size() > 0);
// }
//
// @Override
// public void popupMenuWillBecomeInvisible(PopupMenuEvent arg0) {
//
//
// }
//
// @Override
// public void popupMenuCanceled(PopupMenuEvent arg0) {
//
//
// }
// });
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,10 @@ public void setEndDate(Date d) {
public void setEventType(int eventType) {
this.newEventPanel.setEventType(eventType);
}

public void setReviewAssignee(String assignee) {
this.newEventPanel.setReviewAssignee(assignee);
}

/**
* This method is called from within the constructor to initialize the form.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,4 +911,6 @@ public interface ArchiveFileServiceRemote {
List<TimesheetPosition> getTimesheetPositionsForInvoice(String invoiceId) throws Exception;

TimesheetPosition timesheetPositionAdd(String timesheetId, TimesheetPosition position) throws Exception;

ArrayList<String> getAllArchiveFileNumbers() throws Exception;
}
Binary file modified j-lawyer-server/j-lawyer-server-ejb/lib/j-lawyer-cloud.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2881,6 +2881,8 @@ public DataBucket loadHtmlCaseExport(String caseId) throws Exception {

}



@Override
//@RolesAllowed({"readArchiveFileRole"})
public ArrayList<String> getAllArchiveFileIds() {
Expand Down Expand Up @@ -5953,4 +5955,23 @@ public TimesheetPosition timesheetPositionAdd(String timesheetId, TimesheetPosit

}

@Override
@RolesAllowed({"loginRole"})
public ArrayList<String> getAllArchiveFileNumbers() throws Exception {
JDBCUtils utils = new JDBCUtils();
ArrayList<String> list = new ArrayList<>();
try ( Connection con = utils.getConnection(); PreparedStatement st = con.prepareStatement("select fileNumber from cases"); ResultSet rs = st.executeQuery()) {

while (rs.next()) {
String fileNumber = rs.getString(1);
list.add(fileNumber);
}
} catch (SQLException sqle) {
log.error("Error finding archive files", sqle);
throw new EJBException("Aktensuche konnte nicht ausgeführt werden.", sqle);
}

return list;
}

}

0 comments on commit 49bf02a

Please sign in to comment.