CCrmViewHelper::RenderQuoteStatusSettings

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. RenderQuoteStatusSettings
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::RenderQuoteStatusSettings
static function RenderQuoteStatusSettings()
{
	$result = array();
	$isTresholdPassed = false;
	foreach(self::PrepareQuoteStatuses() 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'] === 'APPROVED')
		{
			$isTresholdPassed = true;
			$info['semantics'] = 'success';
			$info['hint'] = GetMessage('CRM_QUOTE_STATUS_MANAGER_APPROVED_STEP_HINT_MSGVER_1');
		}
		elseif($status['STATUS_ID'] === 'DECLAINED')
		{
			$info['semantics'] = 'failure';
		}
		elseif(!$isTresholdPassed)
		{
			$info['semantics'] = 'process';
		}
		else
		{
			$info['semantics'] = 'apology';
		}
		$result[] = $info;
	}

	$messages = array(
		'dialogTitle' => GetMessage('CRM_QUOTE_STATUS_MANAGER_DLG_TTL_MSGVER_1'),
		'failureTitle' => GetMessage('CRM_QUOTE_STATUS_MANAGER_FAILURE_TTL'),
		'selectorTitle' => GetMessage('CRM_QUOTE_STATUS_MANAGER_SELECTOR_TTL_MSGVER_1'),
		'checkErrorTitle' => GetMessage('CRM_QUOTE_STATUS_MANAGER_CHECK_ERROR_TTL_MSGVER_2'),
		'checkErrorHelp' => GetMessage('CRM_STAGE_MANAGER_CHECK_ERROR_HELP'),
		'checkErrorHelpArticleCode' => '8233923'
	);

	return '';
}

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