<?php

class ViewInputUsulanBarang extends HtmlResponse
{
   function TemplateModule()
   {
      $this->SetTemplateBasedir(GTFWConfiguration::GetValue('application','docroot').'module/poc_usulan_barang/template');
      $this->SetTemplateFile('view_input_usulan_barang.html');
   }
   
   function ProcessRequest()
   {
   	
   	// combo jenis pengadaan
   	$arrJenisPengadaan = array(
   		array(
   			'id' => '1',
   			'name' => 'Barang'
   		),
   		array(
   			'id' => '2',
   			'name' => 'Jasa Konstruksi'
   		),
   		array(
   			'id' => '3',
   			'name' => 'Jasa Konsultasi'
   		),
   		array(
   			'id' => '4',
   			'name' => 'Jasa Lainnya'
   		),
   	);
   	
   	$return['json_jenis_pengadaan'] = json_encode($arrJenisPengadaan);
   	    	
   	//-- definisikan url
   	$return['url'] = array(
   		'url_rencana_pengadaan' => Dispatcher::Instance()->GetUrl('poc_usulan_barang', 'rencanaPengadaan', 'popup', 'html'),
   		'url_action' => Dispatcher::Instance()->GetUrl('poc_usulan_barang', 'listUsulanBarang', 'view', 'html'),
   		'url_popup_unit' => Dispatcher::Instance()->GetUrl('poc_usulan_barang', 'popUpUnitPj', 'view', 'html'),
   		'url_popup_dhs_barang_jasa' => Dispatcher::Instance()->GetUrl('poc_usulan_barang', 'dhsBarangJasa', 'popup', 'html')
   	);
   	
      return $return;
   }
   
	function ParseTemplate($data = NULL)
	{
		$this->mrTemplate->AddVars('content', $data['url'], '');
		$this->mrTemplate->AddVar('content', 'JSON_JENIS_PENGADAAN', $data['json_jenis_pengadaan']);
	}
}
?>
