Dépôt officiel du code source de l'ERP OpenConcerto
Blame | Last modification | View Log | RSS feed
package org.openconcerto.modules.customersupport;
import java.awt.GridBagConstraints;
import javax.swing.JFrame;
import javax.swing.JPanel;
import org.openconcerto.erp.action.CreateFrameAbstractAction;
import org.openconcerto.erp.core.common.ui.IListFilterDatePanel;
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.element.SQLElement;
import org.openconcerto.sql.view.ListeAddPanel;
import org.openconcerto.ui.DefaultGridBagConstraints;
import org.openconcerto.ui.PanelFrame;
public class CustomerSupportTicketHistoryListAction extends CreateFrameAbstractAction {
@Override
public JFrame createFrame() {
return new PanelFrame(getPanel(), "Historique des tickets de support");
}
public CustomerSupportTicketHistoryListAction() {
super("Historique des tickets de support");
}
public JPanel getPanel() {
final SQLElement eltTicket = Configuration.getInstance().getDirectory().getElement(Module.TABLE_CUSTOMER_SUPPORT_TICKET_HISTORY);
final ListeAddPanel panel = new ListeAddPanel(eltTicket);
final IListFilterDatePanel panelDate = new IListFilterDatePanel(panel.getListe(), eltTicket.getTable().getField("DATE"), IListFilterDatePanel.getDefaultMap());
final GridBagConstraints c = new DefaultGridBagConstraints();
c.gridy = 1;
c.gridwidth = GridBagConstraints.REMAINDER;
c.weightx = 1;
c.weighty = 0;
c.gridy++;
panel.add(panelDate, c);
return panel;
}
}