package com.evolute.siprp.client.panels.apps.AnaliseAcidentesTrabalho.concluido;

import com.evolute.siprp.client.panels.utils.permissoes.AccessConstants;
import com.evolute.siprp.client.panels.utils.permissoes.PermissionsController;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;

public class ConcluidoPanel extends Composite {

	private static ConcluidoPanelUiBinder uiBinder = GWT.create( ConcluidoPanelUiBinder.class );
	interface ConcluidoPanelUiBinder extends UiBinder< Widget, ConcluidoPanel > {  }

	private PermissionsController permsController;
	

	public ConcluidoPanel() 
	{
		permsController = PermissionsController.getController();
		if ( permsController.hasPermissionTo( AccessConstants.VIEW_CONCLUIDO_PANEL ) )
		{
			setupComponents();
		}
		else
		{
			initWidget( new SimplePanel() );
		}
	}

	private void setupComponents()
	{
		initWidget( uiBinder.createAndBindUi( this ) );
		
	}

}
