50 lines
1.8 KiB
PHP
50 lines
1.8 KiB
PHP
<?
|
||
|
||
namespace controller\themes\merakomis\dictionary\contractor;
|
||
|
||
use core\core\structure\eRowClick;
|
||
use ms\ms\structure\msControllerTable;
|
||
use themes\Merakomis;
|
||
use themes\merakomis\dictionary\Contractor;
|
||
use themes\merakomis\Emp;
|
||
use themes\merakomis\structure\merakomisControllerTable;
|
||
|
||
class Api extends merakomisControllerTable {
|
||
|
||
static $class = 'themes\merakomis\dictionary\Contractor';
|
||
|
||
static function getData(){
|
||
$res = [];
|
||
if(Emp::$IS_AUTH) {
|
||
$C = Contractor::getByID(intval($_POST['id']));
|
||
$res = Contractor::format($C);
|
||
}
|
||
echo je($res);
|
||
}
|
||
public static function getTableData($post = [])
|
||
{
|
||
//$TITLE= ['title'=>'Контрагенты','subtitle'=>'Список контрагентов','text'=>'Сводная таблица всех наших контрагентов. Прежде чем ввести в карточку проекта контрагента, его необходимо добавить в эту таблицу, нажав кнопку «Добавить».'];
|
||
|
||
$post['options'][\ModuleTable::ROW_CLICK] = eRowClick::CUSTOM;
|
||
$post['getData'] = true;
|
||
$res = parent::getTableData($post);
|
||
$res['title'] = ['title'=>'Контрагенты','subtitle'=>Merakomis::$CONTRACTOR_TABLE_SUBTITLE,'text'=>Merakomis::$CONTRACTOR_TABLE_TEXT];
|
||
|
||
$res['title'] = [
|
||
'title' => 'Контрагенты',
|
||
'edit' => true,
|
||
'subtitle' => Merakomis::$CONTRACTOR_TABLE_SUBTITLE,
|
||
'text' => Merakomis::$CONTRACTOR_TABLE_TEXT,
|
||
'subtitle_var' => Merakomis::$_CONTRACTOR_TABLE_SUBTITLE,
|
||
'text_var' => Merakomis::$_CONTRACTOR_TABLE_TEXT,
|
||
];
|
||
|
||
|
||
echo je($res);
|
||
}
|
||
|
||
|
||
}
|
||
|
||
|