<?php
/**
 * The config file of action module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Yidong Wang <yidong@cnezsoft.com>
 * @package     action 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
$config->action->editor = new stdclass();
$config->action->editor->createcomment = array('id' => 'content', 'tools' => 'simple');

$config->action->require = new stdclass();
$config->action->require->createdating = 'nextContact, nextDate';
$config->action->require->editdating   = 'contact, nextDate';

$config->action->objectNameFields['announce']         = 'title';
$config->action->objectNameFields['article']          = 'title';
$config->action->objectNameFields['attend']           = 'date';
$config->action->objectNameFields['contact']          = 'realname';
$config->action->objectNameFields['contract']         = 'name';
$config->action->objectNameFields['purchasecontact']  = 'realname';
$config->action->objectNameFields['purchasecontract'] = 'name';
$config->action->objectNameFields['customer']         = 'name';
$config->action->objectNameFields['depositor']        = 'abbr';
$config->action->objectNameFields['doc']              = 'title';
$config->action->objectNameFields['doclib']           = 'name';
$config->action->objectNameFields['holiday']          = 'name';
$config->action->objectNameFields['leads']            = 'realname';
$config->action->objectNameFields['leave']            = 'begin';
$config->action->objectNameFields['lieu']             = 'begin';
$config->action->objectNameFields['makeup']           = 'begin';
$config->action->objectNameFields['order']            = 'id';
$config->action->objectNameFields['overtime']         = 'begin';
$config->action->objectNameFields['product']          = 'name';
$config->action->objectNameFields['project']          = 'name';
$config->action->objectNameFields['provider']         = 'name';
$config->action->objectNameFields['refund']           = 'name';
$config->action->objectNameFields['resume']           = 'id';
$config->action->objectNameFields['schema']           = 'name';
$config->action->objectNameFields['task']             = 'name';
$config->action->objectNameFields['todo']             = 'name';
$config->action->objectNameFields['trade']            = 'id';
$config->action->objectNameFields['user']             = 'account';
$config->action->objectNameFields['usercontact']      = 'name';
$config->action->objectNameFields['kanbanregion']     = 'name';
$config->action->objectNameFields['kanbangroup']      = 'name';
$config->action->objectNameFields['kanbanlane']       = 'name';
$config->action->objectNameFields['kanbancolumn']     = 'name';

$config->action->objectModalLinks = ',announce,todo,kanbanregion,kanbangroup,kanbanlane,kanbancolumn,';
$config->action->blankLinks       = ',manageteam,';

$config->action->needOriginTables   = array();
$config->action->needOriginTables[] = TABLE_LEAVE;
$config->action->needOriginTables[] = TABLE_LIEU;
$config->action->needOriginTables[] = TABLE_OVERTIME;
$config->action->needOriginTables[] = TABLE_REFUND;

$config->action->objectAppNames['announce']         = 'oa';
$config->action->objectAppNames['article']          = 'oa';
$config->action->objectAppNames['attend']           = 'oa';
$config->action->objectAppNames['attendgroup']      = 'oa';
$config->action->objectAppNames['trip']             = 'oa';
$config->action->objectAppNames['egress']           = 'oa';
$config->action->objectAppNames['contact']          = 'crm';
$config->action->objectAppNames['contract']         = 'crm';
$config->action->objectAppNames['purchasecontract'] = 'crm';
$config->action->objectAppNames['customer']         = 'crm';
$config->action->objectAppNames['depositor']        = 'cash';
$config->action->objectAppNames['doc']              = 'doc';
$config->action->objectAppNames['doclib']           = 'doc';
$config->action->objectAppNames['holiday']          = 'oa';
$config->action->objectAppNames['leads']            = 'crm';
$config->action->objectAppNames['leave']            = 'oa';
$config->action->objectAppNames['annual']           = 'oa';
$config->action->objectAppNames['conversion']       = 'oa';
$config->action->objectAppNames['lieu']             = 'oa';
$config->action->objectAppNames['lieuconversion']   = 'oa';
$config->action->objectAppNames['makeup']           = 'oa';
$config->action->objectAppNames['order']            = 'crm';
$config->action->objectAppNames['overtime']         = 'oa';
$config->action->objectAppNames['product']          = 'crm';
$config->action->objectAppNames['project']          = 'proj';
$config->action->objectAppNames['provider']         = 'cash';
$config->action->objectAppNames['refund']           = 'oa';
$config->action->objectAppNames['resume']           = 'crm';
$config->action->objectAppNames['schema']           = 'cash';
$config->action->objectAppNames['task']             = 'proj';
$config->action->objectAppNames['todo']             = 'sys';
$config->action->objectAppNames['trade']            = 'cash';
$config->action->objectAppNames['user']             = 'sys';
$config->action->objectAppNames['usercontact']      = 'sys';
$config->action->objectAppNames['kanbanregion']     = 'proj';
$config->action->objectAppNames['kanbangroup']      = 'proj';
$config->action->objectAppNames['kanbanlane']       = 'proj';
$config->action->objectAppNames['kanbancolumn']     = 'proj';

$config->action->actionModules['createorder']           = 'order';
$config->action->actionModules['editorder']             = 'order';
$config->action->actionModules['assignorder']           = 'order';
$config->action->actionModules['closeorder']            = 'order';
$config->action->actionModules['activateorder']         = 'order';
$config->action->actionModules['createcontract']        = 'contract';
$config->action->actionModules['editcontract']          = 'contract';
$config->action->actionModules['delivercontract']       = 'contract';
$config->action->actionModules['receivecontract']       = 'contract';
$config->action->actionModules['paycontract']           = 'contract';
$config->action->actionModules['finishdelivercontract'] = 'contract';
$config->action->actionModules['finishreceivecontract'] = 'contract';
$config->action->actionModules['finishpaycontract']     = 'contract';
$config->action->actionModules['finishcontract']        = 'contract';
$config->action->actionModules['cancelcontract']        = 'contract';

$config->action->datingTables['order']            = TABLE_ORDER;
$config->action->datingTables['contract']         = TABLE_CONTRACT;
$config->action->datingTables['purchasecontract'] = TABLE_CONTRACT;
$config->action->datingTables['customer']         = TABLE_CUSTOMER;
$config->action->datingTables['contact']          = TABLE_CONTACT;

$config->action->majorList = array();
$config->action->majorList['order']    = array('created', 'signed', 'activated'); 
$config->action->majorList['contract'] = array('created', 'delivered', 'returned'); 
$config->action->majorList['customer'] = array('created', 'assigned', 'createorder'); 
$config->action->majorList['action']   = array('createrecord'); 

$config->action->alias['purchasecontract'] = 'contract';
$config->action->relationType['contract']         = 'client';
$config->action->relationType['purchasecontract'] = 'provider';

$config->action->trash = new stdclass();
$config->action->trash->exclude = new stdclass();
$config->action->trash->exclude->modules = array('resume', 'kanbanregion', 'kanbangroup', 'kanbanlane', 'kanbancolumn');

$config->action->dynamic = new stdclass();
$config->action->dynamic->exclude = new stdclass();
$config->action->dynamic->exclude->modules = array('attend', 'refund', 'leave', 'overtime', 'lieu', 'makeup', 'trip', 'egress', 'action', 'usercontact');
$config->action->dynamic->exclude->actions = array('login', 'logout', 'loginxuanxuan', 'logoutxuanxuan', 'disconnectxuanxuan', 'reconnectxuanxuan');
