403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/bizproc/task/src/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/bizproc/task/src/task-status.js
import { Loc, Type, Text } from 'main.core';

export class TaskStatus
{
	#status: number | string;

	constructor(rawStatus: number | string)
	{
		this.#status = rawStatus;
	}

	isWaiting(): boolean
	{
		return this.#status === 0;
	}

	isYes(): boolean
	{
		return this.#status === 1;
	}

	isNo(): boolean
	{
		return this.#status === 2;
	}

	isOk(): boolean
	{
		return this.#status === 3;
	}

	isCancel(): boolean
	{
		return this.#status === 4;
	}

	isCustom(): boolean
	{
		return Type.isStringFilled(this.#status);
	}

	get name(): string
	{
		if (this.isCustom())
		{
			return Text.encode(this.#status);
		}

		if (this.isYes())
		{
			return Loc.getMessage('BIZPROC_TASK_STATUS_YES');
		}

		if (this.isNo() || this.isCancel())
		{
			return Loc.getMessage('BIZPROC_TASK_STATUS_NO');
		}

		return Loc.getMessage('BIZPROC_TASK_STATUS_OK');
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit