This commit is contained in:
2025-05-06 15:29:43 +01:00
parent dc42e43413
commit 27fae06809
4 changed files with 25 additions and 2 deletions
+1 -1
View File
@@ -361,7 +361,7 @@
<dependency>
<groupId>com.unicenta</groupId>
<artifactId>unicenta-plugins</artifactId>
<version>1.2.7</version>
<version>1.2.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.gluonhq</groupId>
@@ -23,6 +23,8 @@ import com.unicenta.pos.catalog.CatalogSelector;
import com.unicenta.pos.catalog.JCatalog;
import com.unicenta.pos.forms.AppView;
import com.unicenta.pos.ticket.ProductInfoExt;
import lombok.extern.slf4j.Slf4j;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
@@ -34,6 +36,7 @@ import javax.swing.event.ListSelectionListener;
*
* @author JG uniCenta
*/
@Slf4j
public class JPanelTicketSales extends JPanelTicket {
private CatalogSelector m_cat;
@@ -95,6 +98,7 @@ public class JPanelTicketSales extends JPanelTicket {
*/
@Override
protected JTicketsBag getJTicketsBag() {
log.debug("Get JTickets Bag");
return JTicketsBag.createTicketsBag(m_App.getProperties().getProperty("machine.ticketsbag"), m_App, this);
}
@@ -53,6 +53,7 @@ public class JTicketsBagShared extends JTicketsBag {
private DataLogicSales dlSales = null;
private final DataLogicSystem dlSystem;
private Boolean showList;
private int existingOrderCount;
/** Creates new form JTicketsBagShared
@@ -140,12 +141,26 @@ public class JTicketsBagShared extends JTicketsBag {
}
public void updateCount() {
/*
1. Need to get / set the existing count
2. When count increases show dialog
*/
try {
List<SharedTicketInfo> l = dlReceipts.getSharedTicketList();
int count = l.size();
if (count > existingOrderCount) {
log.info("New Order Received from the API!");
// show Order Window
// List<ReprintTicketInfo> ticketInfoList= dlSales.getReprintTicketList();
// JTicketsReprintList listDialog = JTicketsReprintList.newJDialog(JTicketsBagShared.this);
// String id = listDialog.showTicketsList(ticketInfoList, dlSales);
}
if (count > 0) {
m_jListTickets.setText(Integer.toString(count));
existingOrderCount = count;
} else {
m_jListTickets.setText("");
}
@@ -427,6 +442,10 @@ public class JTicketsBagShared extends JTicketsBag {
((JRootApp)m_App).closeAppView();
}//GEN-LAST:event_m_jHoldActionPerformed
private void showOrderWindow() {
}
private void m_jReprintTicketsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jReprintTicketsActionPerformed
SwingUtilities.invokeLater(new Runnable() {
@Override
@@ -96,7 +96,7 @@ public class JTicketsReprintList extends javax.swing.JDialog {
m_ticket = null;
m_ticketCopy = null;
ReprintTicketInfo m_Ticket = null;
ReprintTicketInfo m_Ticket = null;
for (ReprintTicketInfo aticket : atickets) {
m_jtickets.add(new JButtonTicket(aticket, dlSales));