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

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.uibinder.client.UiField;
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 SeguimentoPanel extends Composite {

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

	private PermissionsController permsController;
	
	@UiField protected SeguimentoTable tableSeguimento;

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

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

}
