meraproject/themes/merakomis/dictionary/staffing/controller.php
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

49 lines
1.4 KiB
PHP

<?
namespace controller\themes\merakomis\dictionary\staffing;
use core\core\structure\eRowClick;
use ms\ms\structure\msControllerTable;
use themes\Merakomis;
use themes\merakomis\Emp;
use themes\merakomis\structure\merakomisControllerTable;
class Api extends merakomisControllerTable {
static $class = 'themes\merakomis\dictionary\Staffing';
public static function getForm() {
$res = [];
if(Emp::$IS_AUTH) {
$_POST[static::$class::$ID] = $_POST['id'];
$res = static::$class::getFormInfo($_POST);
$res['title'] = 'Редактор должности по штатке';
}
echo je($res);
}
public static function getTableData($post = [])
{
$post['options'][\ModuleTable::ROW_CLICK] = eRowClick::CUSTOM;
$post['getData'] = true;
$res = parent::getTableData($post);
$res['title'] = ['title'=>'Штатное расписание','subtitle'=>Merakomis::$STAFFING_TABLE_SUBTITLE,'text'=>Merakomis::$STAFFING_TABLE_TEXT];
$res['title'] = [
'title' => 'Штатное расписание',
'edit' => true,
'subtitle' => Merakomis::$STAFFING_TABLE_SUBTITLE,
'text' => Merakomis::$STAFFING_TABLE_TEXT,
'subtitle_var' => Merakomis::$_STAFFING_TABLE_SUBTITLE,
'text_var' => Merakomis::$_STAFFING_TABLE_TEXT,
];
echo je($res);
}
}