vcomply-workflow-engine 7.3.9 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/add-multiple-responsibility-with-tab/add-multiple-responsibility-with-tab.component.mjs +255 -6
- package/esm2022/lib/constants/regix.constants.mjs +3 -1
- package/esm2022/lib/constants/responsibility.mjs +22 -1
- package/esm2022/lib/sharedComponents/bulk-responsibility-view/bulk-responsibility-view.component.mjs +14 -3
- package/esm2022/lib/workflow-compliance/workflow-compliance.component.mjs +1 -2
- package/fesm2022/vcomply-workflow-engine.mjs +289 -7
- package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
- package/lib/add-multiple-responsibility-with-tab/add-multiple-responsibility-with-tab.component.d.ts +35 -1
- package/lib/constants/regix.constants.d.ts +2 -0
- package/lib/constants/responsibility.d.ts +8 -0
- package/lib/sharedComponents/bulk-responsibility-view/bulk-responsibility-view.component.d.ts +11 -0
- package/lib/workflow-risk/workflow-risk.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -32015,7 +32015,6 @@ class WorkflowComplianceComponent {
|
|
|
32015
32015
|
}
|
|
32016
32016
|
getInitialData() {
|
|
32017
32017
|
this.isDuplicate = this.responsibilityDetails?.duplicate ?? false;
|
|
32018
|
-
this.hiddenList.push('ASSESSMENT');
|
|
32019
32018
|
this.hiddenList.push('ASSURANCE');
|
|
32020
32019
|
this.getAssigneesList();
|
|
32021
32020
|
this.checkWhetherAllListsLoaded();
|
|
@@ -46869,11 +46868,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
46869
46868
|
}], ctorParameters: function () { return []; } });
|
|
46870
46869
|
|
|
46871
46870
|
const RISK_CLASS_LIST = ['high', 'low-medium', 'low', 'medium-high'];
|
|
46871
|
+
const FULL_MONTH_NAMES = [
|
|
46872
|
+
'January',
|
|
46873
|
+
'February',
|
|
46874
|
+
'March',
|
|
46875
|
+
'April',
|
|
46876
|
+
'May',
|
|
46877
|
+
'June',
|
|
46878
|
+
'July',
|
|
46879
|
+
'August',
|
|
46880
|
+
'September',
|
|
46881
|
+
'October',
|
|
46882
|
+
'November',
|
|
46883
|
+
'December',
|
|
46884
|
+
];
|
|
46872
46885
|
const VALIDATION_MESSAGES = {
|
|
46873
46886
|
RISK_CLASS: 'Invalid risk class. Select a valid option from the drop-down list.',
|
|
46874
46887
|
DAY: 'Invalid day selection. Select a valid day from the drop-down list in the template.',
|
|
46875
46888
|
DATE_FORMAT: 'Invalid date format. Select a valid date from the drop-down list in the template.',
|
|
46876
46889
|
DUE_DATE: 'Invalid Due Date.',
|
|
46890
|
+
DUE_TIME: "This value does not match the VComply template's format. Use the correct value from the drop-downs in the template.",
|
|
46891
|
+
ENDS_AFTER_OCCURRENCES_GREATER_THAN_ZERO: 'Must be greater than 0',
|
|
46892
|
+
ENDS_AFTER_OCCURRENCES_NUMERIC: 'Must be numeric value',
|
|
46893
|
+
ENDS_BY_DATE_INVALID_VALUE: 'The data added in this field is not valid. Select from the dropdown provided in the template.',
|
|
46894
|
+
ENDS_BY_DATE_INCOMPLETE: 'Ends By Date requires both a day and a month. Please complete both fields or clear both to leave the end date unset.',
|
|
46895
|
+
ENDS_BY_DATE_PAST: 'The Ends By Date is in the past. This responsibility will be created with no future occurrences.',
|
|
46896
|
+
ENDS_BY_DATE_CONFLICT: "You have provided values for both 'Ends After Occurrences' and 'Ends By Date'. Fill in only one, or leave both blank if the responsibility will always be active.",
|
|
46877
46897
|
};
|
|
46878
46898
|
|
|
46879
46899
|
class BulkResponsibilityViewComponent {
|
|
@@ -46887,8 +46907,15 @@ class BulkResponsibilityViewComponent {
|
|
|
46887
46907
|
this.responsibilityType = 'singleTab';
|
|
46888
46908
|
this.finalResponsibilities = 0;
|
|
46889
46909
|
this.isConfirmClickable = false;
|
|
46910
|
+
this.isHorizontallyScrolled = false;
|
|
46890
46911
|
this.responsibilityMultiTabBulkUpload = [];
|
|
46891
46912
|
}
|
|
46913
|
+
get hasExtendedFrequencyColumns() {
|
|
46914
|
+
return !!this.responsibilityBulkUpload?.hasExtendedFrequencyColumns;
|
|
46915
|
+
}
|
|
46916
|
+
get hasProgramColumn() {
|
|
46917
|
+
return !!this.responsibilityBulkUpload?.header?.includes('Program');
|
|
46918
|
+
}
|
|
46892
46919
|
ngOnChanges() {
|
|
46893
46920
|
if (this.responsibilityBulkUpload) {
|
|
46894
46921
|
this.finalResponsibilities = 0;
|
|
@@ -46910,6 +46937,10 @@ class BulkResponsibilityViewComponent {
|
|
|
46910
46937
|
});
|
|
46911
46938
|
}
|
|
46912
46939
|
}
|
|
46940
|
+
onGridScroll(event) {
|
|
46941
|
+
const scrollLeft = event.target?.scrollLeft ?? 0;
|
|
46942
|
+
this.isHorizontallyScrolled = scrollLeft > 0;
|
|
46943
|
+
}
|
|
46913
46944
|
submit() {
|
|
46914
46945
|
this.submitResponsibilityBulkUpload.emit();
|
|
46915
46946
|
}
|
|
@@ -46917,11 +46948,11 @@ class BulkResponsibilityViewComponent {
|
|
|
46917
46948
|
this.cancel.emit();
|
|
46918
46949
|
}
|
|
46919
46950
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BulkResponsibilityViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46920
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BulkResponsibilityViewComponent, selector: "app-bulk-responsibility-view", inputs: { responsibilityBulkUpload: "responsibilityBulkUpload", fileName: "fileName", defaultOwner: "defaultOwner", loader: "loader", tabType: "tabType", bulkUpload: "bulkUpload", responsibilityType: "responsibilityType" }, outputs: { submitResponsibilityBulkUpload: "submitResponsibilityBulkUpload", cancel: "cancel", selectedTab: "selectedTab" }, usesOnChanges: true, ngImport: i0, template: "<!-- --------------------------------------------------------------------upward is new one-------------------- -->\r\n<app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- HTML for multiple tabs -->\r\n<ng-container *ngIf=\"responsibilityType === 'multiTab'\">\r\n <div class=\"bulk-view\">\r\n <div class=\"bulk-view-head\">\r\n <h2 class=\"bulk-view-title\">\r\n {{fileName}}\r\n </h2>\r\n </div>\r\n <div class=\"bulk-view-body bulk\">\r\n <div class=\"exel-view\">\r\n <div class=\"exel-view-row head\">\r\n <div class=\"exel-view-column sl-no\">#</div>\r\n <div class=\"exel-view-column\">Responsibility Name <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\" *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Program</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">Program Type</div>\r\n <div class=\"exel-view-column\">Program</div>\r\n <div class=\"exel-view-column\">Program Category</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Entrusted By</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Entrust To <span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Person or Group<span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">All or Any Persons</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Key Responsibility?</div>\r\n <div class=\"exel-view-column\" *ngIf=\"tabType === 'frequency'\"\r\n [class.five-column]=\"tabType === 'frequency' || tabType === 'onCompletion'\"\r\n [class.three-column]=\"tabType === 'ongoing'\">\r\n <div class=\"exel-view-row\">\r\n <!-- <div class=\"exel-view-column large\">Frequency of Occurrence and Completion Window <span class=\"required\">*</span></div> -->\r\n <div class=\"exel-view-column large\">{{responsibilityBulkUpload?.header.includes('Program') ?\r\n responsibilityBulkUpload?.header[8]?.slice(0, -1) :\r\n responsibilityBulkUpload?.header[5]?.slice(0, -1)}}<span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"tabType === 'frequency' || tabType === 'onCompletion'\"\r\n [class.three-column]=\"tabType === 'ongoing'\">\r\n <ng-container *ngIf=\"tabType === 'frequency'\">\r\n <div class=\"exel-view-column\">Frequency <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Day)</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Month)</span></div>\r\n <div class=\"exel-view-column\">Start <span class=\"info-text\">(No. of days before the due\r\n date)</span></div>\r\n <div class=\"exel-view-column\">Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be completed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of\r\n days after the due date. Select \"0\" if the responsibility must be completed on\r\n the due date)</span></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column two-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Responsibility Centre</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">Responsibility Centre Name</div>\r\n <div class=\"exel-view-column\">Responsibility Centre Type</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Risk Class</div>\r\n <div class=\"exel-view-column\">Objective</div>\r\n <div class=\"exel-view-column\">Notes</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Format & Evidence</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\" [class.three-column]=\"false\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Format</div>\r\n <div class=\"exel-view-column\">Format For Responsibility (link)</div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Evidence</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Assessments or Checkpoints</div> -->\r\n <div class=\"exel-view-column four-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Review of Responsibility</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\">Reviewer</div>\r\n <div class=\"exel-view-column\">Reviewer Type\r\n <span class=\"info-text\">(Specify the type of reviewer flow)</span>\r\n\r\n </div>\r\n\r\n <div class=\"exel-view-column\">Review Start <span class=\"info-text\">(No. of days before the\r\n due date)</span></div>\r\n <div class=\"exel-view-column\">Review Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be reviewed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of days\r\n after the due date. Select \"0\" if the responsibility must be reviewed on the due\r\n date)</span></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Overseer</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Always Notify</div>\r\n <div class=\"exel-view-column\">Notify on Failure</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Overseer</div> -->\r\n\r\n <!-- Collaborator -->\r\n <div class=\"exel-view-column\">Collaborator</div>\r\n\r\n </div>\r\n <div class=\"exel-view-row\" *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\">\r\n <div class=\"exel-view-column sl-no\" [class.error]=\"!report?.isValid\">{{i+1}}</div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report.responsibilityName\">\r\n {{report?.responsibilityName}} <i *ngIf=\"!report.responsibilityName\" class=\"icons\"\r\n [appTooltip]=\"'Enter a name for this responsibility.'\" placement=\"bottom-right\" type=\"white\"\r\n delay=\"0\" [tooltipMandatory]=true></i></div>\r\n <div class=\"exel-view-column multi-column\"\r\n *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\" [class.error]=\"false\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">{{report?.programType}}</div>\r\n <div class=\"exel-view-column\">{{report?.program}}</div>\r\n <div class=\"exel-view-column\">{{report?.programCategory}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assignor}}\r\n </div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.assignee || !report?.userValidateWithProgram?.isValidAssignee || (!report?.isValidUser)\">\r\n {{report?.assignee}}\r\n <!-- || (!report?.isValidUser) -->\r\n <i *ngIf=\"(!report?.assignee) || (!report?.isValidUser)\" class=\"icons\"\r\n [appTooltip]=\"'Select the user responsible for completing this responsibility. '\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"(report?.assignee) && !report?.userValidateWithProgram?.isValidAssignee\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assigneeType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.keyResponsibility}}</div>\r\n <div class=\"exel-view-column multi-column five-column\" *ngIf=\"tabType === 'frequency'\">\r\n\r\n <div class=\"exel-view-row multi-column five-column\">\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.frequency\">{{report?.frequency}}\r\n <i *ngIf=\"!report?.frequency\" class=\"icons\"\r\n [appTooltip]=\"'Select a frequency for this responsibility.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.day}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.month}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityWindow}}</div>\r\n <div class=\"exel-view-column\">{{report?.failedAfter}}</div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenter}}</div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenterType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reportClass}}</div>\r\n <div class=\"exel-view-column\">{{report?.objective}}</div>\r\n <div class=\"exel-view-column\">{{report?.notes}}</div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column multi-column\">\r\n <div class=\"exel-view-row multi-column\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">{{report?.isFormat}}</div>\r\n <a class=\"exel-view-column external-link\" [href]=\"report?.formatForResponsibility\"\r\n target=\"_blank\">{{report?.formatForResponsibility}}</a>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">\r\n {{report?.documentEvidenceRequired}}</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">{{report?.assessments}}</div> -->\r\n <div class=\"exel-view-column multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.reviewer && (\r\n !report?.userValidateWithProgram?.isValidReviewer )\">{{report?.reviewer}}\r\n\r\n <!-- <i *ngIf=\"(report?.reviewer && report?.reviewer === report?.assignor)\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Reviewer of this responsibility.':'You cannot be a Reviewer of this responsibility since you are the assignor. ') +'Select another user as the Reviewer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i> -->\r\n <i *ngIf=\"report?.reviewer && !report?.userValidateWithProgram?.isValidReviewer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reviewerType}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewToBeCompletedWithin}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewWillBeFailedAfter}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.overseer && (\r\n !report?.userValidateWithProgram?.isValidOverseer )\">\r\n {{report?.overseer}}\r\n\r\n <i *ngIf=\"(report?.overseer) && !report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"report?.notifyOnFailure && (\r\n !report?.userValidateWithProgram?.isValidNotifyOnFailure )\">\r\n {{report?.notifyOnFailure}}\r\n\r\n <i *ngIf=\"(report?.notifyOnFailure) && !report?.userValidateWithProgram?.isValidNotifyOnFailure\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column\">{{report?.collaborator}}\r\n </div>\r\n\r\n <!-- <div class=\"exel-view-column\" [class.error]=\"(report?.overseer) && ((report?.overseer === report?.assignee) ||(report?.reviewer === report?.overseer) || (report?.overseer == report?.assignor) || (!report?.userValidateWithProgram?.isValidOverseer))\">\r\n {{report?.overseer}}\r\n <i *ngIf=\"(report?.overseer) && ((report?.reviewer === report?.overseer))\"\r\n class=\"icons\"\r\n [appTooltip]=\"'The Reviewer cannot also be the Overseer of this responsibility. Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n\r\n <i *ngIf=\"report?.overseer && (report?.overseer === report?.assignee)\" class=\"icons\"\r\n [appTooltip]=\"'The Assignee cannot also be the Overseer of this responsibility. Select another user as the Overseer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"((report?.overseer) && (report?.overseer == report?.assignor))\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Overseer of this responsibility. ':'You cannot be an Overseer of this responsibility since you are the Assignor. ') +'Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"!report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'Selected user is not a valid overseer for selected program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div> -->\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- ------------------------------------------------old code dynamic------------------------------------------------- -->\r\n\r\n <!-- *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\" -->\r\n </div>\r\n </div>\r\n <div class=\"bulk-view-option\">\r\n <button *ngIf=\"bulkUpload?.frequency?.reports?.length\" [class.active]=\"tabType === 'frequency'\"\r\n (click)=\"selectedTab.emit('frequency')\">Frequency Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.ongoing?.reports?.length\" [class.active]=\"tabType === 'ongoing'\"\r\n (click)=\"selectedTab.emit('ongoing')\">Ongoing Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.onCompletion?.reports?.length\" [class.active]=\"tabType === 'onCompletion'\"\r\n (click)=\"selectedTab.emit('onCompletion')\">On Completion Responsibilities</button>\r\n </div>\r\n <div class=\"bulk-view-footer\">\r\n <!-- <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityBulkUpload?.reports?.length}} responsibilities will be\r\n uploaded.</p>\r\n </div> -->\r\n <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityMultiTabBulkUpload?.length}}\r\n {{responsibilityMultiTabBulkUpload?.length > 1 ? 'responsibilities' : 'responsibility'}} will be\r\n uploaded.</p>\r\n </div>\r\n <div class=\"right\">\r\n <button (click)=\"close()\" id=\"bulk-resp-cancel\">Cancel</button>\r\n <button (click)=\"submit()\" id=\"bulk-resp-confirm\" [disabled]=\"!isConfirmClickable\"\r\n class=\"blue\">Confirm</button>\r\n <!-- finalResponsibilities < 1 -->\r\n </div>\r\n </div>\r\n </div>\r\n <app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n</ng-container>\r\n\r\n<!-- --------------------------------------------------------------------upward is new one-------------------- -->", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#747576;border-radius:16px}::-webkit-scrollbar{height:15px}.bulk-view{position:fixed;inset:0;z-index:11}.bulk-view-head{height:60px;padding:20px 24px;background:#161b2f;display:flex;justify-content:flex-start}.bulk-view-title{font-size:16px;line-height:20px;font-weight:400;margin:0;color:#fff}.bulk-view-body{height:calc(100vh - 110px);overflow:auto;width:100%;background:#fff}.bulk-view-body .exel-view{display:block}.bulk-view-body .exel-view-row{display:flex;width:100%}.bulk-view-body .exel-view-row.head .exel-view-column{font-weight:500;font-size:14px;min-height:26px;background:#f1f1f1;padding:0;word-break:unset}.bulk-view-body .exel-view-row.multi-column .exel-view-column{width:140px;min-width:140px}.bulk-view-body .exel-view-row.multi-column .external-link{color:#1e5dd3;text-decoration:none}.bulk-view-body .exel-view-column{width:300px;min-width:300px;padding:0 10px;border-right:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;text-align:center;word-break:break-all;line-height:16px;font-size:12px;color:#161b2f;flex-wrap:wrap;position:relative}.bulk-view-body .exel-view-column i.icons{position:absolute;top:8px;right:10px;cursor:pointer;color:#d93b41}.bulk-view-body .exel-view-column.large{width:100%;min-width:auto}.bulk-view-body .exel-view-column.error{border:1px solid #EB2424!important;padding-right:24px}.bulk-view-body .exel-view-column.error+.error{border-left:none!important}.bulk-view-body .exel-view-column span.required{color:#eb2424;display:contents}.bulk-view-body .exel-view-column .exel-view-row .exel-view-column{width:100%}.bulk-view-body .exel-view-column.sl-no{background:#f1f1f1;width:60px;min-width:60px;min-height:30px;font-weight:400}.bulk-view-body .exel-view-column.sl-no.error{background:#eb242424;border:none;padding-right:10px;border-bottom:1px solid #dcdcdc}.bulk-view-body .exel-view-column.multi-column{padding:0;border:none}.bulk-view-body .exel-view-column.multi-column .exel-view-row{height:100%}.bulk-view-body .exel-view-column.multi-column .exel-view-column{width:50%;min-width:50%}.bulk-view-body .exel-view-column.multi-column .exel-view-column+.exel-view-column{border-left:none}.bulk-view-body.bulk{height:calc(100vh - 142px)}.bulk-view-body.bulk .exel-view-row.head{position:sticky;top:0;z-index:1}.bulk-view-body.bulk .exel-view-row.head .exel-view-column{min-height:34px}.bulk-view-body.bulk .exel-view-row.head .exel-view-column .info-text{font-size:10px;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0 8px}.bulk-view-body.bulk .exel-view-row.two-column .exel-view-column{min-width:250px!important}.bulk-view-body.bulk .exel-view-row.three-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.four-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.five-column .exel-view-column{width:200px;min-width:200px!important}.bulk-view-body.bulk .exel-view-column .exel-view-row .exel-view-column.small-column{width:120px;min-width:120px!important}.bulk-view-body.bulk .exel-view-column.multi-column .exel-view-column{min-width:unset}.bulk-view-body.bulk .exel-view-column.two-column{width:500px;min-width:500px!important}.bulk-view-body.bulk .exel-view-column.three-column{width:600px;min-width:600px!important}.bulk-view-body.bulk .exel-view-column.four-column{width:800px;min-width:800px!important}.bulk-view-body.bulk .exel-view-column.five-column{width:1000px;min-width:1000px!important}.bulk-view-option{background:#fff;border-top:1px solid #f1f1f1;padding:0 20px;position:fixed;width:100%;bottom:50px;display:flex;align-items:center}.bulk-view-option button{background:transparent;border-radius:0;border:none;border-left:1px solid #f1f1f1;color:#747576;font-size:11px;font-weight:500;padding:0 .5rem;margin:0;height:2rem;position:relative}.bulk-view-option button:last-of-type{border-right:1px solid #f1f1f1}.bulk-view-option button.active{color:#1e5dd3}.bulk-view-option button.active:before{background:#fff;content:\"\";position:absolute;top:-1px;left:0;height:1px;width:100%}.bulk-view-footer{height:50px;box-shadow:0 0 15px #1e03d259;padding:10px 20px;position:fixed;width:100%;bottom:0;display:flex;align-items:center;justify-content:space-between;background:#fff}.bulk-view-footer .left p{color:#747576;font-size:13px;font-weight:500;margin:0}.bulk-view-footer .right button{font-size:12px;background:#fff;border:1px solid #dcdcdc;color:#747576;border-radius:2px;padding:8px 18px;cursor:pointer;text-transform:uppercase}.bulk-view-footer .right button+button{margin-left:4px}.bulk-view-footer .right button.blue{color:#fff;background:#1e5dd3}.bulk-view-footer .right button:disabled{background:#f1f1f1;border-color:#f1f1f1;pointer-events:none;cursor:not-allowed;color:#747576}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ToolTipDirective, selector: "[appTooltip]", inputs: ["appTooltip", "placement", "type", "tooltipMandatory", "showTooltip", "animate"] }, { kind: "component", type: LoaderComponent$1, selector: "app-loader" }] }); }
|
|
46951
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BulkResponsibilityViewComponent, selector: "app-bulk-responsibility-view", inputs: { responsibilityBulkUpload: "responsibilityBulkUpload", fileName: "fileName", defaultOwner: "defaultOwner", loader: "loader", tabType: "tabType", bulkUpload: "bulkUpload", responsibilityType: "responsibilityType" }, outputs: { submitResponsibilityBulkUpload: "submitResponsibilityBulkUpload", cancel: "cancel", selectedTab: "selectedTab" }, usesOnChanges: true, ngImport: i0, template: "<!-- --------------------------------------------------------------------upward is new one-------------------- -->\r\n<app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- HTML for multiple tabs -->\r\n<ng-container *ngIf=\"responsibilityType === 'multiTab'\">\r\n <div class=\"bulk-view\">\r\n <div class=\"bulk-view-head\">\r\n <h2 class=\"bulk-view-title\">\r\n {{fileName}}\r\n </h2>\r\n </div>\r\n <div class=\"bulk-view-body bulk\" [class.is-horizontally-scrolled]=\"isHorizontallyScrolled\"\r\n (scroll)=\"onGridScroll($event)\">\r\n <div class=\"exel-view\">\r\n <div class=\"exel-view-row head\">\r\n <div class=\"exel-view-column sl-no sticky-col sticky-col-index\">#</div>\r\n <div class=\"exel-view-column sticky-col sticky-col-name\">Responsibility Name <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\" *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Program</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">Program Type</div>\r\n <div class=\"exel-view-column\">Program</div>\r\n <div class=\"exel-view-column\">Program Category</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Entrusted By</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Entrust To <span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Person or Group<span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">All or Any Persons</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Key Responsibility?</div>\r\n <div class=\"exel-view-column\" *ngIf=\"tabType === 'frequency'\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-row\">\r\n <!-- <div class=\"exel-view-column large\">Frequency of Occurrence and Completion Window <span class=\"required\">*</span></div> -->\r\n <div class=\"exel-view-column large\">{{responsibilityBulkUpload?.header.includes('Program') ?\r\n responsibilityBulkUpload?.header[8]?.slice(0, -1) :\r\n responsibilityBulkUpload?.header[5]?.slice(0, -1)}}<span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <ng-container *ngIf=\"tabType === 'frequency'\">\r\n <div class=\"exel-view-column\">Frequency <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Day)</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Month)</span></div>\r\n <div class=\"exel-view-column\" *ngIf=\"hasExtendedFrequencyColumns\">Due Time</div>\r\n <div class=\"exel-view-column\">Start <span class=\"info-text\">(No. of days before the due\r\n date)</span></div>\r\n <div class=\"exel-view-column\">Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be completed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of\r\n days after the due date. Select \"0\" if the responsibility must be completed on\r\n the due date)</span></div>\r\n <ng-container *ngIf=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\">Responsibility Ends After Occurences <span\r\n class=\"info-text\">(Number of occurrences)</span></div>\r\n <div class=\"exel-view-column\">Responsibility Ends By Date <span\r\n class=\"info-text\">(Day)</span></div>\r\n <div class=\"exel-view-column\">Responsibility Ends By Date <span\r\n class=\"info-text\">(Month)</span></div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column two-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Responsibility Centre</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">Responsibility Centre Name</div>\r\n <div class=\"exel-view-column\">Responsibility Centre Type</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Risk Class</div>\r\n <div class=\"exel-view-column\">Objective</div>\r\n <div class=\"exel-view-column\">Notes</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Format & Evidence</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\" [class.three-column]=\"false\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Format</div>\r\n <div class=\"exel-view-column\">Format For Responsibility (link)</div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Evidence</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Assessments or Checkpoints</div> -->\r\n <div class=\"exel-view-column four-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Review of Responsibility</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\">Reviewer</div>\r\n <div class=\"exel-view-column\">Reviewer Type\r\n <span class=\"info-text\">(Specify the type of reviewer flow)</span>\r\n\r\n </div>\r\n\r\n <div class=\"exel-view-column\">Review Start <span class=\"info-text\">(No. of days before the\r\n due date)</span></div>\r\n <div class=\"exel-view-column\">Review Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be reviewed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of days\r\n after the due date. Select \"0\" if the responsibility must be reviewed on the due\r\n date)</span></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Overseer</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Always Notify</div>\r\n <div class=\"exel-view-column\">Notify on Failure</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Overseer</div> -->\r\n\r\n <!-- Collaborator -->\r\n <div class=\"exel-view-column\">Collaborator</div>\r\n\r\n </div>\r\n <div class=\"exel-view-row\" *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\">\r\n <div class=\"exel-view-column sl-no sticky-col sticky-col-index\" [class.error]=\"!report?.isValid\">{{i+1}}</div>\r\n <div class=\"exel-view-column sticky-col sticky-col-name\" [class.error]=\"!report.responsibilityName\">\r\n {{report?.responsibilityName}} <i *ngIf=\"!report.responsibilityName\" class=\"icons\"\r\n [appTooltip]=\"'Enter a name for this responsibility.'\" placement=\"bottom-right\" type=\"white\"\r\n delay=\"0\" [tooltipMandatory]=true></i></div>\r\n <div class=\"exel-view-column multi-column\"\r\n *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\" [class.error]=\"false\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">{{report?.programType}}</div>\r\n <div class=\"exel-view-column\">{{report?.program}}</div>\r\n <div class=\"exel-view-column\">{{report?.programCategory}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assignor}}\r\n </div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.assignee || !report?.userValidateWithProgram?.isValidAssignee || (!report?.isValidUser)\">\r\n {{report?.assignee}}\r\n <!-- || (!report?.isValidUser) -->\r\n <i *ngIf=\"(!report?.assignee) || (!report?.isValidUser)\" class=\"icons\"\r\n [appTooltip]=\"'Select the user responsible for completing this responsibility. '\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"(report?.assignee) && !report?.userValidateWithProgram?.isValidAssignee\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assigneeType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.keyResponsibility}}</div>\r\n <div class=\"exel-view-column multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\"\r\n *ngIf=\"tabType === 'frequency'\">\r\n\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.frequency\">{{report?.frequency}}\r\n <i *ngIf=\"!report?.frequency\" class=\"icons\"\r\n [appTooltip]=\"'Select a frequency for this responsibility.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.day}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.month}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" *ngIf=\"hasExtendedFrequencyColumns\"\r\n [class.error]=\"!report?.isValidDueTime\">{{report?.dueTime}}\r\n <i *ngIf=\"!report?.isValidDueTime\" class=\"icons\"\r\n [appTooltip]=\"VALIDATION_MESSAGES.DUE_TIME\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityWindow}}</div>\r\n <div class=\"exel-view-column\">{{report?.failedAfter}}</div>\r\n <ng-container *ngIf=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.isValidEndsAfterOccurrences\">{{report?.endsAfterOccurrences}}\r\n <i *ngIf=\"!report?.isValidEndsAfterOccurrences\" class=\"icons\"\r\n [appTooltip]=\"report?.endsAfterOccurrencesError\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.isValidEndsByDateDay\">{{report?.endsByDateDay}}\r\n <i *ngIf=\"!report?.isValidEndsByDateDay\" class=\"icons\"\r\n [appTooltip]=\"report?.endsByDateDayError\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.isValidEndsByDateMonth\">{{report?.endsByDateMonth}}\r\n <i *ngIf=\"!report?.isValidEndsByDateMonth\" class=\"icons\"\r\n [appTooltip]=\"report?.endsByDateMonthError\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenter}}</div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenterType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reportClass}}</div>\r\n <div class=\"exel-view-column\">{{report?.objective}}</div>\r\n <div class=\"exel-view-column\">{{report?.notes}}</div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column multi-column\">\r\n <div class=\"exel-view-row multi-column\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">{{report?.isFormat}}</div>\r\n <a class=\"exel-view-column external-link\" [href]=\"report?.formatForResponsibility\"\r\n target=\"_blank\">{{report?.formatForResponsibility}}</a>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">\r\n {{report?.documentEvidenceRequired}}</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">{{report?.assessments}}</div> -->\r\n <div class=\"exel-view-column multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.reviewer && (\r\n !report?.userValidateWithProgram?.isValidReviewer )\">{{report?.reviewer}}\r\n\r\n <!-- <i *ngIf=\"(report?.reviewer && report?.reviewer === report?.assignor)\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Reviewer of this responsibility.':'You cannot be a Reviewer of this responsibility since you are the assignor. ') +'Select another user as the Reviewer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i> -->\r\n <i *ngIf=\"report?.reviewer && !report?.userValidateWithProgram?.isValidReviewer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reviewerType}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewToBeCompletedWithin}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewWillBeFailedAfter}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.overseer && (\r\n !report?.userValidateWithProgram?.isValidOverseer )\">\r\n {{report?.overseer}}\r\n\r\n <i *ngIf=\"(report?.overseer) && !report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"report?.notifyOnFailure && (\r\n !report?.userValidateWithProgram?.isValidNotifyOnFailure )\">\r\n {{report?.notifyOnFailure}}\r\n\r\n <i *ngIf=\"(report?.notifyOnFailure) && !report?.userValidateWithProgram?.isValidNotifyOnFailure\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column\">{{report?.collaborator}}\r\n </div>\r\n\r\n <!-- <div class=\"exel-view-column\" [class.error]=\"(report?.overseer) && ((report?.overseer === report?.assignee) ||(report?.reviewer === report?.overseer) || (report?.overseer == report?.assignor) || (!report?.userValidateWithProgram?.isValidOverseer))\">\r\n {{report?.overseer}}\r\n <i *ngIf=\"(report?.overseer) && ((report?.reviewer === report?.overseer))\"\r\n class=\"icons\"\r\n [appTooltip]=\"'The Reviewer cannot also be the Overseer of this responsibility. Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n\r\n <i *ngIf=\"report?.overseer && (report?.overseer === report?.assignee)\" class=\"icons\"\r\n [appTooltip]=\"'The Assignee cannot also be the Overseer of this responsibility. Select another user as the Overseer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"((report?.overseer) && (report?.overseer == report?.assignor))\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Overseer of this responsibility. ':'You cannot be an Overseer of this responsibility since you are the Assignor. ') +'Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"!report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'Selected user is not a valid overseer for selected program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div> -->\r\n </div>\r\n\r\n <div class=\"exel-view-row empty-fill-row\" aria-hidden=\"true\">\r\n <div class=\"exel-view-column sl-no sticky-col sticky-col-index\"></div>\r\n <div class=\"exel-view-column sticky-col sticky-col-name\"></div>\r\n <div class=\"exel-view-column multi-column three-column\" *ngIf=\"hasProgramColumn\">\r\n <div class=\"exel-view-row multi-column three-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\"\r\n *ngIf=\"tabType === 'frequency'\">\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\" *ngIf=\"hasExtendedFrequencyColumns\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <ng-container *ngIf=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column multi-column\">\r\n <div class=\"exel-view-row multi-column\">\r\n <div class=\"exel-view-column small-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column small-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column multi-column four-column\">\r\n <div class=\"exel-view-row multi-column four-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- ------------------------------------------------old code dynamic------------------------------------------------- -->\r\n\r\n <!-- *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\" -->\r\n </div>\r\n </div>\r\n <div class=\"bulk-view-option\">\r\n <button *ngIf=\"bulkUpload?.frequency?.reports?.length\" [class.active]=\"tabType === 'frequency'\"\r\n (click)=\"selectedTab.emit('frequency')\">Frequency Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.ongoing?.reports?.length\" [class.active]=\"tabType === 'ongoing'\"\r\n (click)=\"selectedTab.emit('ongoing')\">Ongoing Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.onCompletion?.reports?.length\" [class.active]=\"tabType === 'onCompletion'\"\r\n (click)=\"selectedTab.emit('onCompletion')\">On Completion Responsibilities</button>\r\n </div>\r\n <div class=\"bulk-view-footer\">\r\n <!-- <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityBulkUpload?.reports?.length}} responsibilities will be\r\n uploaded.</p>\r\n </div> -->\r\n <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityMultiTabBulkUpload?.length}}\r\n {{responsibilityMultiTabBulkUpload?.length > 1 ? 'responsibilities' : 'responsibility'}} will be\r\n uploaded.</p>\r\n </div>\r\n <div class=\"right\">\r\n <button (click)=\"close()\" id=\"bulk-resp-cancel\">Cancel</button>\r\n <button (click)=\"submit()\" id=\"bulk-resp-confirm\" [disabled]=\"!isConfirmClickable\"\r\n class=\"blue\">Confirm</button>\r\n <!-- finalResponsibilities < 1 -->\r\n </div>\r\n </div>\r\n </div>\r\n <app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n</ng-container>\r\n\r\n<!-- --------------------------------------------------------------------upward is new one-------------------- -->", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#747576;border-radius:16px}::-webkit-scrollbar{height:15px}.bulk-view{position:fixed;inset:0;z-index:11}.bulk-view-head{height:60px;padding:20px 24px;background:#161b2f;display:flex;justify-content:flex-start}.bulk-view-title{font-size:16px;line-height:20px;font-weight:400;margin:0;color:#fff}.bulk-view-body{height:calc(100vh - 110px);overflow:auto;width:100%;background:#fff}.bulk-view-body .exel-view{display:block}.bulk-view-body .exel-view-row{display:flex;width:100%}.bulk-view-body .exel-view-row.head .exel-view-column{font-weight:500;font-size:14px;min-height:26px;background:#f1f1f1;padding:0;word-break:unset}.bulk-view-body .exel-view-row.multi-column .exel-view-column{width:140px;min-width:140px}.bulk-view-body .exel-view-row.multi-column .external-link{color:#1e5dd3;text-decoration:none}.bulk-view-body .exel-view-column{width:300px;min-width:300px;padding:0 10px;border-right:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;text-align:center;word-break:break-all;line-height:16px;font-size:12px;color:#161b2f;flex-wrap:wrap;position:relative}.bulk-view-body .exel-view-column i.icons{position:absolute;top:8px;right:10px;cursor:pointer;color:#d93b41}.bulk-view-body .exel-view-column.large{width:100%;min-width:auto}.bulk-view-body .exel-view-column.error{border:1px solid #EB2424!important;padding-right:24px}.bulk-view-body .exel-view-column.error+.error{border-left:none!important}.bulk-view-body .exel-view-column span.required{color:#eb2424;display:contents}.bulk-view-body .exel-view-column .exel-view-row .exel-view-column{width:100%}.bulk-view-body .exel-view-column.sticky-col{position:sticky;z-index:2;background:#fff}.bulk-view-body .exel-view-column.sticky-col-index{left:0;z-index:3;background:#f1f1f1}.bulk-view-body .exel-view-column.sticky-col-name{left:60px}.bulk-view-body .exel-view-column.sl-no{background:#f1f1f1;width:60px;min-width:60px;min-height:30px;font-weight:400}.bulk-view-body .exel-view-column.sl-no.error{background:#f5d6d7;border:none;padding-right:10px;border-bottom:1px solid #dcdcdc}.bulk-view-body .exel-view-column.multi-column{padding:0;border:none}.bulk-view-body .exel-view-column.multi-column .exel-view-row{height:100%}.bulk-view-body .exel-view-column.multi-column .exel-view-column{width:50%;min-width:50%}.bulk-view-body .exel-view-column.multi-column .exel-view-column+.exel-view-column{border-left:none}.bulk-view-body.bulk{height:calc(100vh - 142px)}.bulk-view-body.bulk.is-horizontally-scrolled .sticky-col-name{box-shadow:6px 0 8px -4px #161b2f29}.bulk-view-body.bulk .exel-view{display:flex;flex-direction:column;width:max-content;min-width:100%;min-height:100%}.bulk-view-body.bulk .exel-view-row{width:max-content;min-width:100%}.bulk-view-body.bulk .exel-view-row.head{position:sticky;top:0;z-index:4}.bulk-view-body.bulk .exel-view-row.head .exel-view-column{min-height:34px}.bulk-view-body.bulk .exel-view-row.head .exel-view-column.sticky-col{background:#f1f1f1;z-index:5}.bulk-view-body.bulk .exel-view-row.head .exel-view-column .info-text{font-size:10px;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0 8px}.bulk-view-body.bulk .exel-view-row.two-column .exel-view-column{min-width:250px!important}.bulk-view-body.bulk .exel-view-row.three-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.four-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.five-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.nine-column .exel-view-column{width:200px;min-width:200px!important}.bulk-view-body.bulk .exel-view-column .exel-view-row .exel-view-column.small-column{width:120px;min-width:120px!important}.bulk-view-body.bulk .exel-view-column.multi-column .exel-view-column{min-width:unset}.bulk-view-body.bulk .exel-view-column.two-column{width:500px;min-width:500px!important}.bulk-view-body.bulk .exel-view-column.three-column{width:600px;min-width:600px!important}.bulk-view-body.bulk .exel-view-column.four-column{width:800px;min-width:800px!important}.bulk-view-body.bulk .exel-view-column.five-column{width:1000px;min-width:1000px!important}.bulk-view-body.bulk .exel-view-column.nine-column{width:1800px;min-width:1800px!important}.bulk-view-body.bulk .exel-view .empty-fill-row{flex:1 1 auto;min-height:32px;align-items:stretch}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column{min-height:100%;background-color:#fff;background-image:repeating-linear-gradient(to bottom,#fff 0 31px,#dcdcdc 31px 32px);background-repeat:repeat-y;background-size:100% 32px}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column.multi-column{background-image:none;background-color:transparent}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column.sticky-col-index,.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column.sl-no{background-color:#f1f1f1;background-image:repeating-linear-gradient(to bottom,#f1f1f1 0 31px,#dcdcdc 31px 32px)}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-row{height:100%;align-items:stretch}.bulk-view-option{background:#fff;border-top:1px solid #f1f1f1;padding:0 20px;position:fixed;width:100%;bottom:50px;display:flex;align-items:center}.bulk-view-option button{background:transparent;border-radius:0;border:none;border-left:1px solid #f1f1f1;color:#747576;font-size:11px;font-weight:500;padding:0 .5rem;margin:0;height:2rem;position:relative}.bulk-view-option button:last-of-type{border-right:1px solid #f1f1f1}.bulk-view-option button.active{color:#1e5dd3}.bulk-view-option button.active:before{background:#fff;content:\"\";position:absolute;top:-1px;left:0;height:1px;width:100%}.bulk-view-footer{height:50px;box-shadow:0 0 15px #1e03d259;padding:10px 20px;position:fixed;width:100%;bottom:0;display:flex;align-items:center;justify-content:space-between;background:#fff}.bulk-view-footer .left p{color:#747576;font-size:13px;font-weight:500;margin:0}.bulk-view-footer .right button{font-size:12px;background:#fff;border:1px solid #dcdcdc;color:#747576;border-radius:2px;padding:8px 18px;cursor:pointer;text-transform:uppercase}.bulk-view-footer .right button+button{margin-left:4px}.bulk-view-footer .right button.blue{color:#fff;background:#1e5dd3}.bulk-view-footer .right button:disabled{background:#f1f1f1;border-color:#f1f1f1;pointer-events:none;cursor:not-allowed;color:#747576}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ToolTipDirective, selector: "[appTooltip]", inputs: ["appTooltip", "placement", "type", "tooltipMandatory", "showTooltip", "animate"] }, { kind: "component", type: LoaderComponent$1, selector: "app-loader" }] }); }
|
|
46921
46952
|
}
|
|
46922
46953
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BulkResponsibilityViewComponent, decorators: [{
|
|
46923
46954
|
type: Component,
|
|
46924
|
-
args: [{ selector: 'app-bulk-responsibility-view', template: "<!-- --------------------------------------------------------------------upward is new one-------------------- -->\r\n<app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- HTML for multiple tabs -->\r\n<ng-container *ngIf=\"responsibilityType === 'multiTab'\">\r\n <div class=\"bulk-view\">\r\n <div class=\"bulk-view-head\">\r\n <h2 class=\"bulk-view-title\">\r\n {{fileName}}\r\n </h2>\r\n </div>\r\n <div class=\"bulk-view-body bulk\">\r\n <div class=\"exel-view\">\r\n <div class=\"exel-view-row head\">\r\n <div class=\"exel-view-column sl-no\">#</div>\r\n <div class=\"exel-view-column\">Responsibility Name <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\" *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Program</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">Program Type</div>\r\n <div class=\"exel-view-column\">Program</div>\r\n <div class=\"exel-view-column\">Program Category</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Entrusted By</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Entrust To <span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Person or Group<span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">All or Any Persons</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Key Responsibility?</div>\r\n <div class=\"exel-view-column\" *ngIf=\"tabType === 'frequency'\"\r\n [class.five-column]=\"tabType === 'frequency' || tabType === 'onCompletion'\"\r\n [class.three-column]=\"tabType === 'ongoing'\">\r\n <div class=\"exel-view-row\">\r\n <!-- <div class=\"exel-view-column large\">Frequency of Occurrence and Completion Window <span class=\"required\">*</span></div> -->\r\n <div class=\"exel-view-column large\">{{responsibilityBulkUpload?.header.includes('Program') ?\r\n responsibilityBulkUpload?.header[8]?.slice(0, -1) :\r\n responsibilityBulkUpload?.header[5]?.slice(0, -1)}}<span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"tabType === 'frequency' || tabType === 'onCompletion'\"\r\n [class.three-column]=\"tabType === 'ongoing'\">\r\n <ng-container *ngIf=\"tabType === 'frequency'\">\r\n <div class=\"exel-view-column\">Frequency <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Day)</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Month)</span></div>\r\n <div class=\"exel-view-column\">Start <span class=\"info-text\">(No. of days before the due\r\n date)</span></div>\r\n <div class=\"exel-view-column\">Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be completed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of\r\n days after the due date. Select \"0\" if the responsibility must be completed on\r\n the due date)</span></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column two-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Responsibility Centre</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">Responsibility Centre Name</div>\r\n <div class=\"exel-view-column\">Responsibility Centre Type</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Risk Class</div>\r\n <div class=\"exel-view-column\">Objective</div>\r\n <div class=\"exel-view-column\">Notes</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Format & Evidence</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\" [class.three-column]=\"false\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Format</div>\r\n <div class=\"exel-view-column\">Format For Responsibility (link)</div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Evidence</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Assessments or Checkpoints</div> -->\r\n <div class=\"exel-view-column four-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Review of Responsibility</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\">Reviewer</div>\r\n <div class=\"exel-view-column\">Reviewer Type\r\n <span class=\"info-text\">(Specify the type of reviewer flow)</span>\r\n\r\n </div>\r\n\r\n <div class=\"exel-view-column\">Review Start <span class=\"info-text\">(No. of days before the\r\n due date)</span></div>\r\n <div class=\"exel-view-column\">Review Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be reviewed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of days\r\n after the due date. Select \"0\" if the responsibility must be reviewed on the due\r\n date)</span></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Overseer</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Always Notify</div>\r\n <div class=\"exel-view-column\">Notify on Failure</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Overseer</div> -->\r\n\r\n <!-- Collaborator -->\r\n <div class=\"exel-view-column\">Collaborator</div>\r\n\r\n </div>\r\n <div class=\"exel-view-row\" *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\">\r\n <div class=\"exel-view-column sl-no\" [class.error]=\"!report?.isValid\">{{i+1}}</div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report.responsibilityName\">\r\n {{report?.responsibilityName}} <i *ngIf=\"!report.responsibilityName\" class=\"icons\"\r\n [appTooltip]=\"'Enter a name for this responsibility.'\" placement=\"bottom-right\" type=\"white\"\r\n delay=\"0\" [tooltipMandatory]=true></i></div>\r\n <div class=\"exel-view-column multi-column\"\r\n *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\" [class.error]=\"false\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">{{report?.programType}}</div>\r\n <div class=\"exel-view-column\">{{report?.program}}</div>\r\n <div class=\"exel-view-column\">{{report?.programCategory}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assignor}}\r\n </div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.assignee || !report?.userValidateWithProgram?.isValidAssignee || (!report?.isValidUser)\">\r\n {{report?.assignee}}\r\n <!-- || (!report?.isValidUser) -->\r\n <i *ngIf=\"(!report?.assignee) || (!report?.isValidUser)\" class=\"icons\"\r\n [appTooltip]=\"'Select the user responsible for completing this responsibility. '\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"(report?.assignee) && !report?.userValidateWithProgram?.isValidAssignee\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assigneeType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.keyResponsibility}}</div>\r\n <div class=\"exel-view-column multi-column five-column\" *ngIf=\"tabType === 'frequency'\">\r\n\r\n <div class=\"exel-view-row multi-column five-column\">\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.frequency\">{{report?.frequency}}\r\n <i *ngIf=\"!report?.frequency\" class=\"icons\"\r\n [appTooltip]=\"'Select a frequency for this responsibility.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.day}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.month}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityWindow}}</div>\r\n <div class=\"exel-view-column\">{{report?.failedAfter}}</div>\r\n </div>\r\n\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenter}}</div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenterType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reportClass}}</div>\r\n <div class=\"exel-view-column\">{{report?.objective}}</div>\r\n <div class=\"exel-view-column\">{{report?.notes}}</div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column multi-column\">\r\n <div class=\"exel-view-row multi-column\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">{{report?.isFormat}}</div>\r\n <a class=\"exel-view-column external-link\" [href]=\"report?.formatForResponsibility\"\r\n target=\"_blank\">{{report?.formatForResponsibility}}</a>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">\r\n {{report?.documentEvidenceRequired}}</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">{{report?.assessments}}</div> -->\r\n <div class=\"exel-view-column multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.reviewer && (\r\n !report?.userValidateWithProgram?.isValidReviewer )\">{{report?.reviewer}}\r\n\r\n <!-- <i *ngIf=\"(report?.reviewer && report?.reviewer === report?.assignor)\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Reviewer of this responsibility.':'You cannot be a Reviewer of this responsibility since you are the assignor. ') +'Select another user as the Reviewer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i> -->\r\n <i *ngIf=\"report?.reviewer && !report?.userValidateWithProgram?.isValidReviewer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reviewerType}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewToBeCompletedWithin}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewWillBeFailedAfter}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.overseer && (\r\n !report?.userValidateWithProgram?.isValidOverseer )\">\r\n {{report?.overseer}}\r\n\r\n <i *ngIf=\"(report?.overseer) && !report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"report?.notifyOnFailure && (\r\n !report?.userValidateWithProgram?.isValidNotifyOnFailure )\">\r\n {{report?.notifyOnFailure}}\r\n\r\n <i *ngIf=\"(report?.notifyOnFailure) && !report?.userValidateWithProgram?.isValidNotifyOnFailure\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column\">{{report?.collaborator}}\r\n </div>\r\n\r\n <!-- <div class=\"exel-view-column\" [class.error]=\"(report?.overseer) && ((report?.overseer === report?.assignee) ||(report?.reviewer === report?.overseer) || (report?.overseer == report?.assignor) || (!report?.userValidateWithProgram?.isValidOverseer))\">\r\n {{report?.overseer}}\r\n <i *ngIf=\"(report?.overseer) && ((report?.reviewer === report?.overseer))\"\r\n class=\"icons\"\r\n [appTooltip]=\"'The Reviewer cannot also be the Overseer of this responsibility. Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n\r\n <i *ngIf=\"report?.overseer && (report?.overseer === report?.assignee)\" class=\"icons\"\r\n [appTooltip]=\"'The Assignee cannot also be the Overseer of this responsibility. Select another user as the Overseer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"((report?.overseer) && (report?.overseer == report?.assignor))\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Overseer of this responsibility. ':'You cannot be an Overseer of this responsibility since you are the Assignor. ') +'Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"!report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'Selected user is not a valid overseer for selected program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div> -->\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- ------------------------------------------------old code dynamic------------------------------------------------- -->\r\n\r\n <!-- *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\" -->\r\n </div>\r\n </div>\r\n <div class=\"bulk-view-option\">\r\n <button *ngIf=\"bulkUpload?.frequency?.reports?.length\" [class.active]=\"tabType === 'frequency'\"\r\n (click)=\"selectedTab.emit('frequency')\">Frequency Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.ongoing?.reports?.length\" [class.active]=\"tabType === 'ongoing'\"\r\n (click)=\"selectedTab.emit('ongoing')\">Ongoing Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.onCompletion?.reports?.length\" [class.active]=\"tabType === 'onCompletion'\"\r\n (click)=\"selectedTab.emit('onCompletion')\">On Completion Responsibilities</button>\r\n </div>\r\n <div class=\"bulk-view-footer\">\r\n <!-- <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityBulkUpload?.reports?.length}} responsibilities will be\r\n uploaded.</p>\r\n </div> -->\r\n <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityMultiTabBulkUpload?.length}}\r\n {{responsibilityMultiTabBulkUpload?.length > 1 ? 'responsibilities' : 'responsibility'}} will be\r\n uploaded.</p>\r\n </div>\r\n <div class=\"right\">\r\n <button (click)=\"close()\" id=\"bulk-resp-cancel\">Cancel</button>\r\n <button (click)=\"submit()\" id=\"bulk-resp-confirm\" [disabled]=\"!isConfirmClickable\"\r\n class=\"blue\">Confirm</button>\r\n <!-- finalResponsibilities < 1 -->\r\n </div>\r\n </div>\r\n </div>\r\n <app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n</ng-container>\r\n\r\n<!-- --------------------------------------------------------------------upward is new one-------------------- -->", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#747576;border-radius:16px}::-webkit-scrollbar{height:15px}.bulk-view{position:fixed;inset:0;z-index:11}.bulk-view-head{height:60px;padding:20px 24px;background:#161b2f;display:flex;justify-content:flex-start}.bulk-view-title{font-size:16px;line-height:20px;font-weight:400;margin:0;color:#fff}.bulk-view-body{height:calc(100vh - 110px);overflow:auto;width:100%;background:#fff}.bulk-view-body .exel-view{display:block}.bulk-view-body .exel-view-row{display:flex;width:100%}.bulk-view-body .exel-view-row.head .exel-view-column{font-weight:500;font-size:14px;min-height:26px;background:#f1f1f1;padding:0;word-break:unset}.bulk-view-body .exel-view-row.multi-column .exel-view-column{width:140px;min-width:140px}.bulk-view-body .exel-view-row.multi-column .external-link{color:#1e5dd3;text-decoration:none}.bulk-view-body .exel-view-column{width:300px;min-width:300px;padding:0 10px;border-right:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;text-align:center;word-break:break-all;line-height:16px;font-size:12px;color:#161b2f;flex-wrap:wrap;position:relative}.bulk-view-body .exel-view-column i.icons{position:absolute;top:8px;right:10px;cursor:pointer;color:#d93b41}.bulk-view-body .exel-view-column.large{width:100%;min-width:auto}.bulk-view-body .exel-view-column.error{border:1px solid #EB2424!important;padding-right:24px}.bulk-view-body .exel-view-column.error+.error{border-left:none!important}.bulk-view-body .exel-view-column span.required{color:#eb2424;display:contents}.bulk-view-body .exel-view-column .exel-view-row .exel-view-column{width:100%}.bulk-view-body .exel-view-column.sl-no{background:#f1f1f1;width:60px;min-width:60px;min-height:30px;font-weight:400}.bulk-view-body .exel-view-column.sl-no.error{background:#eb242424;border:none;padding-right:10px;border-bottom:1px solid #dcdcdc}.bulk-view-body .exel-view-column.multi-column{padding:0;border:none}.bulk-view-body .exel-view-column.multi-column .exel-view-row{height:100%}.bulk-view-body .exel-view-column.multi-column .exel-view-column{width:50%;min-width:50%}.bulk-view-body .exel-view-column.multi-column .exel-view-column+.exel-view-column{border-left:none}.bulk-view-body.bulk{height:calc(100vh - 142px)}.bulk-view-body.bulk .exel-view-row.head{position:sticky;top:0;z-index:1}.bulk-view-body.bulk .exel-view-row.head .exel-view-column{min-height:34px}.bulk-view-body.bulk .exel-view-row.head .exel-view-column .info-text{font-size:10px;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0 8px}.bulk-view-body.bulk .exel-view-row.two-column .exel-view-column{min-width:250px!important}.bulk-view-body.bulk .exel-view-row.three-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.four-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.five-column .exel-view-column{width:200px;min-width:200px!important}.bulk-view-body.bulk .exel-view-column .exel-view-row .exel-view-column.small-column{width:120px;min-width:120px!important}.bulk-view-body.bulk .exel-view-column.multi-column .exel-view-column{min-width:unset}.bulk-view-body.bulk .exel-view-column.two-column{width:500px;min-width:500px!important}.bulk-view-body.bulk .exel-view-column.three-column{width:600px;min-width:600px!important}.bulk-view-body.bulk .exel-view-column.four-column{width:800px;min-width:800px!important}.bulk-view-body.bulk .exel-view-column.five-column{width:1000px;min-width:1000px!important}.bulk-view-option{background:#fff;border-top:1px solid #f1f1f1;padding:0 20px;position:fixed;width:100%;bottom:50px;display:flex;align-items:center}.bulk-view-option button{background:transparent;border-radius:0;border:none;border-left:1px solid #f1f1f1;color:#747576;font-size:11px;font-weight:500;padding:0 .5rem;margin:0;height:2rem;position:relative}.bulk-view-option button:last-of-type{border-right:1px solid #f1f1f1}.bulk-view-option button.active{color:#1e5dd3}.bulk-view-option button.active:before{background:#fff;content:\"\";position:absolute;top:-1px;left:0;height:1px;width:100%}.bulk-view-footer{height:50px;box-shadow:0 0 15px #1e03d259;padding:10px 20px;position:fixed;width:100%;bottom:0;display:flex;align-items:center;justify-content:space-between;background:#fff}.bulk-view-footer .left p{color:#747576;font-size:13px;font-weight:500;margin:0}.bulk-view-footer .right button{font-size:12px;background:#fff;border:1px solid #dcdcdc;color:#747576;border-radius:2px;padding:8px 18px;cursor:pointer;text-transform:uppercase}.bulk-view-footer .right button+button{margin-left:4px}.bulk-view-footer .right button.blue{color:#fff;background:#1e5dd3}.bulk-view-footer .right button:disabled{background:#f1f1f1;border-color:#f1f1f1;pointer-events:none;cursor:not-allowed;color:#747576}\n"] }]
|
|
46955
|
+
args: [{ selector: 'app-bulk-responsibility-view', template: "<!-- --------------------------------------------------------------------upward is new one-------------------- -->\r\n<app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!-- HTML for multiple tabs -->\r\n<ng-container *ngIf=\"responsibilityType === 'multiTab'\">\r\n <div class=\"bulk-view\">\r\n <div class=\"bulk-view-head\">\r\n <h2 class=\"bulk-view-title\">\r\n {{fileName}}\r\n </h2>\r\n </div>\r\n <div class=\"bulk-view-body bulk\" [class.is-horizontally-scrolled]=\"isHorizontallyScrolled\"\r\n (scroll)=\"onGridScroll($event)\">\r\n <div class=\"exel-view\">\r\n <div class=\"exel-view-row head\">\r\n <div class=\"exel-view-column sl-no sticky-col sticky-col-index\">#</div>\r\n <div class=\"exel-view-column sticky-col sticky-col-name\">Responsibility Name <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\" *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Program</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">Program Type</div>\r\n <div class=\"exel-view-column\">Program</div>\r\n <div class=\"exel-view-column\">Program Category</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Entrusted By</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Entrust To <span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Person or Group<span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">All or Any Persons</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Key Responsibility?</div>\r\n <div class=\"exel-view-column\" *ngIf=\"tabType === 'frequency'\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-row\">\r\n <!-- <div class=\"exel-view-column large\">Frequency of Occurrence and Completion Window <span class=\"required\">*</span></div> -->\r\n <div class=\"exel-view-column large\">{{responsibilityBulkUpload?.header.includes('Program') ?\r\n responsibilityBulkUpload?.header[8]?.slice(0, -1) :\r\n responsibilityBulkUpload?.header[5]?.slice(0, -1)}}<span class=\"required\">*</span></div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <ng-container *ngIf=\"tabType === 'frequency'\">\r\n <div class=\"exel-view-column\">Frequency <span class=\"required\">*</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Day)</span></div>\r\n <div class=\"exel-view-column\">Due Date <span class=\"info-text\">(Month)</span></div>\r\n <div class=\"exel-view-column\" *ngIf=\"hasExtendedFrequencyColumns\">Due Time</div>\r\n <div class=\"exel-view-column\">Start <span class=\"info-text\">(No. of days before the due\r\n date)</span></div>\r\n <div class=\"exel-view-column\">Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be completed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of\r\n days after the due date. Select \"0\" if the responsibility must be completed on\r\n the due date)</span></div>\r\n <ng-container *ngIf=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\">Responsibility Ends After Occurences <span\r\n class=\"info-text\">(Number of occurrences)</span></div>\r\n <div class=\"exel-view-column\">Responsibility Ends By Date <span\r\n class=\"info-text\">(Day)</span></div>\r\n <div class=\"exel-view-column\">Responsibility Ends By Date <span\r\n class=\"info-text\">(Month)</span></div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column two-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Responsibility Centre</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">Responsibility Centre Name</div>\r\n <div class=\"exel-view-column\">Responsibility Centre Type</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">Risk Class</div>\r\n <div class=\"exel-view-column\">Objective</div>\r\n <div class=\"exel-view-column\">Notes</div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Format & Evidence</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\" [class.three-column]=\"false\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Format</div>\r\n <div class=\"exel-view-column\">Format For Responsibility (link)</div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">Evidence</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Assessments or Checkpoints</div> -->\r\n <div class=\"exel-view-column four-column\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Review of Responsibility</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\">Reviewer</div>\r\n <div class=\"exel-view-column\">Reviewer Type\r\n <span class=\"info-text\">(Specify the type of reviewer flow)</span>\r\n\r\n </div>\r\n\r\n <div class=\"exel-view-column\">Review Start <span class=\"info-text\">(No. of days before the\r\n due date)</span></div>\r\n <div class=\"exel-view-column\">Review Fail <span class=\"info-text\"\r\n appTooltip=\"(No. of days after the due date. Select '0' if the responsibility must be reviewed on the due date)\"\r\n placement=\"bottom\" delay=\"0\" type=\"black\" [tooltipMandatory]=\"false\">(No. of days\r\n after the due date. Select \"0\" if the responsibility must be reviewed on the due\r\n date)</span></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row\">\r\n <div class=\"exel-view-column large\">Overseer</div>\r\n </div>\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\">Always Notify</div>\r\n <div class=\"exel-view-column\">Notify on Failure</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">Overseer</div> -->\r\n\r\n <!-- Collaborator -->\r\n <div class=\"exel-view-column\">Collaborator</div>\r\n\r\n </div>\r\n <div class=\"exel-view-row\" *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\">\r\n <div class=\"exel-view-column sl-no sticky-col sticky-col-index\" [class.error]=\"!report?.isValid\">{{i+1}}</div>\r\n <div class=\"exel-view-column sticky-col sticky-col-name\" [class.error]=\"!report.responsibilityName\">\r\n {{report?.responsibilityName}} <i *ngIf=\"!report.responsibilityName\" class=\"icons\"\r\n [appTooltip]=\"'Enter a name for this responsibility.'\" placement=\"bottom-right\" type=\"white\"\r\n delay=\"0\" [tooltipMandatory]=true></i></div>\r\n <div class=\"exel-view-column multi-column\"\r\n *ngIf=\"responsibilityBulkUpload?.header.includes('Program')\" [class.error]=\"false\"\r\n [class.three-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.three-column]=\"true\">\r\n <div class=\"exel-view-column\">{{report?.programType}}</div>\r\n <div class=\"exel-view-column\">{{report?.program}}</div>\r\n <div class=\"exel-view-column\">{{report?.programCategory}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assignor}}\r\n </div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.assignee || !report?.userValidateWithProgram?.isValidAssignee || (!report?.isValidUser)\">\r\n {{report?.assignee}}\r\n <!-- || (!report?.isValidUser) -->\r\n <i *ngIf=\"(!report?.assignee) || (!report?.isValidUser)\" class=\"icons\"\r\n [appTooltip]=\"'Select the user responsible for completing this responsibility. '\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"(report?.assignee) && !report?.userValidateWithProgram?.isValidAssignee\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.assigneeType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.keyResponsibility}}</div>\r\n <div class=\"exel-view-column multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\"\r\n *ngIf=\"tabType === 'frequency'\">\r\n\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.frequency\">{{report?.frequency}}\r\n <i *ngIf=\"!report?.frequency\" class=\"icons\"\r\n [appTooltip]=\"'Select a frequency for this responsibility.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.day}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"!report?.validDate || report?.isPastDate\">\r\n {{report?.month}}\r\n <i *ngIf=\"!report?.validDate\" class=\"icons\" [appTooltip]=\"'Invalid Due Date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n <i *ngIf=\"report?.isPastDate\" class=\"icons\"\r\n [appTooltip]=\"'This date occurs in the past. Select a future date.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\" *ngIf=\"hasExtendedFrequencyColumns\"\r\n [class.error]=\"!report?.isValidDueTime\">{{report?.dueTime}}\r\n <i *ngIf=\"!report?.isValidDueTime\" class=\"icons\"\r\n [appTooltip]=\"VALIDATION_MESSAGES.DUE_TIME\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityWindow}}</div>\r\n <div class=\"exel-view-column\">{{report?.failedAfter}}</div>\r\n <ng-container *ngIf=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.isValidEndsAfterOccurrences\">{{report?.endsAfterOccurrences}}\r\n <i *ngIf=\"!report?.isValidEndsAfterOccurrences\" class=\"icons\"\r\n [appTooltip]=\"report?.endsAfterOccurrencesError\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.isValidEndsByDateDay\">{{report?.endsByDateDay}}\r\n <i *ngIf=\"!report?.isValidEndsByDateDay\" class=\"icons\"\r\n [appTooltip]=\"report?.endsByDateDayError\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n <div class=\"exel-view-column\"\r\n [class.error]=\"!report?.isValidEndsByDateMonth\">{{report?.endsByDateMonth}}\r\n <i *ngIf=\"!report?.isValidEndsByDateMonth\" class=\"icons\"\r\n [appTooltip]=\"report?.endsByDateMonthError\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true></i>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenter}}</div>\r\n <div class=\"exel-view-column\">{{report?.responsibilityCenterType}}</div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reportClass}}</div>\r\n <div class=\"exel-view-column\">{{report?.objective}}</div>\r\n <div class=\"exel-view-column\">{{report?.notes}}</div>\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column multi-column\">\r\n <div class=\"exel-view-row multi-column\">\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">{{report?.isFormat}}</div>\r\n <a class=\"exel-view-column external-link\" [href]=\"report?.formatForResponsibility\"\r\n target=\"_blank\">{{report?.formatForResponsibility}}</a>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\" [class.small-column]=\"true\">\r\n {{report?.documentEvidenceRequired}}</div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"exel-view-column\">{{report?.assessments}}</div> -->\r\n <div class=\"exel-view-column multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.four-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.reviewer && (\r\n !report?.userValidateWithProgram?.isValidReviewer )\">{{report?.reviewer}}\r\n\r\n <!-- <i *ngIf=\"(report?.reviewer && report?.reviewer === report?.assignor)\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Reviewer of this responsibility.':'You cannot be a Reviewer of this responsibility since you are the assignor. ') +'Select another user as the Reviewer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i> -->\r\n <i *ngIf=\"report?.reviewer && !report?.userValidateWithProgram?.isValidReviewer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\">{{report?.reviewerType}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewToBeCompletedWithin}}</div>\r\n <div class=\"exel-view-column\">{{report?.reviewWillBeFailedAfter}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-row multi-column\" [class.two-column]=\"true\">\r\n <div class=\"exel-view-column\" [class.error]=\"report?.overseer && (\r\n !report?.userValidateWithProgram?.isValidOverseer )\">\r\n {{report?.overseer}}\r\n\r\n <i *ngIf=\"(report?.overseer) && !report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n <div class=\"exel-view-column\" [class.error]=\"report?.notifyOnFailure && (\r\n !report?.userValidateWithProgram?.isValidNotifyOnFailure )\">\r\n {{report?.notifyOnFailure}}\r\n\r\n <i *ngIf=\"(report?.notifyOnFailure) && !report?.userValidateWithProgram?.isValidNotifyOnFailure\"\r\n class=\"icons\"\r\n [appTooltip]=\"'This user is not associated with the selected Program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"exel-view-column\">{{report?.collaborator}}\r\n </div>\r\n\r\n <!-- <div class=\"exel-view-column\" [class.error]=\"(report?.overseer) && ((report?.overseer === report?.assignee) ||(report?.reviewer === report?.overseer) || (report?.overseer == report?.assignor) || (!report?.userValidateWithProgram?.isValidOverseer))\">\r\n {{report?.overseer}}\r\n <i *ngIf=\"(report?.overseer) && ((report?.reviewer === report?.overseer))\"\r\n class=\"icons\"\r\n [appTooltip]=\"'The Reviewer cannot also be the Overseer of this responsibility. Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n\r\n <i *ngIf=\"report?.overseer && (report?.overseer === report?.assignee)\" class=\"icons\"\r\n [appTooltip]=\"'The Assignee cannot also be the Overseer of this responsibility. Select another user as the Overseer'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"((report?.overseer) && (report?.overseer == report?.assignor))\"\r\n class=\"icons\"\r\n [appTooltip]=\"((report?.assignor)?'The Assignor cannot also be the Overseer of this responsibility. ':'You cannot be an Overseer of this responsibility since you are the Assignor. ') +'Select another user as the Overseer.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n <i *ngIf=\"!report?.userValidateWithProgram?.isValidOverseer\"\r\n class=\"icons\"\r\n [appTooltip]=\"'Selected user is not a valid overseer for selected program.'\"\r\n placement=\"bottom-right\" type=\"white\" delay=\"0\" [tooltipMandatory]=true>\r\n </i>\r\n </div> -->\r\n </div>\r\n\r\n <div class=\"exel-view-row empty-fill-row\" aria-hidden=\"true\">\r\n <div class=\"exel-view-column sl-no sticky-col sticky-col-index\"></div>\r\n <div class=\"exel-view-column sticky-col sticky-col-name\"></div>\r\n <div class=\"exel-view-column multi-column three-column\" *ngIf=\"hasProgramColumn\">\r\n <div class=\"exel-view-row multi-column three-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\"\r\n *ngIf=\"tabType === 'frequency'\">\r\n <div class=\"exel-view-row multi-column\"\r\n [class.five-column]=\"!hasExtendedFrequencyColumns\"\r\n [class.nine-column]=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\" *ngIf=\"hasExtendedFrequencyColumns\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <ng-container *ngIf=\"hasExtendedFrequencyColumns\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column multi-column\">\r\n <div class=\"exel-view-row multi-column\">\r\n <div class=\"exel-view-column small-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column small-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column multi-column four-column\">\r\n <div class=\"exel-view-row multi-column four-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column multi-column two-column\">\r\n <div class=\"exel-view-row multi-column two-column\">\r\n <div class=\"exel-view-column\"></div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n </div>\r\n <div class=\"exel-view-column\"></div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- ------------------------------------------------old code dynamic------------------------------------------------- -->\r\n\r\n <!-- *ngFor=\"let report of responsibilityBulkUpload?.reports; let i = index\" -->\r\n </div>\r\n </div>\r\n <div class=\"bulk-view-option\">\r\n <button *ngIf=\"bulkUpload?.frequency?.reports?.length\" [class.active]=\"tabType === 'frequency'\"\r\n (click)=\"selectedTab.emit('frequency')\">Frequency Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.ongoing?.reports?.length\" [class.active]=\"tabType === 'ongoing'\"\r\n (click)=\"selectedTab.emit('ongoing')\">Ongoing Responsibilities</button>\r\n <button *ngIf=\"bulkUpload?.onCompletion?.reports?.length\" [class.active]=\"tabType === 'onCompletion'\"\r\n (click)=\"selectedTab.emit('onCompletion')\">On Completion Responsibilities</button>\r\n </div>\r\n <div class=\"bulk-view-footer\">\r\n <!-- <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityBulkUpload?.reports?.length}} responsibilities will be\r\n uploaded.</p>\r\n </div> -->\r\n <div class=\"left\">\r\n <p>{{finalResponsibilities}} out of {{responsibilityMultiTabBulkUpload?.length}}\r\n {{responsibilityMultiTabBulkUpload?.length > 1 ? 'responsibilities' : 'responsibility'}} will be\r\n uploaded.</p>\r\n </div>\r\n <div class=\"right\">\r\n <button (click)=\"close()\" id=\"bulk-resp-cancel\">Cancel</button>\r\n <button (click)=\"submit()\" id=\"bulk-resp-confirm\" [disabled]=\"!isConfirmClickable\"\r\n class=\"blue\">Confirm</button>\r\n <!-- finalResponsibilities < 1 -->\r\n </div>\r\n </div>\r\n </div>\r\n <app-loader *ngIf=\"loader\"></app-loader>\r\n\r\n</ng-container>\r\n\r\n<!-- --------------------------------------------------------------------upward is new one-------------------- -->", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#747576;border-radius:16px}::-webkit-scrollbar{height:15px}.bulk-view{position:fixed;inset:0;z-index:11}.bulk-view-head{height:60px;padding:20px 24px;background:#161b2f;display:flex;justify-content:flex-start}.bulk-view-title{font-size:16px;line-height:20px;font-weight:400;margin:0;color:#fff}.bulk-view-body{height:calc(100vh - 110px);overflow:auto;width:100%;background:#fff}.bulk-view-body .exel-view{display:block}.bulk-view-body .exel-view-row{display:flex;width:100%}.bulk-view-body .exel-view-row.head .exel-view-column{font-weight:500;font-size:14px;min-height:26px;background:#f1f1f1;padding:0;word-break:unset}.bulk-view-body .exel-view-row.multi-column .exel-view-column{width:140px;min-width:140px}.bulk-view-body .exel-view-row.multi-column .external-link{color:#1e5dd3;text-decoration:none}.bulk-view-body .exel-view-column{width:300px;min-width:300px;padding:0 10px;border-right:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;text-align:center;word-break:break-all;line-height:16px;font-size:12px;color:#161b2f;flex-wrap:wrap;position:relative}.bulk-view-body .exel-view-column i.icons{position:absolute;top:8px;right:10px;cursor:pointer;color:#d93b41}.bulk-view-body .exel-view-column.large{width:100%;min-width:auto}.bulk-view-body .exel-view-column.error{border:1px solid #EB2424!important;padding-right:24px}.bulk-view-body .exel-view-column.error+.error{border-left:none!important}.bulk-view-body .exel-view-column span.required{color:#eb2424;display:contents}.bulk-view-body .exel-view-column .exel-view-row .exel-view-column{width:100%}.bulk-view-body .exel-view-column.sticky-col{position:sticky;z-index:2;background:#fff}.bulk-view-body .exel-view-column.sticky-col-index{left:0;z-index:3;background:#f1f1f1}.bulk-view-body .exel-view-column.sticky-col-name{left:60px}.bulk-view-body .exel-view-column.sl-no{background:#f1f1f1;width:60px;min-width:60px;min-height:30px;font-weight:400}.bulk-view-body .exel-view-column.sl-no.error{background:#f5d6d7;border:none;padding-right:10px;border-bottom:1px solid #dcdcdc}.bulk-view-body .exel-view-column.multi-column{padding:0;border:none}.bulk-view-body .exel-view-column.multi-column .exel-view-row{height:100%}.bulk-view-body .exel-view-column.multi-column .exel-view-column{width:50%;min-width:50%}.bulk-view-body .exel-view-column.multi-column .exel-view-column+.exel-view-column{border-left:none}.bulk-view-body.bulk{height:calc(100vh - 142px)}.bulk-view-body.bulk.is-horizontally-scrolled .sticky-col-name{box-shadow:6px 0 8px -4px #161b2f29}.bulk-view-body.bulk .exel-view{display:flex;flex-direction:column;width:max-content;min-width:100%;min-height:100%}.bulk-view-body.bulk .exel-view-row{width:max-content;min-width:100%}.bulk-view-body.bulk .exel-view-row.head{position:sticky;top:0;z-index:4}.bulk-view-body.bulk .exel-view-row.head .exel-view-column{min-height:34px}.bulk-view-body.bulk .exel-view-row.head .exel-view-column.sticky-col{background:#f1f1f1;z-index:5}.bulk-view-body.bulk .exel-view-row.head .exel-view-column .info-text{font-size:10px;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0 8px}.bulk-view-body.bulk .exel-view-row.two-column .exel-view-column{min-width:250px!important}.bulk-view-body.bulk .exel-view-row.three-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.four-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.five-column .exel-view-column,.bulk-view-body.bulk .exel-view-row.nine-column .exel-view-column{width:200px;min-width:200px!important}.bulk-view-body.bulk .exel-view-column .exel-view-row .exel-view-column.small-column{width:120px;min-width:120px!important}.bulk-view-body.bulk .exel-view-column.multi-column .exel-view-column{min-width:unset}.bulk-view-body.bulk .exel-view-column.two-column{width:500px;min-width:500px!important}.bulk-view-body.bulk .exel-view-column.three-column{width:600px;min-width:600px!important}.bulk-view-body.bulk .exel-view-column.four-column{width:800px;min-width:800px!important}.bulk-view-body.bulk .exel-view-column.five-column{width:1000px;min-width:1000px!important}.bulk-view-body.bulk .exel-view-column.nine-column{width:1800px;min-width:1800px!important}.bulk-view-body.bulk .exel-view .empty-fill-row{flex:1 1 auto;min-height:32px;align-items:stretch}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column{min-height:100%;background-color:#fff;background-image:repeating-linear-gradient(to bottom,#fff 0 31px,#dcdcdc 31px 32px);background-repeat:repeat-y;background-size:100% 32px}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column.multi-column{background-image:none;background-color:transparent}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column.sticky-col-index,.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-column.sl-no{background-color:#f1f1f1;background-image:repeating-linear-gradient(to bottom,#f1f1f1 0 31px,#dcdcdc 31px 32px)}.bulk-view-body.bulk .exel-view .empty-fill-row .exel-view-row{height:100%;align-items:stretch}.bulk-view-option{background:#fff;border-top:1px solid #f1f1f1;padding:0 20px;position:fixed;width:100%;bottom:50px;display:flex;align-items:center}.bulk-view-option button{background:transparent;border-radius:0;border:none;border-left:1px solid #f1f1f1;color:#747576;font-size:11px;font-weight:500;padding:0 .5rem;margin:0;height:2rem;position:relative}.bulk-view-option button:last-of-type{border-right:1px solid #f1f1f1}.bulk-view-option button.active{color:#1e5dd3}.bulk-view-option button.active:before{background:#fff;content:\"\";position:absolute;top:-1px;left:0;height:1px;width:100%}.bulk-view-footer{height:50px;box-shadow:0 0 15px #1e03d259;padding:10px 20px;position:fixed;width:100%;bottom:0;display:flex;align-items:center;justify-content:space-between;background:#fff}.bulk-view-footer .left p{color:#747576;font-size:13px;font-weight:500;margin:0}.bulk-view-footer .right button{font-size:12px;background:#fff;border:1px solid #dcdcdc;color:#747576;border-radius:2px;padding:8px 18px;cursor:pointer;text-transform:uppercase}.bulk-view-footer .right button+button{margin-left:4px}.bulk-view-footer .right button.blue{color:#fff;background:#1e5dd3}.bulk-view-footer .right button:disabled{background:#f1f1f1;border-color:#f1f1f1;pointer-events:none;cursor:not-allowed;color:#747576}\n"] }]
|
|
46925
46956
|
}], propDecorators: { responsibilityBulkUpload: [{
|
|
46926
46957
|
type: Input
|
|
46927
46958
|
}], fileName: [{
|
|
@@ -47690,6 +47721,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
47690
47721
|
|
|
47691
47722
|
const REGEX = {
|
|
47692
47723
|
MONTH: /^[A-Za-z]+'\d{2}$/,
|
|
47724
|
+
DUE_TIME: /^(1[0-2]|[1-9]):(00|30) (AM|PM)$/,
|
|
47725
|
+
ENDS_BY_DATE_MONTH: /^(January|February|March|April|May|June|July|August|September|October|November|December)'(\d{2})$/,
|
|
47693
47726
|
};
|
|
47694
47727
|
|
|
47695
47728
|
class AddMultipleResponsibilityWithTabComponent {
|
|
@@ -47923,6 +47956,9 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
47923
47956
|
}
|
|
47924
47957
|
responsibilityBulkUpload.header = cloneDeep$1(data[2]);
|
|
47925
47958
|
responsibilityBulkUpload.subHeading = cloneDeep$1(data[3]);
|
|
47959
|
+
const hasExtendedFrequencyColumns = this.detectExtendedFrequencyColumns(responsibilityBulkUpload.header, responsibilityBulkUpload.subHeading);
|
|
47960
|
+
responsibilityBulkUpload.hasExtendedFrequencyColumns =
|
|
47961
|
+
hasExtendedFrequencyColumns;
|
|
47926
47962
|
data = data.slice(5);
|
|
47927
47963
|
if (this.member_obj_id != this.templateInfo.memberId) {
|
|
47928
47964
|
this.errorMessage =
|
|
@@ -47945,11 +47981,13 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
47945
47981
|
}
|
|
47946
47982
|
/* Pushing the report details into the bulkUpload object as per tab tabs */
|
|
47947
47983
|
if (sheet?.toLowerCase() === 'frequency responsibilities') {
|
|
47948
|
-
responsibilityBulkUpload.reports.push(this.setReportDetails(report, 'frequency', responsibilityBulkUpload.header[1] === 'Program' ? true : false));
|
|
47984
|
+
responsibilityBulkUpload.reports.push(this.setReportDetails(report, 'frequency', responsibilityBulkUpload.header[1] === 'Program' ? true : false, hasExtendedFrequencyColumns));
|
|
47949
47985
|
this.bulkUpload.frequency.header = responsibilityBulkUpload?.header;
|
|
47950
47986
|
this.bulkUpload.frequency.subHeading =
|
|
47951
47987
|
responsibilityBulkUpload?.subHeading;
|
|
47952
47988
|
this.bulkUpload.frequency.reports = responsibilityBulkUpload?.reports;
|
|
47989
|
+
this.bulkUpload.frequency.hasExtendedFrequencyColumns =
|
|
47990
|
+
hasExtendedFrequencyColumns;
|
|
47953
47991
|
}
|
|
47954
47992
|
if (sheet?.toLowerCase() === 'ongoing responsibilities') {
|
|
47955
47993
|
responsibilityBulkUpload.reports.push(this.setReportDetails(report, 'ongoing', responsibilityBulkUpload.header[1] === 'Program' ? true : false));
|
|
@@ -48523,6 +48561,73 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48523
48561
|
break;
|
|
48524
48562
|
}
|
|
48525
48563
|
}
|
|
48564
|
+
/**
|
|
48565
|
+
* Detects the four frequency columns added to the latest xlsx template:
|
|
48566
|
+
* Due Time, Ends After Occurrences, Ends By Date (Day), Ends By Date (Month).
|
|
48567
|
+
* Older templates without these columns keep the original column mapping.
|
|
48568
|
+
*/
|
|
48569
|
+
detectExtendedFrequencyColumns(header = [], subHeading = []) {
|
|
48570
|
+
const cells = [...(header || []), ...(subHeading || [])];
|
|
48571
|
+
return cells.some((cell) => {
|
|
48572
|
+
if (typeof cell !== 'string') {
|
|
48573
|
+
return false;
|
|
48574
|
+
}
|
|
48575
|
+
const normalized = cell.toLowerCase().replace(/\s+/g, ' ');
|
|
48576
|
+
return (normalized.includes('due time') ||
|
|
48577
|
+
normalized.includes('responsibility ends after') ||
|
|
48578
|
+
normalized.includes('responsibility ends by date'));
|
|
48579
|
+
});
|
|
48580
|
+
}
|
|
48581
|
+
/**
|
|
48582
|
+
* Remaps frequency columns when the uploaded file includes the four new fields,
|
|
48583
|
+
* so later columns (RC, reviewer, etc.) stay aligned. Ongoing/onCompletion are unchanged.
|
|
48584
|
+
*/
|
|
48585
|
+
applyExtendedFrequencyColumns(obj, report, isProgram) {
|
|
48586
|
+
if (isProgram) {
|
|
48587
|
+
obj.dueTime = report[11];
|
|
48588
|
+
obj.responsibilityWindow = report[12];
|
|
48589
|
+
obj.failedAfter = report[13];
|
|
48590
|
+
obj.endsAfterOccurrences = report[14];
|
|
48591
|
+
obj.endsByDateDay = report[15];
|
|
48592
|
+
obj.endsByDateMonth = report[16];
|
|
48593
|
+
obj.responsibilityCenter = report[17];
|
|
48594
|
+
obj.responsibilityCenterType = report[18];
|
|
48595
|
+
obj.reportClass = report[19];
|
|
48596
|
+
obj.objective = report[20];
|
|
48597
|
+
obj.notes = report[21];
|
|
48598
|
+
obj.isFormat = report[22];
|
|
48599
|
+
obj.formatForResponsibility = report[23];
|
|
48600
|
+
obj.documentEvidenceRequired = report[24];
|
|
48601
|
+
obj.reviewer = report[25];
|
|
48602
|
+
obj.reviewerType = report[26];
|
|
48603
|
+
obj.reviewToBeCompletedWithin = report[27];
|
|
48604
|
+
obj.reviewWillBeFailedAfter = report[28];
|
|
48605
|
+
obj.overseer = report[29];
|
|
48606
|
+
obj.notifyOnFailure = report[30];
|
|
48607
|
+
obj.collaborator = report[31];
|
|
48608
|
+
}
|
|
48609
|
+
else {
|
|
48610
|
+
obj.dueTime = report[8];
|
|
48611
|
+
obj.responsibilityWindow = report[9];
|
|
48612
|
+
obj.failedAfter = report[10];
|
|
48613
|
+
obj.endsAfterOccurrences = report[11];
|
|
48614
|
+
obj.endsByDateDay = report[12];
|
|
48615
|
+
obj.endsByDateMonth = report[13];
|
|
48616
|
+
obj.responsibilityCenter = report[14];
|
|
48617
|
+
obj.reportClass = report[15];
|
|
48618
|
+
obj.objective = report[16];
|
|
48619
|
+
obj.notes = report[17];
|
|
48620
|
+
obj.isFormat = report[18];
|
|
48621
|
+
obj.formatForResponsibility = report[19];
|
|
48622
|
+
obj.documentEvidenceRequired = report[20];
|
|
48623
|
+
obj.reviewer = report[21];
|
|
48624
|
+
obj.reviewToBeCompletedWithin = report[22];
|
|
48625
|
+
obj.reviewWillBeFailedAfter = report[23];
|
|
48626
|
+
obj.overseer = report[24];
|
|
48627
|
+
obj.notifyOnFailure = report[25];
|
|
48628
|
+
obj.collaborator = report[26];
|
|
48629
|
+
}
|
|
48630
|
+
}
|
|
48526
48631
|
/**
|
|
48527
48632
|
* It takes in a report, a tab type, and a boolean value. It then returns an object with a bunch of
|
|
48528
48633
|
* properties.
|
|
@@ -48530,9 +48635,10 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48530
48635
|
* @param {any} report - any => the array of data
|
|
48531
48636
|
* @param {string} tabType - string - this is the type of tab that is selected.
|
|
48532
48637
|
* @param {boolean} isProgram - boolean
|
|
48638
|
+
* @param {boolean} hasExtendedFrequencyColumns - whether the xlsx includes the four new frequency columns
|
|
48533
48639
|
* @returns An object with the following properties:
|
|
48534
48640
|
*/
|
|
48535
|
-
setReportDetails(report, tabType, isProgram) {
|
|
48641
|
+
setReportDetails(report, tabType, isProgram, hasExtendedFrequencyColumns = false) {
|
|
48536
48642
|
let obj;
|
|
48537
48643
|
switch (tabType) {
|
|
48538
48644
|
case 'frequency': {
|
|
@@ -48570,6 +48676,9 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48570
48676
|
notifyOnFailure: report[26],
|
|
48571
48677
|
collaborator: report[27],
|
|
48572
48678
|
};
|
|
48679
|
+
if (hasExtendedFrequencyColumns) {
|
|
48680
|
+
this.applyExtendedFrequencyColumns(obj, report, true);
|
|
48681
|
+
}
|
|
48573
48682
|
obj['isValidData'] = this.isValidData(obj);
|
|
48574
48683
|
obj['isValidUser'] = this.returnIds(obj?.assignee, 'entrusted_to')
|
|
48575
48684
|
? true
|
|
@@ -48579,6 +48688,10 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48579
48688
|
obj['isDateFormatInvalid'] = this.isDateFormatInvalid;
|
|
48580
48689
|
obj['isDayInvalid'] = this.isDayInvalid;
|
|
48581
48690
|
obj['isPastDate'] = this.isPastDate(obj?.day, obj?.month);
|
|
48691
|
+
obj['isValidDueTime'] = this.isValidDueTime(obj?.dueTime, hasExtendedFrequencyColumns);
|
|
48692
|
+
obj['endsAfterOccurrencesError'] = this.getEndsAfterOccurrencesError(obj?.endsAfterOccurrences, hasExtendedFrequencyColumns);
|
|
48693
|
+
obj['isValidEndsAfterOccurrences'] = !obj['endsAfterOccurrencesError'];
|
|
48694
|
+
this.applyEndsByDateValidation(obj, hasExtendedFrequencyColumns);
|
|
48582
48695
|
obj['isValid'] =
|
|
48583
48696
|
obj['isValidData'] &&
|
|
48584
48697
|
obj['validDate'] &&
|
|
@@ -48586,7 +48699,10 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48586
48699
|
obj?.frequency?.length &&
|
|
48587
48700
|
!Object.values(obj['userValidateWithProgram']).includes(false) &&
|
|
48588
48701
|
obj['isValidUser'] &&
|
|
48589
|
-
this.isValidRiskClass(obj?.reportClass)
|
|
48702
|
+
this.isValidRiskClass(obj?.reportClass) &&
|
|
48703
|
+
obj['isValidDueTime'] &&
|
|
48704
|
+
obj['isValidEndsAfterOccurrences'] &&
|
|
48705
|
+
obj['isValidEndsByDate'];
|
|
48590
48706
|
return obj;
|
|
48591
48707
|
}
|
|
48592
48708
|
else {
|
|
@@ -48618,6 +48734,9 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48618
48734
|
notifyOnFailure: report[21],
|
|
48619
48735
|
collaborator: report[22],
|
|
48620
48736
|
};
|
|
48737
|
+
if (hasExtendedFrequencyColumns) {
|
|
48738
|
+
this.applyExtendedFrequencyColumns(obj, report, false);
|
|
48739
|
+
}
|
|
48621
48740
|
obj['isValidData'] = this.isValidData(obj);
|
|
48622
48741
|
obj['userValidateWithProgram'] = this.validateDataWithProgram(obj);
|
|
48623
48742
|
obj['isValidUser'] = this.returnIds(obj?.assignee, 'entrusted_to')
|
|
@@ -48625,13 +48744,20 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48625
48744
|
: false;
|
|
48626
48745
|
obj['validDate'] = this.compareWithCurrentDate(obj?.day, obj?.month);
|
|
48627
48746
|
obj['isPastDate'] = this.isPastDate(obj?.day, obj?.month);
|
|
48747
|
+
obj['isValidDueTime'] = this.isValidDueTime(obj?.dueTime, hasExtendedFrequencyColumns);
|
|
48748
|
+
obj['endsAfterOccurrencesError'] = this.getEndsAfterOccurrencesError(obj?.endsAfterOccurrences, hasExtendedFrequencyColumns);
|
|
48749
|
+
obj['isValidEndsAfterOccurrences'] = !obj['endsAfterOccurrencesError'];
|
|
48750
|
+
this.applyEndsByDateValidation(obj, hasExtendedFrequencyColumns);
|
|
48628
48751
|
obj['isValid'] =
|
|
48629
48752
|
obj['isValidData'] &&
|
|
48630
48753
|
obj['validDate'] &&
|
|
48631
48754
|
!obj['isPastDate'] &&
|
|
48632
48755
|
obj?.frequency?.length &&
|
|
48633
48756
|
obj['isValidUser'] &&
|
|
48634
|
-
this.isValidRiskClass(obj?.reportClass)
|
|
48757
|
+
this.isValidRiskClass(obj?.reportClass) &&
|
|
48758
|
+
obj['isValidDueTime'] &&
|
|
48759
|
+
obj['isValidEndsAfterOccurrences'] &&
|
|
48760
|
+
obj['isValidEndsByDate'];
|
|
48635
48761
|
return obj;
|
|
48636
48762
|
}
|
|
48637
48763
|
break;
|
|
@@ -48810,6 +48936,162 @@ class AddMultipleResponsibilityWithTabComponent {
|
|
|
48810
48936
|
return true;
|
|
48811
48937
|
return RISK_CLASS_LIST.includes(riskClass?.toLowerCase());
|
|
48812
48938
|
}
|
|
48939
|
+
isValidDueTime(dueTime, hasExtendedFrequencyColumns = false) {
|
|
48940
|
+
if (!hasExtendedFrequencyColumns) {
|
|
48941
|
+
return true;
|
|
48942
|
+
}
|
|
48943
|
+
const value = this.normalizeDueTime(dueTime);
|
|
48944
|
+
if (!value) {
|
|
48945
|
+
return true;
|
|
48946
|
+
}
|
|
48947
|
+
return REGEX.DUE_TIME.test(value);
|
|
48948
|
+
}
|
|
48949
|
+
/**
|
|
48950
|
+
* Optional field. When filled, the value must be numeric and greater than 0.
|
|
48951
|
+
*/
|
|
48952
|
+
getEndsAfterOccurrencesError(value, hasExtendedFrequencyColumns = false) {
|
|
48953
|
+
if (!hasExtendedFrequencyColumns) {
|
|
48954
|
+
return '';
|
|
48955
|
+
}
|
|
48956
|
+
if (value == null || String(value).trim() === '') {
|
|
48957
|
+
return '';
|
|
48958
|
+
}
|
|
48959
|
+
const normalized = String(value).trim();
|
|
48960
|
+
if (!/^-?\d+(\.\d+)?$/.test(normalized)) {
|
|
48961
|
+
return VALIDATION_MESSAGES.ENDS_AFTER_OCCURRENCES_NUMERIC;
|
|
48962
|
+
}
|
|
48963
|
+
if (Number(normalized) <= 0) {
|
|
48964
|
+
return VALIDATION_MESSAGES.ENDS_AFTER_OCCURRENCES_GREATER_THAN_ZERO;
|
|
48965
|
+
}
|
|
48966
|
+
return '';
|
|
48967
|
+
}
|
|
48968
|
+
applyEndsByDateValidation(obj, hasExtendedFrequencyColumns = false) {
|
|
48969
|
+
const validation = this.getEndsByDateValidation(obj?.endsByDateDay, obj?.endsByDateMonth, hasExtendedFrequencyColumns, obj?.endsAfterOccurrences);
|
|
48970
|
+
obj['endsByDateDayError'] = validation.dayError;
|
|
48971
|
+
obj['endsByDateMonthError'] = validation.monthError;
|
|
48972
|
+
obj['isValidEndsByDateDay'] = !validation.dayError;
|
|
48973
|
+
obj['isValidEndsByDateMonth'] = !validation.monthError;
|
|
48974
|
+
obj['isValidEndsByDate'] = validation.isValid;
|
|
48975
|
+
}
|
|
48976
|
+
hasValue(value) {
|
|
48977
|
+
return value != null && String(value).trim() !== '';
|
|
48978
|
+
}
|
|
48979
|
+
/**
|
|
48980
|
+
* Optional unless either day or month is filled. Cannot be used together with Ends After Occurrences.
|
|
48981
|
+
* Day must be numeric, greater than 0, and at most 31. Month must be full month name + ' + two-digit
|
|
48982
|
+
* year (January'28). Combined date must exist, including leap-year February 29.
|
|
48983
|
+
*/
|
|
48984
|
+
getEndsByDateValidation(day, month, hasExtendedFrequencyColumns = false, endsAfterOccurrences) {
|
|
48985
|
+
const valid = { isValid: true, dayError: '', monthError: '' };
|
|
48986
|
+
if (!hasExtendedFrequencyColumns) {
|
|
48987
|
+
return valid;
|
|
48988
|
+
}
|
|
48989
|
+
const dayValue = day == null ? '' : String(day).trim();
|
|
48990
|
+
const monthValue = month == null ? '' : String(month).trim();
|
|
48991
|
+
if (!dayValue && !monthValue) {
|
|
48992
|
+
return valid;
|
|
48993
|
+
}
|
|
48994
|
+
if (this.hasValue(endsAfterOccurrences) && (dayValue || monthValue)) {
|
|
48995
|
+
return {
|
|
48996
|
+
isValid: false,
|
|
48997
|
+
dayError: dayValue ? VALIDATION_MESSAGES.ENDS_BY_DATE_CONFLICT : '',
|
|
48998
|
+
monthError: monthValue ? VALIDATION_MESSAGES.ENDS_BY_DATE_CONFLICT : '',
|
|
48999
|
+
};
|
|
49000
|
+
}
|
|
49001
|
+
if (!dayValue || !monthValue) {
|
|
49002
|
+
return {
|
|
49003
|
+
isValid: false,
|
|
49004
|
+
dayError: VALIDATION_MESSAGES.ENDS_BY_DATE_INCOMPLETE,
|
|
49005
|
+
monthError: VALIDATION_MESSAGES.ENDS_BY_DATE_INCOMPLETE,
|
|
49006
|
+
};
|
|
49007
|
+
}
|
|
49008
|
+
const dayError = this.getEndsByDateDayError(dayValue);
|
|
49009
|
+
const monthError = this.getEndsByDateMonthError(monthValue);
|
|
49010
|
+
if (dayError || monthError) {
|
|
49011
|
+
return {
|
|
49012
|
+
isValid: false,
|
|
49013
|
+
dayError,
|
|
49014
|
+
monthError,
|
|
49015
|
+
};
|
|
49016
|
+
}
|
|
49017
|
+
if (!this.isValidEndsByCalendarDate(dayValue, monthValue)) {
|
|
49018
|
+
return {
|
|
49019
|
+
isValid: false,
|
|
49020
|
+
dayError: VALIDATION_MESSAGES.ENDS_BY_DATE_INVALID_VALUE,
|
|
49021
|
+
monthError: VALIDATION_MESSAGES.ENDS_BY_DATE_INVALID_VALUE,
|
|
49022
|
+
};
|
|
49023
|
+
}
|
|
49024
|
+
if (this.isEndsByDateInPast(dayValue, monthValue)) {
|
|
49025
|
+
return {
|
|
49026
|
+
isValid: false,
|
|
49027
|
+
dayError: VALIDATION_MESSAGES.ENDS_BY_DATE_PAST,
|
|
49028
|
+
monthError: VALIDATION_MESSAGES.ENDS_BY_DATE_PAST,
|
|
49029
|
+
};
|
|
49030
|
+
}
|
|
49031
|
+
return valid;
|
|
49032
|
+
}
|
|
49033
|
+
getEndsByDateDayError(day) {
|
|
49034
|
+
if (!/^-?\d+(\.\d+)?$/.test(day)) {
|
|
49035
|
+
return VALIDATION_MESSAGES.ENDS_BY_DATE_INVALID_VALUE;
|
|
49036
|
+
}
|
|
49037
|
+
const dayNumber = Number(day);
|
|
49038
|
+
if (dayNumber <= 0 || dayNumber > 31) {
|
|
49039
|
+
return VALIDATION_MESSAGES.ENDS_BY_DATE_INVALID_VALUE;
|
|
49040
|
+
}
|
|
49041
|
+
return '';
|
|
49042
|
+
}
|
|
49043
|
+
getEndsByDateMonthError(month) {
|
|
49044
|
+
if (!REGEX.ENDS_BY_DATE_MONTH.test(month)) {
|
|
49045
|
+
return VALIDATION_MESSAGES.ENDS_BY_DATE_INVALID_VALUE;
|
|
49046
|
+
}
|
|
49047
|
+
return '';
|
|
49048
|
+
}
|
|
49049
|
+
isValidEndsByCalendarDate(day, month) {
|
|
49050
|
+
const monthMatch = month.match(REGEX.ENDS_BY_DATE_MONTH);
|
|
49051
|
+
if (!monthMatch) {
|
|
49052
|
+
return false;
|
|
49053
|
+
}
|
|
49054
|
+
const monthIndex = FULL_MONTH_NAMES.indexOf(monthMatch[1]);
|
|
49055
|
+
const year = 2000 + Number(monthMatch[2]);
|
|
49056
|
+
const dayNumber = Number(day);
|
|
49057
|
+
if (!Number.isInteger(dayNumber)) {
|
|
49058
|
+
return false;
|
|
49059
|
+
}
|
|
49060
|
+
const date = new Date(year, monthIndex, dayNumber);
|
|
49061
|
+
return (date.getFullYear() === year &&
|
|
49062
|
+
date.getMonth() === monthIndex &&
|
|
49063
|
+
date.getDate() === dayNumber);
|
|
49064
|
+
}
|
|
49065
|
+
isEndsByDateInPast(day, month) {
|
|
49066
|
+
const monthMatch = month.match(REGEX.ENDS_BY_DATE_MONTH);
|
|
49067
|
+
if (!monthMatch) {
|
|
49068
|
+
return false;
|
|
49069
|
+
}
|
|
49070
|
+
const monthIndex = FULL_MONTH_NAMES.indexOf(monthMatch[1]);
|
|
49071
|
+
const year = 2000 + Number(monthMatch[2]);
|
|
49072
|
+
const dayNumber = Number(day);
|
|
49073
|
+
const endsByDate = new Date(year, monthIndex, dayNumber);
|
|
49074
|
+
endsByDate.setHours(0, 0, 0, 0);
|
|
49075
|
+
const today = new Date();
|
|
49076
|
+
today.setHours(0, 0, 0, 0);
|
|
49077
|
+
return endsByDate < today;
|
|
49078
|
+
}
|
|
49079
|
+
normalizeDueTime(dueTime) {
|
|
49080
|
+
if (dueTime == null || dueTime === '') {
|
|
49081
|
+
return '';
|
|
49082
|
+
}
|
|
49083
|
+
let value = String(dueTime).trim().replace(/\s+/g, ' ');
|
|
49084
|
+
value = value.replace(/^(\d{1,2}):(\d{2}):\d{2}\s*(AM|PM)$/i, '$1:$2 $3');
|
|
49085
|
+
const match = value.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);
|
|
49086
|
+
if (!match) {
|
|
49087
|
+
return value;
|
|
49088
|
+
}
|
|
49089
|
+
let hour = Number(match[1]);
|
|
49090
|
+
if (hour === 0) {
|
|
49091
|
+
hour = 12;
|
|
49092
|
+
}
|
|
49093
|
+
return `${hour}:${match[2]} ${match[3].toUpperCase()}`;
|
|
49094
|
+
}
|
|
48813
49095
|
/**
|
|
48814
49096
|
* It takes a string, removes all whitespace, and returns the string
|
|
48815
49097
|
* @param {any} name - the name of the responsibility
|