Skip to content

Commit

Permalink
enhanced timesheet functionality:
Browse files Browse the repository at this point in the history
- new summary table
- reformatted timeesheet table
- automatic formatting of dates and currency values per language settings

close #2721. close #2722. close #2723.
  • Loading branch information
j-dimension committed Dec 5, 2024
1 parent 0b3a5a3 commit bc8f97e
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ private void cmbTemplatesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
PartiesTriplet triplet=new PartiesTriplet(pe.getAddress(), pe.getReferenceType(), pe.getInvolvement());
partiesTriplets.add(triplet);
}
HashMap<String, Object> htValues = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, this.contextArchiveFile, partiesTriplets, this.contextDictateSign, null, new HashMap<>(), caseLawyer, caseAssistant, author, null, null, null, null, null, null);
HashMap<String, Object> htValues = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, this.contextArchiveFile, partiesTriplets, this.contextDictateSign, null, new HashMap<>(), caseLawyer, caseAssistant, author, null, null, null, null, null, null, null);
this.txtSubject.setText(TemplatesUtil.replacePlaceHolders(tpl.getSubject(), htValues));

placeHolderNames = TemplatesUtil.getPlaceHoldersInTemplate(tpl.getBody(), allPartyTypesPlaceholders,new ArrayList<>());
Expand All @@ -2095,7 +2095,7 @@ private void cmbTemplatesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
ht.put(ph, "");
}

htValues = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, this.contextArchiveFile, partiesTriplets, this.contextDictateSign, null, new HashMap<>(), caseLawyer, caseAssistant, author, null, null, null, null, null, null);
htValues = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, this.contextArchiveFile, partiesTriplets, this.contextDictateSign, null, new HashMap<>(), caseLawyer, caseAssistant, author, null, null, null, null, null, null, null);

String t = TemplatesUtil.replacePlaceHolders(tpl.getBody(), htValues) + System.getProperty("line.separator");
int cursorIndex = t.indexOf(PLACEHOLDER_CURSOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ private void cmbTemplatesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
for (String ph : placeHolderNames) {
ht.put(ph, "");
}
HashMap<String, Object> htValues = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, contextArchiveFile, partiesTriplets, null, null, formPlaceHolderValues, caseLawyer, caseAssistant, author, null, null, null, null, null, null);
HashMap<String, Object> htValues = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, contextArchiveFile, partiesTriplets, null, null, formPlaceHolderValues, caseLawyer, caseAssistant, author, null, null, null, null, null, null, null);

