CCrmViewHelper::RenderOrderStatusSettings

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. RenderOrderStatusSettings
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::RenderOrderStatusSettings
static function RenderOrderStatusSettings()
{
	$result = array();
	$isTresholdPassed = false;
	foreach(self::PrepareOrderStatuses() as $status)
	{
		$info = array(
			'id' => $status['STATUS_ID'],
			'name' => $status['NAME'],
			'sort' => intval($status['SORT']),
			'color' => isset($status['COLOR']) ? $status['COLOR'] : ''
		);

		if($status['STATUS_ID'] === 'F')
		{
			$isTresholdPassed = true;
			$info['semantics'] = 'success';
			$info['hint'] = GetMessage('CRM_ORDER_STATUS_MANAGER_F_STEP_HINT');
		}
		elseif($status['STATUS_ID'] === 'D')
		{
			$info['semantics'] = 'failure';
		}
		elseif(!$isTresholdPassed)
		{
			$info['semantics'] = 'process';
		}
		else
		{
			$info['semantics'] = 'apology';
		}
		$result[] = $info;
	}

	$settings = array(
		'imagePath' => '/bitrix/js/crm/images/',
		'serverTime' => time() + CTimeZone::GetOffset()
	);

	$messages = array(
		'dialogTitle' => GetMessage('CRM_ORDER_STATUS_MANAGER_DLG_TTL'),
		'failureTitle' => GetMessage('CRM_ORDER_STATUS_MANAGER_FAILURE_TTL'),
		'selectorTitle' => GetMessage('CRM_ORDER_STATUS_MANAGER_SELECTOR_TTL'),
		'setDate' =>  GetMessage('CRM_ORDER_STATUS_MANAGER_SET_DATE'),
		'dateLabelText' => GetMessage('CRM_ORDER_STATUS_MANAGER_DATE_LABEL'),
		'payVoucherNumLabelText' => GetMessage('CRM_ORDER_STATUS_MANAGER_PAY_VOUCHER_NUM_LABEL'),
		'commentLabelText' => GetMessage('CRM_ORDER_STATUS_MANAGER_COMMENT_LABEL'),
		'notSpecified' => GetMessage('CRM_ORDER_STATUS_MANAGER_NOT_SPECIFIED')
	);

	return '';
}

Добавить комментарий