package kz.cafe.admin;

import java.util.*;
import kz.cafe.admin.constants.AccessConstants.EditMode;
import kz.cafe.admin.panels.*;
import kz.cafe.admin.panels.model.*;
import kz.cafe.db.model.*;




public class TabStatisticsDate extends TabAbstractStatistics{
   private static final long serialVersionUID = 7328279321531795708L;




   public TabStatisticsDate(AdminMain application, Set<EditMode> setMode){
      super(application, setMode);
   }
   
   

   @Override
   public DBListPanel<MStatisticDate> build(){
      CustomDescriptor dscr = new CustomDescriptor();

      CustomField field = new CustomField();
      field.visible = false;
      field.search.mode = CustomField.Search.SEARCH_MODES.INTEGER;
      field.name = "ID";
      field.db = "ID";
      field.isEditable = false;
      field.style.width = 50;
      field.isSortable = true;
      field.search.row = 0;
      dscr.addField(field);

      CustomDateField dateField = new CustomDateField();
      dateField.visible = true;
      dateField.name = "Дата";
      dateField.db = "date";
      dateField.isEditable = false;
      dateField.style.width = 0;
      dateField.isSortable = true;
      dateField.search.mode = CustomField.Search.SEARCH_MODES.DATE_RANGE;
      dateField.search.row = 0;
      dateField.format = "dd-MM-YYYY";
      dscr.addField(dateField);
      
      common(dscr);

      DBListPanel<MStatisticDate> panel = new DBListPanel<MStatisticDate>(application, MStatisticDate.class, dscr, Dimension.getFull(application), setMode);
		return panel;
	}

   
   

   @Override
   public DBSingle build(int ID){
      // TODO Auto-generated method stub
      return null;
   }
}