String t = TemplatesUtil.replacePlaceHolders(tpl.getBody(), htValues);
int cursorIndex = t.indexOf(EmailTemplate.PLACEHOLDER_CURSOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ public class AddDocumentFromTemplateDialog extends javax.swing.JDialog implement
private byte[] giroCode = null;
private String ingoText=null;
private StyledCalculationTable timesheetsTable = null;
private StyledCalculationTable timesheetSummaryTable = null;
private List<PartyTypeBean> allPartyTypes = null;
private Collection<String> formPlaceHolders = new ArrayList<>();
private HashMap<String, String> formPlaceHolderValues = new HashMap<>();
Expand All @@ -734,7 +735,7 @@ public class AddDocumentFromTemplateDialog extends javax.swing.JDialog implement
private DocumentNameTemplate nameTemplate = null;

public AddDocumentFromTemplateDialog(java.awt.Frame parent, boolean modal, ArchiveFilePanel casePanel, CaseFolderPanel targetTable, ArchiveFileBean aFile, List<ArchiveFileAddressesBean> involved) {
this(parent, modal, casePanel, targetTable, aFile, involved, null, null, null, null, null, null, null);
this(parent, modal, casePanel, targetTable, aFile, involved, null, null, null, null, null, null, null, null);
}

/**
Expand All @@ -754,7 +755,7 @@ public AddDocumentFromTemplateDialog(java.awt.Frame parent, boolean modal, Archi
* @param giroCode
* @param ingoText
*/
public AddDocumentFromTemplateDialog(java.awt.Frame parent, boolean modal, ArchiveFilePanel casePanel, CaseFolderPanel targetTable, ArchiveFileBean aFile, List<ArchiveFileAddressesBean> involved, GenericCalculationTable calculationTable, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, byte[] giroCode, String ingoText) {
public AddDocumentFromTemplateDialog(java.awt.Frame parent, boolean modal, ArchiveFilePanel casePanel, CaseFolderPanel targetTable, ArchiveFileBean aFile, List<ArchiveFileAddressesBean> involved, GenericCalculationTable calculationTable, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, StyledCalculationTable timesheetSummaryTable, byte[] giroCode, String ingoText) {
super(parent, modal);

this.calculationTable = calculationTable;
Expand All @@ -764,6 +765,7 @@ public AddDocumentFromTemplateDialog(java.awt.Frame parent, boolean modal, Archi
this.ingoText = ingoText;
this.invoiceTable = invoiceTable;
this.timesheetsTable = timesheetsTable;
this.timesheetSummaryTable = timesheetSummaryTable;

this.targetTable = targetTable;
this.aFile = aFile;
Expand Down Expand Up @@ -1803,7 +1805,7 @@ private void templateSelection() {
for (String ph : placeHoldersBody) {
ht.put(ph, "");
}
ht = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, aFile, partiesTriplets, this.cmbDictateSigns.getSelectedItem().toString(), this.calculationTable, this.formPlaceHolderValues, caseLawyer, caseAssistant, author, this.invoice, this.invoiceSender, this.invoiceTable, this.timesheetsTable, giroCode, ingoText);
ht = locator.lookupSystemManagementRemote().getPlaceHolderValues(ht, aFile, partiesTriplets, this.cmbDictateSigns.getSelectedItem().toString(), this.calculationTable, this.formPlaceHolderValues, caseLawyer, caseAssistant, author, this.invoice, this.invoiceSender, this.invoiceTable, this.timesheetsTable, this.timesheetSummaryTable, giroCode, ingoText);

int emptyValues = 0;
for (String key : ht.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4574,11 +4574,11 @@ private void cmdSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST

}//GEN-LAST:event_cmdSaveActionPerformed

public ArchiveFileDocumentsBean newDocumentDialog(GenericCalculationTable table, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, byte[] giroCode, String ingoText) {
return this.newDocumentActionPerformedImpl(table, invoice, invoiceSender, invoiceTable, timesheetsTable, giroCode, ingoText);
public ArchiveFileDocumentsBean newDocumentDialog(GenericCalculationTable table, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, StyledCalculationTable timesheetSummaryTable, byte[] giroCode, String ingoText) {
return this.newDocumentActionPerformedImpl(table, invoice, invoiceSender, invoiceTable, timesheetsTable, timesheetSummaryTable, giroCode, ingoText);
}

private ArchiveFileDocumentsBean newDocumentActionPerformedImpl(GenericCalculationTable table, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, byte[] giroCode, String ingoText) {
private ArchiveFileDocumentsBean newDocumentActionPerformedImpl(GenericCalculationTable table, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, StyledCalculationTable timesheetSummaryTable, byte[] giroCode, String ingoText) {

List<ArchiveFileAddressesBean> involved = new ArrayList<>();

Expand All @@ -4599,7 +4599,7 @@ private ArchiveFileDocumentsBean newDocumentActionPerformedImpl(GenericCalculati
}
}

AddDocumentFromTemplateDialog dlg = new AddDocumentFromTemplateDialog(EditorsRegistry.getInstance().getMainWindow(), true, this, this.caseFolderPanel1, this.dto, involved, table, invoice, invoiceSender, invoiceTable, timesheetsTable, giroCode, ingoText);
AddDocumentFromTemplateDialog dlg = new AddDocumentFromTemplateDialog(EditorsRegistry.getInstance().getMainWindow(), true, this, this.caseFolderPanel1, this.dto, involved, table, invoice, invoiceSender, invoiceTable, timesheetsTable, timesheetSummaryTable, giroCode, ingoText);
dlg.setTitle("Dokument hinzufügen");
FrameUtils.centerDialog(dlg, EditorsRegistry.getInstance().getMainWindow());
dlg.setVisible(true);
Expand Down Expand Up @@ -4632,7 +4632,7 @@ public void saveInvolvements() {
}
}

private void newDocumentActionPerformedImpl(StyledCalculationTable rvgTable, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, byte[] giroCode, String ingoText) {
private void newDocumentActionPerformedImpl(StyledCalculationTable rvgTable, Invoice invoice, AppUserBean invoiceSender, StyledCalculationTable invoiceTable, StyledCalculationTable timesheetsTable, StyledCalculationTable timesheetSummaryTable, byte[] giroCode, String ingoText) {

// save all forms to have the latest data available for document creation
this.saveFormData();
Expand All @@ -4658,7 +4658,7 @@ private void newDocumentActionPerformedImpl(StyledCalculationTable rvgTable, Inv
}
}

AddDocumentFromTemplateDialog dlg = new AddDocumentFromTemplateDialog(EditorsRegistry.getInstance().getMainWindow(), true, this, this.caseFolderPanel1, this.dto, involved, rvgTable, invoice, invoiceSender, invoiceTable, timesheetsTable, giroCode, ingoText);
AddDocumentFromTemplateDialog dlg = new AddDocumentFromTemplateDialog(EditorsRegistry.getInstance().getMainWindow(), true, this, this.caseFolderPanel1, this.dto, involved, rvgTable, invoice, invoiceSender, invoiceTable, timesheetsTable, timesheetSummaryTable, giroCode, ingoText);
dlg.setTitle("Dokument hinzufügen");
FrameUtils.centerDialog(dlg, EditorsRegistry.getInstance().getMainWindow());
dlg.setVisible(true);
Expand All @@ -4667,7 +4667,7 @@ private void newDocumentActionPerformedImpl(StyledCalculationTable rvgTable, Inv

private void cmdNewDocumentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdNewDocumentActionPerformed

this.newDocumentActionPerformedImpl(null, null, null, null, null, null, null);
this.newDocumentActionPerformedImpl(null, null, null, null, null, null, null, null);

}//GEN-LAST:event_cmdNewDocumentActionPerformed

Expand Down
Loading

0 comments on commit bc8f97e

Please sign in to comment.