import { EventEmitter, OnInit } from '@angular/core'; import { DatePickerComponent } from 'ng2-date-picker'; import { EditorConfig } from 'vcomply-editor'; import { SnackBarService } from '../ui-kit/snack-bar/snack-bar.service'; import { PolicyForm } from '../workflow-interfaces/create-policy-form'; import { AuthService } from '../workflow-services/auth.service'; import { PolicyService } from '../workflow-services/policy.service'; import { ResponsibilityService } from '../workflow-services/responsibility.service'; import { UiKitService } from '../workflow-services/ui-kit.service'; import { PlatformLocation } from '@angular/common'; import { ActivatedRoute, Router } from '@angular/router'; import { FrequencyService } from '../sharedComponents/frequency/frequency.service'; import { FormatAndEvidenceComponent } from '../sharedComponents/format-and-evidence/format-and-evidence.component'; export declare class WorkflowPolicyComponent implements OnInit { private policyService; private snackBar; private uiKitService; private authService; private responsibilityService; private router; private route; private frequencyService; pickerChanged: EventEmitter; mode: string; policyId: string; showConfirmationAlert: EventEmitter; datePicker: DatePickerComponent; populateOption: EventEmitter; disconnectRefresh: EventEmitter; shiftToEditMode: EventEmitter; convertFileData: any; selectedCategory: string; formatEvidence: FormatAndEvidenceComponent; description: EditorConfig; workflowType: string; scrollToBottom: boolean; navigateToDocumentsSection: boolean; activeSelector: string; rcList: any; usersList: any; allApprovers: any; allReviewers: any; assigneesList: any; reviewersList: any; overseersList: any; rcListLoaded: boolean; usersListLoaded: boolean; categoryList: any; groupsList: any[]; workFlowList: any[]; approverWorkFlowList: any[]; submitted: boolean; loader: boolean; categoriesListLoaded: boolean; groupsListLoaded: boolean; categoryConfig: { panelTitle: string; floatingTextSingular: string; floatingTextPlural: string; searchPlaceholder: string; searchEnabled: boolean; selectAllEnabled: boolean; }; approvalWorkflowConfig: { panelTitle: string; floatingTextSingular: string; floatingTextPlural: string; searchPlaceholder: string; searchEnabled: boolean; selectAllEnabled: boolean; }; addMoreLevels: boolean; approversListIndex: number; workflowList: string[]; datePickerOverlay: boolean; dateConfig: { disableKeypress: boolean; format: string; unSelectOnClick: boolean; openOnClick: boolean; openOnFocus: boolean; min: string; }; frequencyDetails: { pattern: string; notificationPending: number; dateOfModified: number; deactivationValue: number; selectedReport: number; lifecycle: string; startDate: number; startOnTheDay: number; window: number; failed: number; time: string; failedTime: string; continuous_failed_days: number; }; reviewerFrequencyDetails: { pattern: string; notificationPending: number; dateOfModified: number; deactivationValue: number; selectedReport: number; lifecycle: string; startDate: number; startOnTheDay: number; window: number; failed: number; time: string; failedTime: string; continuous_failed_days: number; }; frequencyPlaceholder: string; reviewerFrequencyPlaceholder: string; sideSelectorElements: string[]; riskClassification: { name: string; value: number; class: string; }[]; showRiskClassification: boolean; showCreateDocuments: boolean; organization_id: string; member_obj_id: string; memberId: number; userInfo: any; policyApprovalFlag: number; baseURL: string; constructor(policyService: PolicyService, snackBar: SnackBarService, uiKitService: UiKitService, authService: AuthService, responsibilityService: ResponsibilityService, router: Router, route: ActivatedRoute, frequencyService: FrequencyService, platformLocation: PlatformLocation); policyForm: PolicyForm; ngOnInit(): void; /** * Displays the listing pages the left side of policy form to set and edit the dropdown fields values * @param type holds name of particular list is to be displayed * @param event contains boolean value to display the list or not * @param workflowType it sets the approval workflow type while editing the approval workflow. */ activateSelector(type: any, event: boolean, workflowType?: any): void; /** * Closes the listing pages */ disableSelector(): void; /** * Fetches Responsibility centers list */ getRCList(): void; /** * Fetches organization users list */ getUsersList(): void; /** * Fetches Policy Categories list */ getCategoriesList(): void; /** * Fetches organization users groups list */ getGroupsList(): void; /** * Sets the approvers workflow from the selected workflow on Approvers workflow list * @param event contains selected predefined workflow */ selectedWorkflowChange(event: any): void; /** * Fetches Approvers workflow list based on selected policy categories * @param id contains selected categories id's */ getApproverWorkFlow(id: any): void; /** * Fetches Approvers and reviewers list based on selected policy categories * @param categoryIds contains selected categories id's */ getApproversAndReviewersList(categoryIds: any, approverIds?: any, reviewerIds?: any): void; /******* * It is to populate more options elements while editing the policy form */ populateOptionalFields(): void; /** * It is to add and remove the elements from More option to the policy Form * @param event contains details related to checked value, code particular elements from More options */ addMoreInfo(event: any): void; /** * It is to ensure whether all required lists on Policy from is loaded from the api call or not */ checkWhetherAllListsLoaded(): void; /** * Triggers the confirmation popup when availability on Policy portal toggle in ON * @param event contains toggle value which is always true or false */ availabilityOnPortal(event: any): void; /** * Receives the input from the Confirmation dialog of available on Policy portal * @param event contains selected option from the confirmation dialog which is always either 'YES' or 'NO' */ confirmPolicyPortal(event: any): void; /** * Sets the policyForm with selected elements from the listing, frequency, file upload components * @param type defines the particular field on Policy form. * @param selectedItems contains the list of selected items from the list */ saveSelectedList(type: string, selectedItems: any): void; /** * Removes the particular element from selected list * @param type defines the particular case * @param event holds the id or key of element to be removed * @param removeIndex contains the index of the element to be removed */ remove(type: any, event: any, removeIndex?: any): void; /** * Refreshes the assignees and overseers list such that both list does not contain the same users based on selection */ refreshAllLists(): void; /** * Returns whole list based on selected id's from a particular list elements * @param list it is the main list which contains all elements list * @param key contains key to filter selected list from the list * @param ids selected ids array */ setList(list: any[], ids: any[], key: string): any; /** * Returns id's from a particular list elements * @param list actual selected list * @param key contains key to extract id from the list */ returnIds(list: any[], key: string): any[]; /** * Sets the reviewer type in approval workflow * @param event contains selected reviewer type */ reviewerTypeChange(event: any): void; /** * Sets frequency in edit mode */ frequencyDataPopulation(event: any): void; /** * Sets the selected frequency details in the policyForm * @param event contains selected frequency details */ frequencyData(event: any): void; /** * Populates the frequency field with selected data from frequency component * @param event contains selected frequency details */ frequencyPopulation(event: any): void; reviewerFrequencyDataPopulation(event: any): void; resetReviewerFrequency(): void; /** * Sets the selected reviewer frequency details in the policyForm * @param event contains selected frequency details */ reviewerFrequencyData(event: any): void; /** * Populates the reviewer frequency field with selected data from frequency component * @param event contains selected frequency details */ reviewerFrequencyPopulation(event: any): void; /** * Validates the data submitted on create policy form */ validatePolicy(): boolean; /** * Makes an api call to create a policy * @param policy contains policyForm data */ submitPolicy(): false | undefined; linkDocumentWithPolicy(document: any): void; /** * opens the date picker on policy form */ openDatePicker(): void; /** * closes the date picker from policy form */ closeDatePicker(evt: any): void; editPolicyFromDocuments(): void; checkForCreateDocuments(): void; editPolicy(): void; populatePolicyForm(data: any, categoryIds: any): void; }