package com.rjconsultores.ventaboletos.web.utilerias.menu.item.gestaoDePricing;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.UiException;

import com.google.gson.Gson;
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PricingGestaoVO;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;

public class ItemMenuPricingGestao extends DefaultItemMenuSistema {

	public ItemMenuPricingGestao() {
		super("indexController.mniGestaoPricing.label");
	}

	@Override
	public String getClaveMenu() {
		return ConstantesFuncionSistema.CLAVE_TELA_GESTAO_PRICING;
	}

	@Override
	public void ejecutar() {

		try {
			Map map = getArgs();

			List<PricingGestaoVO> tmpGestao = new ArrayList<PricingGestaoVO>();
			PricingGestaoVO servico1 = new PricingGestaoVO();
			servico1.setServico("");
			servico1.setDomingo("");
			servico1.setSegunda("");
			servico1.setTerca("");
			servico1.setQuarta("");
			servico1.setQuinta("");
			servico1.setSexta("");
			servico1.setSabado("");
			tmpGestao.add(servico1);

			Gson gson = new Gson();

			String dados = gson.toJson(tmpGestao);

			map.put("json", dados);
			map.put("color", "{}");

			PantallaUtileria.openWindow("/gui/gestao_pricing/gestaoPricing.zul",
					Labels.getLabel("indexController.mniGestaoPricing.label"), map, desktop);

		} catch (Exception e) {
			throw UiException.Aide.wrap(e);
		}

	}

}
