File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/bizproc/install/js/bizproc/automation/src/template_scope.js
Back
import { Type } from 'main.core'; import { DocumentType, DocumentCategory, DocumentStatus } from './document/types'; export class TemplateScope { #documentType: DocumentType; #category: DocumentCategory | null; #status: DocumentStatus; constructor(rawTemplateScope: { DocumentType: { Type: string, Name: string, }, Category: { Id: string | null, Name: string | null, }, Status: { Id: string, Name: string, Color: string, } }) { this.#documentType = rawTemplateScope.DocumentType; this.#category = !Type.isNil(rawTemplateScope.Category.Id) ? rawTemplateScope.Category : null; this.#status = rawTemplateScope.Status; } getId() { if (this.hasCategory()) { return `${this.#documentType.Type}_${this.#category.Id}_${this.#status.Id}`; } return `${this.#documentType.Type}_${this.#status.Id}`; } getDocumentType(): DocumentType { return this.#documentType; } getDocumentCategory(): DocumentCategory { return this.#category; } getDocumentStatus(): DocumentStatus { return this.#status; } hasCategory(): boolean { return !Type.isNull(this.#category); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings