<?php
/**
 **	/navigation/leftNav_perm_AGENT.inc
 ** 	leftNav library file
 **
 **	Original Author:	Robby Anderson
 **	Original Date:		September 2005
 **
 **	Modified By:
 **	Modified On:
 **	Modifications:
 **
 ** this shows the left nav for internal Agents
 **
 **/

 	require_once('functions/formcontrol_functions.inc');

	global $sobj;

 	$navSections[0]  = 'Tools';
	$navSections[10] = 'Customer Service';
	$navSections[11] = 'Production';
	$navSections[12] = 'Fulfillment';
	$navSections[110] = 'App Functions';

	global $LKUP_appViewTabs;
	$LKUP_appViewTabs = array(
		array('NOTES', 'Notes/Comms'),
		array('CUSTOMER', 'Customer Info'),
		array('JOINT', 'Joint Info'),
		array('TASKS', 'Tasks'),
		array('BOOK', 'Book Out'),
		array('CREDIT', 'Credit File'),
		array('DECISION', 'Decisioning'),
		array('LENDER', 'Lender History'),
		array('QUOTE', 'Quick Quote'),
		array('DEAL', 'Deal Info'),
		array('CHANNEL', 'Channel Info'),
		array('RECAP', 'Deal Recap'),
		array('SHIPPING', 'Ship History'),
		array('FUNDING', 'Pre-Funding'),
		array('STATUS', 'Status History'),
		array('TITLE', 'Title Info'),
		array('SUMMARY', 'Summary'),
	);

	$navLinks[0]['Tools_QuickView'] = '
		<a href="javascript:void(0);">App Quick View</a>
		<form class="nice" style="padding: 0px 0px 0px 10px; margin: 0px;" onsubmit="loadAppView(); return false;">
			<input name="viewApp" id="viewApp" type="text" placeholder="App List" class="input-text" style="width: 115px;" onclick="this.select();">'
			.form_selectComplex('appViewTabs', 0, 1, 'viewTab', 'NOTES', 'Tab', 'inputsmall', 'style="display:inline;width: 115px;"').
			' <input name="viewGo" id="viewGo" type="button" value="GO" onclick="loadAppView();" style="width: 34px;" class="inputlittle">
		</form>

		';

	$ssnSearchURL = mkcurl('/Agent/AppListBySSN.php', 'SECURE');
	$ssn = ifNull(showVar('viewSSN'), '');
	$navLinks[0]['Tools_SSNSearch'] = '
		<a href="javascript:void(0);">SSN Quick Search</a>
		<form class="nice" id="viewSSNForm" method="POST" action="'.$ssnSearchURL.'" style="padding: 0px 0px 6px 10px; margin: 0px;" onsubmit="return validateSSN();">
			<input name="viewSSN" id="viewSSN" type="text" value="'.$ssn.'" placeholder="SSN" class="input-text" style="display:inline; width: 115px;" onclick="this.select();">
			<input id="viewSSNGo" type="button" value="GO" style="width: 34px;" onclick="validateSSN();" class="inputlittle">
		</form>
		';

	$nameSearchURL = mkcurl('/Agent/AppListByName.php', 'SECURE');
	$firstName = ifNull(showVar('viewNameFirst'), '');
	$lastName = ifNull(showVar('viewNameLast'), '');
	$navLinks[0]['Tools_NameSearch'] = '
		<a href="javascript:void(0);">Name Quick Search</a>
		<form class="nice" id="viewSSNForm" method="POST" action="'.$nameSearchURL.'" style="padding: 0px 0px 8px 12px; margin: 0px;">
			<input name="viewNameFirst" id="viewSSN" type="text" value="'.$firstName.'" placeholder="First Name" class="input-text" style="width: 115px;" onclick="this.select();">
			<input name="viewNameLast" id="viewSSN" type="text" value="'.$lastName.'" placeholder="Last Name" class="input-text" style="display:inline; width: 115px;" onclick="this.select();">
			<input id="viewNameGo" type="submit" value="GO" style="width: 34px;" class="inputlittle">
		</form>
		';

	$vinSearchURL = mkcurl('/Agent/AppListByVIN.php', 'SECURE');
	$vin = ifNull(showVar('viewVIN'), '');
	$navLinks[0]['Tools_VINSearch'] = '
		<a href="javascript:void(0);">VIN Quick Search</a>
		<form class="nice" id="viewSSNForm" method="POST" action="'.$vinSearchURL.'" style="padding: 0px 0px 8px 12px; margin: 0px;">
			<input name="viewVIN" id="viewSSN" type="text" value="'.$vin.'" placeholder="VIN" class="input-text" style="display:inline; width: 115px;" onclick="this.select();">
			<input id="viewVINGo" type="submit" value="GO" style="width: 34px;" class="inputlittle">
		</form>
		';


	if (hasPerm($sobj->getProp('sessionPermissions'), 'DOWNLOAD')) {
		$navLinks[0]['Tools_SecureDownloads'] = mkcurl('/Tools/SecureDownload.php', 'LINKTEXT', 'Secure Downloads', 'SECURE');
	}

	// Customer Service links
	$navLinks[10]['WF_Followup'] = mkcurl('/Agent/AppList.php','ID','FOLLOWUP','LINKTEXT','CS Followup','SECURE');
	$navLinks[10]['WF_WFD_All'] = mkcurl('/Agent/AppList.php','ID','DOC_WAIT','LINKTEXT','New Applications (All)','SECURE');
	$navLinks[10]['WF_Prime'] = mkcurl('/Agent/AppList.php', 'ID', 'PRIME_RESTRUCTURE', 'LINKTEXT','Prime Restructure','SECURE');
	$navLinks[10]['WF_Transmit'] = mkcurl('/Agent/AppList.php', 'ID', 'FIN_TRAN', 'LINKTEXT','Waiting for Data','SECURE');
	//$navLinks[10]['WF_WFD_RG'] = mkcurl('/Agent/AppList.php','ID','DOC_WAIT','QVLIST','fID','-1','LINKTEXT','New (rateGenius)','SECURE');
	//$navLinks[10]['WF_WFD_LT'] = mkcurl('/Agent/AppList.php','ID','DOC_WAIT','QVLIST','fID','1','LINKTEXT','New (LendingTree)','SECURE');
	//$navLinks[10]['WF_WFD_MAL'] = mkcurl('/Agent/AppList.php','ID','DOC_WAIT','QVLIST','fID','20','LINKTEXT','New (MyAutoLoan)','SECURE');

	// Production links
	$navLinks[11]['WF_Mark'] = mkcurl('/Agent/AppList.php', 'ID', 'FIN_WAIT', 'LINKTEXT','Mark for Lender','SECURE');
	$navLinks[11]['WF_Waiting'] = mkcurl('/Agent/AppList.php', 'ID', 'FIN_SENT', 'LINKTEXT','Waiting for Decision','SECURE');
	$navLinks[11]['WF_PendingAuto'] = mkcurl('/Agent/AppList.php', 'ID', 'FIN_PEND', 'LINKTEXT','Pending Auto-Approval','SECURE');
	$navLinks[11]['WF_Decisioned'] = mkcurl('/Agent/AppList.php', 'ID', 'FIN_DEC', 'LINKTEXT','Decisioned by Lender','SECURE');
	$navLinks[11]['WF_Assigned'] = mkcurl('/Agent/AppList.php', 'ID', 'FIN_LEND', 'LINKTEXT','Assigned to Lender','SECURE');

	// Fulfillment links
	$navLinks[12]['WF_Printing'] = mkcurl('/Agent/AppList.php','ID','FUL_PRINT','LINKTEXT','Ready to Print','SECURE');
	$navLinks[12]['WF_SentCust'] = mkcurl('/Agent/AppList.php','ID','FUL_CUSTSENT','LINKTEXT','Sent to Customer','SECURE');
	$navLinks[12]['WF_RecvCust'] = mkcurl('/Agent/AppList.php','ID','FUL_CUSTRECV','LINKTEXT','Recv from Customer','SECURE');
	$navLinks[12]['WF_RecvCustDS'] = mkcurl('/Agent/AppList.php','ID','FUL_CUSTRECV_DS','LINKTEXT','Recv from Customer (DocuSign)','SECURE');
	$navLinks[12]['WF_Exceptions'] = mkcurl('/Agent/AppList.php','ID','FUL_EXCEPTION','LINKTEXT','Funding Exceptions','SECURE');
	$navLinks[12]['WF_SentFund'] = mkcurl('/Agent/AppList.php','ID','FUL_LENDSENT','LINKTEXT','Sent for Funding','SECURE');
	$navLinks[12]['WF_Pending'] = mkcurl('/Agent/AppList.php','ID','FUL_PENDING','LINKTEXT','Pending Payoff','SECURE');
	$navLinks[12]['WF_Verified'] = mkcurl('/Agent/AppList.php','ID','FUL_LENDVER','LINKTEXT','Funding Verified','SECURE');


	// Channel links
	$navLinks[110]['PaymentApprovals'] = mkcurl('/Agent/AppList.php','ID','CHAN_PAY','QVLIST',array('sortBy','sortDir'),array('submit_date','asc'),'LINKTEXT','Payment Approvals','SECURE');
	//$navLinks[110]['WFSShortApp'] = mkcurl('/Apply/ShortAppStart.php','QVLIST','applySponsor','19','LINKTEXT','WFS Short App','SECURE');


/*
	// Product Sales aren't currently used.

	$navSections[50] = 'Product Sales';

	$navLinks[50]['Prod_Followup'] = mkcurl('/Agent/AppList.php','ID','FOLLOWUP','QVLIST','pType','PROD','LINKTEXT','Prod: CS Followup','SECURE');
	$navLinks[50]['Prod_Review'] = mkcurl('/Agent/AppList.php','ID','REVIEW','QVLIST','pType','PROD','LINKTEXT','Prod: Needs Review','SECURE');
	$navLinks[50]['Prod_Print'] = mkcurl('/Agent/AppList.php','ID','PRINT','QVLIST','pType','PROD','LINKTEXT','Prod: Print and Send','SECURE');
	$navLinks[50]['Prod_Sent'] = mkcurl('/Agent/AppList.php','ID','SENT','QVLIST','pType','PROD','LINKTEXT','Prod: Sent to Cust','SECURE');
	$navLinks[50]['Prod_Received'] = mkcurl('/Agent/AppList.php','ID','RECV','QVLIST','pType','PROD','LINKTEXT','Prod: Recv and Verify','SECURE');
	$navLinks[50]['Prod_Complete'] = mkcurl('/Agent/AppList.php','ID','COMPLETE','QVLIST','pType','PROD','LINKTEXT','Prod: Completed','SECURE');
	$navLinks[50]['Prod_ChargeBack'] = mkcurl('/Agent/AppList.php','ID','CHARGE','QVLIST','pType','PROD','LINKTEXT','Prod: Charge Backs','SECURE');
*/

/*
	// Oh yeah. Mortgage stuff isn't currently used, either. Woo.

	$navSections[60] = 'Mortgage Apps';
	$navSections[61] = 'Mortgage Workflow';


	// Mortage App links
	$navLinks[60]['MortApp'] = mkcurl('/Mortgage/ShortAppStart.php','ID','1','LINKTEXT','New Application','SECURE');
	$navLinks[60]['MortSearch'] = mkcurl('/Mortgage/Search.php','LINKTEXT','Mortgage Search','SECURE');


	// Mortgage Workflow links
	$navLinks[61]['MortNew'] = mkcurl('/Mortgage/ViewList.php','ID','NEW','LINKTEXT','Mort: New','SECURE');
	$navLinks[61]['MortProcessed'] = mkcurl('/Mortgage/ViewList.php','ID','PROCESS','LINKTEXT','Mort: Processed','SECURE');
	$navLinks[61]['MortFunded'] = mkcurl('/Mortgage/ViewList.php','ID','FUNDED','LINKTEXT','Mort: Funded','SECURE');
*/

?>
