X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FMainFrame.java;h=3e844307b760da688c38b988d68a6568c021c191;hp=3ff041854100ec5be12129cbb2fe4337114ab950;hb=bc2309fb0a6c83daa94320d06619c1f8b153696c;hpb=020bf95644b2f26d9c81d66d2a752e55bcd3ad5b diff --git a/src/habeas/MainFrame.java b/src/habeas/MainFrame.java index 3ff0418..3e84430 100644 --- a/src/habeas/MainFrame.java +++ b/src/habeas/MainFrame.java @@ -39,8 +39,10 @@ public class MainFrame extends javax.swing.JFrame { jSeparator1 = new javax.swing.JPopupMenu.Separator(); menuGenerateRaisedBills = new javax.swing.JMenuItem(); menuNoticesReports = new javax.swing.JMenu(); - menuAwaitingPayment = new javax.swing.JMenuItem(); + menuNoticesClarificationPending = new javax.swing.JMenuItem(); + menuNoticeDraftAwaitingApproval = new javax.swing.JMenuItem(); menuNoticesSentNotYetDelivered = new javax.swing.JMenuItem(); + menuAwaitingPayment = new javax.swing.JMenuItem(); menuSettings = new javax.swing.JMenu(); menuDatabaseSettings = new javax.swing.JMenuItem(); menuStationery = new javax.swing.JMenuItem(); @@ -97,14 +99,23 @@ public class MainFrame extends javax.swing.JFrame { menuNoticesReports.setMnemonic('r'); menuNoticesReports.setText("Reports"); - menuAwaitingPayment.setMnemonic('a'); - menuAwaitingPayment.setText("Bills awaiting payment..."); - menuAwaitingPayment.addActionListener(new java.awt.event.ActionListener() { + menuNoticesClarificationPending.setMnemonic('c'); + menuNoticesClarificationPending.setText("Clarifications pending..."); + menuNoticesClarificationPending.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - menuAwaitingPaymentActionPerformed(evt); + menuNoticesClarificationPendingActionPerformed(evt); } }); - menuNoticesReports.add(menuAwaitingPayment); + menuNoticesReports.add(menuNoticesClarificationPending); + + menuNoticeDraftAwaitingApproval.setMnemonic('d'); + menuNoticeDraftAwaitingApproval.setText("Drafts to be approved..."); + menuNoticeDraftAwaitingApproval.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuNoticeDraftAwaitingApprovalActionPerformed(evt); + } + }); + menuNoticesReports.add(menuNoticeDraftAwaitingApproval); menuNoticesSentNotYetDelivered.setMnemonic('s'); menuNoticesSentNotYetDelivered.setText("Notices sent not yet delivered..."); @@ -115,6 +126,15 @@ public class MainFrame extends javax.swing.JFrame { }); menuNoticesReports.add(menuNoticesSentNotYetDelivered); + menuAwaitingPayment.setMnemonic('a'); + menuAwaitingPayment.setText("Bills awaiting payment..."); + menuAwaitingPayment.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuAwaitingPaymentActionPerformed(evt); + } + }); + menuNoticesReports.add(menuAwaitingPayment); + menuLawyerNotices.add(menuNoticesReports); jMenuBar1.add(menuLawyerNotices); @@ -222,6 +242,37 @@ public class MainFrame extends javax.swing.JFrame { frm.setupReportTable(rep, REPORT_TITLE_NOTICES_SENT_NOT_DELIVERED, cols, data); frm.setVisible (true); }//GEN-LAST:event_menuNoticesSentNotYetDeliveredActionPerformed + + private void menuNoticeDraftAwaitingApprovalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuNoticeDraftAwaitingApprovalActionPerformed + // TODO add your handling code here: + NoticesReportViewDialog frm = new NoticesReportViewDialog(this, false); + String cols[] = {"Reference Number", "Description", "Entrustment Date", "Client"}; + int rep = 2; + ArrayList data = Utility.getReportData(rep, -1); + if (data == null) { + JOptionPane.showMessageDialog(this, ERROR_DISPLAYING_REPORT); + return; + } + frm.setupReportTable(rep, REPORT_TITLE_DRAFTS_AWAITING_APPROVAL, cols, data); + frm.setVisible(true); + }//GEN-LAST:event_menuNoticeDraftAwaitingApprovalActionPerformed + + private void menuNoticesClarificationPendingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuNoticesClarificationPendingActionPerformed + // TODO add your handling code here: + NoticesReportViewDialog frm = new NoticesReportViewDialog(this, false); + String cols[] = {"Reference Number", "Description", "Entrustment Date", + "Clarification Remarks", "Client" }; + int rep = 3; + ArrayList data = Utility.getReportData(rep, -1); + if (data == null) { + JOptionPane.showMessageDialog(this, ERROR_DISPLAYING_REPORT); + return; + } + frm.setupReportTable(rep, REPORT_TITLE_CLARIFICATIONS_PENDING, cols, data); + frm.setVisible(true); + }//GEN-LAST:event_menuNoticesClarificationPendingActionPerformed + private static final String REPORT_TITLE_CLARIFICATIONS_PENDING = "Clarifications Pending"; + private static final String REPORT_TITLE_DRAFTS_AWAITING_APPROVAL = "Drafts To Be Approved"; public static final String REPORT_TITLE_NOTICES_SENT_NOT_DELIVERED = "Notices Sent Not Yet Delivered"; public static final String ERROR_DISPLAYING_REPORT = "Error displaying report"; public static final String REPORT_TITLE_BILLS_AWAITING_PAYMENT = "Bills Awaiting Payment"; @@ -272,6 +323,8 @@ public class MainFrame extends javax.swing.JFrame { private javax.swing.JMenu menuLawyerNotices; private javax.swing.JMenuItem menuManageNotices; private javax.swing.JMenu menuMaster; + private javax.swing.JMenuItem menuNoticeDraftAwaitingApproval; + private javax.swing.JMenuItem menuNoticesClarificationPending; private javax.swing.JMenu menuNoticesReports; private javax.swing.JMenuItem menuNoticesSentNotYetDelivered; private javax.swing.JMenu menuSettings;