{"version":3,"sources":["polyfils.js","app.modules.js","app.config.js","app.routes.js","app.run.js","loading.js","app-menu-item/app-menu-item.factory.js","attachment/attachment.component.js","attachment/attachment.controller.js","attachment/attachment.factory.js","automile/automile.factory.js","competence/competence.service.js","contact/contact.component.js","contact/contact.controller.js","contact/contact.factory.js","country/country.factory.js","course/course.factory.js","course/course.service.js","customer/customer.factory.js","deviation/deviation.factory.js","error/error-log.factory.js","execution/execution.service.js","execution/executionFactory.js","execution/executionHorizontalController.js","execution/executionManagementController.js","execution/executionManagementStepDirective.js","execution/executionVerticalController.js","execution/modalNotificationEditorController.js","gdpr/gdpr.component.js","gdpr/gdpr.controller.js","gdpr/gdpr.factory.js","home/home.component.js","home/home.controller.js","home/infoController.js","language/translate.factory.js","laws-regulations/laws-regulations-tabs.component.js","laws-regulations/laws-regulations-tabs.controller.js","laws-regulations/laws-regulations.controller.js","laws-regulations/laws-regulations.factory.js","management/dataDetailsController.js","management/dataDetailsDirective.js","management/executionController.js","menu/menuController.js","menu/menuFactory.js","menu-item/menu-item.factory.js","message/dialogController.js","message/dialogService.js","message/messageController.js","notification/notification.factory.js","order/order-details.service.js","order/order-type.service.js","order/orderController.js","order/orderFactory.js","organization/notificationEditorController.js","organization/notificationEditorDirective.js","organization/OrganizationController.js","organization/organizationFactory.js","processList/horizontalProcesslistController.js","processList/process-list-details.service.js","processList/processListController.js","processList/processListDirectives.js","processList/processListFactory.js","processList/verticalProcesslistController.js","product/productController.js","product/productFactory.js","project/project.service.js","project/projectController.js","project/projectFactory.js","qualityHandbook/qualityHandbookController.js","qualityHandbook/qualityHandbookFactory.js","report/f5-report.js","report/f5-reportCreator.js","report/f5-reportFactory.js","report/f5-reportLink.js","report/f5-reportViewer.js","report/ng-google-chart.js","report/usersDropdownDirective.js","report-builder/report-builder.service.js","session/auth.service.js","session/session-utils.factory.js","session/sessionController.js","session/sessionFactory.js","resourcePlanner/resource-planner-context-options.service.js","resourcePlanner/resourcePlannerController.js","resourcePlanner/resourcePlannerFactory.js","resourcePlanner/resourcePlannerService.js","resourcePlanner/resourcePlannerTrash.js","resourcePlanner/resourcePlannerView.js","settings/settings.service.js","settings/settingsController.js","settings/settingsDirective.js","settings/settingsFactory.js","shared/search.component.js","shared/search.controller.js","simulation/horizontalSimulationController.js","simulation/verticalSimulationController.js","status/status.factory.js","status/status.service.js","taskList/task-list.service.js","taskList/taskListFactory.js","type/type.factory.js","type/type.service.js","user/user-util.service.js","user/user.factory.js","user/user.service.js","util/common-directives.js","util/datepicker-demo.controller.js","util/dateUtilService.js","util/detectChangeDirective.js","util/downloadService.js","util/filters.js","util/focus.directive.js","util/formChangeDetector.js","util/formChangesService.js","util/formOnChangeDirective.js","util/interceptors.js","util/lodash.factory.js","util/organizationUtilService.js","util/page-route-util.service.js","util/pingService.js","util/print.service.js","util/storage.service.js","util/translate.controller.js","app-menu-item/app-menu-item-list/app-menu-item-list.component.js","app-menu-item/app-menu-item-list/app-menu-item-list.controller.js","attachment/attachment-item/attachment-item.component.js","attachment/attachment-item/attachment-item.controller.js","attachment/attachment-list/attachment-list.component.js","attachment/attachment-list/attachment-list.controller.js","attachment/attachment-participant/attachment-participant.component.js","attachment/attachment-participant/attachment-participant.controller.js","automile/trip-details/trip-details.component.js","automile/trip-details/trip-details.controller.js","automile/trip-list/trip-list.component.js","automile/trip-list/trip-list.controller.js","configuration/data-details/data-details.component.js","configuration/data-details/data-details.controller.js","contact/contact-modal/contact-modal.controller.js","course/course-agenda/course-agenda.component.js","course/course-agenda/course-agenda.controller.js","course/course-agenda/course-agenda.factory.js","course/course-day/course-day.factory.js","course/course-day/course-day.service.js","course/course-details/course-details.component.js","course/course-details/course-details.controller.js","course/course-enrolled-users/course-enrolled-users.component.js","course/course-enrolled-users/course-enrolled-users.controller.js","course/course-enrollment/course-enrollment.factory.js","course/course-invitation/course-invitation.component.js","course/course-invitation/course-invitation.controller.js","course/course-invitation-configuration/course-invitation-configuration.component.js","course/course-invitation-configuration/course-invitation-configuration.controller.js","course/course-invitation-configuration/course-invitation-configuration.service.js","course/course-list/course-list.component.js","course/course-list/course-list.controller.js","course/course-location/course-location.factory.js","course/course-location/course-location.service.js","course/course-reservation/course-reservation.factory.js","course/course-reservation/course-reservation.service.js","course/course-selection-for-invitation-modal/course-selection-for-invitation-modal.component.js","course/course-selection-for-invitation-modal/course-selection-for-invitation-modal.controller.js","course/course-session/course-session.factory.js","course/course-settings/course-settings.component.js","course/course-settings/course-settings.controller.js","course/course-subject-manager/course-subject-manager.factory.js","course/course-target-audience/course-target-audience.factory.js","course/courses/courses.component.js","course/courses/courses.controller.js","customer/customer-delete/customer-delete.component.js","customer/customer-delete/customer-delete.controller.js","customer/customer-delete-confirm/customer-delete-confirm-button.component.js","customer/customer-delete-confirm/customer-delete-confirm.component.js","customer/customer-delete-confirm/customer-delete-confirm.controller.js","customer/customer-delete-confirm/customer-delete-confirm.factory.js","customer/customer-details/customer-details.component.js","customer/customer-details/customer-details.controller.js","customer/customer-details-modal/customer-details-modal.component.js","customer/customer-details-modal/customer-details-modal.controller.js","customer/customer-list/customer-list.component.js","customer/customer-list/customer-list.controller.js","deviation/audit/deviationAuditController.js","deviation/deviation-details/deviation-details.component.js","deviation/deviation-details/deviation-details.controller.js","deviation/deviation-external-input/deviation-external-input.component.js","deviation/deviation-external-input/deviation-external-input.controller.js","deviation/deviation-list/deviation-list.component.js","deviation/deviation-list/deviation-list.controller.js","deviation/deviation-list/deviation-list.service.js","deviation/email/deviationEmailController.js","deviation/execution/deviationExecutionController.js","deviation/external-party-notification-confirmation-modal/external-party-notification-confirmation.controller.js","error/report-error/report-error.directive.js","execution/cameraImage/cameraImageItemController.js","execution/multi-user-execution/multi-user-execution.component.js","execution/multi-user-execution/multi-user-execution.controller.js","execution/riskAnalysisForm/riskAnalysisFormController.js","execution/riskAnalysisForm/riskAnalysisFormDirective.js","gdpr/gdpr-delete-confirmation/gdpr-delete-confirmation.component.js","gdpr/gdpr-delete-confirmation/gdpr-delete-confirmation.controller.js","gdpr/gdpr-overview/gdpr-overview.component.js","gdpr/gdpr-overview/gdpr-overview.controller.js","gdpr/gdpr-private-customer/gdpr-private-customer.component.js","gdpr/gdpr-private-customer/gdpr-private-customer.controller.js","gdpr/gdpr-external/gdpr-external.component.js","help/general-help/general-help.component.js","help/general-help/general-help.controller.js","help/quick-guide/quick-guide.component.js","help/quick-guide/quick-guide.controller.js","help/user-manual/user-manual.component.js","help/user-manual/user-manual.controller.js","laws-regulations/laws-regulations-configuration/laws-regulations-configuration.component.js","laws-regulations/laws-regulations-configuration/laws-regulations-configuration.controller.js","laws-regulations/laws-regulations-documents/laws-regulations-documents.component.js","laws-regulations/laws-regulations-documents/laws-regulations-documents.controller.js","management/riskAnalysis/risk-analysis-utils.factory.js","management/riskAnalysis/risk-analysis.factory.js","menu/navbar-notifications/navbar-notifications.component.js","menu/navbar-notifications/navbar-notifications.controller.js","menu-item/demo-content/demo-content.factory.js","menu-item/menu-item-hierarchy/menu-item-hierarchy.component.js","menu-item/menu-item-hierarchy/menu-item-hierarchy.controller.js","menu-item/menu-item-hierarchy/menu-item-hierarchy.service.js","message/impersonate-notification/impersonate-notification.component.js","message/impersonate-notification/impersonate-notification.controller.js","notification/notification-details/notification-details.component.js","notification/notification-details/notification-details.controller.js","notification/notification-list/notification-list.component.js","notification/notification-list/notification-list.controller.js","notification/notification-modal/notification-modal.component.js","notification/notification-modal/notification-modal.controller.js","order/attachment/attachment.controller.js","order/cameraImages/orderCameraImages.js","order/cameraImages/uiTreeHelper.js","order/cordel-send-get/cordel-send-get.component.js","order/cordel-send-get/cordel-send-get.controller.js","order/material/material.controller.js","order/officer/officerFactory.js","order/order-left-menu-hierarchy/order-left-menu-hierarchy.component.js","order/order-left-menu-hierarchy/order-left-menu-hierarchy.controller.js","order/order-left-menu-hierarchy/order-left-menu-hierarchy.service.js","order/order-list/order-list.controller.js","order/order-progress-bar/order-progress-bar.component.js","order/order-progress-bar/order-progress-bar.controller.js","order/order-status/order-status.component.js","order/order-status/order-status.controller.js","order/participant/participant.controller.js","order/participant/participant.factory.js","order/participant/participant.service.js","order/report-builder/order-report-builder.component.js","order/report-builder/order-report-builder.controller.js","order/resourcePlanner/participantResourcePlanner.js","order/risk-analysis/order-risk-analysis.component.js","order/risk-analysis/order-risk-analysis.controller.js","order/trip/trip.controller.js","order/working-hour/working-hour.controller.js","organization/company-info/company-info.component.js","organization/company-info/company-info.controller.js","organization/customer-notification/customer-notification.component.js","organization/customer-notification/customer-notification.controller.js","organization/department/departmentController.js","organization/didac-user-mapping/didac-user-mapping.component.js","organization/didac-user-mapping/didac-user-mapping.controller.js","organization/organization-chart/organization-chart.component.js","organization/organization-chart/organization-chart.controller.js","organization/organization-delete/organization-delete.component.js","organization/organization-delete/organization-delete.controller.js","organization/organization-dropdown/organization-dropdown.component.js","organization/organization-dropdown/organization-dropdown.controller.js","organization/organization-list/organization-list.component.js","organization/organization-list/organization-list.controller.js","organization/organization-notification-template/organization-notification-template.component.js","organization/organization-notification-template/organization-notification-template.controller.js","organization/packingSlipMapping/packingSlipMappingController.js","organization/processListCategorySettings/categorySettingsController.js","organization/settings/organization-settings.component.js","organization/settings/organization-settings.controller.js","organization/settings/organization-settings.factory.js","processList/central-approval/central-approval-item.service.js","processList/centralApprovalItemType/centralApprovalItemTypeDropdownController.js","processList/deviationTemplate/deviationTemplateController.js","processList/option-item/option-item.service.js","processList/process-list/process-list.controller.js","processList/public-organizations-exception/public-organizations-exception.component.js","processList/public-organizations-exception/public-organizations-exception.controller.js","project/progressPlan/progressPlanChildRow.js","project/progressPlan/progressPlanController.js","project/progressPlan/progressPlanFactory.js","project/progressPlan/progressPlanParentRow.js","project/progressPlan/projectProgressPlanListController.js","project/project-chart/project-chart.component.js","project/project-chart/project-chart.controller.js","project/project-risk-analysis/project-risk-analysis.component.js","project/project-risk-analysis/project-risk-analysis.controller.js","project/projectDocumentation/projectDocumentationController.js","project/projectLeftMenu/projectLeftMenuController.js","project/projectList/projectListController.js","project/projectManagement/projectManagementController.js","project/projectReportBuilder/projectReportBuilderController.js","qualityHandbook/centralApproval/centralApprovalExecutionController.js","qualityHandbook/qualityChapter/qualityChapterController.js","qualityHandbook/qualityHandbookArchive/archiveController.js","qualityHandbook/qualityHandbookLeftMenu/qualityHandbookLeftMenuController.js","qualityHandbook/qualityHandbookView/qualityHandbookViewController.js","qualityHandbook/qualityHandbookTemplate/qualityHandBookTemplateController.js","session/intranett-login/intranett-login.component.js","session/intranett-login/intranett-login.controller.js","session/session-external/session-external.component.js","session/session-external/session-external.controller.js","session/vb-intranet-popup/vb-intranet-popup.component.js","session/vb-intranet-popup/vb-intranet-popup.controller.js","resourcePlanner/meeting-confirmation/meeting-confirmation.component.js","resourcePlanner/meeting-confirmation/meeting-confirmation.controller.js","resourcePlanner/resource-planner-settings/resource-planner-settings.component.js","resourcePlanner/resource-planner-settings/resource-planner-settings.controller.js","resourcePlanner/resource-planner-settings/resource-planner-settings.factory.js","resourcePlanner/resource-planner-task-timeline/resource-planner-task-timeline.component.js","resourcePlanner/resource-planner-task-timeline/resource-planner-task-timeline.controller.js","resourcePlanner/resourcePlannerOverview/resourcePlannerDay.js","resourcePlanner/resourcePlannerOverview/resourcePlannerMonth.js","resourcePlanner/resourcePlannerOverview/resourcePlannerWeek.js","resourcePlanner/resourcePlannerOverview/resourcePlannerWorkingDays.js","resourcePlanner/resourcePlannerPanel/resourcePlannerInactiveTasks.js","resourcePlanner/resourcePlannerPanel/resourcePlannerTaskPanel.js","settings/app-demo-content-settings-tab/app-demo-content-settings-tab.component.js","settings/app-demo-content-settings-tab/app-demo-content-settings-tab.controller.js","settings/demo-content-settings/demo-content-settings.component.js","settings/demo-content-settings/demo-content-settings.controller.js","shared/constants/all-access-roles.constant.js","shared/constants/app-routes.constant.js","shared/constants/application-change.constant.js","shared/constants/business-role-categories.constant.js","shared/constants/email-status.constant.js","shared/constants/email-template-tables.constant.js","shared/constants/event-types.constant.js","shared/constants/order-statuses.constant.js","shared/constants/patterns.constant.js","shared/constants/process-list-actions.constant.js","shared/constants/process-list-item-option-types.constant.js","shared/constants/product-column-types.constant.js","shared/constants/quality-handbook-statuses.constant.js","shared/constants/quality-handbook-types.constant.js","shared/constants/table-resources.constant.js","shared/constants/urls-without-loader-animation.js","shared/constants/user-details-tabset.constant.js","shared/constants/user-groups.constant.js","shared/directives/close-notification-menu-on-click.directive.js","shared/directives/inner-html-to-text.directive.js","shared/dropdown/dropdown.component.js","shared/dropdown/dropdown.controller.js","shared/dropdown/dropdown.service.js","shared/password-modal/password-modal.component.js","shared/password-modal/password-modal.controller.js","shared/services/list.service.js","shared/services/modal.service.js","type/type-modal/type-modal.component.js","type/type-modal/type-modal.controller.js","user/group/group.service.js","user/user-details/user-details.component.js","user/user-details/user-details.controller.js","user/user-list/user-list.component.js","user/user-list/user-list.controller.js","user/users/users.component.js","user/users/users.controller.js","util/common/tab-util.service.js","util/file/file-reader.factory.js","configuration/data-details/data-details-item/data-details-item.component.js","configuration/data-details/data-details-item/data-details-item.controller.js","course/course-agenda/course-agenda-details/course-agenda-details.component.js","course/course-agenda/course-agenda-details/course-agenda-details.controller.js","course/course-agenda/course-agenda-list/course-agenda-list.component.js","course/course-agenda/course-agenda-list/course-agenda-list.controller.js","course/course-agenda/course-agenda-modal/course-agenda-modal.component.js","course/course-agenda/course-agenda-modal/course-agenda-modal.controller.js","course/course-day/course-day-hours/course-day-hours.service.js","course/course-day/course-day-list/course-day-list.component.js","course/course-day/course-day-list/course-day-list.controller.js","course/course-details/constants/course-details-tabset-tabs.constant.js","course/course-details/course-details-agenda-tab/course-details-agenda-tab.component.js","course/course-details/course-details-agenda-tab/course-details-agenda-tab.controller.js","course/course-details/course-details-attachments-tab-readonly/course-details-attachments-tab-readonly.component.js","course/course-details/course-details-attachments-tab-readonly/course-details-attachments-tab-readonly.controller.js","course/course-details/course-details-information-tab/course-details-information-tab.component.js","course/course-details/course-details-information-tab/course-details-information-tab.controller.js","course/course-details/course-details-information-tab-readonly/course-details-information-tab-readonly.component.js","course/course-details/course-details-information-tab-readonly/course-details-information-tab-readonly.controller.js","course/course-details/course-details-location-tab/course-details-location-tab.component.js","course/course-details/course-details-location-tab/course-details-location-tab.controller.js","course/course-details/course-details-location-tab-readonly/course-details-location-tab-readonly.component.js","course/course-details/course-details-location-tab-readonly/course-details-location-tab-readonly.controller.js","course/course-details/course-details-notifications-sent-tab/course-details-notifications-sent-tab.component.js","course/course-details/course-details-notifications-sent-tab/course-details-notifications-sent-tab.controller.js","course/course-details/course-details-sessions-tab/course-details-sessions-tab.component.js","course/course-details/course-details-sessions-tab/course-details-sessions-tab.controller.js","course/course-details/course-details-time-interval-tab/course-details-time-interval-tab.component.js","course/course-details/course-details-time-interval-tab/course-details-time-interval-tab.controller.js","course/course-details/course-details-time-interval-tab/course-details-time-interval-tab.service.js","course/course-details/course-details-time-interval-tab-readonly/course-details-time-interval-tab-readonly.component.js","course/course-details/course-details-time-interval-tab-readonly/course-details-time-interval-tab-readonly.controller.js","course/course-details/enrolled-users-selection-for-diploma-modal/enrolled-users-selection-for-diploma-modal.component.js","course/course-details/enrolled-users-selection-for-diploma-modal/enrolled-users-selection-for-diploma-modal.controller.js","course/course-enrollment/course-enrollment-details/course-enrollment-details.component.js","course/course-enrollment/course-enrollment-details/course-enrollment-details.controller.js","course/course-enrollment/course-others-enrollment-modal/course-others-enrollment-modal.component.js","course/course-enrollment/course-others-enrollment-modal/course-others-enrollment-modal.controller.js","course/course-enrollment/course-user-enrollment-modal/course-user-enrollment-modal.component.js","course/course-enrollment/course-user-enrollment-modal/course-user-enrollment-modal.controller.js","course/course-session/course-session-details/course-session-details.component.js","course/course-session/course-session-details/course-session-details.controller.js","course/course-session/course-session-list/course-session-list.component.js","course/course-session/course-session-list/course-session-list.controller.js","course/course-subject-manager/course-subject-manager-details/course-subject-manager-details.component.js","course/course-subject-manager/course-subject-manager-details/course-subject-manager-details.controller.js","course/course-subject-manager/course-subject-manager-modal/course-subject-manager-modal.component.js","course/course-subject-manager/course-subject-manager-modal/course-subject-manager-modal.controller.js","customer/customer-details/customer-tabset/customer-tabset.component.js","customer/customer-details/customer-tabset/customer-tabset.controller.js","deviation/email/emailTemplate/emailTemplateFactory.js","laws-regulations/laws-regulations-documents/open-file-modal/open-file-modal.component.js","laws-regulations/laws-regulations-documents/open-file-modal/open-file-modal.controller.js","management/riskAnalysis/risk-head-list/risk-head-list.component.js","management/riskAnalysis/risk-head-list/risk-head-list.controller.js","management/riskAnalysis/risk-head/risk-head.component.js","management/riskAnalysis/risk-head/risk-head.controller.js","management/riskAnalysis/risk-head/risk-head.service.js","management/riskAnalysis/risk-head-modal/risk-head-modal.component.js","management/riskAnalysis/risk-head-modal/risk-head-modal.controller.js","management/riskAnalysis/risk-heads/risk-heads.component.js","management/riskAnalysis/risk-heads/risk-heads.controller.js","management/riskAnalysis/risk-heads/risk-heads.service.js","management/riskAnalysis/risk-row-modal/risk-row-modal.component.js","management/riskAnalysis/risk-row-modal/risk-row-modal.controller.js","menu-item/demo-content/demo-content-modal/demo-content-modal.component.js","menu-item/demo-content/demo-content-modal/demo-content-modal.controller.js","menu-item/demo-content/demo-content-details/demo-content-details.component.js","menu-item/demo-content/demo-content-details/demo-content-details.controller.js","order/order-progress-bar/services/order-progress-bar.service.js","order/participant/participant-dates/participant-dates.component.js","order/participant/participant-dates/participant-dates.controller.js","order/participant/participant-dates/participant-dates.factory.js","order/participant/participant-dates/participant-dates.service.js","order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerDay.js","order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerMonth.js","order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerWeek.js","order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerWorkingDays.js","order/resourcePlanner/resourcePlannerPanel/resourcePlannerOrderList.js","order/resourcePlanner/resourcePlannerPanel/resourcePlannerPanel.js","order/resourcePlanner/resourcePlannerPanel/resourcePlannerUserList.js","organization/settings/organization-notification-settings-tab/notification-settings.service.js","organization/settings/organization-notification-settings-tab/organization-notification-settings-tab.component.js","organization/settings/organization-notification-settings-tab/organization-notification-settings-tab.controller.js","organization/settings/company-settings/company-settings.component.js","organization/settings/company-settings/company-settings.controller.js","organization/settings/report-logo-upload/report-logo-upload.component.js","organization/settings/report-logo-upload/report-logo-upload.controller.js","project/projectLeftMenu/categoryAddAttachment/categoryAddAttachmentController.js","project/projectManagement/projectProcessList/projectProcessListController.js","project/projectReportBuilder/categoryReportBuilder/categoryReportBuilderController.js","project/projectReportBuilder/processListReportBuilder/processListReportBuilderController.js","qualityHandbook/centralApproval/pointSettings/pointSettingsController.js","qualityHandbook/qualityHandbookView/centralApprovalView/centralApprovalViewController.js","qualityHandbook/qualityHandbookView/chapterView/chapterViewController.js","shared/components/datepicker/datepicker.component.js","shared/components/datepicker/datepicker.controller.js","shared/components/keywords/keywords.component.js","shared/components/keywords/keywords.controller.js","shared/components/rich-text-editor/rich-text-editor.component.js","shared/components/rich-text-editor/rich-text-editor.controller.js","shared/components/map/map.component.js","shared/components/map/map.controller.js","shared/components/searchable-dropdown/searchable-dropdown.component.js","shared/components/searchable-dropdown/searchable-dropdown.controller.js","shared/components/timepicker/timepicker.component.js","shared/components/timepicker/timepicker.controller.js","shared/constants/course/course-enrollment-options.constant.js","shared/constants/course/course-invitation-dispatch-modes.constant.js","shared/constants/course/course-statuses.constant.js","shared/constants/course/course-types.constant.js","shared/constants/course/courses-and-competences-tabset.constant.js","shared/constants/notification/notification-types.constant.js","shared/constants/notification-settings/notification-settings-tabset.constant.js","shared/constants/process-list/process-list-types.constant.js","shared/constants/project/project-details-tabset.constant.js","user/user-details/courses-and-competences/courses-and-competences.component.js","user/user-details/courses-and-competences/courses-and-competences.controller.js","user/user-details/user-access/user-access.component.js","user/user-details/user-access/user-access.controller.js","user/user-details/user-impersonate/user-impersonate.component.js","user/user-details/user-impersonate/user-impersonate.controller.js","user/user-details/user-intranett-info/user-intranett-info.component.js","user/user-details/user-intranett-info/user-intranett-info.controller.js","user/user-details/user-settings/user-settings.component.js","user/user-details/user-settings/user-settings.controller.js","user/user-details/user-settings/user-settings.factory.js","course/course-agenda/course-agenda-item/course-agenda-item-list/course-agenda-item-list.component.js","course/course-agenda/course-agenda-item/course-agenda-item-list/course-agenda-item-list.controller.js","course/course-agenda/course-agenda-item/course-agenda-items/course-agenda-items.component.js","course/course-agenda/course-agenda-item/course-agenda-items/course-agenda-items.controller.js","course/course-day/course-day-hours/course-day-hours-list/course-day-hours-list.component.js","course/course-day/course-day-hours/course-day-hours-list/course-day-hours-list.controller.js","course/course-day/course-day-hours/course-day-hours-modal/course-day-hours-modal.component.js","course/course-day/course-day-hours/course-day-hours-modal/course-day-hours-modal.controller.js","course/course-details/course-details-time-interval-tab/day-picker/day-picker.component.js","course/course-details/course-details-time-interval-tab/day-picker/day-picker.controller.js","course/course-details/course-details-time-interval-tab/start-session-for-day-button/start-session-for-day-button.component.js","course/course-details/course-details-time-interval-tab/start-session-for-day-button/start-session-for-day-button.controller.js","course/course-session/course-session-details/constants/course-session-details-tabset-tabs.constant.js","course/course-session/course-session-details/course-information-tab/course-information-tab.component.js","course/course-session/course-session-details/course-information-tab/course-information-tab.controller.js","deviation/email/emailTemplate/modalEmailSettings/emailSettingsFactory.js","deviation/email/emailTemplate/modalEmailSettings/modalDeviationTypeEmailSettingsController.js","deviation/email/emailTemplate/modalEmailTemplates/deviation-email-template.service.js","deviation/email/emailTemplate/modalEmailTemplates/deviationEmailTemplate.js","deviation/email/emailTemplate/modalEmailTemplates/deviationEmailTemplateController.js","deviation/email/emailTemplate/modalEmailTemplates/modalDeviationEmailTemplatesController.js","deviation/email/emailTemplate/modalPreviewEmailTemplate/modalPreviewEmailTemplateController.js","organization/settings/organization-notification-settings-tab/organization-notification-setting/organization-notification-setting.controller.js","organization/settings/organization-notification-settings-tab/organization-notification-setting/organzation-notification-setting.component.js","qualityHandbook/centralApproval/variables/companyInfo/companyInfoExecutionController.js","qualityHandbook/centralApproval/variables/companyInfoDetailed/companyInfoDetailedExecutionController.js","qualityHandbook/centralApproval/variables/primaryContact/primaryContactExecutionController.js","qualityHandbook/centralApproval/variables/projectReference/projectReferenceExecutionController.js","qualityHandbook/centralApproval/variables/usernameAndPassword/usernameAndPasswordExecutionController.js","qualityHandbook/qualityHandbookView/chapterView/personal-handbook-signature/personal-handbook-signature.component.js","qualityHandbook/qualityHandbookView/chapterView/personal-handbook-signature/personal-handbook-signature.controller.js","shared/components/keywords/keywords-list/keywords-list.component.js","shared/components/keywords/keywords-list/keywords-list.controller.js","user/user-details/courses-and-competences/courses-overview/courses-overview.component.js","user/user-details/courses-and-competences/courses-overview/courses-overview.controller.js","user/user-details/courses-and-competences/my-courses/my-courses.component.js","user/user-details/courses-and-competences/my-courses/my-courses.controller.js","user/user-details/courses-and-competences/relevant-courses/relevant-courses.component.js","user/user-details/courses-and-competences/relevant-courses/relevant-courses.controller.js","user/user-details/courses-and-competences/user-competence/user-competence.component.js","user/user-details/courses-and-competences/user-competence/user-competence.controller.js","user/user-details/courses-and-competences/user-competence/user-competence.service.js","user/user-details/user-settings/constants/user-settings-tabset.constant.js","user/user-details/user-settings/user-notification-settings/user-notification-settings.component.js","user/user-details/user-settings/user-notification-settings/user-notification-settings.controller.js","user/user-details/user-settings/user-notification-settings/user-notification-settings.service.js","user/user-details/user-settings/user-notification-settings-tab/user-notification-settings-tab.component.js","user/user-details/user-settings/user-notification-settings-tab/user-notification-settings-tab.controller.js","user/user-details/user-settings/user-setting-participants/user-setting-participants.component.js","user/user-details/user-settings/user-setting-participants/user-setting-participants.controller.js","user/user-details/user-settings/user-settings-tab/user-settings-tab.component.js","user/user-details/user-settings/user-settings-tab/user-settings-tab.controller.js","user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-settings.component.js","user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-settings.controller.js","user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-settings.service.js","user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-setting/user-event-notification-type-setting.component.js","user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-setting/user-event-notification-type-setting.controller.js","user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-setting/user-event-notification-type-setting.service.js"],"names":["String","prototype","replaceAll","search","replacement","this","replace","RegExp","Array","removeIf","callback","i","length","splice","angular","module","config","$translateProvider","useStaticFilesLoader","prefix","suffix","preferredLanguage","useSanitizeValueStrategy","$httpProvider","$locationProvider","defaults","headers","get","IdleProvider","KeepaliveProvider","idle","timeout","interval","$provide","decorator","taRegisterTool","taSelection","taOptions","fileReader","LawsAndRegulationsFactory","defaultTagAttributes","a","target","iconclass","tooltiptext","action","editor","$editor","retVal","prompt","nrOfColumnsFromInput","parseInt","colNr","columnsHtml","Math","ceil","wrapSelection","toolbar","push","elem","element","find","newElem","append","setSelectionToElementEnd","setSelectionToElementStart","insertHtml","fileInput","document","querySelector","trigger","unbind","bind","e","files","file","type","match","scope","readAsDataUrl","then","result","value","$parent","focussed","disabled","attach","newAttachment","AttachmentName","name","AttachmentBytes","promise","saveAttachment","id","URL","buttontext","qtMethods","addVariable","variable","display","dropMenuTemplate","focusHack","$","focus","self","Object","keys","forEach","key","isDisabled","run","localforage","version","storeName","description","clear","moment","locale","$routeProvider","when","templateUrl","controller","template","resolve","auth","AuthService","isAuthenticated","otherwise","redirectTo","oidcIntranett","UserManager","authority","metadata","issuer","authorization_endpoint","userinfo_endpoint","end_session_endpoint","jwks_uri","signingKeys","kty","use","kid","x5t","n","x5c","client_id","redirect_uri","response_type","loadUserInfo","userStore","WebStorageStateStore","store","window","localStorage","runHandler","$rootScope","$http","$location","$route","$templateCache","sessionInformationService","baseUrlService","$resource","$localStorage","_","AppRoutes","AllAccessFactory","AllAccessPage","SessionFactory","$routeParams","SessionUtils","setBaseUrl","$on","event","current","previous","console","log","rejection","Demo","path","Forbidden","$inject","factory","service","requestCount","noLoader","isLoading","onCompleteInterceptor","$q","loadingService","urlsWithoutLoaderAnimation","ended","request","url","indexOf","response","responseError","reject","interceptors","LoadingCtrl","$scope","$watch","loading","appMenuItemFactory","baseUrl","getBaseUrl","AppMenuItems","DemoContentForAppMenuItem","getAppMenuItems","query","$promise","saveDemoContentForAppMenuItem","demoContent","appMenuItemId","save","component","controllerAs","bindings","foreignKey","table","limitedAccess","allowDescription","participantSecondForeignKey","participantSecondTable","isCategoryUserConnect","AttachmentController","dialogService","infoService","$translate","AttachmentFactory","TableResources","DownloadService","vm","fileUpload","extension","clearFileInput","cloneDeep","selectAttachment","attachment","selectedAttachment","getAttachments","attachments","$onInit","$onDestroy","addAttachments","reduce","fileName","format","Table","ForeignKey","addAttachment","savedAttachment","connectCategoryAttachmentToUser","Promise","deleteAttachment","showConfirmDialog","DIALOG_RESULT_OK","remove","changeInfo","instant","catch","unselectAttachment","showIncludeInEndReport","ProcessListManagement","CourseTable","downloadAttachment","download","api","AttachmentApi","AttachmentDescriptionApi","AttachmentIncludeReportApi","ConnectCategoryAttachmentUserApi","ParentAttachmentForAttachment","getAttachment","assign","$save","$delete","selectedUserForConnect","saveDescription","attachmentId","attachmenDescriptionApiObject","saveIncludeInEndReport","includeInReport","attachmentIncludeReport","userId","connectAttachmentApiObject","getParentAttachmentForAttachment","UserFactory","automileFactory","Trips","Trip","update","method","getTrips","freeText","getTrip","tripId","reverseTrips","predicateTrips","currentPageTrips","_idOfCompetenceToOpenFromNotification","defineProperties","idOfCompetenceToOpenFromNotification","set","showContactForm","contact","isFromOrderPage","emailPattern","phonePattern","phone","test","ContactFactory","Contacts","NrOfContactsOnCustomer","getContactsByCustomerId","customerId","getNrOfContactsOnCustomer","countryFactory","Countries","getCountries","accessPage","courseFactory","Course","Courses","MyCourses","CourseByCourseSessionId","InviteCourseParticipants","InviteSelectedCourseParticipants","UnsubscribeFromCourse","NotifyUserAboutUnsubscribeFee","UserEnrollmentConnectedToCourseSessionsCheck","TargetAudiencesByOrganization","RelevantCoursesForUser","CoursesOverview","saveCourse","course","getCourseById","courseId","getCourses","courseStatusProgId","getMyCourses","getCourseByCourseSessionId","courseSessionId","sendInvitationsToTheParticipantsOfTheCourse","notificationTemplate","unsubscribeFromCourse","notifyUserAboutCourseUnsubscribeFee","checkIfUserEnrollmentToCourseIsConnectedToCourseSessions","user","sendInvitationsToSelectedParticipantsOfTheCourse","selectedUsers","data","SelectedUsers","CourseId","NotificationTemplate","getCourseTargetAudiencesByOrganizationId","organizationId","getRelevantCoursesForUser","getCoursesOverview","userOrganizationId","courseService","CourseDayService","courseStatuses","DateUtilService","CourseTypes","_courseDetailsPageOpenedFromRoute","computeNrOfDaysLeftUntilCourseStarts","Error","courseStartDate","StartDate","todayDate","Date","days","diff","getIndexOfDayInList","day","dayMomentDate","findIndex","currentDay","currentDayMomentDate","date","month","year","convertCourseDatesToMilliseconds","getLongWithOffset","toDate","EndDate","convertCourseDaysDatesToMillisecondsWithOffset","Days","isCancellationDeadlineOver","NrOfDaysBeforeCourseStarts","undefined","extractCourseEnrollmentForUser","EnrolledUsers","userFound","currentUser","CourseEnrollment","isRepeatingDaily","Settings","ItRepeatsDaily","hasLimitedAccessToEnrolledUsers","LimitedAccessToEnrolledUsers","updateCourseDays","dayIndex","isSelected","isPublished","Status","ProgId","published","convertCourseDatesToMillisecondsWithoutOffset","getLongWithoutOffset","valueOf","setCourseDetailsPageOpenedFromRoute","getCourseDetailsPageOpenedFromRoute","isSpanningOnSeveralDays","IsSpanningSeveralDays","isCourseOfTypeELearning","Type","ELearning","CustomerFactory","customerFactory","Customers","Customer","StatusList","Types","CustomersDropdown","Contact","getCustomers","includeDeactivated","withoutEmail","getCustomersDropdown","getCustomer","getStatusDropdown","getTypes","getCustomerToSave","saveCustomer","customerSaved","$update","getContactToSave","saveContact","reverseCustomers","predicateCustomers","currentPageCustomers","includeDeactivatedItems","DeviationFactory","deviationFactory","DeviationStatuses","DeviationTypes","DeviationTypeOfCauses","Deviations","Deviation","deviationId","DeviationExecution","DeviationAudit","DeviationNotification","EntitiesToNotify","NewEntitiesForNotify","SendEmailWithDeviation","NotifyForStatusChanged","DeviationExternalPartyEmail","DeviationForExternalInput","DeviationExternalPartyComments","SendDeviationDetailsReportThroughEmail","getDeviationStatuses","getDeviations","typeId","getDeviation","saveDeviation","deviation","copy","getTime","getDeviationForSave","getDeviationTypes","getTypeOfCauses","getDeviationExecution","getDeviationAudit","getDeviationNotificationList","getEntitiesToNotify","getNewEntitiesToNotify","freetext","templateTable","sendEmailWithDeviation","recipients","emailTemplate","notifyForStatusChange","deviationTable","sendEmailToExternalParty","getDeviationForExternalInput","sessionId","saveDeviationAdditionalComments","sendDeviationDetailsReportThroughEmail","reportData","predicate","reverse","modalInstance","emailPreviewModalInstance","selectedType","ErrorLogService","$log","$window","StackTraceService","StorageService","exception","cause","error","apply","arguments","errorMessage","toString","some","isString","print","Code","Message","JSON","stringify","Key","getUser","getItem","storeItem","err","warn","LogFactory","Logs","isArray","saveLogs","logs","isNil","isEmpty","provider","$get","StackTrace","fromError","_page","_idOfExecutionToOpenFromProjectPage","_idOfExecutionToOpenFromQualityHandbookPage","getPageFromWhereTheExecutionWasOpened","setPageFromWhereTheExecutionWasOpened","page","setIdOfExecutionToOpenFromProjectPage","initiatedId","getIdOfExecutionToOpenFromProjectPage","setIdOfExecutionToOpenFromQualityHandbookPage","getIdOfExecutionToOpenFromQualityHandbookPage","ExecutionFactory","executionFactory","InitiatedProcessList","Executions","ExecutionsInProgress","Execution","DeactivateExecution","NotificationData","OrganizationContacts","ExecutionExecutedFor","ExecutionOrganizationExecutedFor","CameraImage","CameraImages","PageBreak","ExecutionParticipants","UpdateExecutionParticipants","ManagementExecution","AnswerHistory","NotifyQualityHandbookExecutionCreatorAboutUpdate","RootInitiatedProcessListByWorkingValueId","RootInitiatedProcessListStartingFrom","changePageBreakValue","initiateProcessList","orderId","processListId","getInitiatedProcessList","skipHierarchy","retrieveDescriptionHtmlFromTemplate","updateProcessList","processList","fromExecution","generateEndReport","ProcessListType","getExecutions","byAvailableTable","getNotificationData","initiatedProcessListId","dataAbout","getOrganizationContacts","notificationProgId","getExecutionsInProgress","getExecution","createExecution","participants","execution","Participants","getWhoIsExecutedFor","tableProgId","getOrganizationExecutedFor","saveCameraImage","cameraImage","saveCameraImages","cameraImages","deactivateExecution","executionId","getExecutionParticipants","getManagementExecution","updateExecutionParticipants","participantIds","getAnswerHistory","notifyQualityHandbookExecutionCreatorAboutUpdate","getRootInitiatedProcessListByWorkingValueId","workingValueId","getRootInitiatedProcessListStartingFrom","ExecutionHorizontalController","$timeout","OrderFactory","$filter","onDestroySubscription","isQualityHandbookPage","isProjectPage","container","getElementById","showHeader","canHideHeader","order","initiatedProcessList","processListElement","hasOrderAttachments","hasAttachments","TableFields","tableField","Value","ListValues","addCurrentTableFields","changeStatusToStarted","processListDone","processListQueue","close","backToParent","scrollToElement","setTimeout","goToElement","scrollTo","addItem","ParentId","go","closeTab","tabs","identificationTabActive","$broadcast","wasSavedManually","saveProcessList","IsCompleted","isExecutionEnded","managementObject","finishExecution","redirectBack","saveExecution","collapseExecution","closeExecution","dialogResult","$emit","ExecutionManagementController","$sce","$document","$uibModal","menuService","TaskListFactory","errorService","Idle","ExecutionService","PageRouteUtilService","menuToGet","menu","getMenuByHref","setSelectedMenu","mainProcessListDataAbout","itemIdParam","scrollContainer","lastIndexSet","isAutoSaving","executionStarted","currentItemIndex","progressBar","items","calendar","visible","datetime","time","executedFor","intellisense","isDropdownOpen","currentDefaultAnswer","notificationData","hasRight","progId","hasAccess","openNotificationEditorModal","processListItem","choice","isNextDisabled","defaultAnswers","currentProcessListItem","InitiatedOption","selectedValue","SelectedDefaultAnswer","OptionItem","ProcessListAction","DefaultAnswers","InitiatedId","Name","SelectedValue","Notification","currentNotificationData","isSms","NotificationMessageId","readOnly","TextMessage","CommentInput","open","size","currentExecution","saveItemNotification","deleteItemNotification","init","itemId","watch","index","elemId","executionPanelContainer","getBoundingClientRect","elementClientRect","top","bottom","height","angularElement","DataAbout","initializeExecution","initHorizontal","deferred","defer","Organization","getUsersByOrganizationId","users","startExecution","currentItemPosition","ProcessListItems","item","status","isProcessListItemNotCompleted","initiateDateTime","j","Items","selectedValueForChoice","getSelectedValueForChoice","isChecked","SelectedValues","OptionItemEdited","Text","CustomDataType","doneItemEncoutered","executionResumed","lastDoneItemIndex","goToItem","toggleDescription","DescriptionHtml","canShowDescription","trim","FlexibleExecution","isHorizontalDataCompleted","row","col","checkIfHorizontalIsCompleted","HeaderFields","goToParent","markAsCompleted","pop","notFinishedSaving","initiatedOption","cameFromButton","removeCyclicDependencies","getProgresBarItemClass","descriptionHTML","text","all","trustedText","displayedCharacters","displayedText","trustAsHtml","attachmentNamePattern","myFile","image","brandNew","imageToAdd","CameraImageOriginal","IncludeInReport","Size","SortNumber","setNoRightError","selectImage","selectedImage","modal","removeImage","CameraImagesToDelete","imageIndex","resetAttachment","onChoiceCheckedChange","selectedValues","newSelectedValue","initiateSelectedDefaultAnswer","initializeTempDate","selectedValueIndex","continue","goToNextItem","jumpToStep","ProcessListItem","LimitedAccess","Recipients","extractRecipients","SendNotification","willJumpToStepAtId","promiseForMultipleChoice","isDone","currentIndex","moveAndMarkNextItems","destinationItemId","destinationItemIndex","executionParticipants","forSms","currentParticipant","User","Phone","Mobile","Email","queueCheckList","checkList","jumpToProcessList","optionItem","ProcessList","downloaded","oldIndex","newIndex","changeCurrentStep","isAnyStandardAnswerInEdit","isSelectedValueWithActionInvalid","ChoicesRequired","checkIfAnnet","filterResult","RiskHead","RiskRows","Active","tempDate","Number","tempTime","downloadFile","sUrl","navigator","userAgent","toLowerCase","link","createElement","href","substring","lastIndexOf","createEvent","initEvent","dispatchEvent","openAttachment","IsExternalURL","startDate","endDate","startTime","endTime","putInCalendar","saveTask","onDateTimePickerChanged","datePart","timePart","newDate","getFullYear","getMonth","getDate","getHours","getMinutes","onCalendarChanged","getSeconds","isEndDateWrong","saveItemTask","Task","Description","isCalendarVisible","loadCalendarFromItem","taskToSaveExecutionFor","loggedUser","taskToSave","getTaskToSave","notAnnet","defaultAnswer","onDropdownChange","onRadioButtonChange","Signature","EditMode","isItemDisabled","skipScroll","savedAfterEnteringIdle","onMouseMove","unwatch","isFromManagement","removeEventListener","countdown","addEventListener","showPrivateComment","Group","CreatedBy","LastUpdatedBy","displayProcessListItemWarning","isFlexibleExecution","addParticipant","removeParticipant","participant","openParticipantsModal","participantsModal","pageThatOpenedTheExecution","extractParticipantsIds","setCurrentPageForExecution","reload","getUsers","searchedUserText","notYetSelected","disabledAddItem","listLength","currentField","directive","restrict","ExecutionVerticalController","OrganizationUtilService","ProcessListFactory","ProjectFactory","currentListHistory","canBack","attachmentsModal","saveLocation","getOrganizationId","resetSelectedOptionNotification","selectedOption","orderStatus","orderLevel","level","initExecution","isLocked","isOpen","lastItem","checkForCompletedChildProcessList","PreventCollapse","scrollToElementAnimated","disableSaveOrderExec","Order","asCompleted","isCompleted","showAlertDialog","removeTextFromChoice","IsChecked","UserComment","itemDone","itemSelected","pli","getClass","currentProcessList","itemsOfAnotherProcessList","lastItemOfAnotherProcessList","clickImage","editMode","selected","openImage","doneEditing","deleteImages","images","isRadioButtonOrDropdownDisabled","showDropdownForDefaultAnswers","onOptionItemChanged","processListItemSelectedValue","openOrdersAttachmentModal","finally","closeAttachmentModal","imageModal","closeCameraEditModal","canvas","context","rects","pencils","circles","newRect","newCircle","isPencil","isSquare","isCircle","pencil","square","circle","lastX","lastY","currentX","currentY","points","drawAll","hasImage","clearRect","width","r","strokeStyle","color","strokeRect","left","right","p1","beginPath","moveTo","x","y","len","lineTo","stroke","first","second","bezierCurveTo","firstBezier","third","fourth","fifth","sixth","secondBezier","closePath","canvasSetup","getContext","lineWidth","lineJoin","lineCap","shadowBlur","shadowColor","reset","cleanup","setLastPoints","offsetX","offsetY","colors","colorIndex","min","max","addEventListeners","setColor","style","addSelectedClass","classList","add","showEdit","showEdited","downloadImage","initCanvas","onload","changeColor","setPencil","setSquare","setCircle","clearAll","editComplete","drawings","CameraImageEdit","toJson","ModalNotificationEditorController","closeGdprModal","firstTimeLogin","GdprController","GdprFactory","UserSettingsFactory","OrganizationSettingFactory","gdpr","Gdpr","saveUserSettings","userSettings","AllowImpersonation","FromDate","ToDate","AllowImpersonationOnce","saveUserSettingsGdpr","saveCompanySettings","saveOrganizationSettings","companySettings","getCompanySettings","isLoggedUserAdmin","getOrganizationSettingsByOrganizationId","IsCentralAllowedToView","AllowImpersonate","NumberOfYearsForCustomerGdprNotification","role","isExternal","answer","saveUserResponse","message","IsGdprAccepted","saveFromEmail","processExistingGdpr","saveUserImpersonateSettings","saveCompanyImpersonateSettings","GdprApi","GdprFromEmailApi","GdprUserRequestedDeleteApi","GdprOrganizationRequestedDeleteApi","GdprConfirmDeleteApi","GdprDeclineDeleteApi","GdprCustomerNotificationApi","NotifyCustomersForGdprApi","MarkCustomerAsDeletedApi","GdprOverviewApi","MarkCustomerAsDeletedWebApi","UsersWhichRejectedGdpr","CustomersWithoutOrders","gdprId","gdprFromEmailApiObject","getUsersThatHaveRequestedDelete","getOrganizationsThatHaveRequestedDelete","declineDelete","password","gdprDeclineDeleteObject","confirmDelete","gdprConfirmDeleteApiObject","getCustomerGdprNotificationInfo","notifyCustomersForGdpr","notifyCustomersForGdprApiObject","markCustomerAsDeleted","markCustomerAsDeletedApiObject","getGdprOverview","markCustomerAsDeletedFromWeb","markCustomerAsDeletedWebApiObject","getUsersWhichRejectedGdpr","getCustomersWithoutOrders","HomeController","OrganizationFactory","titleService","hasLoggedUserFullAccess","getFailedCordelOrders","failedCordelOrders","deleteOrderCallback","deleteOrder","popupOpen","markOrderAsDeleted","organizations","shadowLoginInfo","todaysOrders","tasks","changeTitle","getOrganizationUserAccess","Home","filter","o","HasAccess","unshift","getTodaysOrdersForFrontPage","getExecutionTasks","shadowLogin","shadowLoginCallback","setOrderFullyDone","FullyDone","getTaskCount","t","onTaskClick","task","Users","InfoController","allTasks","taskType","onTaskItemClick","getValidOrganizationsToLogin","organizationsAccess","TranslateUtils","changeLanguage","language","common","project","LawsAndRegulationsTabsController","canUserSeeSection","menuItem","isSectionVisibleToUser","Central","LawsAndRegulationsController","F5ReportFactory","$modal","$compile","lawsReport","isEditMode","oldContent","valueTypes","getContentPage","getReport","str","last","attachmentElements","innerHTML","removeAttribute","html","elem2","findStringBetween","lawsMenuSelected","getLoggedUser","startEditing","ReportCode","cancelEditing","saveReport","attachToDelete","oldAttachIds","newAttachIds","oldAttach","attachId","getMappedPdfs","mappedPdfs","getPdfMappings","pdfMappingId","getPdfMappingTypes","pdfMappings","savePdfMappings","mappedPdfId","filteredList","s","ParentValue","disableGetFilledPdf","notFilledValues","filledPdfMappingTypes","Parent","getValues","input","hideValueInput","showFillInput","getIntellisense","mappingType","getRiskAnalysisIntellisense","IntellisenseList","selectAssociatedObject","object","filledPdfModal","openFilledPdfModal","pdfId","getFilledPdfMappingTypes","downloadRegularPdf","regularPdf","saveConfigAndOpenPdfModal","currentMappedPdf","getFilledPdf","getFilledPdfUrl","getRegularPdf","onUseProjectCustomerChange","useProjectCustomer","FullName","isInputDisabled","useProjectOrder","onUseProjectOrderChange","OrderNumber","lawsAndRegulationsFactory","MappedPdfs","PdfMappings","PdfMappingTypes","FilledPdfMappings","FilledPdfMappingTypes","RegularPdf","ConvertToFile","filledPdfTypes","filledPdfApiObject","convertToFile","urls","DataDetailsController","loadExecutions","dataDetails","details","inProgressExecutions","finishedExecutions","userExists","availableProcessLists","selectedItems","available","inProgress","finished","selectedItem","organization","onIncludeDeactivatedItemsChange","getProcessLists","p","startProcessList","onExecutionStart","getParticipants","horizontalExecution","CreateExecutionResult","MyOrganization","getParticipantFromId","orgaizationId","resumeExecution","onExecutionResume","editProcessList","deactivateExecutionModal","confirm","newProcessList","ExecutionController","selectedCategories","categoryHierarchy","reverseProcessLists","reverseProcessList","predicateProcessLists","predicateProcessList","reverseExecutions","predicateExecutions","executionParameters","mode","allProcessLists","allExecutions","processLists","executions","selectedProcessList","hideNavigation","currentPageProcessLists","currentPageExecutions","itemsPerPage","numPages","userFilter","selectedOrganization","isUserOpen","getProcessList","getProcessListCategoryHierarchy","getOrganizations","onSelectedOrganizationChange","filterByCategory","filterExecutionsByCategory","getOrganizationsDropdown","onProcessListItemClick","setSelectedUser","FirstName","LastName","disableStartExecution","filterByOrganization","pls","pl","arr","val","isLike","Categories","arrVal","modeFiltration","categoryFilteredProcessList","pushToList","filteredExecutions","selectCategory","category","clearCategoryLevel","getCategoryBoxClass","className","canShowInProgressTab","changeProcessListsOrder","orderBy","changeExecutionsOrder","MenuController","$sessionStorage","isNavigatingFromMenu","menus","menuSelected","menuCollapsed","isOrderPage","includeDeactivatedSubOrders","isQualityPage","getCurrentMenus","getMenus","isSubmenuSelected","selectedMenu","currentMenu","MenuItems","isChild","isUrl","Href","getSelectedMenu","convertExtUrl","$$path","toggleMenu","navigateToPage","checkForOrganizationActiveUsersReportPassword","goTo","selectedMenuItem","canShowMenuItem","notifyAboutMenuItemSelection","handleIncludeDeactivatedSubOrdersChangeFromChild","mainOrder","newValue","oldValue","next","pathParams","reportProgid","preventDefault","isOrderTabFromProjectPage","title","infoText","theTitle","getTitle","changeInfoText","theInfoText","getInfoText","searchService","TabUtilService","userMenus","setMenus","Menus","SelectedMenu","SelectedMenuItem","clearSearch","clearConfiguration","getSelectedMenuItem","root","split","getParentMenuByHref","menuName","m","checkMenuAccess","requiredMenu","snapService","isSnapOpen","setSnap","getSnap","fromDate","currentTabId","categoryFilter","category2","category3","productSearch","ProductCatalog","Provider","NRF","keywords","setSearch","currentSecondLevelTabId","setCategoryFilter","getCategoryFilter","getSearch","getSearchText","setProductSearch","getProductSearch","MenuFactory","menuItemFactory","DemoContentForMenuItem","saveDemoContentForMenuItem","menuItemId","getAllMenuItems","excludeCentralOnlyItems","DialogController","$uibModalInstance","dialogTitle","dialogMessages","dialogButtons","dialogInputs","showWarningIcon","onButtonClick","button","model","inputs","showDialog","messages","buttons","createButtons","buttonValues","parseMessage","messageList","DIALOG_SIZE_LARGE","DIALOG_SIZE_MEDIUM","DIALOG_SIZE_SMALL","DIALOG_RESULT_CANCEL","selectedButton","okButtonText","cancelButtonText","showCustomDialog","selectedButon","showDialogWithInputs","MessageController","alerts","getError","hasError","alert","removeAlertOnTimeout","getInfo","infoMessage","info","hasInfo","timeoutSeconds","clearError","clearInfo","closeAlert","isForbbiden","changeError","setErrorForbidden","notificationFactory","MyNotifications","MarkNotificationAsSeen","NotificationMessages","MarkNotificationsAsSeen","getMyNotifications","markNotificationAsSeen","notificationId","getNotificationMessages","markNotificationsAsSeen","notifications","getNotificationById","orderDetailsService","orderStatuses","ParticipantService","setOrderActive","updateChildren","UpdateChildren","convertParticipantDatesToMillisecondsForParticipants","saveOrder","sortOrderListByOrderNumber","orders","convertOrderNumber","sort","firstOrder","secondOrder","firstOrderExternalId","secondOrderExternalId","deselectOrder","showCurrentOrder","SubOrders","filterOrderStatuses","statuses","statusProgId","preorder","ready","started","done","handleOrderActiveClick","modalMessage","openDisableOrderModal","canAddSubOrder","OrderType","isSubOrder","addSubOrderForOrder","statusToAdd","subOrder","Building","Comment","CreatedDate","CustomerContact","CustomerReference","InternalNote","InternalOrder","InvoiceCustomer","IsTask","IsVisibleInApp","LastUpdatedDate","Note","Officer","OrderDate","OurReference","Project","SiteAddress","SortNr","Tag","copyOrderData","CostsAllowed","random","flattenHierarchy","removeHierarchy","ordersToReturn","subOrders","sortOrderHierarchy","subOrdersWithNumberExternalId","isNaN","subOrdersWithoutNumberExternalId","concat","removeFromOrderSubOrdersWithEndProcessList","startAndEndProcessLists","endProcessList","isOrderNumberEmptyString","addOrdersToTheEndOfOrderList","ordersToAdd","orderList","orderToAdd","convertOrderDateFieldsToMilliseconds","orderDate","setHours","setMinutes","setSeconds","subtract","utcOffset","orderTypeService","getServiceOrderType","orderTypes","orderType","OrderController","ResourcePlannerFactory","ProductFactory","formChangeDetector","formChanges","OfficerFactory","OrderTypeService","ParticipantDatesService","OrderDetailsService","headerHierarchyHeight","isFromResourcePlanner","ordersMenu","dateChangeWarningShown","markOrderEditDeregistration","entityId","endSubOrder","isRouteReloading","allStatuses","onOrderSelectFromLeftMenuWatcher","onOrderActiveClickFromLeftMenuWatcher","onSubOrderAddFromLeftMenuWatcher","retrievedOrder","getOfficers","officerList","currentOrder","getOrder","getStartAndEndProcessLists","subOrdersWithEndProcessList","initOrder","getOrderForSave","ConnectWithPlanner","getStatusList","resourcePlanner","addDatePickerDateAttributes","fixTimezone","setEntityId","setPreviousEntityId","pageReady","initHeaderHeight","getCustomerFullName","customer","filterStatuses","statusList","setStartAndEndProcessList","InitiatedProcessListId","generateEndProcessList","isCustomerOpen","isInvoiceCustomerOpen","isProcessListOpen","isProductOpen","isParticipantOpen","isOrderTypeOpen","activeTab","showExecutionTab","workingHour","material","trip","oldPersonnel","customerAddress","copyCustomerAddress","customerHasAddress","isNavigatingToOrderListFromButton","isNavigatingFromCloseOrder","setUpHeaderHeight","throttle","leading","trailing","displayCordelGetMessage","displayCordelPostMessage","getOrderTypes","serviceOrderType","onOrderTypeChange","preSelectOrderType","getColorSettings","Color","values","targetScope","OrganizationId","saveColorSetting","manageEndSubOrder","addSubOrder","arrayIndex","changeOrderType","hasWorkingHours","WorkingHours","WorkingHoursCount","hasMaterials","Materials","MaterialsCount","getContactsForCustomer","customerContacts","WorkingHoursStartDate","WorkingHoursEndDate","notifySelectedOrder","getDeviationsReference","addGetDeviationsReference","getDeviationsForOrder","getMainOrder","addReferenceToMainOrderForSubOrderHierarchy","mainOrderId","currentSubOrder","SelectedStartDate","SelectedEndDate","markOrderAsEdit","Changes","addReferenceToMainOrder","addFunctionToOrder","selectedOrderId","goOrder","Attachments","processOrderAttachments","setCustomerToHierarchy","orderCameraImage","projectObject","projectReportBuilder","currentTab","getCurrentTab","pages","ORDER_DETAIL","initTabs","refreshSelectedTab","askUserToRemoveConnectWithPlanner","copyAddressFromCustomer","address","addressToReturn","Street","Street2","Street3","PostalPlace","PostalCode","hasAddress","PostalAddress","setEntityIdForFormChanges","getOrderList","getDeviationsForSelectedOrder","selectedOrder","onDatePickerDateChanged","orderDateToChange","isOrderStartDate","changeToAdd","orderChange","c","Change","applicationChange","EDIT","isAfter","isBefore","isCustomer","isInvoiceCustomer","getCustomersForOrder","customers","openNewCustomerModal","currentCustomerIdFromOrder","setCurrentCustomer","setCustomerToEntireHierarchy","getProcessListOrder","allProcesslists","setCurrentProcessList","setCurrentInvoiceCustomer","invoiceCustomer","clearProcessList","onOrderActiveClick","setCurrentOrderType","toggleOrderTypeDropdown","disableStatusDropdown","updateStatus","oldStatus","parse","changeStatusOrder","startOrder","progress","Progress","getProjectOrderDetails","getProject","setUpProjectOrder","removeProject","IsEditable","convertParticipantDates","navigate","headerHierarchyElement","getWorkingHours","getMaterials","orderOptions","dropped","noReload","isSaveOrderDisabled","resultedOrder","displaySaveMessage","resetChanges","$dismiss","reloadFromCordel","navigateFromCordel","canSaveOrders","setOrder","projectId","clearOrder","getCameraImages","onCopyCustomerAddressChange","closeOrder","newUrl","showProgressBar","header","showFullOrderStack","showCameraImageTab","getCameraImagesForOrder","onFocusControl","$event","controlType","onValueChanged","onDropdownOptionChanged","getChange","addNewContact","wasSaved","getSelectedCustomerAddress","addressArray","map","reopenOrder","Finished","getOrderDates","args","eventData","selectTab","tabName","getStartAndEndDate","handleSelectIdentificationTab","setCurrentTab","orderFactory","Orders","StartEndDate","OrderFullyDone","OrderActive","CustomersForOrder","UsersForWorkingHour","Attachment","WorkingHourCategories","ContactsForCustomer","OrderTypes","StartAndEndProcessLists","OrderStatus","ColorSettings","IncludeInReportStatus","IrrelevantStatus","ProjectOrders","CordelOrderFetch","CordelOrderPost","CordelNewOrderSync","OrdersForCustomers","ReportBuilderSortNumber","ProjectOrdersByProjectId","OrderIsVisibleInApp","OrdersForOrganizationPage","RiskAnalysisVisibilityState","TodaysOrdersFrontPage","OrderCordelStatus","UnassignTrip","OrderTrip","FailedCordelOrders","getOrderFromCordel","postOrderToCordel","syncNewOrderToCordel","orderExternalId","includeInactive","getUsersForOrder","getWorkingHourCategories","taskId","getOrderActive","getOrders","includeCompleted","orderTypeId","participantId","setDate","orderFullyDone","saveOrderActive","orderActive","orderstatus","colorSetting","setIncludeInReportStatus","include","OrderId","setIrrelevantStatus","irrelevantStatus","IsIrrelevant","getProjectOrders","getOrdersForCustomer","saveOrdersReportBuilderSortNumber","getProjectOrdersByProjectId","updateIsVisibleInApp","isVisibleInApp","getOrdersForOrganizationPage","getParentOrderIdThatIsNotTask","parentId","Suborders","parentIdToReturn","toggleRiskAnalysisVisibilityInReport","IncludeRiskAnalysisInReport","getOrderCordelStatus","unassignTrip","assignedUserId","saveOrderTrip","orderTrip","TripId","Distance","DistanceKilometers","IncludeTollPassesIntoHours","AssignedUserId","Driver","UserId","TripDetails","failedCordelOrder","failedOrder","merge","reverseOrders","predicateOrders","currentPageOrders","includeCompletedItems","useOldPersonnel","CREATE","DELETE","NotificationEditorController","hasFocus","footerText","headerText","contentText","Footer","Header","ex","notificationContent","notificationRecipients","editingHeader","editingFooter","editingContent","editingRecipients","tempContent","tempHeader","tempFooter","tempRecipients","notificationStringToList","string","list","recipientsError","editNotificationTemplate","section","closeNotificationTemplate","saveChanges","addCustomRecipients","addRecipient","notificationOrganizationId","organizationContacts","returnData","notificationContact","notif","recipientExists","removeRecipient","fullyEditable","OrganizationController","$interval","PingService","QualityHandbookFactory","currentPage","workingHourCategoryModal","organizationOriginal","organizationsAccessOriginal","allDataTypes","processListsByDataAbout","processListsByAvailability","reports","executionsAvailability","processListsByDataAboutPromise","identificationTab","tabActive","settings","orgChartTab","dataDetailsTypes","catalogs","showVismaError","showJobOfficeError","hideIntegrationInputFields","getOrderName","getDefaultProductCatalogsName","productCatalogs","nameToReturn","IsDefault","slice","loadOrganization","getOrganization","DeviationUnhandledNumberOfDays","getOrganizationAccess","access","HadAccess","FrontPageReportId","report","getIntegrationTypes","IntegrationType","EmailTemplate","ProductCatalogs","Catalog","getOrganizationTypes","BusinessRoleList","promises","GeneratingEndData","getEndDataStatus","postInit","usersPromise","getUsersForOrganizationPage","owners","Owner","Owners","currentOwner","getOrganizationToSave","IsOpen","checkForCachedTab","tab","tabData","isDynamicGenerated","currentDataDetailType","processListDataTypesPromise","getProcessListDataTypes","userDataType","dataDetailsType","getProcessListsByDataAbout","isOrderOpen","isContractOpen","isAdditionalOpen","isStartOpen","isEndOpen","workingHourCategoryPredicate","workingHourCategoryReverse","getOrganizationWorkingHourCategories","global","showPrintButton","getProcessListByData","checkMenuAccessAndNavigate","changeWorkingHourCategoryOrder","getProcessListsByDataDetails","processListsByDataDetails","DataDetails","getProcessListsByAvailability","getProcessListByAvailability","setInternalOrder","getExecutionsByDataDetails","executionsByDataDetails","getExecutionsByAvailability","canShowDataDetailsTabs","saveOrganization","disableSaveOrganization","OrganizationsAccess","getValidOrganizationsAccessToSave","closeOrganization","StartProcessList","EndProcessList","OrganizationNr","invalidOrganizationNr","tempOrg","tempOriginalOrg","Functions","endDataStatusPromise","orgNr","nr","resultfmod","dProduct","lDigit","oneDigit","getModulus11","integrationTypes","selectedIntegrationn","changeIntegration","openWokingHourCategoryModal","workingHourCategory","closeWorkingHourCategoryModal","dismiss","saveWorkingHourCategory","saveOrganizationWorkingHourCategory","saveOrganizationTypes","changeActive","businessRole","currentList","activeTypes","newBusinessRole","exists","disabledBusinessRoles","returned","checkExisting","typeIndex","isContract","isAdditional","isStart","isEnd","setStartProcessList","startProcessListFocus","setEndProcessList","endProcessListFocus","setCurrentAdditionalProcessList","AdditionalProcessList","setCurrentContractProcessList","ContractProcessList","setProductCatalogDefault","productCatalog","extractData","getEndData","EndDataUrl","cancel","ORGANIZATION_DETAIL","showPrintDialog","printOrganizationChart","node","offsetWidth","offsetHeight","html2canvas","backgroundColor","dataUrl","toDataURL","img","Image","src","printWindow","frames","write","outerHTML","activateTab","tabObject","$$route","originalPath","getReports","organizationFactory","OrganizationsDropdown","Organizations","OrganizationUserAccess","OrganizationAccess","OrganizationEndData","OrganizationEndDataStatus","OrganizationTypes","Reports","IntegrationTypes","ProcessListOrganization","CategorySettings","Departments","UnmappedPackingSlips","PackingSlipSuppliers","DefaultDeviationUnhandledNrOfDays","OrganizationDelete","OrganizationViewDataRequest","OrganizationChartBase64","UnmappedDidacUsers","MapDidacUser","OrganizationsWithAccessToCourse","businessRoles","saveTypes","saveCategory","LaunchDate","SalaryPeriodFrom","SalaryPeriodTo","getProcessListOrganizations","orgsAccess","orgAccess","getCategorySettings","getDepartments","saveCategorySettings","categorySettings","categoryRequest","saveDepartment","department","getUnmappedPackingSlips","supplierId","receivedDate","formattedDate","getPackingSlipSuppliers","savePackingSlipMapping","customerNumber","packingSlipMap","deleteOrganization","deleteOrganizationApiObject","confirmPassword","btoa","getDeviationDefaultUnhandledNrOfDays","requestOrganizationViewDataAccess","requestViewDataApiObject","organizationIdToRequest","saveOrganizationChartBase64","base64","dto","ChartBase64","getOrganizationsWithAccessToCourse","getUnmappedDidacUsers","mapDidacUser","didacUser","reverseOrganizations","predicateOrganizations","currentPageOrganizations","HorizontalProcesslistElementController","$controller","setDefaultColumn","colspan","Total","tempItem","BodyPerItem","floor","BodyRest","PerItem","RestItem","removeItem","itemIndex","disableAddInput","showInput","ChangeName","rowIndex","colIndex","removeRow","setChangesMadeValue","hideInput","Label","onHeaderInputChange","label","shouldBeDisabled","addNewColHeader","addNewHeaderRow","addNewBodyHeader","showErrDateTo","ValidFrom","ValidTo","attachName","processListDetailsService","convertSigningFrequencyToIntForProcessList","SigningFrequency","Frequency","ProcessListElementController","ProcessListDetailsService","OptionItemService","selectedOptionItemIndex","optionItemDetailsHeight","newItemIndex","processListExternalFilter","rorhandbokaItem","rorhandbokaBookmarks","showModalClose","showMoreCategories","initialized","categories","allSelected","exportList","isNavigatingToProcessListOverviewFromButton","isNavigatingFromCloseProcessList","changesMade","queryParams","location","signingFrequencies","qualityHandbookCategorySetting","processListElementOriginal","processListElementId","categoryModal","arrayObjectIndexOf","myArray","searchTerm","property","organizationExists","removeDeactivatedBasedOnProgId","currentProcessListStatus","idx","postProcessListElementInit","getUsersFromOrganization","organizationUsers","ResponsibleUser","displayWarningSaveMessage","getOrganizationTab","selectedOrgsIds","org","checked","IsPublic","initiateOptionItem","getDataTypeById","externalProcessListFiltered","filterData","filterDataAboutId","filterDataDetailsId","processListExternal","externalProcessList","toUpperCase","getProcessListExternal","dataAboutId","getExternalProcessList","currentExternalListItem","fillDataAboutList","fillDataDetailsList","getSecondaryProcessListDataTypes","secondaryAllDataTypes","allProcessListDataAboutTypes","getDataAboutList","dataType","dataTypes","processListDataAboutTypes","processListDataDetailsTypes","processListDataDetails","dataDetail","getIndexOfCategory","categoryList","idOfCategory","manageCategoryChange","categoryName","isRemove","removeOrganizationAccess","manageOrganizationAccessChange","giveAccess","OrganizationName","closeProcessList","hasBeenMadeFormChanges","processListMenu","saveExternalAttachments","processlistId","duplicateAttachment","oldId","saveProcesslistToServer","savedProcessListElement","resultedProcesslist","onTabSelect","getUrlBasedOnQueryParams","onProcessListDataAboutChanged","onAllProcessListDataAboutChanged","allProcessListDataDetailsTypes","datatypes","getDataDetailsList","onValidFromChanged","showErrDateToPastToday","getCategories","getProcessListCategories","GetProcessListCategoriesResult","addCategory","setting","showQualitySigningFrequency","FrequencyType","removeCategory","openCategory","saveProcessListCategory","closeCategoryModal","fixHtmlPaste","toggleSelectAllOrganizations","every","toggleSelectOrganization","IsOwner","HasUsedProcessList","isAccessCheckDisabled","loadRorhanboka","GetBookmarks","bookmarks","toggleListItemRelation","existing","videoUrl","videoUrlName","rorahandbokaItem","edit","UrlKey","ConnectRorhandbokaBookmarkProcessList","connectId","hasInactiveCategories","disableSaveProcessListElement","identificationTabError","categoriesTabError","itemsTabError","Option","hasJumpToStepAction","dir","nextRoute","saveProcessListElement","setOrganizationsToProcessList","disableProcessListElement","redirect","getCoupledProcessLists","coupled","ok","enableProcessListElement","startSimulation","plE","nextPage","NrOfLinesLeft","NrOfLinesRight","IsExternal","openPublicExceptionModal","publicExceptionsModalInstance","backdrop","Exceptions","getExportList","exportTo","targetConnection","AlreadyExported","reExport","ExportId","doesOptionItemGeneratesAnotherProcessList","stopPropagation","setSigningFrequencyType","queryFilters","initQueryFilters","getSelectedProcessListType","getHPlE","getProcessListElement","showExternalList","disableResponsibleUserDropdown","getQualityHanbookCategorySetting","qualityCategory","ProcessListElement","initializeProcessListElement","require","atr","parentController","openModal","external","dragged","removeProcessListItem","listItem","duplicateItem","indexOfSource","getBackgroundColor","parenttype","getBorderColor","getArrowColor","parentType","$cookies","processListFactory","optionTypes","GetProcessListByData","GetProcessListByAvailability","ProcessListDataTypes","ProcessListCategories","ProcessListCategoryHierarchy","OptionTypes","ActionTypes","QuestionType","ProcessListToSave","ProcessListToEnable","ProcessListSimulation","Coupled","DuplicateAttachment","HPlE","ProcessListOrder","Rorhandboka","rorhandbokaChapterId","ExternalProcessLists","FirstLevelCategories","DataDetail","ManagementRiskAnalysis","IntellisenseRiskAnalysis","RiskAnalysis","RiskRowStatusList","ProcessListsForRiskAnalysis","CheckIfProcessListCanBeEdited","ProcessListCircularityCheck","ProcessListExportList","ProcessListExport","ProcessListReExport","GetProcessListsForRiskAnalysis","getRiskAnalysis","saveRiskAnalysis","riskHead","getRiskRowStatusList","selectedProcessListItem","includeManagement","selectedProcessListId","dataAboutTypeId","processListTypeProgId","currentProcessListId","availableOnTable","req","Content-Type","onlyActive","saveDataDetail","getManagementRiskAnalysis","getOptionTypes","getActionTypes","getQuestionTypes","saveQuestionType","question","questionType","validToDate","validFromDate","disablePl","tableName","getFirstLevelCategories","checkIfProcessListCanBeEdited","checkForProcessListCircularity","anotherProcessListId","connectionTargetId","processListExportApiObject","exportId","processListReExportApiObject","processListType","currentPageProcessList","navigationMode","VerticalProcesslistElementController","CentralApprovalItemService","processListItemModal","externalProcessListOriginal","lineIterations","flatColors","newIndexForItem","currentDraggedProcessListItem","centralApprovalSharedObject","onOptionItemTextChange","setDisableAddLine","onMouseMoveAboveItemsSection","elementBoundingClientRect","innerHeight","scrollBy","checkIfAutoScrollingIsNecessary","getJumpToTargetIndex","dragEnabled","destIndex","returnValue","jumpToWarning","anteriorItem","nextItem","targetedByJumpToIndex","itemObj","anteriorItemHasJump","nextItemHasJump","optionsItems","accept","sourceNodeScope","destNodesScope","$index","dragStart","removeAnimations","source","nodeScope","$element","dragStop","addAnimations","drawLines","optionsExternal","elements","dragging","placeholder","replaceWith","clone","ProcessListId","processListAttachment","existingAttachment","DeviationTemplate","idToFind","indexOfProcessListItem","currentListItem","createAnimation","itemToAnimate","contains","removeClassAnimation","disabledAddLine","isNew","Question","UseForCentralApproval","ReportingCode","disabledActions","disabledTypeDropdown","processCentralApprovalVariables","availableProcessListItems","editable","setOptionItem","resetEditQuestion","reportingCodeAlreadyExists","duplicateProcessListItem","$$hashKey","OptionId","countNrOfPoints","addNewOptionItem","checkActionForEmpty","resetAction","processListAction","tempNrAppartions","removeOptionItem","moreThanOneJumpToStep","nrOfJumpsToStepActions","isFlexibleWithJumpToStep","checkOpenDefaultAnswers","onOptionTypeChange","defaultAnswersInitiate","setOpenDefaultAnswers","addNewPredefinedAnswer","temp","showErr","checkAnswer","checkListDefaultAnswers","errDefaultAnswers","setSelectedOptionItemIndex","resetOptionItemProcessList","opt","anyItemOpen","areStandardAnswersNotCompleted","disableSaveProcessListItem","saveProcessListItem","doNotCloseModal","selectedQuestion","questionTypes","containedInListItem","contained","indexToDelete","removeCurrentListItem","$apply","NrOfPointsLeft","NrOfPointsRight","elementsLeft","getElementsByClassName","elementsRight","parentNode","removeChild","deleteLines","sourceItem","elementSource","elementDestination","bullet","rectElemSource","arrow","destinationId","destinationItem","offsetTop","offsetLeft","rectElemDestination","isReversed","arrowLine","borderColor","sourceDeparturePoint","destinationDeparturePoint","currentView","marginLeft","appendChild","lineIterationsRight","composedId","offsetParent","arrowLineRight","borderColorClass","heightOfLineRight","showQuestionList","saveQuestionCheck","getProcesslistItemIndex","showExternalProcessListItems","divExternalProcessList","divCurrentProcessList","minHeight","setQuestion","checkQuestion","int","questionTemp","questionFilter","actionTypes","questions","resetQuestion","questionExists","editQuestion","tempQuestionType","saveQuestion","resetExternalSelection","dataAboutProgId","getPentagonColor","setVisibilityOfExternal","addStandardAnswer","option","onKeyPressStandardAnswer","which","originalProcessListExternal","copyProcessListOptions","droppedIndex","dest","k","openDeviationTemplateModal","currentProcessListItemIndex","selectProcessList","processlist","onVariableSelect","getLayoutForCompanyInfoDetailed","getLayoutForDesiredApprovalAreas","ProductsController","limitNotification","allCatalogs","allProducts","listOfPillsHTML","inputElement","getProviders","providers","getAll","getCatalogs","getProducts","getMostUsedProducts","products","isProductsSearchOpen","reachedEndOfList","mostUsedProducts","product","IsMostUsed","usedProducts","children","paddingLeft","join","searchProducts","productIndex","ProductsList","catalog","DescriptionSplit","CatalogName","loadMore","indexToLoad","changeOrder","addDescriptionToSearch","removeKeywork","onProviderChange","onProductCatalogChange","onOrganizationChange","highlight","searchText","splitText","stringReplaced","firstTime","setOrganizationId","isImpersonationActive","ProductController","productId","getProductDetails","showPrices","productFactory","Product","ProductDetails","MostUsedProducts","Catalogs","Providers","productCatalogId","providerId","selectedProductColumnTypeId","projectService","convertProjectDateFieldsToMilliseconds","convertParticipantDatesListToMilliseconds","Dates","ProjectController","ProjectService","projectCtrl","isControllerDestroyingAfterSave","showRealReportButton","chartLoadedFromReportButtonClick","showRenderChart","canOrderProgressBarBeDisplayed","isOrderExecutionDisabled","toggleRenderChart","projectsMenu","onProjectOrderExecutionTabSelected","projectOrder","handleSelectedTab","refresh","snapshotChart","closeProject","saveProject","dontReload","canSaveProject","projectToSave","saveAnyOpenExecution","onProjectManagementSelect","showLawsAndRegulationsTab","showDeviationTab","deviationMenuSelected","syncOrderDescriptionWithProject","getProjectTabs","onProjectRetrieve","PROJECT_DETAIL","generateFinalReport","resetManagementProcessLists","defineProperty","previousTab","selectedTab","checkForOrderExecutionTab","projectFactory","Projects","Statuses","ProjectLeftMenu","ProjectOrder","ProjectManagement","CreateProjectExecution","ProjectCategoryAttachments","params","categoryId","ProjectCategoryDeleteAttachments","ProjectManagementSorting","ProjectCameraImages","ProjectManagementIncludeReport","AttachmentIncludeReport","ProjectAttachmentUrl","getProjectAttachmentUrl","getProjects","statusId","getProjectToSave","getProjectStatuses","getLeftMenuCategories","leftMenuCategoriesDeffer","addManagementProcessList","noRequest","projectRequest","reportCollapse","projectManagementCategories","managementCategory","ExecutionList","updateManagementProcessList","projectManagement","removeManagementProcessList","processListIndex","initProjectManagementCategories","currentExecutions","leftMenuCategories","ProcessLists","ProjectCategory","createProjectExecution","createManagementExecution","getManagementProcessLists","projectConnectId","saveCategoryAttachments","deleteCategoryAttachment","projectCategoryAttachment","initProjectCategoriesAttachments","initProjectAttachments","resetLeftMenuCategoriesDefer","resetLeftMenuCategories","saveManagementProcessListsSorting","managementSorting","getProjectCameraImages","saveManagementProcessListIncludeReport","managementIncludeReport","saveAttachmentIncludeReport","mainProjectOrder","reverseProjects","predicateProjects","currentPageProjects","selectedDeviationStatus","QualityHandbookController","QualityHandbookTypes","qualityController","initPromise","activeQualityHandbookTypeProgId","qualityHandbook","_onDestroySubscription","getQualityHandbook","selectedOrganizationId","archived","selectedStatus","setCategories","qualityHandbookId","RevisionFrequency","revisionFrequencies","types","qualityHandbookTable","archivedQualityHandbooks","getQualityHandbookForSave","getSigningFrequencyForQualityHandbook","CentralApprovalLists","setActiveQualityHandbookTypeProgId","typeProgId","processListFilter","qualityCategories","selectedQualityHandbookTab","centralApprovalLists","centralApprovalList","sharedChapterObject","viewQualityHandbook","getActiveQualityHandbookTypeProgId","onChapterUpdate","chapter","ConnectId","onCentralApprovalChapterUpdate","onTabTypeSelect","getCentralApprovalLists","onTabStatusSelect","onOrganizationChanged","isSaveDisabled","chapters","saveQualityHandbook","archive","modalTitle","selectedButtonId","archiveQualityHandbook","editTemplate","deleteChapter","firstLevelCategory","Approved","getQualityChapters","frequency","saveChapterExecution","InitiateChapterExecutionResult","approve","signingFrequencyTable","approveQualityHandbook","viewArchivedHandbook","archivedQualityHandbook","onChapterAdd","chapterTreeOptions","destNodeScope","$treeScope","saveChaptersSorting","setCentralApprovalList","listToAdd","saveChapter","deleteCentralApprovalList","getQualityHandbookTypes","active","getQualityHandbookStatuses","qualityHandbookFactory","QualityHandbookTemplate","qualityHandbookTemplateId","QualityHandbookProcessLists","QualityHandbookStatuses","QualityHandbook","QualityHandbookChapter","QualityHandbookChapterDelete","QualityHandbookCategorySetting","QualityHandbookChapterExecute","QualityHandbookUser","QualityHandbookChapterView","QualityHandbookApprove","QualityHandbookChapterSign","PersonalHandbookChapterSign","QualityHandbookChapterSignRevised","ArchivedQualityHandbook","ApproveArchivedQualityHandbook","ArchiveQualityHandbook","QualityHandbookChapterSorting","QualityHandbookProcessListsOrganizationWindow","SigningFrequencyForQualityHandbook","CentralApprovalList","CentralApprovalOrganizationInfo","CentralApprovalPrimaryContact","CentralApprovalRevisionData","CentralApprovalListView","CentralApprovalUsers","CentralApprovalReferences","QualityHandbookById","getQualityHandbookTemplate","getQualityHandbookTemplateForSave","saveQualityHandbookTemplate","qualityHandbookTemplate","getQualityHandbookProcessLists","chapterToSave","getChapter","deleteQualityHanbookChapter","chapterDelete","addChapter","categoryToInsert","existingCategory","qc","Children","executionFound","executionIndex","chapterExecution","getQualityHandbookForUser","getChapterView","approveQuality","signChapter","chapterSign","signPersonalHandbookChapter","signPreviouslyRevised","qualityHandbookChapterSignRevisedApiObject","getArchivedQualityHandbook","approveArchivedQualityHandbook","copyLists","approveArchived","archiveQualityHandbookApiObject","sorting","getProcessListsForOrganizationWindow","listToDelete","getCentralApprovalCompanyInfo","detailed","getCentralApprovalPrimaryContact","getCentralApprovalRevisionData","getCentralApprovalListView","getCentralApprovalUsers","getCentralApprovalOrderReferences","getQualityHandbookById","attrs","showList","$parse","ReportCreator","reportId","SearchComponents","Pdf","generatePdf","pdf","HTML","BaseUrl","PdfUrl","newReport","hideList","getShowList","getSearchComponents","executeReport","searchComponents","trustJs","js","trustAsJs","f5ReportCreator","mainController","changeTemplate","contents","openReport","put","DeviationsReport","PrintCentralApprovalDocument","GeneratedDateForReport","ReportPassword","DiplomaForUsers","f5ReportFactory","generateDeviationsExcelReport","GenerateDeviationsExcelReportResult","printCentralApprovalDocument","htmlDocument","PrintCentralApprovalDocumentResult","saveGeneratedDateForReport","reportProgId","generateDiplomaForUsers","f5ReportLink","displayName","attributes","objectId","footerProgId","showFooter","showPageNumber","generateZipWithAttachments","onSendReportThroughEmailClick","onReportGenerationFinish","$printSection","htmlBlob","canSendReportThroughEmailButtonBeDisplayed","onSendReportThroughEmailClicked","reportSource","printElement","openNewPrintWindow","content","showDownloadZipButton","reportResult","ZipAttachmentsUrl","openZipAttachments","baseHTML","delimiter","domClone","cloneNode","body","appendChlid","searchComponent","$eval","ShowFooter","ShowPageNumber","FooterProgId","GenerateZipWithAttachments","linkElement","ChartObjects","scopeText","ChartType","ChartCols","ChartData","ChartOption","ChartId","windowClass","contentDocument","f5ReportViewer","infoid","reportid","dates","onReportReady","loggedUserOrganization","organizationDropdown","public","onUsersComplete","results","showExecute","execute","reExecuteWithSearchParameters","searchParameters","executeWithSearchComponents","toISOString","browserPrint","mywindow","executeViewOnly","ExcludePDF","getOrganizationIdForLoggedUser","constant","optionalSettings","packages","protocol","setProtocol","newProtocol","setUrl","apiConfig","googleJsapiUrl","apiReady","onLoad","oldCb","isFunction","call","extend","google","load","head","getElementsByTagName","script","setAttribute","onreadystatechange","readyState","fn","apiProxy","chart","onReady","select","$elm","$attr","applyFormat","formatType","formatClass","dataTable","formatters","cIdx","colorFormat","formats","addGradientRange","from","to","fromBgColor","toBgColor","addRange","bgcolor","columnNum","getNumberOfColumns","options","allowHtml","draw","triggered","visualization","DataTable","arrayToDataTable","NumberFormat","ArrowFormat","DateFormat","BarFormat","ColorFormat","chartWrapperArgs","chartType","view","containerId","chartWrapper","ChartWrapper","events","addListener","displayed","getChart","getSelection","setChartType","setDataTable","setView","setOptions","usersDropdown","getUserFullName","userFullName","currentOptions","newHTMLForDropdown","newHTML","buildDropdownContent","reportBuilderService","ProcessListItemOptionTypes","fakeImageStartId","generateFakeImagesForImagesIncludedInReport","imagesIncludedInReport","imagesExcludedFromReport","nrOfExcludedImages","generateFakeImagesForImagesExcludedFromReport","nrOfIncludedImages","canOptionBeDisplayedForQuestion","Numeric","generateFakeImages","removeFakeImagesFromList","getFakeImage","removeOneFakeImageFromList","firstFakeImageIndex","isFakeImage","moveFakeImagesToTheEnd","fakeImage","authService","Ok","currentRoute","Session","session","getSession","SessionId","initSession","retrieveSessionFromStorage","accessibleRoutesWithoutASession","hasLoggedUserAccessOnlyToDemoContent","isLoggedUserOrganizationAVbOrganization","pagesToCheck","getRouteAllAccessPages","previousPage","getCurrentPageForExecution","NoAccess","handleManagementExecutionRoute","MyProfile","routeParams","handleMyProfileRoute","AllowAccess","hasAllAccessToRoute","smartAgentStatusColor","setSmartAgentColor","getSmartAgentStatus","getSmartAgentStatusColor","setSmartAgentInterval","storeSessionInCookies","storedSession","storeSessionUserInCookies","storedUser","Language","Rights","UserName","storeUserMenus","SessionController","userDetailsTabset","coursesAndCompetencesTabset","smartAgentPromise","lang","regexp","initUserAfterLogin","currentLanguage","handleLogin","isShadowLogin","dontGoHome","logout","recaptchaCheck","RecaptchaCheck","ImpersonatedByUser","gdprModalInstance","keyboard","isIE","documentMode","goToMyCompetences","USER_DETAIL","coursesAndCompetences","COURSES_AND_COMPETENCES_TAB","competences","openVBIntranet","isOpeningIntranett","signinRedirect","state","expandMenu","currentPath","firstPathSegment","isCurrentRouteAllowed","SelectedOrganizationId","signinRedirectCallback","userProfile","intranettCompanyId","intranettUsername","hash","isLoggingFromIntranett","isLoggingViaIntranett","profile","intranettLogin","isLoggedIn","stopRedirect","resetInfo","clearOrganizationId","profileNavigation","myProfilePage","goToGdprPage","login","username","recaptchaResponse","isShadow","loginViaIntranett","duration","offset","scrollToTop","scrollTop","resetPassword","resetLoggedUser","currentSession","getImpersonatedByFullName","impersonatedBy","getImpersonatedByOrganizationName","finishImpersonation","inputType","resultedInputs","onSessionCreatedDeregistration","onSessionCreatedFromCourseInvitationDeregistration","onLogOutDeregistration","shadowLoginDeregistration","result1","result2","result3","result4","LoginController","loginIntern","newSession","Password","recaptchaModel","resetPasswordIntern","setResponse","userGroups","theSession","rightProgId","getImpersonatingUser","isLoggedUserOrganization","isLoggedUserFromCentral","IsVBCustomer","IsVBOrganization","isLoggedUserAdminFromCentral","admin","isUserLoggedUser","sessionFactory","IntranettSession","ShadowLogin","ResetPassword","SmartAgentStatus","ExternalSessionCheck","CreateSessionForUser","ImpersonateSession","CreateSessionForExternalSession","AllAccessRouteApi","CreateLoginSessionForUserInvitedToCourse","isFromLoginPage","intranettRequest","Username","CompanyId","sessionToDelete","checkIfExternalSessionExpired","createSessionForUserFromInvitation","invitationId","impersonate","userIdToImpersonate","reason","impersonateApiOject","loginUsingExternalSession","externalSessionId","createSessionApiObject","createLoginSessionForUserInvitedToCourse","ResourcePlannerContextOptionsService","ResourcePlannerService","resourcePlannerInstance","setResourcePlannerInstance","getOptionsForCut","$itemScope","currentRightClickAction","rightMenuActions","CUT","taskCopied","createActionTimeline","resetCursor","IsPrivate","getOptionsForCopy","COPY","getOptionsForDelete","delete","getTasks","getOptionsForDeleteAll","deleteAll","getOptionsForDeleteAllAndRemoveParticipant","deleteAllAndRemoveParticipants","getOptionsForDeleteDay","getDayForDelete","deleteDay","getOptionsForDeleteHour","getHourForDelete","deleteHour","getOptionsForSplit","askForPeriodisering","getOptionsForUnnasign","ResourcePlannerController","ResourcePlannerSettingsFactory","UserUtilService","startHour","endHour","showTrash","taskDetailPanel","inactiveTasksPanel","userGroupId","fullDayFormat","selectedDate","userViews","allUsers","userListCollapsed","onDateChange","resetCollapsedUsersHeight","onUserCheckToggle","Checked","Collapsed","collapseUser","intervalPromise","removeTaks","Tasks","u","setLoggedUserFirst","getTasksForSelectedUsers","setStartEndHours","initInterval","setUser","collapsed","lines","Lines","resizeFullDayFormat","deleteTask","removeParticipantsFromMeeting","updateTaskListWithoutEmail","dayToDelete","dayStart","dayEnd","taskStartDate","getDateWithoutTimezone","taskEndDate","addDaysToDate","newTasks","firstTask","secondTask","splitDate","hourToDelete","processUserSettings","fromSettings","getResourcePlannerSettings","RefreshTime","intervalSync","GroupView","getUsersView","setUserGroupValue","Overview","workingDays","week","Use24H","set24HFormatValue","setToday","setNavigationMode","onIntervalChanged","userIds","removeAnyExistingTasks","getTasksForUsersBetweenDates","createOrderTask","set24hFormat","getInactiveTasks","inactiveTasks","selectedUser","onlyTodaysTasks","notInResourcePlanner","showCollapseButton","showInactiveTasks","createTask","newTaskPanel","removeInactiveTaskByIndex","getFullName","createOrder","getParticipantsForOrder","getTypesForTask","getStatusesForTask","saveTaskType","getColorSetting","getResourcePlannerDropdownViews","includeDeactivatedViews","getResourcePlannerViewUsers","saveResourcePlannerView","getSelectedOrganizationId","getTaskById","getChildTasks","saveChildTasks","childTasks","isUserAlreadyAssigned","getResourcePlannerCustomers","getResourcePlannerUsers","inviteUser","taskToInvite","taskWhoSentInvite","getTasksForUser","saveMeeting","organizerTask","participantTasks","addParticipantsToMeeting","currentTask","deselectAllExceptLoggedUser","atLeastOneUnchecked","collapseAllUsers","atLeastOneNotCollapsed","cursor","isSaveViewDisabled","userViewEdit","filterSelected","collpaseUser","getSidePanelTasksForSelectedUsers","getResourcePlannerTasksForSelectedUsers","showResourcePlannerTasks","openSettings","settingsTable","modalSettingsInstance","overflow","taskContextOptions","resourcePlannerFactory","TasksForUsers","InactiveTasks","TaskLists","TaskTypes","TaskStatuses","InviteUser","ResourcePlannerView","ResourcePlannerViewUsers","ChildTasks","ResourcePlannerCustomers","AcceptInvitation","IsAssigned","UnassignUser","AssignUser","DatesExtremities","Meeting","AddParticipantsToMeeting","RemoveParticipantsFromMeeting","CopyTaskActionApi","CutTaskActionApi","DeleteTaskActionApi","DeleteAllTaskActionApi","DeleteAllTaskAndRemoveParticipantActionApi","DeclineInvitation","AskForPeriodisering","MarkAsPeriodisering","todayTasksOnly","taskSave","orgId","typeToSave","viewToSave","tasksToSave","invite","acceptInvitation","declineInvitation","isUserAssignedToOrder","unassingUser","unassignFromAll","unasignUser","assignUser","getDatesExtremities","orderIds","meeting","saveCopiedTasks","copyTaskApiObject","saveCutTask","cutTaskApiObject","deleteTaskActionApiObject","deleteAllTaskActionApiObject","deleteAllTaskAndRemoveParticipantActionApi","askForPeriodiseringApiObject","markAsPeriodiseringApiObject","resourcePlannerService","getTransformedValues","getComputedStyle","getPropertyValue","compareDates","b","getHtmlElementsFromCoordinates","htmlElements","elementsFromPoint","msElementsFromPoint","htmlElement","getHtmlElementsContainingClassName","getDateOfTask","getSplittedInfo","infos","getParticipantsName","getNameOfTask","MeetingParticipants","CourseDayHoursTable","getStatusOfTask","todaysDate","statusToReturn","getOrderStatus","getAddressOfTaskOrder","addresses","PASTE","CREATE_ORDER","USER_HEIGHT","getUserByTask","getIndexOfTheTask","getColorBasedOnUser","getUserIndex","pxToHours","pixels","hours","abs","minutes","hoursToPx","isStartDateInRange","isEndDateInRange","userElements","userTaskElements","increaseUserHeight","userItemElement","userTaskElement","increaseGridHeight","grid","clientHeight","areTasksOverlapping","expandUserTasks","transitionClass","taskArray","currentLine","taskElement","transformValues","heightIncreased","transform","collapseUserTasks","recalculateCollapsedTasks","elementClass","getUserElementsFromCoordinates","MainOrderId","getPopupInfo","taskElements","pageX","pageY","overlayedTasksInfo","PendingResponse","popover","parent","originalEvent","clientWidth","getOverlapDropdown","overlappingTasks","dropdownElement","getTaskInfo","infoToReturn","splittedText","isTaskPrivateToCurrentUser","getOpacityValue","setOpacityLevel","css","manageNotInRangeTask","computedDates","navigationModeStartDate","datesAfterDrop","resourcePlannerOrderDragged","resourcePlannerTaskDragged","ResourcePlannerTrashController","lastColor","interact","dropzone","overlap","ondrop","position","interaction","pointers","relatedTarget","on","zIndex","mouseCoordinates","bindToController","ResourcePlannerViewController","allView","getUsersBySelectedView","checkedUsers","isPersonnel","isUsersViewOpen","userView","setUserView","selectedUserView","openUserViewModal","addUserToCurrentView","existingUsers","existingUser","subscription","removeSelectedUser","saveUserView","existingViews","existingView","removeInactiveViewFromViews","showCollapseAllButton","toggleViewDropdown","checkIfTheDropdownWillRemainOpen","isClosing","settingsService","canDemoContentTabBeDisplayed","SettingsController","SettingsFactory","SettingsService","MenuItemFactory","GroupService","originalGroups","isAllAccessGroup","group","getGroupsMenuAccess","displayUser","g","groups","tempAccess","changeMenu","parentIndex","parentMenu","tempCount","saveSettings","saveGroupsMenuAccess","SaveGroupsMenuAccessResult","disabledSaveSettings","settingsFactory","GroupsMenuAccess","groupList","listForSearch","searchResult","registerComponentForParent","SearchController","originalListForSearch","ProcessListTable","NotificationMessageTable","notification","searchBoxCtrl","$onChanges","changes","HorizontalSimulationController","getProcesslist","CanBeEdited","VerticalSimulationController","initSimulation","destinationProcessList","StringInput","NumericInput","statusFactory","CourseStatuses","getCourseStatuses","statusService","getStatusTranslation","Translations","translation","Culture","taskListService","isTaskInteractable","InitiatedProcessListItemTable","InitiatedProcessListItemCalendarTable","lockNonInteractableTasks","usersWithTasks","userWithTasks","warningInfo","taskListFactory","TaskList","TaskListsWithoutEmail","ExecutionTasks","ResourcePlannerTasks","SearchTasks","getTask","forDisplay","searchTasksByText","typeFactory","NotificationTypes","EventTypes","MandatoryNotificationTypesByOrganization","CourseCategory","CourseCategories","TargetAudience","TargetAudiences","CourseInvitationDispatchModes","CourseInvitationDispatchManualModeOptions","ProductColumnTypes","getNotificationTypes","getEventTypes","getMandatoryNotificationTypesByOrganizationId","getCourseTypes","saveCourseCategory","courseCategory","getCourseCategories","saveTargetAudience","targetAudience","getTargetAudiences","getCourseInvitationDispatchModes","getCourseInvitationDispatchManualModeOptions","getProductColumnTypes","typeService","getTypeTranslation","removeCharactersFromName","stringToRemove","userList","loggedUserId","userFactory","Groups","BusinessRoles","BusinessRoleParents","BusinessRole","UserLanguage","UsersOrganization","UsersForOrganization","UserRights","UserOrganizationAccess","UnlockUser","Managers","Competence","EducationLevels","UsersWhoSignedForQualityHandbook","RequestImpersonateAccess","SaveUserSettingsGdpr","EnrollUsersToCourse","UsersEnrolledToCourse","NrOfUsersEnrolledToCourse","UsersPresentToCourseSession","IntranettDetails","AllUsersEnrolledToCourse","IntranettPositions","UsersInvitedToTheCourse","UsersFromOrganizations","getUsersFromOrganizations","UsersForCourseEnrollment","getCompetences","includeDeactivatedCompetences","userGroupProgId","getGroups","getUserToSave","saveUser","saveCompetence","competence","competenceToSave","Certificate","HighestEducationLevel","saveBusinessRole","businessRoleToSave","getBusinessRoles","getBusinessRoleParents","saveUserLanguage","getUserRights","getIntranettDetails","checkUsersForOrganizationAccess","unlockUser","getManagers","getEducationLevels","getUsersWhoSignedForQualityHandbook","requestImpersonateAccess","requestImpersonateApiObject","userIdToRequest","saveUserSettingsGdprApiObject","enrollUsersToCourse","selectedOrganizationsIds","getUsersEnrolledToCourse","fillCourseEnrollmentId","courseDayId","getNrOfUsersEnrolledToCourse","getUsersPresentToCourseSession","getAllUsersEnrolledToCourse","getIntranettPositions","getUsersInvitedToTheCourse","organizationIds","getUsersForCourseEnrollment","reverseUsers","predicateUsers","currentPageUsers","organizationSettings","_fullName","_idOfTheLastVisitedUser","markAlreadyEnrolledUsers","enrolledUsers","enrolledUser","markUsersPresentToSession","usersPresentToSession","userPresent","extractUsersWithGroup","convertIntranettPositionsToObjects","intranettPositions","intranettPositionsObjects","currentPosition","isUserAvailableToNotifyForCourseEvents","HasNotificationTypesForCourse","hasUserSelectedAtLeastOneNotificationTypeForEvent","eventType","EventNotificationTypeSettings","eventNotificationTypeSetting","Event","NotificationType","setIdOfTheLastVisitedUser","getIdOfTheLastVisitedUser","modelSetter","fileModel","fileNameSetter","fileExtensionSetter","fileExtension","extName","nameArray","multipleFileModel","filesModel","fileNameModel","createTimelineModel","createTimeline","leaveTimelineModel","leaveTimeline","timeoutHandler","bindUnsafeHtml","attr","stopEvent","snapRemote","getSnapper","snapper","newState","snapStateClosed","$last","onFinishRender","scrollHeight","addClass","priority","terminal","compile","$set","compileElement","pre","resolvedPromise","evaluedValue","post","DatepickerDemoCtrl","uibDatepickerPopupConfig","currentText","clearText","closeText","getDay","toggleMin","minDate","opened","dateOptions","formatYear","customClass","startingDay","getTodaysDate","dateUtilService","getWeekNumber","getNumberOfDaysInMonth","seconds","setMilliseconds","getDateInMonth","setYear","setMonth","addMonthsToDate","months","subtractDaysFromDate","isSundayOrSaturday","addHours","hour","setTime","long","timezoneOffsetInHours","getTimezoneOffset","getMondayOfDate","changeDate","dateToChange","setUTCDate","setUTCMonth","setUTCFullYear","isDateAfter","dateToCheckAgainst","isDateBefore","isSameDate","dateDay","dateMonth","dateYear","dateToCheckAgainstDay","dateToCheckAgainstMonth","dateToCheckAgainstYear","detectChange","formatValue","isDate","timepickerId","registerTimepickerWatcher","currentInput","mainEntityId","isUpdatingEntity","ngModel","currentEntityId","getEntityId","previousEntityId","getPreviousEntityId","previousChangeForCurrentControl","getChangeById","originalValue","checkbox","getCheckBoxChild","isChangeEventRegistered","registerCheckboxListeners","triggerHandler","timePickerInputs","datepickerId","registerDatepickerWatcher","textElement","elementContent","registerTextElementListeners","wordwise","tail","substr","lastspace","start","eventFocus","eventFocusId","off","change","currentControlId","previousControlId","getPreviousControlId","setOriginalValue","setPreviousControlId","getOriginalValue","performChange","currentEntityChanges","currentChanges","getChangesForCurrentEntityId","formChange","currentChange","currentFormChange","formControls","onFocus","currentControlValue","onChange","control","currentControl","hasAttribute","registerListeners","httpInterceptor","msgId","splitMessage","lodashFactory","hasCordel","setOrganizationHasCordel","orgHasCordel","getOrganizationHasCordel","currentPageForExecution","ping","ip","inUse","onerror","timer","PrintService","writeln","setItem","TranslateCtrl","langKey","appMenuItems","onAfterDemoContentSave","appMenuItemListController","AppMenuItemFactory","appMenuItem","openDemoContentModal","DemoContent","editedContent","AttachmentItemController","attachmentListController","secondTable","secondForeignKey","AttachmentParticipantController","ParticipantFactory","SecondForeignKey","SecondTable","deleteParticipant","saveParticipants","getFilteredUsers","differenceBy","AutomileTripDetailsController","AutomileFactory","Duration","calcDuration","TripEndDateTimeLong","TripStartDateTimeLong","Speed","calcSpeed","firstDate","secondDate","totalMinutes","distance","speed","round","AutomileTripListController","allTrips","trips","isXs","DataDetailListController","getDataDetails","dataAboutList","d","selectedDataDetail","dataDetailModalInstance","openDataDetailsModal","checkIfDataDetailsAlreadyExists","ContactModalController","dismissModal","disableSaveContact","Telephone","savedContact","courseSession","onCourseAgendaDetailsFormInitialized","courseAgendaController","toggleAgendaState","agenda","onCourseAgendaDetailsFormInit","form","courseAgendaFactory","CourseAgendas","getAgendasForCourse","courseDayFactory","CourseDays","CourseDayByCourseSessionId","getCourseDaysForCourse","getCourseDayByCourseSessionId","courseDayService","CourseDayHoursService","courseDays","courseDay","HoursList","convertHoursListToMillisecondsWithOffset","convertCourseDaysDatesToMillisecondsWithoutOffset","convertHoursListToMillisecondsWithoutOffset","findDayIndexInList","dayDate","currentDayDate","courseDetailsController","CourseFactory","ModalService","CourseService","CourseEnrollmentFactory","CourseSessionFactory","courseDetailsTabSetTabs","UserService","CourseDetailsTimeIntervalTabService","courseIdentificationForm","loggedUserCourseEnrollment","_nrOfUsersEnrolledToCourse","_loggedUserSettings","_courseSessionForToday","getCourseSessionForToday","courseSessionForToday","COURSE_DETAIL","informationTab","initCourse","getCourseEnrollmentByUserAndCourseIds","loggedUserSettings","AvailableForOrganizations","Location","Address","Country","createNewCourseInstance","LimitedAccessToUser","turnOffLimitedAccessToUser","turnOffLimitedAccessToTargetAudiences","clearDaysNotPresentInCourseDateInterval","courseEnrollment","GetNrOfUsersEnrolledToCourseResult","showCourseInvitationResponseMessage","UnnotifiedUsers","unnotifiedUsers","nrOfUsersEnrolledToCourse","showTabset","canLocationTabBeDisplayed","Classroom","closeCourse","courseDetailsPageOpenedFromRoute","userDetails","courses","saveAndSendInvitations","InvitationDispatchMode","Automatic","savedCourse","InvitationTemplate","openCourseSelectionForInvitationModal","isSaveButtonDisabled","$invalid","Category","onCourseIdentificationFormInitialized","canEnrollOthersButtonBeDisplayed","enrollOthers","canEnrollButtonBeDisplayed","CanSignUpForCourses","enroll","getLoggedUserCourseEnrollment","isEnrollButtonDisabled","NrOfParticipants","isEnrollOthersButtonDisabled","canStartCourseButtonBeDisplayed","startCourse","createSessionForCourse","canSessionsTabBeDisplayed","getStartCourseButtonTooltipMessage","canAgendaTabBeDisplayed","canSaveButtonBeDisplayed","canSaveAndSendInvitationsButtonBeDisplayed","canAttachmentComponentBeDisplayed","canAttachmentsTabReadonlyBeDisplayed","canEnrolledUsersTabBeDisplayed","canNotificationsSentTabBeDisplayed","canGenerateDiplomaButtonBeDisplayed","completed","GenerateCertificate","openEnrolledUsersSelectionForDiplomaModal","onCourseDateIntervalChange","getTextForStartSessionButton","canAttachmentsTabBeDisplayed","canTimeIntervalTabBeDisplayed","areUsersSelectable","onEnrolledUserClick","onUsersRetrieve","selectColumnName","courseEnrolledUsersController","_selectedOrganization","_loggedUser","_organizations","_enrolledUsers","_usersInvitedToTheCourse","_extraColumnsForUserList","columnName","isInvited","extraColumnsForUserList","getRetrievedEnrolledUsers","onEnrolledUserClicked","isSelectable","notifyParentComponentAboutEnrolledUserClick","courseEnrollmentFactory","EnrollUserToCourse","CourseEnrollmentByUserAndCourseIds","CourseEnrollmentByCourseDay","CourseEnrollmentsByCourseDay","enrollUserToCourse","getEnrollmentByCourseDay","getEnrollmentsByCourseDay","courseInvitationController","_sessionId","_courseId","courseInvitationConfigurationController","EmailTemplateFactory","EmailTemplateTables","CourseInvitationConfigurationService","_isHeaderEditing","_isContentEditing","_isFooterEditing","isHeaderEditing","isContentEditing","isFooterEditing","variables","getVariablesForNotificationTemplate","canRetrieveDefaultInvitationTemplate","getEmailTemplateByTable","CourseInvitation","editSection","closeSection","trustHtml","notificationTemplateVariables","hashTag","onCourseClick","showButtons","showStartCourseButton","showUnsubscribeButton","showEnrollButton","onEnrollButtonClick","onGetEnrollButtonName","onUnsubscribeClick","courseListController","CourseLocationService","TypeService","getPredicate","getReverse","sortBy","predicateToSortBy","onCourseClicked","notifyParentComponentAboutTheClickedCourse","getCourseLocationAsString","convertCourseLocationToString","courseType","unsubscribe","notifyParentComponentAboutUnsubscribeClick","notifyParentComponentAboutCourseEnroll","getEnrollButtonNameForCourse","isCoursePublished","DidacLink","canUnsubscribeBeShown","courseLocationFactory","CourseLocation","getCourseLocationByCourseId","courseLocation","courseLocationAsString","City","PostalBox","courseReservationFactory","CourseReservation","CourseReservationByCourseId","CourseReservationsForCourse","saveCourseReservation","courseReservation","getReservationByCourseId","getCourseReservationsForCourse","removeCourseReservationFromList","courseReservations","currentCourseReservation","computeNrOfReservedSeats","nrOfReservedSeats","NrOfPeople","courseSelectionForInvitationModalController","_selectedUsers","userIndex","onCourseEnrolledUsersRetrieve","markNotSelectableUsers","isUpdateAndSendInvitationsButtonDisabled","closeModal","courseSessionFactory","CourseSessionForCourse","UserPresenceToSession","RemoveUserPresenceFromSession","CourseSession","CourseSessionsByCourseId","CourseSessionForToday","saveUserPresenceToSession","removeUserPresenceFromSession","getCourseSessionById","saveCourseSession","getCourseSessionsByCourseId","courseSettingsController","TypeFactory","ListService","_translateChangeSuccessDeregistrationFunction","_targetAudienceDropdownComponent","_usersFromOrganizationsWithAccess","_usersWithAccessDropdownComponent","_onTargetAudienceFromCourseInformationTabSelectDeregistrationFunction","_onTargetAudienceFromCourseInformationTabSelectAllDeregistrationFunction","_onTargetAudienceFromCourseInformationTabUnselectDeregistrationFunction","initOrganizationsItemsForDropdown","isCourseConnectedWithTargetAudiences","CourseTargetAudiences","convertOrganizationsTargetAudiencesToObjects","courseTargetAudiences","existentTargetAudiences","findExistentTargetAudiencesForCurrentOrganization","markExistentItemsAsSelected","markExistentCourseTargetAudiencesForTheAvailableForOrganizations","UsersWithAccess","userWithAccess","markExistentUsersWithAccessToCourse","initUserItemsForOrganization","initOrganizationsWithUsersWithAccess","getUsersFromOrganizationsWithAccessToTheCourse","onOrganizationSelect","availableForOrganizations","addUsersToUsersFromOrganizationsWithAccessList","TargetAudienceAccesses","translateCourseInvitationDispatchModes","courseInvitationDispatchModesCopy","courseInvitationDispatchModes","invitationDispatchMode","realId","invitationDispatchModeOptions","invitationDispatchModes","centralOrganization","mandatory","markCentralOrganizationAsSelectedAndMandatory","isFirstChange","canInvitationDispatchModeOptionsBeDisplayed","Manual","onOrganizationUnselect","unselectedOrganization","removeOrganizationUsersFromUsersFromOrganizationsWithAccessList","removeOrganizationUsersFromUsersWithAccessList","onCourseTargetAudienceSelect","targetAudienceName","accessIndex","addPrimitiveItemIfNotExists","onCourseTargetAudienceUnselect","currentAccess","removePrimitiveItemFromList","canAccessSettingsBeDisplayed","onCourseInvitationDispatchModeSelect","courseInvitationDispatchMode","InvitationDispatchModeOption","onTargetAudiencesDropdownInit","componentReference","canAccessForTargetAudiencesSectionBeDisplayed","canAccessForUsersSectionBeDisplayed","onUserWithAccessSelect","userObject","addItemIfNotExists","onUserWithAccessUnselect","removeItemFromList","canUsersDropdownBeDisplayed","onUsersWithAccessDropdownInit","onLimitedAccessToTargetAudienceChange","onLimitedAccessToUserChange","unsubscribeFromEvents","courseSubjectManagerFactory","CourseSubjectManager","CourseSubjectManagers","saveSubjectManager","subjectManager","getCourseSubjectManagers","courseTargetAudienceFactory","TargetAudienceUsedInAccessForCourseCheck","checkIfTargetAudienceIsUsedInAccessForCourse","coursesController","StatusFactory","StatusService","_courseStatuses","_activeTab","cachedTab","COURSES","createCourse","canNewCourseButtonBeDisplayed","courseStatus","CustomerDeleteController","deleteCustomer","CustomerDeleteConfirmButtonController","CustomerDeleteConfirmFactory","numberOfDeleteRequests","changesObj","currentValue","getNumberOfDeleteRequests","DeleteRequestedCustomers","viewCustomerDeleteRequests","CustomerDeleteConfirmController","getDeleteRequests","handlePassword","goBack","GetNumberOfDeleteRequestsApi","GetDeleteRequestsApi","ConfirmDeleteApi","DeclineDeleteApi","confirmDeleteApiObject","declineDeleteApiObject","isFromOrderWindow","onAfterCustomerSave","onCustomerClose","CustomerController","Patterns","emailRegularExpression","EmailPattern","nrOfContactsOnCustomer","originalCustomer","disableSaveCustomer","MobilePhone","email","isEmailValid","Telefax","nrOfContacts","ContactList","newCustomer","closeCustomer","CustomersController","allCustomers","CustomerNumber","DeviationAuditController","auditCtrl","audit","isModal","DeviationController","EmailSettingsFactory","currentDeviationStatus","deviationCtrl","getDeviationTypeEmailSettings","deviationTypeId","getEmailSettingsForDeviationType","deviationTypeEmailSettings","canSaveDeviation","Improvement","Severity","WhatHappened","ImmediateMeasure","ChanceOfHappeningAgain","Consequence","getDeviationEmailTemplateForAssociatedEntity","templateFor","getAssociatedEntityType","DeviationCustomerTable","DeviationCustomerDefaultTable","showEmailPreview","associatedEntityType","deviationDataForEmail","savedDeviation","closeDeviation","contacts","externalCustomerContacts","ExternalInputEntity","selectedCustomerForExternalInput","officers","projects","orderFreeText","projectFreeText","userFreeText","customerFreeText","objectAssignList","externalInputCustomerFreeText","externalInputCustomers","canGenerateReportButtonBeDisplayed","OrderTable","onSendDeviationDetailsReportThroughEmailClick","SendDeviationDetailsReportThroughEmailResult","typeOfCauses","externalInputEntity","UnhandledNumberOfDays","deviationData","emailSettings","SendEmailForInProcessStatusChange","SendEmailForReadyForClosingStatusChange","SendEmailForClosedStatusChange","IsNotifyingForDeviationStatus","getDeviationData","isSaving","goToOrder","goToProject","setProject","ProjectNumber","clearProject","clearUser","isSearchingForExternalCustomerDropdown","setCustomer","isForExternalInputCustomer","clearCustomer","showInfoFields","onDeviationTypeChange","onAssociatedEntityChange","sendEmail","isNotAssociatedToExistentProject","openContactModal","sendEmailToExternal","MessageToExternalParty","isSentToExternalDisabled","DeviationExternalInputController","getDeviationDetails","originalDeviation","hasDeviationCommentExceededAllowedLength","DeviationListController","DeviationListService","deviationListCtrl","allDeviations","filteredDeviations","deviationDefaultUnhandledNrOfDays","typesPromise","deviations","Title","onStatusTabSelect","statusTabs","activeStatusTab","GetDeviationDefaultUnhandledNrOfDaysResult","activeTypeTab","currentSelectedTab","onTypeTabSelect","selectDeviation","showSearchBar","isDropdown","loggedUserOrganizationId","createNewDeviation","configureEmailSettingsForDeviationType","configureEmailTemplatesForDeviation","hasWarning","daysFromLastUpdate","today","deviationCreatedDate","deviationLastUpdatedDate","isSame","computeDifferenceBetweenTodayAndLastUpdatedDate","getCustomerNameByDeviationTable","numberOfDeviations","deviationListService","ProjectTable","CustomerTable","DeviationEmailController","notificationTypes","emailCtrl","emailMessages","smsMessages","pushMessages","emailReverse","smsReverse","pushReverse","emailPredicate","smsPredicate","pushPredicate","selectedNotification","getRecipients","changeEmailOrder","changeSmsOrder","changePushOrder","viewNotification","isSelectedNotificationAPushNotification","getSelectedNotificationContactName","emails","DeviationExecutionController","executionCtrl","initExecutionForAllProcessLists","hasDeviation","DeviationId","processListLoaded","getSelectedDefaultAnswer","filteredAnswers","printDeviationExecutionDetails","hideExecutionTab","ExternalPartyNotificationConfirmationController","ReportErrorController","handleClick","placeInAppInput","whatHappenedInput","placeInApp","whatHappened","reportedErrorData","startLog","whatHappenedLog","endLog","createLogs","CameraImageItemController","cameraItem","resizeImage","attachmentBytes","currentWidth","currentHeight","resizedSize","widthResized","heightResized","resizedBytes","canvasElement","fillStyle","fillRect","drawImage","imageData","getImageData","putImageData","makeTransparentWhite","getResizedAttachmentBytes","readImageFile","newCameraImage","imageObject","horizontalItemField","createImageObject","bytes","calculateTotalNrOfAttachments","numberOfImages","ProcessListItemAttachments","readAttachmentFile","attachmentToReturn","addImageListsToEventArgs","onImagesUploadedEventArgs","entity","isAfterUpload","IncludedCameraImagesAfterUpload","IncludedCameraImages","CameraImagesAfterUpload","IncludedCameraImagesBeforeUpload","CameraImagesBeforeUpload","addAssociatedEntityType","entityType","imageList","currentImage","openImageGallery","clearFileUpload","isFileEligible","isManagement","addFile","attachmentPromises","imagesSaved","cameraTab","UpdatedImageList","saveImages","attachmentsSaved","IncludedAttachments","saveAttachments","onAttachmentUpload","getAttachmentIcon","deleteImage","listHistory","MultiUserExecutionController","getItemForUser","InitiatedOptions","optionItems","intersectionBy","currentAnswers","showSelectButton","optionItemInitiatedId","showMultiUserAction","userAnswer","lastUpdatedBy","areThereAnswers","checkForMultipleUsers","userHistory","Answer","prepareMultipleUserAnswers","showAlternativeAnswers","isSelectDisabled","selectedAnswer","hasAction","isAnswerAnnet","defaultAnswerInitiatedId","selectAnswer","RiskAnalysisFormController","showRiskForm","riskRowIndex","getNewRiskRowIndex","openRiskRow","riskRow","currentRiskRow","deadline","Deadline","probabilityChoice","consequenceChoice","saveRiskRow","riskRows","ProbabilityOne","ProbabilityTwo","ProbabilityThree","ProbabilityFour","ProbabilityFive","ConsequenceOne","ConsequenceTwo","ConsequenceThree","ConsequenceFour","ConsequenceFive","resetRiskRowValues","setRiskRowValues","disableRiskRow","riskRowDisabled","Case","Measures","Responsability","closeRiskForm","initRiskRows","GdprDeleteConfirmationController","externalSessionModalInstance","handlePasswordDialog","closeExternalSessionModalInstance","enteredPassword","GdprOverviewController","usersWhichRejectedGdprTableVisibility","gdprOverview","toggleUsersWhichRejectedGdprTableVisibility","usersWhichRejectedGdpr","GdprPrivateCustomerController","requestSent","GeneralHelpController","QuickGuideController","UserManualController","LawsAndRegulationsConfigurationController","saveFillData","fields","selectedPdf","pdfs","getFillData","downloadSelectedPdf","saveFillDataAndOpen","LawsAndRegulationsDocumentsController","oldReport","saveEdit","attachmentsToDelete","oldAttachmentIds","newAttachmentIds","getDeletedAttachments","getLawsAndRegulationsReport","pdfSetProjectCustomer","pdfSetProjectOrder","reportElement","externalPdfFiles","linksToBeDownloaded","externalFile","m_Item1","m_Item2","m_Item3","processExternalPdfFiles","addActionToDocuments","attachmentElement","compiledHtml","startEdit","cancelEdit","openFile","parentAttachment","documentFields","fillData","downloadFilledPdf","downloadDocument","riskAnalysisUtilsFactory","isRiskRowInvalid","openRiskHeadModal","RiskAnalysisFactory","RiskHeadsForOrder","RiskHeadsForProject","getRiskHeadsForOrder","getRiskHeadsForProject","navbarNotificationsController","NotificationFactory","CompetenceService","processListTypes","projectDetailsTabSet","closeNotificationMenuEventDeregistrationFunction","_isNotificationListOpened","_notifications","_notificationsSearchResult","computeNrOfNewNotifications","Seen","existsNewNotifications","rootInitiatedId","onTabConfigClearSuccessUnsubscribeFunction","UserTable","OrganizationTable","projectManagementTab","QualityHandbookTable","Archived","openQualityHandbook","isNotificationListOpened","notificationsSearchResult","onAfterShadowLoginSubscription","getNotificationTypeTranslation","onNotificationIconClick","onNotificationClick","retrievedNotification","openNotificationModal","canNewBadgeBeDisplayedForNotification","canNrOfNewNotificationsBadgeBeDisplayed","canMarkNotificationsAsSeenIconBeDisplayed","markAllNotificationsAsSeen","newNotifications","getTranslationForTable","onOpenEntityClick","CompetenceTable","competenceId","openCompetence","DeviationTable","openDeviation","openOrganization","openUser","openCourse","openOrder","getProcessListType","management","openProcessList","WorkingValueTable","rootInitiatedProcessList","openExecutionUsingWorkingValue","InitiatedProcessListTable","openExecution","demoContentFactory","getDemoContentByMenuItemId","menuItems","onDemoContentSaveForMenuItem","menuItemHierarchyController","MenuItemHierarchyService","openMenuItemDemoContentModal","menuItemDemoContent","onDemoContentSavedForMenuItem","menuItemHierarchyService","abortImpersonation","ImpersonateNotificationController","loggedUserName","abort","notificationDetailsController","trustNotificationText","notificationListController","selectNotification","notifyParentComponentAboutNotificationClick","OrderAttachmentController","OrderCameraImagesController","UiTreeHelper","ReportBuilderService","currentExpandedOrderId","isHorizontal","ItemsImages","itemImages","setUrlToImages","sortImages","Questions","Answers","AnotherProcessList","AnotherHorizontalProcessList","addEntityType","objectList","splitImages","checkForCameraImages","show","collapseState","includeImagesInReport","excludedImages","includedImages","existingImage","exludeImagesFromReport","collapse","imageAlign","extractSubOrders","generateFakeImagesForQuestions","generateFakeImagesForHorizontalItemFields","horizontalItems","generateFakeImagesForOrder","ProcessListImage","HorizontalProcessListImage","onIncludedCameraImagesNodeDropped","droppedImage","nodesScope","$id","imagesToSave","onCameraImagesNodeDropped","onAttachmentUploadedInIncludedSection","onAttachmentUploadedInNotIncludedSection","getOrderDetails","collapseOrder","existingOrder","orderReturned","collapseOtherOrders","loaded","cameraImagesTreeOptions","imageDragged","$modelValue","sourceQuestion","destQuestion","extractDroppedImage","includedImagesList","excludedImagesList","includedCameraImagesTreeOptions","answerCameraImageTreeOptions","draggedImage","sourceAnswer","destAnswer","includedAnswerCameraImagesTreeOptions","horizontalCameraImagesTreeOptions","sourceHorizontalItemField","destHorizontalItemField","includedItemsList","excludedItemsList","includedHorizontalItemImages","treeOptions","isDraggingOrder","isDraggingQuestionImage","isDefaultImageDragging","isDraggingAnswerImage","isDraggingItemFieldImage","isOrderDropped","hasNodeChangedIndex","isImageDropped","extractQuestion","extractAnswer","extractItemField","HasPageBreak","excludeAllImagesFromReport","horizontalItemImages","imagesToUpdate","includeAllImagesInReport","imageHoverIn","hover","imageHoverOut","makeImageFullSize","OriginalSize","previewImageSize","setImageSize","showUploadPictureOnAllPointsButton","onOrderIncludeReportChange","saveImage","disableButton","toggleVisibilityForProcessList","parentAnswer","$parentNodesScope","isSource","CordelSendGetController","canSync","isPost","sync","operation","orderToSave","orderIdSaved","OrderMaterialController","itemAll","selectedProductColumnType","productColumnTypes","getSelectedProductColumnType","selectProductColumnType","productColumnType","onProductDescriptionChange","newMaterial","addNewMaterial","MaterialSheetDate","Quantity","Products","nrf","ProductNumber","setCurrentProduct","selectProductIfExactNrfWasTyped","saveNewMaterial","TaskNumber","Price","isMaterialModalDisabled","Officers","onOrderExpand","onChildOrderBackClick","onIncludeDeactivatedSubOrdersChangeFromChild","orderLeftMenuHierarchyController","OrderLeftMenuHierarchyService","isVisible","toggleSubOrdersSectionForOrder","expandedOrder","selectOrder","canOrderBeDisplayed","onOrderVisibleInAppClick","handleOrderVisibleInAppClick","onChildOrderExpand","isScoped","hideSubOrders","onChildOrderBackClicked","handleChildOrderBackClick","showSubOrders","canBackButtonBeDisplayed","onIncludeDeactivatedSubOrdersChanged","getNrOfSubOrders","orderLeftMenuHierarchyService","OrderListController","allOrders","defaultParticipant","wasSearchParameterSent","Participant","selectedParticipant","externalId","showErrDate","searchDate","checkDate","showErrDateToPastFrom","newOrder","syncNewOrder","cordelNewOrderExternalId","hideNewOrderSync","cordelSyncAnim","showCordelSync","showNewOrderSync","cacheSelectedParticipant","clearCachedParticipant","canDisplayOrder","canDisplayMessageRelatedToOrders","subject","indexOfTheFirstCompletedOrder","indexOfTheFirstInactiveOrder","existsCompletedOrders","existsDeactivatedOrders","toggleOrderCheckboxFilters","checkboxFilter","orderListTypes","ActiveTab","orderProgressBarController","OrderProgressBarService","_orderProgress","computeOrderProgress","previousValue","getOrderProgress","reopenOrderCallback","VBOrderStatusController","cordelStatus","GetCordelDoneStatusResult","OrderParticipantController","ParticipantDatesFactory","addParticipantMessageShown","changeDateMessageShown","getTasksBetweenOrderDates","toggleOldPersonnel","reloadProject","askUserToConfirmRemoveConnectWithPlanner","areTasksAssociatedWithTheOrder","checkIfUserIsBusy","expandParticipant","markParticipantAsEdited","getTasksBetweenMinAndMaxDatesOfParticipantDates","minAndMaxDates","getMinAndMaxDatesFromParticipantDates","getTasksBetweenDatesForParticipant","minStartDate","maxEndDate","periodiseringInfo","getParticipantDatesListForParticipant","participantDates","onParticipantDatesDelete","onParticipantDatesChange","onNewParticipantDatesDelete","onParticipantDatesRetrieve","moreThan1Participant","existingParticipant","Edit","isExpanded","newParticipant","toggleParticipantDropdown","switchMainResponsibility","existMainResponsibility","MainResponsibility","switchParticipantFinished","userBusyError","getParticipantsForDisplay","setActiveStatus","setActiveStatusForParticipant","showBusyHeader","participantsTasks","concatParticipantsTasks","isUserBusy","skipPeriodiseringAlert","onConnectToPlannerChange","SetActiveStatusApi","ParticipantsRetrieveApi","ParticipantsModifyApi","activeStatusApiObject","participantsApiObject","participantService","OrderReportBuilderController","ParticipantResourcePlannerController","ParticipantResourcePlannerPanelService","navigation","cancelCurrentDateInterval","setStartAndEndHours","unassignUserFromOrder","setActiveStatusForUser","addUserAsParticipant","setTodaysDate","isInit","participantUser","IsAssignedToOrder","associateCurrentOrderWithTasks","prepareTaskForDetails","panelLoading","resourcePlannerStatuses","NOT_INITIATED","INITIATED","resourcePlannerStatus","orderListPanel","userListPanel","taskDetailsPanel","assignUserToOrder","checkUser","notGetTasks","initParticipantResourcePlanner","removeAllTasks","areThereTasks","toggleOrdersPanel","toggleUserListPanel","toggleTaskDetailsPanel","getCurrentState","getStates","CLOSED","processDatesForOrder","getParticipantsForCurrentOrder","resetScroll","toggleFullDayFormat","showCollapsedButton","selectOrdersForTimeline","collpaseUserList","userListElement","userFullNameElement","overviewGrid","resizeOverviewToFit","toggleCreateOrderTimeline","OrderRiskAnalysisController","selectedRiskHeadId","riskHeads","createNewRiskHead","goToRiskHeadDetails","riskHeadId","simpleChanges","isEqual","RiskCount","OrderTripController","orderTrips","OrderTrips","getTripsForDisplay","addNewTrip","getAllTrips","setTrip","clearTrip","saveNewTrip","OrderWorkingHourController","decreaseQuantity","quantity","parsedQuantity","parseFloat","newWorkingHour","OrderWorkingHour","increaseQuantity","workingHourUsers","orderWorkingHours","addNewWorkingHour","isNewWorkingHour","IsTotal","workingHourCategories","showNewWorkingHourRestriction","newWorkingHourDisabled","isWorkingHourFormInvalid","newWorkingHourDateIsInvalid","saveNewWorkingHour","newUser","WorkingHourCategory","TaskId","totalRow","userTotalRow","wh","toFixed","minute","actualDate","CompanyInfoController","oIndex","uIndex","checkUsers","onUserMatchSelect","owner","checkIfOwnerIsAlreadySet","ownersName","getOrganizationOwnersName","setOwner","OrganizationCustomerNotificationController","getCustomerNotificationInfo","customerNotification","viewCustomersWithoutEmailTable","customersWithoutEmail","showWarningAboutSendingEmails","customersWithoutOrdersTableVisibility","toggleCustomersWithoutEmailTable","goToCustomer","notifyCustomers","previewCustomerNotification","Content","toggleCustomersWithoutOrdersTableVisibility","customersWithoutOrders","DepartmentController","departmentModal","departmentPredicate","departmentReverse","departments","changeDepartmentSorting","openDepartmentModal","closeDepartmentModal","DidacUserMappingController","getUnmappedUsers","unmappedUsers","companies","mapUser","OrganizationChartController","userEditedSubscription","organizationEditedSubscription","showChart","checkLocation","onOrganizationChartReady","onDelete","OrganizationPermanentDeleteController","showPasswordInput","deletePassword","askForPassword","isConfirmDisabled","getOrganizationName","organizationName","transclude","hideDropdown","OrganizationDropdownController","selectOrganization","contentLoaded","showDropdown","showNotAllowedMessage","reqestAccessForCompany","OrganizationsController","allOrganizations","setCordelApiColor","endpoint","ApiURL","ApiKey","cordelApiColor","openCategorySettingsModal","openDataDetailsAttachmentOptions","openDidacUserModal","OrganizationNotificationTemplateController","textAngularManager","focusEditor","editorName","footerEditor","retrieveEditor","displayElements","headerOpen","footerOpen","trustText","toggleHeader","toggleFooter","PackingSlipMappingController","packingSlipCtrl","supplier","packingSlips","suppliers","saveMapping","getDeliveryRecipientByCustomerNumber","unmappedPackingSlips","packingSlip","PackingSlips","Advice","OrderReference","DeliveryRecipient","DespatchAdviceRecipient","onPackingSlipSupplierChange","onSearchSubmit","CategorySettingsController","categoryCtrl","filterText","toggleSearchInput","showSearchInput","toggleCategorySetting","filterCategories","saveCategories","OrganizationSettingsController","MandatoryNotificationTypesList","IsAutomileEnabled","getLoggedUserLanguage","OrganizationSettings","OrganizationSettingTypes","saveOrganizationSettingTypes","isVbOrganization","isVBCustomer","organizationSettingTypesApiObject","centralApprovalItemService","CentralApprovalItemTypeDropdownController","itemTypeCtrl","onVariableClick","sharedObject","v","DeviationTemplateController","deviationTemplateCtrl","showKeepAndUpdateButton","onKeepAndUpdateChange","KeepAndUpdate","saveDeviationTemplate","processKeepAndUpdateButton","deviationDropdownCtrl","setDefaultVariables","HideVariable","HasNavigation","showBackButton","previousProcessListItems","variableToAdd","SubVariables","setProcessListItemsVariables","optionItemService","ProcessListActions","ProcessListController","onNavigationModeChange","goToProcesslist","changeProcessListType","removeClass","canShowManagementButton","hideNewButton","newButtonHidden","hButtonVisible","vButtonVisible","mButtonVisible","closeButtonVisible","showNewButton","selectedOrganizations","PublicOrganizationsExceptionController","organizationSearchText","existingOrganization","oo","initSelectedOrganizations","addOrganization","removeOrganization","getAvailableOrganizations","progressPlanChildRow","createContent","getAllOrdersWithThisStartDate","projectOrders","projectStartDate","projectYear","selectedProjectStartDate","selectedProjectEndDate","selectedProjectData","projectNecessaryData","oldStartDate","projectData","extractNecessaryData","ProjectProgressPlanController","ProgressPlanFactory","getProgressPlanById","progressPlanId","selectedProgressPlan","Revision","saveProgressPlanReport","saveProgressPlan","SaveProgressPlanResult","onProgressPlanActiveChanged","progressPlan","updateProgressPlanState","ProgressPlans","ProgressPlanModify","ProgressPlanRetrieve","ProgressPlanState","getProgressPlanList","isActive","progressPlanMainRow","registerClickEventListenerFn","rowCollapsed","rowId","selectedRowId","rowWithTheSameId","rowList","currentRowElement","getRowWithTheSameId","parentElement","rowElement","hasClass","iconElement","toggleChevron","ProjectProgressPlanListController","progressPlans","projectUsers","onlyRender","ProjectChartController","onRefreshAndSnapshot","uniqueId","ceos","projectChartContainer","scrollX","scrollY","chartData","uu","Manager","ceo","manager","splitUsers","existsPreviousUser","currentUserIndex","previousUser","existsNextUser","nextUser","projectRiskAnalysisController","RiskAnalysisUtilsFactory","ProjectDocumentationController","projectDocCtrl","setProjectOrganization","projectStatuses","participantFilter","mainOrders","syncDescriptionWithMainOrder","setDisplayNameForOrder","setStatus","ProjectManager","processOrderParticipants","executionItem","projectAttachments","getUsersFromParticipants","skipBroadcast","GetProjectStatusesResult","forSave","formatDatesForSave","OfferDate","offerDate","ContractSigned","contractSigned","PaymentDeadline","paymentDeadline","promiseLeftMenuCategories","clearStatus","setProjectManager","clearProjectManager","getMainProjectOrders","setMainProjectOrder","clearMainProjectOrder","setInvoiceCustomer","clearInvoiceCustomer","syncDescriptionWithOrder","ProjectLeftMenuController","projectLeftMenuCtrl","registerSearchBoxComponent","toggleCategoryMenuItem","categoryToAdd","getNumberOfProcessLists","getNumberOfProcessListsOnCategory","showNewTab","openAddCategoryAttachmentModal","selectedCategory","getCategoryAttachments","CategoryAttachments","getSelectedDeviationStatus","selectDeviationStatus","newTab","AttachmentsCollapsed","lawsMenu","ctrl","ProjectListController","projectListCtrl","allProjects","selectedStatusId","currentSecondLevelSelectedTab","onTabChange","onSecondLevelTablChange","ProjectManagementController","projectManagementCtrl","readFile","projectAttachmentsCollapsed","availableCategoryExecutions","executionsToSave","projectFileUpload","anyManagementProcessList","removeProcessList","CreateManagementExecutionResult","collapseCategoryAttachments","clearAttachments","getProjectCategoryAttachments","filePromises","clearAttachmentsForProject","collapseProjectAttachments","addAttachmentsForProject","saveProjectAttachments","deleteProjectAttachment","managementTreeOptions","executionList","ProjectReportBuilderController","projectReportCtrl","isReportTabSelected","CentralApprovalExecutionController","initCentralApprovalVariables","CentralApproval","UsernameAndPasswordDisabled","MultipleChoiceInput","MultipleChoiceComment","ProjectReferences","ProjectReferenceLoaded","CompanyPrimaryContactLoaded","MultipleChoiceHeaderComment","CompanyInfoDetailedLoaded","onChoiceSelectForVariables","PrimaryContact","FullNameChanged","PhoneChanged","EmailChanged","propertiesToKeep","Experience","FieldOfStudy","KindOfBuilding","Completion","Municipality","Gnr","Bnr","Fnr","WorkedFor","WhatDidYouDo","NameOfTheEmployee","NameOfTheCompany","SeekLiabilityYes","SeekLiabilityNo","multipleChoiceHeaderCommentSet","getJumpToStepQuestionName","shouldShowForCentralApproval","actionType","getRevisionData","RevisionData","checkIfItHasEducation","education","Competences","getUsersCompetence","educationLevels","properties","customProperties","ExperienceInMilliseconds","Years","years","Months","QualityChapterController","Fullscreen","$anchorScroll","qualityChapterCtrl","onExecutionManagementControllerDestroySubscription","onCentralApprovalExecutionControllerDestroySubscription","onExecutionHorizontalControllerDestroySubscription","onFullScreenChange","isEnabled","maximize","updateExecution","hide","isExecutionStarted","getChapterInitiatedProcessListId","toggleMaximize","resumeChapterIfNeeded","hideProgress","archivedChapter","isPersonalHandbook","qualityHandbookType","QualityHandbookArchiveController","qualityArchiveCtrl","archivedQualityHandbookId","QualityHandbookLeftMenuController","qualityLeftMenuCtrl","oldOrganizationId","getQualityHandbookProcessListsByOrganizationId","qualityManagement","QualityHandbookViewController","qualityViewCtrl","chapterModalInstance","getSignature","usersWhoSigned","hasSigned","markUsersWhoSignedForQualityHandbook","getUsersDropdown","uniqBy","addUsersFullName","selectedChapter","isUserDropdownOpen","userChapter","SignDate","getLastRevisionOfQualityHandbook","RevisionDate","onQualityHandbookTypeSelect","signAllPreviouslyRevised","showGoBackToCreatorButton","showQualityHandbookCreator","viewChapter","showSignature","agreeChapter","chapterToSign","Sign","reinit","canUserSign","openUsersDropdown","setCurrentUser","QualityHandbookTemplateController","qualityTemplateController","frontPage","footer","toggleEditMode","IntranettLoginController","closeExternalModal","SessionExternalController","createdSession","VBIntranetPopupController","accessToken","intranetSession","getIntranetUrl","trustAsResourceUrl","MeetingConfirmationController","isDeclined","createLoginSession","ResourcePlannerSettingsController","makeSortNumberInteger","refreshTimes","overviews","groupViews","resourcePlannerSettings","getRefreshTimes","getOverviews","saveResourcePlannerSettings","resourcePlannerSettingsFactory","RefreshTimesApi","OverviewsApi","ResourcePlannerSettingsModifyApi","ResourcePlannerSettingsRetrieveApi","setPositionForTask","render","overview","dayArray","participantPlanner","ResourcePlannerTaskTimelineController","timelineTask","clearTimelineTask","hasStartedTimeline","timelinedTasks","usersWithTimelinedTasks","isCutAction","isCreateOrderAction","getNameForTask","getForeignKey","getHour","xCoordinate","relativeXCoordinate","startDayIndex","startHourCoordinates","hourCoordinate","currentTarget","hourWidth","dayWidth","onkeydown","keyCode","helperTextCoordinates","initHelperTextPosition","clientX","onMouseHoldTimeline","yCoordinate","clientY","userElement","millisecond","userScope","ColorSetting","OriginalOrder","OriginalTask","Action","getTaskToCreate","timelinedTask","onMouseReleaseTimeline","removeTimelinedTask","getTaskMainOrderId","saveTasks","showConfirmButton","ResourcePlannerDayController","TaskListService","lastWidth","hoursGrid","overlayedTasks","usersList","usersTasks","currentDatePromise","currentDateElement","yesterdayDate","generateHourGrid","setWidthOfElements","minWidth","grids","getYCoordinate","scrollTaskList","setStartAndEndDate","outOfBoundaries","targetElement","getAttribute","topY","nrOfLines","bottomY","onStartEvent","onResizeMove","deltaRect","rect","webkitTransform","taskWidth","hourStartResized","hourEndResized","onEndEvent","transition","msTransform","onDragMove","dx","dy","end","getPosition","canResizeToLeft","canDrag","canResizeToRight","resetUserDropzone","border","borderBottom","handleScrollWheel","wheelDelta","detail","zoomIn","zoomOut","getContextMenuForTask","setGridHeight","hourStart","isTaskPrivate","nextDay","lastDay","openTaskPanel","onDoubleClick","constructor","onMouseOver","initElement","resizable","preserveAspectRatio","edges","snap","targets","createSnapGrid","invert","draggable","autoScroll","enabled","hourEnd","inactiveTask","onDropInactiveTaskOnGrid","currentNavigationModeStartDate","currentNavDifference","taskDates","onDropNormalTaskOnGrid","ondragenter","onDragEnterInactiveTask","ondragleave","onDragLeaveInactiveTask","ondropdeactivate","ondropactivate","currentDate","finishedRender","lastTask","userLooped","onGetTasksForSelectedUsersResolvedSubscription","unset","ResourcePlannerMonthController","generateMonthDays","numberOfDays","dayGridLines","getDayNumberInGrid","setHourWidth","endDayIndex","startTask","endTask","xStart","resourcePlannerOverviewElement","lastMonth","nextMonth","ResourcePlannerWeekController","generateWeek","getStartWeekNumber","getEndWeekNumber","isStartDateInDayRange","isEndDateInDayRange","isWorkingHour","nextWeek","lastWeek","ResourcePlannerWorkingDaysController","generateWorkingDays","getYear","startedCreating","clickedHour","newTask","isDummy","onGridClick","cameFromTask","ResourcePlannerInactiveTasksController","selectedTask","allRPTasks","onDragStart","onDragEnd","removeAttr","initElements","manualStart","pointerIsDown","interacting","original","elementWidth","elementHeight","interactable","extractUserIds","resourcePlannerTasks","mergeUsersTasksToList","selectedUsersList","currentSelectedUser","mergeWithCurrentUserTasks","inactivePopupInfo","inactiveTaskContextOptions","onSearch","isForRpTasks","retrievedTasksLength","originalTasks","getInactiveTaskUserName","getInactiveTaskCustomerName","getInactiveTaskTag","getInactiveTaskAddress","onMouseOverRpTask","rpTaskPopupInfo","onDoubleClickOnRpTask","switchOffLess","checkboxToExclude","getTaskUserName","assignedUser","getRPTasksForSelectedUsers","assignedToUser","findAssignedToUser","inactiveSearch","returnArray","searchTextSplit","count","ResourcePlannerTaskController","hasAlreadyAnsweredForEndDateGreater","originalEndDate","taskTypes","dayExists","freeDays","freeDay","getFreeDays","parentStartDate","parentEndDate","firstChildStartDate","lastChildEndDate","calculateFreeDays","TableToSet","ForeignKeyToSet","addedParticipantTasks","removedParticipants","participantTask","UserCategory","saveUserMeeting","getOrganizationForTaskType","UsersName","isTypeOpen","showTypeModal","typeToEdit","toggleTypeDropdown","getFreeDayText","colorToSave","setCurrentTaskType","DisplayName","addUserToTask","markedAsInactive","IsSelected","IsBusy","checkBusyOnChange","clearUsers","isTaskVisible","isPrivateCheckVisible","currentStartDate","currentEndDate","childTask","goToForeignKey","ParentForeignKey","getTaskName","getTypeName","showTypeInput","onStatusChange","newEndDateValue","showBusy","returnedUser","getTooltipValue","isStartDateChanging","selectedDateDay","getUTCDate","selectedDateMonth","getUTCMonth","selectedDateYear","getUTCFullYear","changedDate","getTaskOrderAddress","appDemoContentSettingsTabController","_appMenuItems","demoContentSettingsController","routeAllAccessMap","route","LawsAndRegulations","Risk","ResourcePlanner","QuickGuide","UserManual","GeneralHelp","OrderHourReport","HourReport","DeviationReport","ProjectProgressReport","UsageReport","ActiveUsersReport","accessibleRoutesForAVbOrganizationWithoutALicense","create","middleManager","new","sent","withdrawFromCourse","gtin","centralApproval","personalHandbook","DeviationInternalTable","OrderEventTable","ManagementProcessListEventTable","DeviationEventTable","ProcessListEventTable","QualityHandbookEventTable","CourseEventTable","CompetenceEventTable","identification","groupSettings","horizontal","notAUser","courseHolder","adminAll","userAll","closeNotificationMenuOnClick","navbarNotificationsContainer","closest","notificationModalContainer","innerHtmlToText","elementText","itemsList","multiSelect","hasHeaders","selectedProperties","onItemUnselect","messageForMandatoryItem","supportsAddEdit","onItemAdd","onItemEdit","onMultiSelectItemEdit","addItemTooltipMessage","editItemTooltipMessage","initiallySelectedItem","onComponentInit","onSearchTextChange","noDataMessage","onSelectAllItems","VBDropdownController","DropdownService","getSelectionString","getDisplayText","textToReturn","notifyParentComponentAboutSearchTextChange","manageInitiallySelectedItem","selectedText","notifyParentComponentAboutAllItemsSelection","addNewItem","editItem","editMultiSelectItem","isEditItemDisabled","onItemReselected","getCheckedItems","onSearchTextChanged","onClearSearchText","getItemTooltip","itemText","getNoDataMessage","onSelectAllClick","filteredItems","selectItem","selectAllItems","onClearClick","clearSelectionForItems","getItemFromListById","fromChb","isFromSelectAll","unselectedItem","dropdownService","itemsFromHeaders","allItems","onConfirm","listService","existentItems","propertyToCheck","currentItem","existentItem","itemFound","primitiveItem","modalService","htmlComponent","modalSize","saveType","groupService","UserDetailsController","businessRoleCategories","userOriginal","businessRoleModal","appRights","webRights","Supervisors","Supervisor","getSupervisorsName","oldUserName","setDefaultWebRights","showPasswordFields","onBusinessRoleChange","isDirty","supervisors","initalizeDataDetailsTabs","checkUsersAccessAndNavigate","fixDate","managers","checkBusinessRole","businessRoleNameError","businessRoleCEOError","nrAparition","closeUser","keyPressed","isFormValid","showChangePass","checkConfirmedPassword","checkPasswordSameAsUsername","Department","userForm","showErrOrganization","showBusinessRoleModal","businessRoleParents","toggleChangePassword","disabledSaveBusinessRole","roleForm","$error","required","userNamePattern","rightChanged","resetOrders","setSupervisor","supervisor","removeManagerFromSupervisors","managerId","initiateDate","addDepartment","removeDepartment","changeRightState","unregisterUser","UserListController","companyHasAutomile","ExternalId","AutomileConnected","getCurrentOrganization","expandableRows","selectableRows","useMaxHeight","onUserClick","extraColumns","_areAllUsersSelected","canUserBeSelected","notifyParentComponentAboutUserClick","areAllUsersSelected","onUserClicked","onExpandToggle","onSelectAllUsersClick","markAllUsers","canSelectAllUsersCheckboxBeDisplayed","tabUtilService","configuration","tabConfiguration","existingConfiguration","pageConfig","reader","FileReader","onError","onprogress","total","onProgress","getReader","readAsDataURL","checkIfDataDetailExist","DataDetailsItemController","onFormInitialized","courseAgendaDetailsController","agendaDetailsForm","courseAgendas","toggleAgenda","courseAgendaDetailsForm","saveAgenda","courseDayHoursService","hoursList","StartTime","EndTime","isStartTimeGreaterThanEndTime","deactivateHoursFromList","onEnrollClick","courseDayListController","toggleDay","notifyParentComponentAboutEnrollClick","timeIntervalTab","agendaTab","locationTab","attachmentsTab","participantsTab","invitationConfigurationTab","enrolledUsersTab","sessionsTab","settingsTab","courseDetailsAgendaTabController","CourseAgendaFactory","_agendas","agendas","courseDetailsAttachmentsTabReadonlyController","_courseAttachments","courseAttachments","courseDetailsInformationTabController","CourseSubjectManagerFactory","CourseTargetAudienceFactory","_intranettPositions","_targetAudienceSearchText","_translationChangeSuccessDeregistrationFunction","courseCategories","targetAudiences","courseSubjectManagers","SubjectManagers","openSubjectManagerModal","openTypeModal","saveDelegate","targetAudiencesObjects","translateObjects","courseTypesCopy","courseStatusesCopy","courseTypes","canNrOfParticipantsFieldBeDisplayed","canLocationFieldBeDisplayed","onCourseCategorySelect","onCourseCategoryAdd","onCourseCategoryEdit","onCourseKeywordsChange","courseKeywords","Keywords","KeywordsList","onCourseTargetAudienceChange","targetAudienceObject","onCourseTargetAudienceAdd","onCourseTargetAudienceEdit","onCourseSubjectManagerChange","courseSubjectManager","onCourseSubjectManagerAdd","onCourseSubjectManagerEdit","courseTargetAudienceObject","CheckIfTargetAudienceIsUsedInAccessForCourseResult","currentTargetAudience","onCourseSubjectManagerUnselect","initTargetAudienceDropdownReference","onTargetAudienceSearchTextChange","onCourseTypeSelect","onCourseStatusSelect","onCourseOrganizerChange","courseOrganizer","Organizer","canCancellationDeadlineFieldBeDisplayed","onSelectAllTargetAudiences","courseDetailsInformationTabReadonlyController","getCourseTypeTranslation","getCourseStatusTranslation","getAccommodationTextValue","Accommodation","courseDetailsLocationTabController","CountryFactory","CourseLocationFactory","getCourseLocation","countries","norway","country","CountryIsoCode","courseDetailsLocationTabReadonlyController","courseDetailsNotificationsSentTabController","_notificationMessages","notificationMessages","courseDetailsSessionsTabController","_courseSessions","courseSessions","onViewSessionClick","onDateIntervalChange","courseDetailsTimeIntervalTabController","CourseDayFactory","_daysFromCourseDateInterval","_previousStartDate","_previousEndDate","showCourseIntervalChangeWarning","checkItRepeatsDailySetting","checkIsSpanningSeveralDaysSetting","notifyParentComponentAboutDateIntervalChange","markExistentCourseDaysAsSelected","isEnrollButtonDisabledForDay","daysFromCourseDateInterval","getCourseDays","getDaysFromCourseDateInterval","onCourseStartDateChange","isAtLeastOneCourseDayOutOfTheCourseDateInterval","removeCourseDaysNotPresentInCourseDateInterval","onCourseEndDateChange","openEnrollmentModal","Enrollments","enrollmentFound","enrollment","indexOfLoggedUserEnrollment","onDaySelectionToggle","daysNotPresentInCourseDateInterval","getDaysNotPresentInCourseDateInterval","removedDay","openCourseDayUnselectWarning","onDaysSelectionToggle","selection","openCourseDaysUnselectWarning","getTooltipMessageForEnrollButton","courseDetailsTimeIntervalTabService","_daysNotPresentInCourseDateInterval","getTimeFromDate","setTimeForDate","momentDate","setCourseDatesToToday","startDateTime","endDateTime","existsAtLeastOneDayOutOfTheCourseDateInterval","dayIndexInDaysNotPresentInCourseDateInterval","notPresentDay","courseDetailsTimeIntervalTabReadonlyController","_courseDays","getDateFormat","enrolledUsersSelectionForDiplomaModalController","_selectedEnrolledUsers","isGenerateDiplomaForSelectedUsersButtonDisabled","generateDiplomaForSelectedUsers","GenerateDiplomaForUsersResult","computePriceForEnrollment","price","CostWithAccommodation","CostWithoutAccommodation","onAccommodationChange","courseOthersEnrollmentModalController","courseEnrollmentOptions","CourseReservationFactory","CourseReservationService","_showOptionInfoMessage","_allAlreadyEnrolledUsers","_allUsers","_selectedOrganizationsIds","_initiallySelectedOrganization","_nrOfReservedSeatsForCourse","_courseReservations","getUsersFromSelectedOrganization","cacheAlreadyEnrolledUsers","currentOrgId","isNrOfPeopleValueTooBig","computeReservationPrice","nrOfPeople","showOptionInfoMessage","initiallySelectedOrganization","reserveOption","getCourseEnrollmentOptions","getOptionInfoMessage","continueEnrollmentOption","getReservationNotificationMessage","canReservationNotificationBeDisplayed","onNrOfPeopleChange","computePriceForEnrolledUsers","enrollments","onAllOrganizationsSelect","courseUserEnrollmentModalController","canInfoMessageBeDisplayed","canEnroll","saveCourseEnrollment","canCourseEnrollmentDetailsFormBeDisplayed","courseSessionDetailsController","courseSessionDetailsTabsetTabs","courseInformationTab","_courseSessionId","_courseSession","_course","_usersPresentToSession","_courseAgendaDetailsForm","_dayOfTheSession","dayOfTheSession","onEnrolledUsersRetrieve","goBackToCourseDetails","getClassesForAgendaTab","onViewSessionClicked","notifyParentComponentAboutViewSessionClick","onFormInit","courseSubjectManagerDetailsController","subjectManagerDetailsForm","courseSubjectManagerModalController","onSubjectManagerDetailsFormInit","CustomerTabsetController","customerPromise","contactsUpdated","customerModal","isCustomerUpdating","justAdded","getContact","ordersForCustomer","setNewContact","statusDropdown","EmailTemplatesForDeviation","DeviationEmailTemplate","DeviationEmailTemplateFor","getTemplateVariables","hashtag","firstLetter","getEmailTemplatesForDeviation","saveDeviationEmailTemplate","deviationEmailTemplate","fillAttachmentId","LawsAndRegulationsOpenFileController","isGetFilledDisabled","getRegularFile","getFilledFile","showOrderDropdown","setOrderForInputsOfTypeOrder","RiskAnalysisController","allRiskHeads","riskAnalysis","navigateTo","saveRiskAnalysisDelegate","RiskHeadController","RiskHeadService","riskAnalysisIntellisense","canProcessListDropdownBeDisplayed","canDisableButtonBeDisplayed","setRiskHeadOrganization","openRiskRowModal","riskRowModal","setCurrentFreeText","objectFound","preSelectAssociatedObject","currentData","changeRiskHeadType","processListName","ProcessListName","processListFiltered","resetProcessList","hasProcessListId","showRiskRowsTable","closeRiskAnalysis","disableRiskAnalysis","IsFromExecution","riskHeadService","saveRisk","onRiskHeadClick","riskHeadsController","RiskHeadsService","onRiskHeadClicked","getExecutedForNameByTable","riskHeadsService","RiskRowModalController","riskRowStatusList","saveCurrentRiskRow","saveDemoContent","VideoTitle","demoContentDetailsController","DemoContentFactory","orderProgressBarService","orderProgress","executionItems","orderNumber","currentSubOrderProgress","onDatesChange","participantDatesController","notifyListenersForChange","initParticipantDates","addNewDateLine","isNewButtonDisabled","deleteParticipantDates","deleteParticipantDatesById","onStartDateChange","participantDate","startDateMoment","endDateMoment","endDateHourBeforeChange","endDateMinuteBeforeChange","onEndDateChange","canDeleteIconBeDisplayedForDateLine","participantDatesFactory","ParticipantDatesListForParticipant","DeleteParticipantDatesById","participantDatesId","participantDatesService","convertParticipantDatesListToNormalDates","datesList","configured","datess","uncompletedDateLine","participantDatesList","startDatesList","endDatesList","ParticipantResourcePlannerDayController","userTaskListElement","minimumWidth","oldHourLineElement","generateGrid","initTask","maxWidth","resizeToFit","overviewCurrentWidth","initCurrentDate","resetDropzone","createTaskAndCheckUser","ParticipantActive","getOrderIdsFromTask","returnedTasks","getStartAndEndHoursFortheDay","createTaskForMainOrder","createTaskForSubOrder","noDelete","processTaskForResize","onDropOrder","processTaskForDrop","hightlightDropzone","onDragEnterOrder","onDragLeaveOrder","onDropDeactivateOrder","ondropmove","hourLineElement","onDropMove","getBorderValue","ParticipantResourcePlannerMonthController","ParticipantResourcePlannerWeekController","monday","ParticipantResourcePlannerWorkingDaysController","ResourcePlannerOrderListController","initOrderElements","onOrderClick","isSaveSelectedOrdersDisabled","saveSelectedOrders","selectedOrders","tasksToCreate","taskToCreate","fromSave","intersectionWith","getOrderId","getCustomerName","getOrderColor","hasStartAndEndDate","getStartDate","getEndDate","ResourcePlannerPanelController","panel","OPEN","bindToContoller","states","currentState","ResourcePlannerUserListController","participantSearch","addUser","onParticipantSearchChange","firstName","lastName","notificationSettingsService","findMandatoryNotificationTypeObjectByTable","mandatoryNotificationTypes","addNotificationSettingIfNotExists","notificationSetting","splitMandatoryNotificationTypes","mandatoryNotificationTypesPerTable","orderNotificationTypes","managementProcessListNotificationTypes","deviationNotificationTypes","processListNotificationTypes","qualityHandbookNotificationTypes","courseNotificationTypes","competenceNotificationTypes","notificationTypesForOrder","notificationTypesForManagementProcessList","notificationTypesForDeviation","notificationTypesForProcessList","notificationTypesForQualityHandbook","notificationTypesForCourse","notificationTypesForCompetence","organizationNotificationSettingsTabController","NotificationSettingsService","notificationSettingsTabSet","orderTab","managementProcessListTab","deviationTab","processListTab","qualityHandbookTab","courseTab","competenceTab","onNotificationSettingChange","companySettingsController","initSalaryPeriodIntervalDates","UseSalaryPeriod","alertUserForSupport","reportLogos","onSalaryPeriodFromChange","onSalaryPeriodToChange","onIsCentralAllowedToViewChange","onAllowImpersonateChange","onOrganizationSettingsTypeChange","addReportLogo","setReportLogo","logo","ReportLogo","ReportLogoUploadController","addImage","CategoryAddAttachmentController","categoryAttachmentCtrl","ProjectProcessListController","processListCtrl","saveExecutionOnExit","showEditProcessListButton","deactiveExecution","CategoryReportBuilderController","categoryReportCtrl","collapseCategory","showFileIcon","includedAttachmentsTreeOptions","sourceCategory","destCategory","excludedAttachmentsTreeOptions","excludeAllAttachments","ExcludedAttachments","includeAllAttachments","isExcludeButtonDisabled","isIncludeButtonDisabled","checkForAttachments","ProcessListReportBuilderController","collapseProcessList","attachmentsTreeOptions","modalScope","$new","onIncludeInReportChange","showQuestionImagesContainer","processListManagement","PointSettingsController","CentralApprovalViewController","centralViewCtrl","centralTemplate","FrontPage","centralApprovalViewList","listLoaded","printDelegate","generateFullHTMLDocument","processOrganizationChart","organizationChart","organizationChartsHtml","printMode","getCompanyInfo","CompanyInfo","getPrimaryContact","getFormattedExperienceTotal","ChapterViewController","chapterViewCtrl","labelName","readonly","additionalClasses","onDateChanged","inputName","keywordsController","addKeywordToListIfNotExists","keyword","trimmedKeyword","onKeyPress","code","onBlur","onSaveContentClick","onCancelContentClick","_originalContent","insertVariable","onSaveContentClicked","onCancelContentClicked","propertyToDisplay","getItemsAsync","onMatchSelect","searchableDropdownController","getItems","onMatchSelected","matchModel","hideLabel","registered","canceled","coursesOverview","myCourses","relevantCourses","sms","vertical","coursesAndCompetencesController","getActiveTab","getCoursesAndCompetencesTabset","canMyCoursesTabBeDisplayed","UserAccessController","selectedOrganizationAccess","SelectedUserId","existingOrganizationUsers","isOkAccessDisabled","Selected","updateExistingUserWithShadow","createANewShadowUser","UserImpersonateController","showAskUserDialog","isBetween","handleImpersonation","UserIntranettController","intranettInfo","UserSettingsController","userSettingsTabSet","userSettingsTab","notificationSettingsTab","isLoggedUser","UserSettingsApi","clickableItems","onCourseAgendaItemClick","showActiveTooltip","onItemActiveClick","courseAgendaItemListController","onCourseAgendaItemClicked","notifyParentComponentAboutItemClick","getActiveTooltipMessage","onItemActiveClicked","notifyParentComponentAboutItemActiveClick","courseAgendaItemsController","isSavingAgendaItem","currentAgendaItem","isSavingAgendaItemInProcess","addAgendaItem","editAgendaItem","cancelSaving","confirmSaving","toggleAgendaItemActiveState","courseDayHoursListController","onActiveClick","courseDayHoursModalController","isAddButtonDisabled","_groupsOfDates","groupsOfDates","monthString","onDayClick","notifyParentComponentAboutDaySelection","toggleDaySelection","toggleGroupSelection","areAllSelected","notifyParentComponentAboutDaysSelection","startSessionForDayButtonController","canStartSessionButtonBeDisplayed","isStartSessionButtonDisabled","getTooltipMessage","startSessionForDay","getButtonText","onAfterEnrollmentSaveDeregistrationFunction","EmailSettingsForDeviationType","saveEmailSettingsForDeviationType","ModalDeviationTypeEmailSettingsController","selectedDeviationType","saveSelectedDeviationTypeEmailSettings","DeviationType","deviationSelectedType","deviationEmailTemplateService","getTableByEmailTemplate","isPreview","DeviationEmailTemplateController","DeviationEmailTemplateService","entitiesFound","notificationPattern","newRecipient","isCustomRecipientValid","ModalDeviationEmailTemplatesController","createEmailTemplate","selectedEmailTemplate","emailTemplateSettings","emailTemplateFor","showEmailTemplate","resetEmailTemplate","existTemplate","checkForAll","deviationEmailTemplates","selectEmailTemplate","ModalPreviewEmailTemplateController","emailData","organizationNotificationSettingController","notifyParentComponentAboutChange","onNotificationTypeToggle","notificationType","existentNotificationTypes","toggleNotificationTypeSelection","CompanyInfoExecutionController","companyInfoCtrl","customDataType","CompanyInfoDetailedExecutionController","companyInfoDetailedCtrl","getValueForReportCode","reportCode","companyInfoDetailed","OrganizationNumber","HomePage","CEOFullName","SeniorPositions","NonSeniorPositions","OrganizationCompanyFormInfo","OrganizationCompanyRegistrationInfo","OrganizationLaunchDate","OrganizationOwnersName","getReportCodeFromDefaultAnswers","hasAnyRelevantDefaultAnswer","replaceNewLines","processSelectedValues","PrimaryContactExecutionController","contactCtrl","primaryContact","ProjectReferenceExecutionController","projectRefCtrl","addNewProjectReference","initWhatDidYouDo","whatDidYouDo","orderReferences","UsernameAndPasswordExecutionController","usernamePassCtrl","isUsernameAndPasswordDisabled","PersonalHandbookSignatureController","signature","onSignatureDone","callbackFunction","clearButtonClass","drawing","removeKeyword","currentKeyword","coursesOverviewController","_courses","getRetrievedCourses","CanEnrollOthers","openCourseUserEnrollmentModal","myCoursesController","eventTypes","_myCourses","NotifyUserAboutUnsubscribeFeeResult","translatedErrorMessage","openUnsubscribeFeeConfirmDialog","openUnsubscribeConfirmDialog","relevantCoursesController","_relevantCourses","UserCompetenceController","UserCompetenceService","competenceModal","openCompetenceModal","formatCompetenceDate","educations","competenceFound","newCompetence","convertCompetenceDatesToLong","openCompetenceFromNotification","addNewCompetence","disableCompetenceSave","competenceIsValid","competenceTemp","saveNewCompetence","eventNotificationTypeSettings","isLoggedUserViewingHisProfile","userNotificationSettingsController","UserNotificationSettingsService","eventsPerType","splitEventTypes","onNotificationTypeAddForEvent","addEventNotificationTypeSettingIfNotExists","onNotificationTypeRemoveForEvent","removeEventNotificationTypeSetting","userNotificationSettingsService","getEventTypesByTable","eventsPerEntityType","orderEvents","managementProcessListEvents","deviationEvents","processListEvents","qualityHandbookEvents","courseEvents","competenceEvents","userNotificationSettingsTabController","UserSettingParticipantsController","userSettingsTabController","_canSignUpForCoursesSettingInfo","_canEnrollOthersSettingInfo","_translateChangeSuccessSubscription","initCanSignUpForCoursesSettingInfo","canCourseSettingsBeChangedByLoggedUser","initCanEnrollOthersSettingInfo","canSignUpForCoursesSettingInfo","canEnrollOthersSettingInfo","onAllowImpersonationChange","onAllowImpersonationOnceChange","isStartDateGreater","hasNotificationsForEntityType","hasNotificationsForEntityTypeOnOrganization","notificationsStateInfoMessage","userEventNotificationTypeSettingsController","UserEventNotificationTypeSettingsService","cacheExistentEventNotificationTypeSettings","clearCachedEventNotificationTypeSettings","onNotificationTypeAdd","onNotificationTypeRemove","getExistentNotificationTypesForEvent","getPopoverInfoMessage","userEventNotificationTypeSettingsService","cachedEventNotificationTypeSettings","emptyArray","eventSettings","currentEventType","settingsForCurrentEvent","organizationMandatoryNotificationTypes","userEventNotificationTypeSettingController","UserEventNotificationTypeService","notifyParentComponentAboutNotificationTypeAdd","selectNotificationType","unselectNotificationType","markMandatoryNotificationTypes","getEventTypeTranslation","toggleNotificationType","getEventTypeInfoMessage","userEventNotificationTypeService","mandatoryNotificationType"],"mappings":"CAAA,WACA,aAEAA,OAAAC,UAAAC,WAAA,SAAAC,EAAAC,GAEA,OADAC,KACAC,QAAA,IAAAC,OAAAJ,EAAA,KAAAC,IAGAI,MAAAP,UAAAQ,SAAA,SAAAC,GAEA,IADA,IAAAC,EAAAN,KAAAO,OACAD,KACAD,EAAAL,KAAAM,GAAAA,IACAN,KAAAQ,OAAAF,EAAA,IAZA,GCAA,WACA,aAEAG,QAAAC,OAAA,qBAAA,IACAD,QAAAC,OAAA,UAAA,CAAA,aAAA,gBACAD,QAAAC,OAAA,UAAA,IACAD,QAAAC,OAAA,OAAA,IACAD,QAAAC,OAAA,OAAA,IACAD,QAAAC,OAAA,eAAA,IACAD,QAAAC,OAAA,gBAAA,IACAD,QAAAC,OAAA,cAAA,IACAD,QAAAC,OAAA,WAAA,IACAD,QAAAC,OAAA,kBAAA,IACAD,QAAAC,OAAA,UAAA,IACAD,QAAAC,OAAA,QAAA,IACAD,QAAAC,OAAA,qBAAA,IACAD,QAAAC,OAAA,uBAAA,IACAD,QAAAC,OAAA,YAAA,IACAD,QAAAC,OAAA,OAAA,IACAD,QAAAC,OAAA,WAAA,IACAD,QAAAC,OAAA,UAAA,IACAD,QAAAC,OAAA,wBAAA,IACAD,QAAAC,OAAA,YAAA,CAAA,eACAD,QAAAC,OAAA,WAAA,IACAD,QAAAC,OAAA,kBAAA,CAAA,aACAD,QAAAC,OAAA,OAAA,IACAD,QAAAC,OAAA,OAAA,IACAD,QAAAC,OAAA,YAAA,IACAD,QAAAC,OAAA,kBAA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Ar5J,KAAA,oBACA25K,cAAA,gCAVA,GCAA,WACA,aAEA1uL,QACAC,OAAA,UACA69F,SAAA,cACA,CACA6wF,IAAA,EACAC,KAAA,EACAjwK,MAAA,IATA,GCAA,WACA,aAEA3e,QACAC,OAAA,UACA69F,SAAA,sBACA,CACAynC,iBAAA,sBAPA,GCAA,WACA,aAEAvlI,QACAC,OAAA,UACA69F,SAAA,aACA,CACA+wF,mBAAA,yBAPA,GCAA,WACA,aAEA7uL,QACAC,OAAA,UACA69F,SAAA,gBACA,CACA5/C,SAAA,WACAC,MAAA,QACAC,QAAA,UACAC,KAAA,SAVA,GCAA,WACA,aAEAr+C,QACAC,OAAA,UACA69F,SAAA,WACA,CACAszC,aAAA,2JAPA,GCAA,WACA,aAEApxI,QACAC,OAAA,UACA69F,SAAA,qBACA,CACAquD,mBAAA,wBAPA,GCAA,WACA,aAEAnsJ,QACAC,OAAA,UACA69F,SAAA,6BACA,CACA5+F,OAAA,SACAukG,QAAA,YARA,GCAA,WACA,aAEAzjG,QACAC,OAAA,UACA69F,SAAA,qBACA,CACA13F,YAAA,cACA2sJ,IAAA,MACA+7B,KAAA,SATA,GCAA,WACA,aAEA9uL,QACAC,OAAA,UACA69F,SAAA,0BACA,CACAnL,OAAA,SACA5D,SAAA,aARA,GCAA,WACA,aAEA/uF,QACAC,OAAA,UACA69F,SAAA,uBACA,CACAnP,gBAAA,mBACAogG,gBAAA,mBACAC,iBAAA,sBATA,GCAA,WACA,aAEAhvL,QACAC,OAAA,UACA69F,SAAA,iBAAA,CACAg3C,WAAA,YACAsE,aAAA,cACAC,cAAA,eACA5F,uBAAA,yBACAw7C,uBAAA,yBACAv7C,8BAAA,iCACAhkI,sBAAA,6BACA45I,eAAA,gBACA5kC,iBAAA,kBACAujC,qBAAA,uBACAt4I,YAAA,aACAw5I,gBAAA,iBACA+lC,gBAAA,kBACAC,gCAAA,mCACAC,oBAAA,sBACAC,sBAAA,wBACAC,0BAAA,6BACAC,iBAAA,mBACAC,qB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xxM,EAAAk2M,+BAAA1E,EAAA9yE,UACA,OAGA8yE,EAAAzzI,SAAAyzI,EAAAzzI,QACAwzI,EAAAC,IA3FAxxM,EAAA65M,wBA8FA,WACA,IAAA75M,EAAA2gH,YAAA3gH,EAAA2gH,UAAA51G,OACA,MAAA,GAGA,OAAAnL,EAAA+B,QAAA,uBAAA3B,EAAA2gH,UAAA51G,OAAA,qBAjGA/K,EAAA4rI,kBAAA,GAzBAytE,EAAAx8M,QAAA,CACA,cACA,cACA,mCACA,cACA,cAyHAxK,QACAC,OAAA,QACA0G,WAAA,6CAAAqgN,GAnIA,GCAA,WACA,aAMA,SAAAS,EACAn+M,GA2BA,MAAA,CACA+9M,+BAzBA,SAAA9tE,EAAA83D,GAEA/nM,EAAA4W,MAAAmxL,IAAA/nM,EAAA6W,QAAAkxL,IAIA93D,EAAA1zI,SAAA,SAAAs5M,GAGA71M,EAAAvG,KAAAsuM,GAAA,SAAAqW,GACA,OAAAA,EAAA3iN,KAAAo6M,EAAAp6M,QAMAo6M,EAAA9yE,WAAA,EAEA8yE,EAAAzzI,UACAyzI,EAAAzzI,SAAA,SA3BA+7I,EAAAj9M,QAAA,CACA,KAoCAxK,QACAC,OAAA,QACAyK,QAAA,mCAAA+8M,GA1CA","file":"../scripts.min.js","sourcesContent":["(function () {\r\n 'use strict';\r\n\r\n String.prototype.replaceAll = function (search, replacement) {\r\n var target = this;\r\n return target.replace(new RegExp(search, 'g'), replacement);\r\n };\r\n\r\n Array.prototype.removeIf = function (callback) {\r\n var i = this.length;\r\n while (i--) {\r\n if (callback(this[i], i)) {\r\n this.splice(i, 1);\r\n }\r\n }\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module(\"NotificationEditor\", []);\r\n angular.module('session', ['ngResource', 'vcRecaptcha']);\r\n angular.module('message', []);\r\n angular.module('menu', []);\r\n angular.module('user', []);\r\n angular.module('organization', []);\r\n angular.module('configuration', []);\r\n angular.module('processList', []);\r\n angular.module('customer', []);\r\n angular.module('processListItem', []);\r\n angular.module('project', []);\r\n angular.module('order', []);\r\n angular.module('verticalSimulation', []);\r\n angular.module('horizontalSimulation', []);\r\n angular.module('execution', []);\r\n angular.module('info', []);\r\n angular.module('settings', []);\r\n angular.module('product', []);\r\n angular.module('horizontalProcesslist', []);\r\n angular.module('f5.report', ['ngResource']);\r\n angular.module('taskList', []);\r\n angular.module('resourcePlanner', ['taskList']);\r\n angular.module('util', []);\r\n angular.module('laws', []);\r\n angular.module('deviation', []);\r\n angular.module('qualityHandbook', []);\r\n angular.module('loading', []);\r\n angular.module('shared', []);\r\n angular.module('attachment', []);\r\n angular.module('contact', []);\r\n angular.module('gdpr', []);\r\n angular.module('riskAnalysis', []);\r\n angular.module('participant', []);\r\n angular.module('reportBuilder', []);\r\n angular.module('menuItem', []);\r\n angular.module('type', []);\r\n angular.module('demoContent', []);\r\n angular.module('courseParticipants', []);\r\n angular.module('courseEnrollment', []);\r\n angular.module('courseEnrolledUsers', []);\r\n angular.module('course', [\r\n 'courseDetails',\r\n 'courseParticipants',\r\n 'courseInvitationConfiguration',\r\n 'courseSettings',\r\n 'courseList',\r\n 'courseLocation',\r\n 'courseTimeInterval',\r\n 'courseAgenda',\r\n 'courseSubjectManager',\r\n 'courseEnrollment',\r\n 'courseReservation',\r\n 'courseEnrolledUsers',\r\n 'courseSession',\r\n 'courseSessionDetails',\r\n 'courseTargetAudience',\r\n 'status'\r\n ]);\r\n angular.module('country', []);\r\n angular.module('courseSubjectManager', []);\r\n angular.module('status', []);\r\n angular.module('courseInvitationConfiguration', []);\r\n angular.module('courseSettings', []);\r\n angular.module('courseList', []);\r\n angular.module('courseLocation', []);\r\n angular.module('courseDay', ['courseDayHours']);\r\n angular.module('courseTimeInterval', ['courseDay']);\r\n angular.module('courseAgenda', ['courseAgendaItem']);\r\n angular.module('courseAgendaItem', []);\r\n angular.module('courseReservation', []);\r\n angular.module('courseSession', []);\r\n angular.module('courseDetails', []);\r\n angular.module('courseSessionDetails', []);\r\n angular.module('courseDayHours', []);\r\n angular.module('automile', []);\r\n angular.module('help', []);\r\n angular.module('notification', []);\r\n angular.module('courseTargetAudience', []);\r\n angular.module('appMenuItem', []);\r\n angular.module('competence', []);\r\n\r\n angular.module('VBSmart', [\r\n 'ngRoute',\r\n 'ngAnimate',\r\n 'ui.bootstrap',\r\n 'session',\r\n 'message',\r\n 'menu',\r\n 'user',\r\n 'project',\r\n 'organization',\r\n 'processList',\r\n 'processListItem',\r\n 'customer',\r\n 'order',\r\n 'product',\r\n 'verticalSimulation',\r\n 'horizontalSimulation',\r\n 'execution',\r\n 'info',\r\n 'product',\r\n 'settings',\r\n 'horizontalProcesslist',\r\n 'pascalprecht.translate',\r\n 'loading',\r\n 'ui.tree',\r\n 'sticky',\r\n 'ngCookies',\r\n 'duScroll',\r\n 'infinite-scroll',\r\n 'textAngular',\r\n 'f5.report',\r\n 'googlechart',\r\n 'ui.bootstrap.contextMenu',\r\n 'resourcePlanner',\r\n 'util',\r\n 'colorpicker.module',\r\n 'NotificationEditor',\r\n 'configuration',\r\n 'laws',\r\n 'ngStorage',\r\n 'deviation',\r\n 'isteven-multi-select',\r\n 'rzModule',\r\n 'ngIdle',\r\n 'qualityHandbook',\r\n 'angular.filter',\r\n 'FBAngular',\r\n 'angular-horizontal-timeline',\r\n 'shared',\r\n 'attachment',\r\n 'contact',\r\n 'gdpr',\r\n 'riskAnalysis',\r\n 'participant',\r\n 'reportBuilder',\r\n 'menuItem',\r\n 'demoContent',\r\n 'automile',\r\n 'help',\r\n 'course',\r\n 'country',\r\n 'notification',\r\n 'appMenuItem',\r\n 'type',\r\n 'competence'\r\n ]);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('VBSmart')\r\n .config([\r\n '$translateProvider',\r\n function (\r\n $translateProvider\r\n ) {\r\n\r\n $translateProvider.useStaticFilesLoader({\r\n prefix: 'Scripts/language/locale-',\r\n suffix: '.json'\r\n });\r\n\r\n $translateProvider.preferredLanguage('nb_NO');\r\n $translateProvider.useSanitizeValueStrategy('sanitize');\r\n }]);\r\n\r\n angular\r\n .module('VBSmart')\r\n .config([\r\n '$httpProvider',\r\n '$locationProvider',\r\n function (\r\n $httpProvider,\r\n $locationProvider\r\n ) {\r\n //initialize get if not there\r\n if (!$httpProvider.defaults.headers.get) {\r\n $httpProvider.defaults.headers.get = {};\r\n }\r\n\r\n //disable IE caching\r\n $httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';\r\n $httpProvider.defaults.headers.get['Pragma'] = 'no-cache';\r\n\r\n //enable HTML 5\r\n //$locationProvider.html5Mode({ enabled: true, requireBase: true });\r\n }]);\r\n\r\n angular\r\n .module('VBSmart')\r\n .config([\r\n 'IdleProvider',\r\n 'KeepaliveProvider',\r\n function (\r\n IdleProvider,\r\n KeepaliveProvider\r\n ) {\r\n IdleProvider.idle(30);\r\n IdleProvider.timeout(5);\r\n KeepaliveProvider.interval(2);\r\n }]);\r\n\r\n angular\r\n .module('VBSmart')\r\n .config([\r\n '$provide',\r\n function (\r\n $provide\r\n ) {\r\n $provide.decorator(\r\n 'taOptions', [\r\n 'taRegisterTool',\r\n 'taSelection',\r\n '$delegate',\r\n 'fileReader',\r\n 'LawsAndRegulationsFactory',\r\n function (\r\n taRegisterTool,\r\n taSelection,\r\n taOptions,\r\n fileReader,\r\n LawsAndRegulationsFactory) {\r\n // $delegate is the taOptions we are decorating\r\n\r\n //edit insertLink to use target _blank\r\n taOptions.defaultTagAttributes.a.target = '_blank';\r\n\r\n taRegisterTool('addColumns', {\r\n iconclass: \"fa fa-columns\",\r\n tooltiptext: \"Add columns\",\r\n action: function () {\r\n var editor = this.$editor();\r\n\r\n var retVal = prompt(\"Enter number of columns : \", \"3\");\r\n\r\n var nrOfColumnsFromInput = parseInt(retVal);\r\n\r\n if (retVal && nrOfColumnsFromInput > 0) {\r\n var columnsHtml = \"
\";\r\n\r\n var colNr;\r\n if (nrOfColumnsFromInput < 6)\r\n colNr = Math.ceil(12 / nrOfColumnsFromInput);\r\n else\r\n colNr = 2;\r\n for (var i = 0; i < nrOfColumnsFromInput; i++) {\r\n columnsHtml += \"
Column nr. \" + (i + 1) + \"
\";\r\n }\r\n\r\n columnsHtml += \"
\";\r\n\r\n editor.wrapSelection('insertHtml', columnsHtml);\r\n }\r\n\r\n\r\n }\r\n });\r\n\r\n // add the button to the default toolbar definition\r\n taOptions.toolbar[1].push('addColumns');\r\n\r\n taRegisterTool('newLine', {\r\n iconclass: \"fa fa-level-down fa-rotate-90\",\r\n tooltiptext: \"New line\",\r\n action: function () {\r\n\r\n var elem = angular.element('text-angular[name=lawsEditor]').find('*[id*=taTextElement]');\r\n var newElem = angular.element(\"

\");\r\n elem.append(newElem);\r\n\r\n //change selection\r\n taSelection.setSelectionToElementEnd(newElem[0]);\r\n taSelection.setSelectionToElementStart(newElem[0]);\r\n taSelection.insertHtml(\"
\");\r\n }\r\n });\r\n\r\n // add the button to the default toolbar definition\r\n taOptions.toolbar[1].push('newLine');\r\n\r\n // register the tool with textAngular\r\n taRegisterTool('uploadImage', {\r\n iconclass: \"fa fa-image\",\r\n tooltiptext: \"Insert image\",\r\n action: function () {\r\n var editor = this.$editor();\r\n\r\n var fileInput = angular.element(document.querySelector('#fileUpload'));\r\n\r\n // the file browser dialog shows when gets clicked; \r\n // since it's hidden, it needs to get triggered programmaticaly when the uploadImage button gets clicked\r\n fileInput.trigger('click');\r\n\r\n fileInput.unbind('change');\r\n fileInput.bind('change', function (e) {\r\n if (fileInput[0].files == null || fileInput[0].files.length == 0) {\r\n return;\r\n }\r\n var file = this.files[0];\r\n var imageType = /image.*/;\r\n if (file.type.match(imageType)) {\r\n\r\n var scope = angular.element(this).scope();\r\n var promise = fileReader.readAsDataUrl(file, scope);\r\n promise.then(function (result) {\r\n if (result != null) {\r\n editor.wrapSelection('insertImage', result);\r\n\r\n fileInput[0].value = null;\r\n scope.$parent.focussed = false;\r\n scope.$parent.disabled = true;\r\n }\r\n });\r\n }\r\n else {\r\n editor.wrapSelection('pasteHtmlAtCaret', 'File not supported!');\r\n }\r\n return false;\r\n });\r\n }\r\n });\r\n // add the button to the default toolbar definition\r\n taOptions.toolbar[1].push('uploadImage');\r\n\r\n //add attachment\r\n taRegisterTool('uploadFile', {\r\n iconclass: \"fa fa-file-o\",\r\n tooltiptext: \"Upload attachment\",\r\n action: function () {\r\n var editor = this.$editor();\r\n\r\n var fileInput = angular.element(document.querySelector('#attachmentUpload'));\r\n\r\n // the file browser dialog shows when gets clicked; \r\n // since it's hidden, it needs to get triggered programmaticaly when the uploadFile button gets clicked\r\n fileInput.trigger('click');\r\n\r\n fileInput.unbind('change');\r\n fileInput.bind('change', function (e) {\r\n if (fileInput[0].files == null || fileInput[0].files.length == 0) {\r\n return;\r\n }\r\n var file = this.files[0];\r\n\r\n //save file\r\n var scope = angular.element(this).scope();\r\n var promise = fileReader.readAsDataUrl(file, scope);\r\n promise.then(function (result) {\r\n if (result != null) {\r\n var attach = {};\r\n\r\n if (scope.$parent.newAttachment)\r\n attach = scope.$parent.newAttachment();\r\n else if (LawsAndRegulationsFactory.newAttachment)\r\n attach = LawsAndRegulationsFactory.newAttachment();\r\n\r\n attach.AttachmentName = file.name,\r\n attach.AttachmentBytes = result;\r\n\r\n var promise = {};\r\n if (scope.$parent.saveAttachment)\r\n promise = scope.$parent.saveAttachment(attach);\r\n else if (LawsAndRegulationsFactory.saveAttachment)\r\n promise = LawsAndRegulationsFactory.saveAttachment(attach);\r\n\r\n promise.then(function (result) {\r\n editor.wrapSelection('insertHtml', '' + file.name + '');\r\n });\r\n\r\n fileInput[0].value = null;\r\n scope.$parent.focussed = false;\r\n scope.$parent.disabled = true;\r\n\r\n\r\n }\r\n });\r\n\r\n return false;\r\n });\r\n }\r\n });\r\n // add the button to the default toolbar definition\r\n taOptions.toolbar[1].push('uploadFile');\r\n\r\n taRegisterTool('variableReceiverName', {\r\n buttontext: \"Receiver\",\r\n action: function () {\r\n this.$editor().wrapSelection('insertHtml', '##receiverName##');\r\n }\r\n });\r\n taOptions.toolbar[1].push('variableReceiverName');\r\n\r\n taRegisterTool('variableSenderName', {\r\n buttontext: \"Sender\",\r\n action: function () {\r\n this.$editor().wrapSelection('insertHtml', '##senderName##');\r\n }\r\n });\r\n taOptions.toolbar[1].push('variableSenderName');\r\n\r\n\r\n var insertHtml = function (qtvar) {\r\n var template = '%var%

';\r\n template = template.replace(/%var%/g, qtvar);\r\n\r\n this.$editor().wrapSelection('inserthtml', template);\r\n };\r\n\r\n var qtMethods = {};\r\n\r\n qtMethods.addVariable = function (variable) {\r\n this.$editor().wrapSelection('insertHtml', variable);\r\n };\r\n\r\n var dropMenuTemplate = '
';\r\n dropMenuTemplate += '
Variables
';\r\n dropMenuTemplate += '';\r\n dropMenuTemplate += '
';\r\n\r\n // register the tool with textAngular\r\n taRegisterTool('insertVariable', {\r\n display: dropMenuTemplate,\r\n disabled: function () {\r\n\r\n // runs as an init function\r\n\r\n // hack to get around the errors thrown by textAngular\r\n // because it didn't get to store a pointer to the editor,\r\n // because it's not focused.\r\n this.focusHack = function () {\r\n $('.ta-scroll-window [contenteditable]')[0].focus();\r\n };\r\n\r\n var self = this;\r\n\r\n // insert all qtMethods into the scope\r\n Object.keys(qtMethods).forEach(function (key) {\r\n self[key] = qtMethods[key];\r\n });\r\n\r\n this.isDisabled = function () {\r\n return false;\r\n };\r\n\r\n },\r\n action: function () { }\r\n });\r\n\r\n taOptions.toolbar[1].push('insertVariable');\r\n\r\n return taOptions;\r\n }]);\r\n }]);\r\n\r\n angular\r\n .module('VBSmart')\r\n .run(function () {\r\n localforage.config({\r\n name: 'VBSmart',\r\n version: 1.0,\r\n storeName: 'vb', // Should be alphanumeric, with underscores.\r\n description: 'VBSmart'\r\n });\r\n\r\n localforage.clear();\r\n\r\n moment.locale('nb');\r\n }\r\n );\r\n})();","(function () {\r\n\r\n var authResolver = function () {\r\n return {\r\n auth: ['AuthService', function (AuthService) {\r\n return AuthService.isAuthenticated();\r\n }]\r\n }\r\n }\r\n\r\n angular.module('VBSmart').config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) {\r\n $routeProvider.when('/login', {\r\n templateUrl: 'Scripts/session/loginPartial.html',\r\n controller: 'LoginController'\r\n });\r\n $routeProvider.when('/home', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/users', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/user/:userId?', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/organizations', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/dataDetails', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/organization/:organizationId?', {\r\n templateUrl: 'Scripts/organization/organizationPartial.html',\r\n controller: 'OrganizationController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/processList', {\r\n templateUrl: 'Scripts/processList/process-list/process-list.html',\r\n controller: 'ProcessListController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/processListElement/:processListElementId?', {\r\n templateUrl: 'Scripts/processList/processListElementPartial.html',\r\n controller: 'ProcessListElementController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/processListElementReadOnly/:processListElementId?', {\r\n templateUrl: 'Scripts/processList/processListElementReadonlyPartial.html',\r\n controller: 'ProcessListElementController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/projects', {\r\n templateUrl: 'Scripts/project/projectList/projectListPartial.html',\r\n controller: 'ProjectListController as projectListCtrl',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/project/:projectId?', {\r\n templateUrl: 'Scripts/project/projectPartial.html',\r\n controller: 'ProjectController as projectCtrl',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/lawsAndRegulations', {\r\n template: '',\r\n controller: 'LawsAndRegulationsTabsController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/deviations', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/deviation/:deviationId?', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/deviation-external-input/:deviationId/:sessionId', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/customers', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/customer/:customerId?', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/orders', {\r\n templateUrl: 'Scripts/order/order-list/order-list.html',\r\n controller: 'OrderListController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/order/:orderId?', {\r\n templateUrl: 'Scripts/order/orderPartial.html',\r\n controller: 'OrderController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/verticalSimulation/:processListElementId', {\r\n templateUrl: 'Scripts/simulation/verticalSimulationPartial.html',\r\n controller: 'VerticalSimulationController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/horizontalSimulation/:processListElementId', {\r\n templateUrl: 'Scripts/simulation/horizontalSimulationPartial.html',\r\n controller: 'HorizontalSimulationController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/verticalSimulation/:orderId/:processListElementId', {\r\n templateUrl: 'Scripts/simulation/verticalSimulationPartial.html',\r\n controller: 'VerticalSimulationController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/horizontalSimulation/:orderId/:processListElementId', {\r\n templateUrl: 'Scripts/simulation/horizontalSimulationPartial.html',\r\n controller: 'HorizontalSimulationController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/settings', {\r\n templateUrl: 'Scripts/settings/settingsPartial.html',\r\n controller: 'SettingsController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/products', {\r\n templateUrl: 'Scripts/product/productsPartial.html',\r\n controller: 'ProductsController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/products/:productId?', {\r\n templateUrl: 'Scripts/product/productPartial.html',\r\n controller: 'ProductController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/forgotPassword', {\r\n templateUrl: 'Scripts/session/forgotPasswordPartial.html',\r\n controller: 'LoginController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/reportCreator', {\r\n templateUrl: 'Scripts/report/reportCreatorPartial.html',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/reportViewer', {\r\n templateUrl: 'Scripts/report/reportViewerPartial.html',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/reportViewer/:reportProgid', {\r\n templateUrl: 'Scripts/report/reportViewerPartial.html',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/managementExecution/:foreignKey/:initiatedProcessListId/:itemId?', {\r\n templateUrl: 'Scripts/execution/executionManagementPartial.html',\r\n controller: 'ExecutionManagementController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/horizontalExecution/:initiatedProcessListId/:table/:foreignKey', {\r\n templateUrl: 'Scripts/execution/executionHorizontalPartial.html',\r\n controller: 'ExecutionHorizontalController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/execution/:mode?', {\r\n templateUrl: 'Scripts/management/executionPartial.html',\r\n controller: 'ExecutionController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/riskAnalysis', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/riskHead/:riskHeadId?', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/help/QuickGuide', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/help/UserManual', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/help/GeneralHelp', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/resourcePlanner', {\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerPartial.html',\r\n controller: 'ResourcePlannerController as vm',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/resourcePlanner/:invitationId?', {\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerPartial.html',\r\n controller: 'ResourcePlannerController as vm',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/rp-meeting-confirmation/:sessionId/:invitationId/:isDeclined', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/qualityHandbook', {\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookPartial.html',\r\n controller: 'QualityHandbookController as qualityController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/qualityHandbookRedirect', {\r\n template: ''\r\n });\r\n\r\n $routeProvider.when('/qualityHandbookTemplate/:table?', {\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookTemplate/qualityHandbookTemplatePartial.html',\r\n controller: 'QualityHandbookTemplateController as qualityTemplateController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/qualityHandbookView', {\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookView/qualityHandbookViewPartial.html',\r\n controller: 'QualityHandbookViewController as qualityViewCtrl',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/qualityHandbookArchive/:qualityHandbookId?', {\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookArchive/archivePartial.html',\r\n controller: 'QualityHandbookArchiveController as qualityArchiveCtrl',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/packingSlipMapping', {\r\n templateUrl: 'Scripts/organization/packingSlipMapping/packingSlipMappingPartial.html',\r\n controller: 'PackingSlipMappingController as packingSlipCtrl',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/progressPlans', {\r\n templateUrl: 'Scripts/project/progressPlan/progressPlanListPartial.html',\r\n controller: 'ProjectProgressPlanListController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/progressPlan/:progressPlanId?', {\r\n templateUrl: 'Scripts/project/progressPlan/progressPlanPartial.html',\r\n controller: 'ProjectProgressPlanController',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/gdpr', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/gdpr-confirm/:sessionId', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/gdpr-delete-confirm/:sessionId?', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/gdpr-private-customer/:sessionId', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/customerDeleteRequests', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/demo-content', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/courses', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/course/:courseId?', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/course-session/:courseSessionId', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n\r\n $routeProvider.when('/course-invitation/:sessionId/:courseId', {\r\n template: '',\r\n resolve: authResolver()\r\n });\r\n \r\n $routeProvider.when('/intranett-login', {\r\n template: ''\r\n });\r\n\r\n //$routeProvider.when('/automileTrips', {\r\n // template: ''\r\n //});\r\n\r\n //$routeProvider.when('/automileTrip/:tripId?', {\r\n // template: ''\r\n //});\r\n\r\n $routeProvider.otherwise({ redirectTo: '/home' });\r\n }]);\r\n\r\n})();","var oidcIntranett = new UserManager({\r\n authority: 'https://intranett.vb.no',\r\n metadata: {\r\n issuer: 'https://intranett.vb.no',\r\n authorization_endpoint: 'https://intranett.vb.no/connect/authorize',\r\n userinfo_endpoint: 'https://intranett.vb.no/connect/userinfo',\r\n end_session_endpoint: 'https://intranett.vb.no/connect/endsession',\r\n jwks_uri: 'https://intranett.vb.no/.well-known/jwks'\r\n },\r\n signingKeys: [\r\n {\r\n \"kty\": \"RSA\",\r\n \"use\": \"sig\",\r\n \"kid\": \"Dutou0MJO7mX66_QCVNbyHqsZlQ\",\r\n \"x5t\": \"Dutou0MJO7mX66_QCVNbyHqsZlQ\",\r\n \"e\": \"AQAB\",\r\n \"n\": \"4aTb2w3W9wmbZxnphUh759afLwHi_pVELMI7EEpoYZN0ZLYY7Pz5BVvRMo8ZRwDb7BOl7PpBVM5zSyIFx3W0NDRv0GOeIGyvEO4ycipM2XJuAXQ4DW30a4pyzyLiL1nl8Ed4MzjjLlqk_kWuD9fEal53dSShckjq-aGxchDHorTHZ1bvMHNPZv2cwIjPO7yl-knLBIM3uuURFtelna6QNHbVMDYhS9_0Zs35UzhNuQ1yDwbAFc_h6CROBJ7QgsH9EEpCy7CBeHwn82E6YvrWxVqK1sFwK4gDlUzrJZy0lHPh-nU616G0R7JD0qz53RlPa3KoeXWmU6lPo-mUSRVVeQ\",\r\n \"x5c\": [\r\n \"MIIDDjCCAfagAwIBAgIQR2F+xDnDUIFPMJMYFBxUvjANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcNMjAwNDE1MTIzMDAwWhcNMzAwNDE1MTI0MDAwWjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDhpNvbDdb3CZtnGemFSHvn1p8vAeL+lUQswjsQSmhhk3Rkthjs/PkFW9EyjxlHANvsE6Xs+kFUznNLIgXHdbQ0NG/QY54gbK8Q7jJyKkzZcm4BdDgNbfRrinLPIuIvWeXwR3gzOOMuWqT+Ra4P18RqXnd1JKFySOr5obFyEMeitMdnVu8wc09m/ZzAiM87vKX6ScsEgze65REW16WdrpA0dtUwNiFL3/RmzflTOE25DXIPBsAVz+HoJE4EntCCwf0QSkLLsIF4fCfzYTpi+tbFWorWwXAriAOVTOslnLSUc+H6dTrXobRHskPSrPndGU9rcqh5daZTqU+j6ZRJFVV5AgMBAAGjXDBaMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAUBgNVHREEDTALgglsb2NhbGhvc3QwHQYDVR0OBBYEFIPy3AJe6kwXzLaEE0MI238fiDxMMA0GCSqGSIb3DQEBBQUAA4IBAQAa4XUVY3HHPvyNJ/fLuLpaaNA51ld7sU+PQBBDmqEMlTccPqstHminmkA3Nl1msYM4UehUKtZEx4sw16p8vzJXWPvv5REzWSR3QrMLpyTGTdnkmTezipwF0tvH1Yg33QShLwlhx1Gf+vQztR+8O4KjWAZAqqbPTcyQS3ef/Z7J8INyQf0UUI1L2LHYCXgnf9h4n+KU11G/rfF9wbQxCN7n835hycFxCjPDuY0meNc4U4lcufwK/PEL4pHF2zybMzUTFjqfF5Raj5LevofzvLccwBmVy+cgaUdEn4jRylA7HMe8EEx5ZKIXZ/UKSElMVd5EtlQNzxbcWtEcpQVX9sFR\"\r\n ]\r\n }\r\n ],\r\n client_id: 'vbsmart_implicit',\r\n redirect_uri: 'https://vbsmart.no/vbsmart',\r\n response_type: 'id_token',\r\n scope: 'openid profile',\r\n loadUserInfo: true,\r\n userStore: new WebStorageStateStore({ store: window.localStorage })\r\n});\r\n\r\n(function () {\r\n runHandler.$inject = [\r\n '$rootScope',\r\n '$http',\r\n '$location',\r\n '$route',\r\n '$templateCache',\r\n 'sessionInformationService',\r\n 'baseUrlService',\r\n '$resource',\r\n '$localStorage',\r\n '_',\r\n 'AppRoutes',\r\n 'AllAccessFactory',\r\n 'AllAccessPage',\r\n 'SessionFactory',\r\n 'AuthService',\r\n '$routeParams',\r\n 'SessionUtils'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .run(runHandler);\r\n\r\n function runHandler(\r\n $rootScope,\r\n $http,\r\n $location,\r\n $route,\r\n $templateCache,\r\n sessionInformationService,\r\n baseUrlService,\r\n $resource,\r\n $localStorage,\r\n _,\r\n AppRoutes,\r\n AllAccessFactory,\r\n AllAccessPage,\r\n SessionFactory,\r\n AuthService,\r\n $routeParams,\r\n SessionUtils\r\n ) {\r\n baseUrlService.setBaseUrl(\"\");\r\n\r\n //console.log($routeParams);\r\n\r\n\r\n\r\n\r\n\r\n //var intranetOidcParams = $location.hash();\r\n //$location.hash('');\r\n //var weHaveIntranetCallbackParams = intranetOidcParams.indexOf('id_token') > -1;\r\n\r\n //if (weHaveIntranetCallbackParams) {\r\n // var urlParams = new URLSearchParams(intranetOidcParams);\r\n // var intranetSession = {};\r\n\r\n // urlParams.forEach(function (value, key) {\r\n // intranetSession[key] = value;\r\n // });\r\n\r\n // $localStorage.intranetSession = intranetSession;\r\n\r\n // $location.path('/home');\r\n //}\r\n\r\n\r\n $rootScope.$on('$routeChangeSuccess', function (event, current, previous) {\r\n console.log('$routeChangeSuccess', event);\r\n });\r\n\r\n $rootScope.$on('$routeChangeError', function (event, current, previous, rejection) {\r\n switch (rejection) {\r\n case AuthService.Demo:\r\n $location.path('/demo-content');\r\n break;\r\n case AuthService.Forbidden:\r\n default:\r\n $location.path('/login');\r\n break;\r\n }\r\n });\r\n\r\n // register listener to watch route changes\r\n //$rootScope.$on(\"$routeChangeStart\", function (event, next, current) {\r\n // if (next && next.$$route && next.$$route.originalPath == '/login') {\r\n\r\n // delete $localStorage.Session;\r\n // delete $localStorage.User;\r\n // delete $localStorage.Menus;\r\n // delete $localStorage.SelectedMenu;\r\n // }\r\n\r\n // if (current == undefined && next && next.$$route) {\r\n // var session = $localStorage.Session;\r\n // if (session) {\r\n // session.User = $localStorage.User;\r\n // session.User.Menus = $localStorage.Menus;\r\n // }\r\n\r\n // if (session) {\r\n // $http.defaults.headers.common['user_session_id'] = session.SessionId;\r\n // sessionInformationService.initSession(session);\r\n // $route.reload();\r\n // return;\r\n // }\r\n // }\r\n // if (!sessionInformationService.getSession().SessionId) {\r\n\r\n // // no logged user, we should be going to /login\r\n // //also check if the path is different from those with external session\r\n // if (next.$$route && !_.some(AppRoutes.accessibleRoutesWithoutASession, function (p) { return p == next.$$route.originalPath }))\r\n // $location.path(\"/login\");\r\n\r\n // } else {\r\n\r\n // //if (!!current.scope && current.scope.menus === undefined) {\r\n // // current.scope.menus = sessionInformationService.getUser().Menus;\r\n // //}\r\n // //check if user has access to the required menu item\r\n // //if (current && current.scope && current.scope.menus && next.$$route && checkMenuAccess(current.scope.menus, next.$$route.originalPath) == false)\r\n // // //$location.path(current.$$route.originalPath);\r\n // // event.preventDefault();\r\n\r\n // //if menu item doesn't exists, redirect to current menu :)\r\n // if (current && next.$$route == undefined)\r\n // //$location.path(current.$$route.originalPath);\r\n // event.preventDefault();\r\n\r\n // if (isNextRouteDifferentFromDemoContent(next) && !isNextRouteAccessibleWithoutASession(next.$$route.originalPath))\r\n // checkWhatContentToBeDisplayedForNextRoute(next);\r\n // }\r\n\r\n //});\r\n\r\n function isNextRouteDifferentFromDemoContent(next) {\r\n return next && next.$$route && next.$$route.originalPath !== '/demo-content';\r\n }\r\n\r\n function isNextRouteAccessibleWithoutASession(nextRoutePath) {\r\n\r\n return _.some(AppRoutes.accessibleRoutesWithoutASession,\r\n function (routePath) {\r\n return routePath === nextRoutePath;\r\n });\r\n }\r\n\r\n function isNextRouteAccessibleForAVbOrganizationWithoutALicense(nextRoutePath) {\r\n var pages = AllAccessFactory.getRouteAllAccessPages(nextRoutePath);\r\n\r\n // in case the user is not allowed to access that page\r\n if (_.some(pages, function (p) { return p === AllAccessPage.NoAccess }))\r\n return Promise.resolve(false);\r\n\r\n return SessionFactory.hasAllAccessToRoute(_.join(pages, ','))\r\n .then(function (result) {\r\n return result.HasAccess;\r\n });\r\n\r\n //return _.some(AppRoutes.accessibleRoutesForAVbOrganizationWithoutALicense, function (routePath) {\r\n // return routePath === nextRoutePath;\r\n //});\r\n }\r\n\r\n function checkWhatContentToBeDisplayedForNextRoute(next) {\r\n // if the user has vbsmart license\r\n if (sessionInformationService.hasLoggedUserFullAccess()) {\r\n return;\r\n } else {\r\n // it's neither vb company nor vbsmart customer\r\n if (sessionInformationService.hasLoggedUserAccessOnlyToDemoContent()) {\r\n // only show demo content\r\n $location.path('/demo-content');\r\n return;\r\n }\r\n\r\n if (sessionInformationService.isLoggedUserOrganizationAVbOrganization()) {\r\n isNextRouteAccessibleForAVbOrganizationWithoutALicense(nextRoutePath)\r\n return;\r\n } else\r\n // show demo content if the next route requires a license in order to be accessed\r\n $location.path('/demo-content');\r\n\r\n }\r\n }\r\n\r\n //check is current user has access to required menu item\r\n function checkMenuAccess(menus, requiredMenu) {\r\n var root = requiredMenu.split(\"/\");\r\n\r\n if (root[1] == 'user')\r\n return true;\r\n\r\n for (var i = 0; i < menus.length; i++) {\r\n if (menus[i].Href != '') {\r\n if (menus[i].Href.toLowerCase().indexOf(root[1].toLowerCase()) > -1)\r\n return true;\r\n }\r\n else\r\n if (menus[i].MenuItems)\r\n for (var j = 0; j < menus[i].MenuItems.length; j++)\r\n if (menus[i].MenuItems[j].Href.toLowerCase().indexOf(root[1].toLowerCase()) > -1)\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n angular\r\n .module('loading')\r\n .factory('loadingService', loadingService);\r\n\r\n function loadingService() {\r\n var service = {\r\n requestCount: 0,\r\n noLoader: false,\r\n isLoading: function () {\r\n if (service.noLoader)\r\n return false;\r\n else\r\n return service.requestCount > 0;\r\n }\r\n };\r\n return service;\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n\r\n onCompleteInterceptor.$inject = [\r\n '$q',\r\n 'loadingService',\r\n 'urlsWithoutLoaderAnimation'\r\n ];\r\n\r\n angular\r\n .module('loading')\r\n .factory('onCompleteInterceptor', onCompleteInterceptor)\r\n .config(['$httpProvider', function ($httpProvider) {\r\n $httpProvider.interceptors.push('onCompleteInterceptor');\r\n }]);\r\n\r\n function onCompleteInterceptor(\r\n $q,\r\n loadingService,\r\n urlsWithoutLoaderAnimation\r\n ) {\r\n var started = function () {\r\n loadingService.requestCount++;\r\n };\r\n var ended = function () {\r\n loadingService.requestCount--;\r\n };\r\n return {\r\n request: function (config) {\r\n\r\n var url = config.url;\r\n \r\n if (urlsWithoutLoaderAnimation.value.indexOf(url) === -1) {\r\n started();\r\n }\r\n \r\n return config || $q.when(config);\r\n },\r\n response: function (response) {\r\n\r\n if (!response.config) {\r\n return response;\r\n }\r\n\r\n var url = response.config.url;\r\n\r\n if (urlsWithoutLoaderAnimation.value.indexOf(url) === -1) {\r\n ended();\r\n }\r\n\r\n return response || $q.when(response);\r\n },\r\n responseError: function (rejection) {\r\n\r\n var url = rejection.config.url;\r\n\r\n if (urlsWithoutLoaderAnimation.value.indexOf(url) === -1) {\r\n ended();\r\n }\r\n \r\n return $q.reject(rejection);\r\n }\r\n };\r\n };\r\n\r\n\r\n})();\r\n\r\n(function () {\r\n\r\n LoadingCtrl.$inject = [\r\n '$scope',\r\n 'loadingService'\r\n ];\r\n\r\n angular\r\n .module('loading')\r\n .controller('LoadingCtrl', LoadingCtrl);\r\n\r\n function LoadingCtrl(\r\n $scope,\r\n loadingService\r\n ) {\r\n $scope.$watch(function () { return loadingService.isLoading(); }, function (value) { $scope.loading = value; });\r\n };\r\n\r\n})();\r\n","(function() {\r\n 'use strict';\r\n\r\n appMenuItemFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function appMenuItemFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n var AppMenuItems = $resource(baseUrl + 'REST/AppMenuItem.svc/AppMenuItems');\r\n var DemoContentForAppMenuItem = $resource(baseUrl + 'REST/AppMenuItem.svc/DemoContentForAppMenuItem');\r\n\r\n function getAppMenuItems() {\r\n return AppMenuItems.query().$promise;\r\n }\r\n\r\n function saveDemoContentForAppMenuItem(demoContent, appMenuItemId) {\r\n return DemoContentForAppMenuItem.save({ appMenuItemId: appMenuItemId }, demoContent).$promise;\r\n }\r\n\r\n return {\r\n getAppMenuItems: getAppMenuItems,\r\n saveDemoContentForAppMenuItem: saveDemoContentForAppMenuItem\r\n };\r\n }\r\n\r\n angular\r\n .module('appMenuItem')\r\n .factory('AppMenuItemFactory', appMenuItemFactory);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('attachment')\r\n .component('vbAttachment',\r\n {\r\n templateUrl: 'Scripts/attachment/attachment.component.html',\r\n controller: 'AttachmentController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n foreignKey: '<',\r\n table: '<',\r\n limitedAccess: '=',\r\n allowDescription: '=',\r\n participantSecondForeignKey: '<',\r\n participantSecondTable: '<',\r\n isCategoryUserConnect: ' return\r\n if (vm.selectedAttachment && attachment)\r\n return;\r\n\r\n vm.selectedAttachment = attachment;\r\n };\r\n\r\n /**\r\n * Removes the selected attachment and cancels edit\r\n */\r\n function unselectAttachment() {\r\n selectAttachment(null);\r\n };\r\n\r\n /**\r\n * Gets the attachments for the current deviation\r\n */\r\n function getAttachments() {\r\n return AttachmentFactory.getAttachments(vm.table, vm.foreignKey, vm.participantSecondForeignKey, vm.participantSecondTable, vm.isCategoryUserConnect, vm.participantSecondForeignKey)\r\n .then(function (result) {\r\n vm.attachments = result;\r\n });\r\n };\r\n\r\n function showIncludeInEndReport() {\r\n //add other tables that you don't want include in end report property\r\n return vm.table !== TableResources.ProcessListManagement &&\r\n vm.table !== TableResources.CourseTable;\r\n };\r\n\r\n function downloadAttachment(attachment) {\r\n DownloadService.download(attachment.URL);\r\n }\r\n\r\n function onDestroy() {\r\n vm.attachments = [];\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n AttachmentFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource',\r\n '$q'\r\n ];\r\n\r\n angular.module('attachment')\r\n .factory('AttachmentFactory', AttachmentFactory);\r\n\r\n function AttachmentFactory(\r\n baseUrlService,\r\n $resource,\r\n $q\r\n ) {\r\n var service = {};\r\n\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var AttachmentApi = $resource(api + 'REST/Attachment.svc/Attachment/:id', { id: '@id' });\r\n var AttachmentDescriptionApi = $resource(api + 'REST/Attachment.svc/AttachmentDescription');\r\n var AttachmentIncludeReportApi = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/AttachmentIncludeReport');\r\n var ConnectCategoryAttachmentUserApi = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/ConnectCategoryAttachmentUser');\r\n var ParentAttachmentForAttachment = $resource(api + 'REST/Attachment.svc/ParentAttachment/:attachmentId');\r\n\r\n service.getAttachment = function(id) {\r\n return AttachmentApi.get({ id: id });\r\n };\r\n\r\n /**\r\n * Creates and saves a new attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n service.addAttachment = function (attachment) {\r\n attachment = Object.assign(new AttachmentApi(), attachment);\r\n\r\n return attachment.$save();\r\n };\r\n\r\n /**\r\n * Deletes a given attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n service.deleteAttachment = function (attachment) {\r\n attachment = Object.assign(new AttachmentApi(), attachment);\r\n\r\n return attachment.$delete();\r\n };\r\n\r\n /**\r\n * Gets a list of attachments \r\n * @param {} table used to identity for which table should attachments be retrieved\r\n * @param {} foreignKey used to identify for which id should attachment be retrieved\r\n * @returns {} \r\n */\r\n service.getAttachments = function (table, foreignKey, participantSecondForeignKey, participantSecondTable, isCategoryUserConnect, selectedUserForConnect) {\r\n if (!table || !foreignKey)\r\n return $q.when();\r\n\r\n return AttachmentApi.query({\r\n table: table,\r\n foreignKey: foreignKey,\r\n participantSecondForeignKey: participantSecondForeignKey,\r\n participantSecondTable: participantSecondTable,\r\n isCategoryUserConnect: isCategoryUserConnect,\r\n selectedUserForConnect: selectedUserForConnect\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Saves the description for the given attachment\r\n * @param {} attachmentId \r\n * @param {} description \r\n * @returns {} \r\n */\r\n service.saveDescription = function (attachmentId, description) {\r\n if (!attachmentId)\r\n return $q.when();\r\n\r\n var attachmenDescriptionApiObject = new AttachmentDescriptionApi();\r\n\r\n attachmenDescriptionApiObject.attachmentId = attachmentId;\r\n attachmenDescriptionApiObject.description = description;\r\n\r\n return attachmenDescriptionApiObject.$save();\r\n };\r\n\r\n /**\r\n * Saves the status of the include in end report for the given attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n service.saveIncludeInEndReport = function (attachmentId, includeInReport) {\r\n if (!attachmentId)\r\n return $q.when();\r\n\r\n var attachmentIncludeReport = new AttachmentIncludeReportApi();\r\n\r\n attachmentIncludeReport.attachmentId = attachmentId;\r\n attachmentIncludeReport.includeInReport = includeInReport;\r\n\r\n return attachmentIncludeReport.$save();\r\n };\r\n\r\n service.connectCategoryAttachmentToUser = function(attachmentId, userId) {\r\n var connectAttachmentApiObject = new ConnectCategoryAttachmentUserApi();\r\n\r\n connectAttachmentApiObject.attachmentId = attachmentId;\r\n connectAttachmentApiObject.userId = userId;\r\n\r\n return connectAttachmentApiObject.$save();\r\n };\r\n\r\n service.getParentAttachmentForAttachment = function(attachmentId) {\r\n return ParentAttachmentForAttachment.get({ attachmentId: attachmentId }).$promise;\r\n };\r\n\r\n return service;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('automile').factory('AutomileFactory', UserFactory);\r\n\r\n function UserFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var automileFactory = {};\r\n\r\n var Trips = $resource(baseUrlService.getBaseUrl() + 'REST/Automile.svc/Trips');\r\n var Trip = $resource(baseUrlService.getBaseUrl() + 'REST/Automile.svc/Trip/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n\r\n \r\n automileFactory.getTrips = function (freeText) {\r\n return Trips.query({ freeText: freeText});\r\n };\r\n \r\n automileFactory.getTrip = function (tripId) {\r\n automileFactory.tripId = tripId;\r\n return Trip.get({ id: tripId });\r\n }; \r\n\r\n\r\n automileFactory.reverseTrips = true;\r\n automileFactory.predicateTrips = \"id\";\r\n automileFactory.currentPageTrips = 1;\r\n automileFactory.tripId = 0;\r\n\r\n return automileFactory;\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function competenceService() {\r\n\r\n var service = {};\r\n var _idOfCompetenceToOpenFromNotification = null;\r\n\r\n Object.defineProperties(service,\r\n {\r\n idOfCompetenceToOpenFromNotification: {\r\n set: function(value) {\r\n _idOfCompetenceToOpenFromNotification = value;\r\n },\r\n get: function() {\r\n return _idOfCompetenceToOpenFromNotification;\r\n }\r\n }\r\n });\r\n\r\n return service;\r\n }\r\n\r\n angular\r\n .module('competence')\r\n .service('CompetenceService', competenceService);\r\n\r\n})();","(function () {\r\n\r\n angular\r\n .module('contact')\r\n .component('vbContact', {\r\n\r\n templateUrl: 'Scripts/contact/contact.component.html',\r\n controller: 'ContactController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n showContactForm: '=showContactForm',\r\n contact: '()\\[\\]\\\\.,,:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n vm.phonePattern = function (phone) { \r\n return /([0-9][0-9])([0-9]{1,20})$/.test(phone);\r\n }\r\n\r\n }\r\n\r\n angular\r\n .module('contact')\r\n .controller('ContactController', ContactController);\r\n\r\n})();","(function () {\r\n\r\n ContactFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '$q'\r\n ];\r\n\r\n function ContactFactory(\r\n $resource,\r\n baseUrlService,\r\n $q\r\n ) {\r\n\r\n var Contacts = $resource(baseUrlService.getBaseUrl() + 'REST/Contact.svc/Contacts/:customerId');\r\n var NrOfContactsOnCustomer = $resource(baseUrlService.getBaseUrl() + 'REST/Contact.svc/NrOfContactsOnCustomer/:customerId');\r\n\r\n function getContactsByCustomerId(customerId) {\r\n return Contacts.query({ customerId: customerId}).$promise;\r\n }\r\n\r\n function getNrOfContactsOnCustomer(customerId) {\r\n\r\n if (!customerId) {\r\n return $q.when(0);\r\n }\r\n\r\n return NrOfContactsOnCustomer.query({ customerId: customerId}).$promise;\r\n }\r\n\r\n return {\r\n getContactsByCustomerId: getContactsByCustomerId,\r\n getNrOfContactsOnCustomer: getNrOfContactsOnCustomer\r\n };\r\n\r\n }\r\n\r\n angular\r\n .module('contact')\r\n .factory('ContactFactory', ContactFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n countryFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function countryFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var Countries = $resource(baseUrl + 'REST/Country.svc/Countries/:accessPage');\r\n\r\n /**\r\n * Sends a request to the server in order to retrieve countries\r\n * @param {any} accessPage - The page from where the request is made\r\n */\r\n function getCountries(accessPage) {\r\n return Countries.query({\r\n accessPage: accessPage\r\n }).$promise;\r\n }\r\n\r\n return {\r\n getCountries: getCountries\r\n };\r\n }\r\n\r\n angular\r\n .module('country')\r\n .factory('CountryFactory', countryFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function courseFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n var Course = $resource(baseUrl + 'REST/Course.svc/Course/:courseId');\r\n var Courses = $resource(baseUrl + 'REST/Course.svc/Courses');\r\n var MyCourses = $resource(baseUrl + 'REST/Course.svc/MyCourses');\r\n var CourseByCourseSessionId = $resource(baseUrl + 'REST/Course.svc/CourseByCourseSessionId/:courseSessionId');\r\n var InviteCourseParticipants = $resource(baseUrl + 'REST/Course.svc/InviteCourseParticipants/:courseId');\r\n var InviteSelectedCourseParticipants = $resource(baseUrl + 'REST/Course.svc/InviteSelectedCourseParticipants');\r\n var UnsubscribeFromCourse = $resource(baseUrl + 'REST/Course.svc/UnsubscribeFromCourse');\r\n var NotifyUserAboutUnsubscribeFee = $resource(baseUrl + 'REST/Course.svc/NotifyUserAboutUnsubscribeFee');\r\n var UserEnrollmentConnectedToCourseSessionsCheck = $resource(baseUrl + 'REST/Course.svc/UserEnrollmentConnectedToCourseSessionsCheck');\r\n var TargetAudiencesByOrganization = $resource(baseUrl + 'REST/Course.svc/TargetAudiencesByOrganization');\r\n var RelevantCoursesForUser = $resource(baseUrl + 'REST/Course.svc/RelevantCoursesForUser/:userId');\r\n var CoursesOverview = $resource(baseUrl + 'REST/Course.svc/CoursesOverview/:userId/:organizationId');\r\n\r\n function saveCourse(course) {\r\n return Course.save(course).$promise;\r\n }\r\n\r\n function getCourseById(courseId) {\r\n return Course.get({ courseId: courseId }).$promise;\r\n }\r\n\r\n function getCourses(courseStatusProgId) {\r\n return Courses.query({ courseStatusProgId: courseStatusProgId}).$promise;\r\n }\r\n\r\n function getMyCourses() {\r\n return MyCourses.query().$promise;\r\n }\r\n\r\n function getCourseByCourseSessionId(courseSessionId) {\r\n return CourseByCourseSessionId.get({ courseSessionId: courseSessionId }).$promise;\r\n }\r\n\r\n function sendInvitationsToTheParticipantsOfTheCourse(courseId, notificationTemplate) {\r\n return InviteCourseParticipants.save({ courseId: courseId }, notificationTemplate).$promise;\r\n }\r\n\r\n function sendInvitationsToSelectedParticipantsOfTheCourse(selectedUsers, courseId, notificationTemplate) {\r\n\r\n var data = {\r\n SelectedUsers: selectedUsers,\r\n CourseId: courseId,\r\n NotificationTemplate: notificationTemplate\r\n };\r\n\r\n return InviteSelectedCourseParticipants.save(data).$promise;\r\n }\r\n\r\n function unsubscribeFromCourse(course) {\r\n return UnsubscribeFromCourse.save(course).$promise;\r\n }\r\n\r\n function notifyUserAboutCourseUnsubscribeFee(courseId) {\r\n return NotifyUserAboutUnsubscribeFee.save({ courseId: courseId }).$promise;\r\n }\r\n\r\n function checkIfUserEnrollmentToCourseIsConnectedToCourseSessions(user, courseId) {\r\n // using http post method to send the request\r\n return UserEnrollmentConnectedToCourseSessionsCheck.save({\r\n user: user,\r\n courseId: courseId\r\n }).$promise;\r\n }\r\n\r\n function getCourseTargetAudiencesByOrganizationId(organizationId, courseId) {\r\n return TargetAudiencesByOrganization.query({\r\n organizationId: organizationId,\r\n courseId: courseId\r\n }).$promise;\r\n }\r\n\r\n function getRelevantCoursesForUser(userId) {\r\n return RelevantCoursesForUser.query({ userId: userId }).$promise;\r\n }\r\n\r\n function getCoursesOverview(userId, userOrganizationId) {\r\n return CoursesOverview.query({\r\n userId: userId,\r\n organizationId: userOrganizationId\r\n }).$promise;\r\n }\r\n\r\n return {\r\n saveCourse: saveCourse,\r\n getCourseById: getCourseById,\r\n getCourses: getCourses,\r\n getMyCourses: getMyCourses,\r\n getCourseByCourseSessionId: getCourseByCourseSessionId,\r\n sendInvitationsToTheParticipantsOfTheCourse: sendInvitationsToTheParticipantsOfTheCourse,\r\n unsubscribeFromCourse: unsubscribeFromCourse,\r\n notifyUserAboutCourseUnsubscribeFee: notifyUserAboutCourseUnsubscribeFee,\r\n checkIfUserEnrollmentToCourseIsConnectedToCourseSessions: checkIfUserEnrollmentToCourseIsConnectedToCourseSessions,\r\n sendInvitationsToSelectedParticipantsOfTheCourse: sendInvitationsToSelectedParticipantsOfTheCourse,\r\n getCourseTargetAudiencesByOrganizationId: getCourseTargetAudiencesByOrganizationId,\r\n getRelevantCoursesForUser: getRelevantCoursesForUser,\r\n getCoursesOverview: getCoursesOverview\r\n };\r\n }\r\n\r\n angular\r\n .module('course')\r\n .factory('CourseFactory', courseFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseService.$inject = [\r\n 'CourseDayService',\r\n 'courseStatuses',\r\n 'DateUtilService',\r\n 'CourseTypes'\r\n ];\r\n\r\n function courseService(\r\n CourseDayService,\r\n courseStatuses,\r\n DateUtilService,\r\n CourseTypes\r\n ) {\r\n var _courseDetailsPageOpenedFromRoute = null;\r\n\r\n function convertCourseDatesToMilliseconds(course) {\r\n\r\n if (!course) {\r\n throw new Error('Cannot convert dates to milliseconds for an invalid course');\r\n }\r\n\r\n if (course.StartDate) {\r\n course.StartDate = DateUtilService.getLongWithOffset(moment(course.StartDate).toDate());\r\n }\r\n\r\n if (course.EndDate) {\r\n course.EndDate = DateUtilService.getLongWithOffset(moment(course.EndDate).toDate());\r\n }\r\n\r\n CourseDayService.convertCourseDaysDatesToMillisecondsWithOffset(course.Days);\r\n }\r\n\r\n function computeNrOfDaysLeftUntilCourseStarts(course) {\r\n\r\n if (!course) {\r\n throw new Error('Course cannot be null when computing nr. of days left until it starts');\r\n }\r\n\r\n var courseStartDate = moment(course.StartDate);\r\n var todayDate = moment(new Date());\r\n\r\n var days = courseStartDate.diff(todayDate, 'days');\r\n\r\n if (days < 0) {\r\n days = 0;\r\n }\r\n\r\n return days;\r\n }\r\n\r\n function isCancellationDeadlineOver(course) {\r\n\r\n if (!course) {\r\n throw new Error('Course cannot be null when checking if registration deadline is over');\r\n }\r\n\r\n if (course.NrOfDaysBeforeCourseStarts === null || course.NrOfDaysBeforeCourseStarts === undefined) {\r\n course.NrOfDaysBeforeCourseStarts = 0;\r\n }\r\n\r\n var days = computeNrOfDaysLeftUntilCourseStarts(course);\r\n\r\n return days < course.NrOfDaysBeforeCourseStarts;\r\n }\r\n\r\n function extractCourseEnrollmentForUser(user, course) {\r\n\r\n if (!user) {\r\n throw new Error('User cannot be null or undefined when extracting course enrollment for user');\r\n }\r\n\r\n if (!course) {\r\n throw new Error('Course cannot be null or undefined when extracting course enrollment for user');\r\n }\r\n\r\n if (!course.EnrolledUsers || course.EnrolledUsers.length === 0) {\r\n return {};\r\n }\r\n\r\n var userFound = course.EnrolledUsers.find(function (currentUser) {\r\n return currentUser.id === user.id;\r\n });\r\n\r\n if (!userFound || !userFound.CourseEnrollment) {\r\n return {};\r\n }\r\n\r\n return userFound.CourseEnrollment;\r\n }\r\n\r\n function isRepeatingDaily(course) {\r\n\r\n if (!course) {\r\n return null;\r\n }\r\n\r\n if (!course.Settings) {\r\n return null;\r\n }\r\n\r\n return course.Settings.ItRepeatsDaily;\r\n }\r\n\r\n function hasLimitedAccessToEnrolledUsers(course) {\r\n\r\n if (!course) {\r\n return null;\r\n }\r\n\r\n if (!course.Settings) {\r\n return null;\r\n }\r\n\r\n return course.Settings.LimitedAccessToEnrolledUsers;\r\n }\r\n\r\n function getIndexOfDayInList(day, days) {\r\n\r\n var dayMomentDate = moment(day.Date);\r\n\r\n return days.findIndex(function(currentDay) {\r\n\r\n var currentDayMomentDate = moment(currentDay.Date);\r\n\r\n return currentDayMomentDate.date() === dayMomentDate.date() &&\r\n currentDayMomentDate.month() === dayMomentDate.month() &&\r\n currentDayMomentDate.year() === dayMomentDate.year();\r\n });\r\n }\r\n\r\n function updateCourseDays(course, day) {\r\n\r\n if (!course) {\r\n throw new Error('Course cannot be null when updating course days');\r\n }\r\n\r\n if (!day) {\r\n throw new Error('Day cannot be null when updating course days');\r\n }\r\n\r\n if (!course.Days) {\r\n course.Days = [];\r\n }\r\n\r\n var dayIndex;\r\n\r\n if (day.isSelected) {\r\n\r\n dayIndex = getIndexOfDayInList(day, course.Days);\r\n\r\n if (dayIndex !== -1) {\r\n return;\r\n }\r\n // if not exists add the day\r\n course.Days.push(day);\r\n\r\n } else {\r\n\r\n dayIndex = getIndexOfDayInList(day, course.Days);\r\n\r\n if (dayIndex === -1) {\r\n return;\r\n }\r\n\r\n course.Days.splice(dayIndex, 1);\r\n }\r\n }\r\n\r\n function isPublished(course) {\r\n\r\n if (!course || !course.Status) {\r\n return null;\r\n }\r\n\r\n return course.Status.ProgId === courseStatuses.published;\r\n }\r\n\r\n function convertCourseDatesToMillisecondsWithoutOffset(course) {\r\n\r\n if (!course) {\r\n return;\r\n }\r\n\r\n if (course.StartDate) {\r\n course.StartDate = DateUtilService.getLongWithoutOffset(moment(course.StartDate).valueOf());\r\n }\r\n\r\n if (course.EndDate) {\r\n course.EndDate = DateUtilService.getLongWithoutOffset(moment(course.EndDate).valueOf());\r\n }\r\n }\r\n\r\n function getCourseDetailsPageOpenedFromRoute() {\r\n return _courseDetailsPageOpenedFromRoute;\r\n }\r\n\r\n function setCourseDetailsPageOpenedFromRoute(value) {\r\n _courseDetailsPageOpenedFromRoute = value;\r\n }\r\n\r\n function isSpanningOnSeveralDays(course) {\r\n\r\n if (!course) {\r\n return null;\r\n }\r\n\r\n if (!course.Settings) {\r\n return null;\r\n }\r\n\r\n return course.Settings.IsSpanningSeveralDays;\r\n }\r\n\r\n function isCourseOfTypeELearning(course) {\r\n\r\n if (!course || !course.Type)\r\n return null;\r\n\r\n return course.Type.ProgId === CourseTypes.ELearning;\r\n }\r\n\r\n return {\r\n convertCourseDatesToMilliseconds: convertCourseDatesToMilliseconds,\r\n computeNrOfDaysLeftUntilCourseStarts: computeNrOfDaysLeftUntilCourseStarts,\r\n isCancellationDeadlineOver: isCancellationDeadlineOver,\r\n extractCourseEnrollmentForUser: extractCourseEnrollmentForUser,\r\n isRepeatingDaily: isRepeatingDaily,\r\n hasLimitedAccessToEnrolledUsers: hasLimitedAccessToEnrolledUsers,\r\n updateCourseDays: updateCourseDays,\r\n isPublished: isPublished,\r\n convertCourseDatesToMillisecondsWithoutOffset: convertCourseDatesToMillisecondsWithoutOffset,\r\n setCourseDetailsPageOpenedFromRoute: setCourseDetailsPageOpenedFromRoute,\r\n getCourseDetailsPageOpenedFromRoute: getCourseDetailsPageOpenedFromRoute,\r\n isSpanningOnSeveralDays: isSpanningOnSeveralDays,\r\n isCourseOfTypeELearning: isCourseOfTypeELearning\r\n };\r\n }\r\n\r\n angular\r\n .module('course')\r\n .service('CourseService', courseService);\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n CustomerFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular\r\n .module('customer')\r\n .factory('CustomerFactory', CustomerFactory);\r\n\r\n function CustomerFactory($resource, baseUrlService) {\r\n var customerFactory = {};\r\n\r\n var Customers = $resource(baseUrlService.getBaseUrl() + 'REST/Customer.svc/Customers');\r\n var Customer = $resource(baseUrlService.getBaseUrl() + 'REST/Customer.svc/Customer/:customerId', {\r\n customerId: '@id'\r\n }, {\r\n update: {\r\n method: 'PUT'\r\n }\r\n });\r\n var StatusList = $resource(baseUrlService.getBaseUrl() + 'REST/Customer.svc/StatusList');\r\n var Types = $resource(baseUrlService.getBaseUrl() + 'REST/Customer.svc/Types');\r\n var CustomersDropdown = $resource(baseUrlService.getBaseUrl() + 'REST/Customer.svc/CustomersDropdown');\r\n var Contact = $resource(baseUrlService.getBaseUrl() + 'REST/Customer.svc/Contact');\r\n\r\n /**\r\n * Fetches the list of customers for the customer grid\r\n * @param freeText\r\n * @param includeDeactivated\r\n * @param organizationId\r\n * @returns\r\n */\r\n customerFactory.getCustomers = function (freeText, includeDeactivated, organizationId, withoutEmail) {\r\n return Customers.query({\r\n freeText: freeText,\r\n includeDeactivated: includeDeactivated,\r\n organizationId: organizationId,\r\n withoutEmail: withoutEmail\r\n });\r\n };\r\n\r\n /**\r\n * Fetches the list of customers for the customer dropdown\r\n * @returns\r\n */\r\n customerFactory.getCustomersDropdown = function () {\r\n return CustomersDropdown.query();\r\n };\r\n\r\n /**\r\n * Fetches a customer by a given id\r\n * @param id\r\n * @returns\r\n */\r\n customerFactory.getCustomer = function (id) {\r\n var customerId = id;\r\n return Customer.get({\r\n customerId: id\r\n });\r\n };\r\n\r\n /**\r\n * Fetches the list of statuses for customers\r\n * @returns\r\n */\r\n customerFactory.getStatusDropdown = function () {\r\n return StatusList.query();\r\n };\r\n\r\n /**\r\n * Fetches the list of types for customers\r\n * @returns\r\n */\r\n customerFactory.getTypes = function () {\r\n return Types.query();\r\n };\r\n\r\n /**\r\n * Returns a new object to be able to save any newly created customers\r\n * @returns\r\n */\r\n customerFactory.getCustomerToSave = function () {\r\n return new Customer();\r\n };\r\n\r\n /**\r\n * Saves or updates any given customer\r\n * @param customerSaved\r\n * @returns\r\n */\r\n customerFactory.saveCustomer = function (customerSaved) {\r\n if (customerSaved.id == undefined)\r\n return customerSaved.$save();\r\n else\r\n return customerSaved.$update();\r\n\r\n };\r\n\r\n /**\r\n * Returns a new object to be able to save any newly created contacts\r\n * @returns\r\n */\r\n customerFactory.getContactToSave = function () {\r\n return new Contact();\r\n };\r\n\r\n /**\r\n * Saves any given contact\r\n * @param contact\r\n * @returns\r\n */\r\n customerFactory.saveContact = function (contact) {\r\n return Contact.save(contact).$promise;\r\n };\r\n\r\n customerFactory.reverseCustomers = false;\r\n customerFactory.predicateCustomers = \"FullName\";\r\n customerFactory.currentPageCustomers = 1;\r\n customerFactory.customerId = 0;\r\n customerFactory.includeDeactivatedItems = false;\r\n\r\n return customerFactory;\r\n }\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('deviation')\r\n .factory('DeviationFactory', DeviationFactory);\r\n\r\n function DeviationFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n\r\n var deviationFactory = {};\r\n\r\n var DeviationStatuses = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationStatuses');\r\n var DeviationTypes = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationTypes');\r\n var DeviationTypeOfCauses = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationTypeOfCauses');\r\n var Deviations = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/Deviations');\r\n var Deviation = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/Deviation/:deviationId', { deviationId: '@id' }, { update: { method: 'PUT' } });\r\n var DeviationExecution = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationExecution');\r\n var DeviationAudit = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationAudit');\r\n var DeviationNotification = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationNotification');\r\n var EntitiesToNotify = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/EntitiesToNotify');\r\n var NewEntitiesForNotify = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/NewEntitiesForNotify');\r\n var SendEmailWithDeviation = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/SendEmailWithDeviation');\r\n var NotifyForStatusChanged = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/NotifyForStatusChanged');\r\n var DeviationExternalPartyEmail = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/ExternalPartyEmail');\r\n var DeviationForExternalInput = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationForExternalInput');\r\n var DeviationExternalPartyComments = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/DeviationExternalPartyComments');\r\n var SendDeviationDetailsReportThroughEmail = $resource(baseUrlService.getBaseUrl() + 'REST/Deviation.svc/SendDeviationDetailsReportThroughEmail');\r\n\r\n /**\r\n * Fetch the list of statuses for deviations\r\n * @returns {} \r\n */\r\n deviationFactory.getDeviationStatuses = function () {\r\n return DeviationStatuses.query().$promise;\r\n };\r\n\r\n /**\r\n * Fetch the list of deviations to be showed in grid\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @param {} table \r\n * @param {} foreignKey \r\n * @param {} typeId \r\n * @returns {} \r\n */\r\n deviationFactory.getDeviations = function (freeText, organizationId, table, foreignKey, typeId) {\r\n return Deviations.query({\r\n freeText: freeText,\r\n organizationId: organizationId,\r\n table: table,\r\n foreignKey: foreignKey,\r\n typeId: typeId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Fetch a specific deviation\r\n * @param {} deviationId \r\n * @returns {} \r\n */\r\n deviationFactory.getDeviation = function (deviationId) {\r\n return Deviation.get({\r\n deviationId: deviationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Save or update a given deviation\r\n * @param {} deviation \r\n * @returns {} \r\n */\r\n deviationFactory.saveDeviation = function (deviation) {\r\n if (deviation.Date)\r\n deviation.Date = angular.copy(new Date(deviation.Date)).getTime();\r\n\r\n if (deviation.id)\r\n return deviation.$update();\r\n return deviation.$save();\r\n };\r\n\r\n /**\r\n * Get new object with necessary functions for $resource save\r\n * @returns {} \r\n */\r\n deviationFactory.getDeviationForSave = function () {\r\n return new Deviation();\r\n };\r\n\r\n /**\r\n * Get a list of types for deviations\r\n * @returns {} \r\n */\r\n deviationFactory.getDeviationTypes = function () {\r\n return DeviationTypes.query().$promise;\r\n };\r\n\r\n /**\r\n * Get a list of type of causes for deviation\r\n * @returns {} \r\n */\r\n deviationFactory.getTypeOfCauses = function () {\r\n return DeviationTypeOfCauses.query().$promise;\r\n };\r\n\r\n /**\r\n * Get the process list associated with the deviation\r\n * @param {} deviationId \r\n * @returns {} \r\n */\r\n deviationFactory.getDeviationExecution = function (deviationId) {\r\n return DeviationExecution.get({ deviationId: deviationId }).$promise;\r\n };\r\n\r\n /**\r\n * Get the history of the deviation\r\n * @param {} deviationId \r\n * @returns {} \r\n */\r\n deviationFactory.getDeviationAudit = function (deviationId) {\r\n return DeviationAudit.query({ deviationId: deviationId }).$promise;\r\n };\r\n\r\n /**\r\n * Get emails and smss for the deviation\r\n * @param {} deviationId \r\n * @returns {} \r\n */\r\n deviationFactory.getDeviationNotificationList = function (deviationId) {\r\n return DeviationNotification.query({ deviationId: deviationId }).$promise;\r\n };\r\n\r\n /**\r\n * Get a list of entities to later be able to notify them\r\n * @param {} foreignKey \r\n * @param {} table \r\n * @param {} deviationId \r\n * @returns {} \r\n */\r\n deviationFactory.getEntitiesToNotify = function (foreignKey, table, deviationId) {\r\n return EntitiesToNotify.query({\r\n foreignKey: foreignKey,\r\n table: table,\r\n deviationId: deviationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Get entities for notification based on a search criteria\r\n * @param {} freetext \r\n * @param {} templateTable \r\n * @returns {} \r\n */\r\n deviationFactory.getNewEntitiesToNotify = function (freetext, templateTable, organizationId) {\r\n return NewEntitiesForNotify.query({\r\n freetext: freetext,\r\n templateTable: templateTable,\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Send an email with the deviation attached\r\n * @param {} recipients \r\n * @param {} deviation \r\n * @param {} emailTemplate \r\n * @returns {} \r\n */\r\n deviationFactory.sendEmailWithDeviation = function (recipients, deviation, emailTemplate) {\r\n return SendEmailWithDeviation.save({}, {\r\n recipients: recipients,\r\n deviation: deviation,\r\n emailTemplate: emailTemplate\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Notifiy the user when the status changes\r\n * @param {} deviationId \r\n * @param {} foreignKey \r\n * @param {} deviationTable \r\n * @returns {} \r\n */\r\n deviationFactory.notifyForStatusChange = function (deviationId, foreignKey, deviationTable) {\r\n\r\n return NotifyForStatusChanged.save({\r\n deviationId: deviationId,\r\n foreignKey: foreignKey,\r\n deviationTable: deviationTable\r\n }, {});\r\n\r\n };\r\n\r\n /**\r\n * Sends an e-mail to the external party set on a deviation \r\n * @param {} deviation\r\n */\r\n deviationFactory.sendEmailToExternalParty = function (deviation) {\r\n return DeviationExternalPartyEmail.save(deviation).$promise;\r\n };\r\n\r\n /**\r\n * Gets a deviation details by its id\r\n *\r\n * @param {} deviationId\r\n * @param {} sessionId\r\n */\r\n deviationFactory.getDeviationForExternalInput = function (deviationId, sessionId) {\r\n\r\n return DeviationForExternalInput.get({\r\n deviationId: deviationId,\r\n sessionId: sessionId\r\n }, {}).$promise;\r\n\r\n };\r\n\r\n /**\r\n * Saves additional comments inputed by a external party on a deviation\r\n * @param {} deviation\r\n * @returns {}\r\n */\r\n deviationFactory.saveDeviationAdditionalComments = function (deviation, sessionId) {\r\n return DeviationExternalPartyComments.save({\r\n sessionId: sessionId\r\n }, deviation).$promise;\r\n };\r\n\r\n deviationFactory.sendDeviationDetailsReportThroughEmail = function (reportData, deviationId) {\r\n return SendDeviationDetailsReportThroughEmail.save({\r\n reportData: reportData,\r\n deviationId: deviationId\r\n }).$promise;\r\n };\r\n\r\n deviationFactory.predicate = 'id';\r\n deviationFactory.reverse = true;\r\n deviationFactory.modalInstance = null;\r\n deviationFactory.emailPreviewModalInstance = null;\r\n deviationFactory.selectedType = null;\r\n\r\n return deviationFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ErrorLogService.$inject = [\r\n '$log',\r\n '$window',\r\n 'StackTraceService',\r\n '_',\r\n 'sessionInformationService',\r\n 'StorageService'\r\n ];\r\n\r\n LogFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '_'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .provider('$exceptionHandler', {\r\n $get: [\r\n 'ErrorLogService', function (ErrorLogService) {\r\n return (ErrorLogService);\r\n }\r\n ]\r\n })\r\n .factory('ErrorLogService', ErrorLogService)\r\n .factory('LogFactory', LogFactory)\r\n .factory('StackTraceService', StackTraceService);\r\n\r\n /**\r\n * Custom service for StackTrace.js\r\n */\r\n function StackTraceService() {\r\n return ({\r\n print: function (error) {\r\n return StackTrace.fromError(error);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Global service that handles any thrown errors\r\n */\r\n function ErrorLogService(\r\n $log,\r\n $window,\r\n StackTraceService,\r\n _,\r\n sessionInformationService,\r\n StorageService\r\n ) {\r\n\r\n\r\n function log(exception, cause) {\r\n //pass to angularjs logger -> this will output to console\r\n $log.error.apply($log, arguments);\r\n\r\n var errorMessage = exception.toString();\r\n\r\n if (_.some([//we're not interested in these ones\r\n 'Possibly unhandled rejection: backdrop click',\r\n 'Possibly unhandled rejection: Transition cancelled',\r\n 'Possibly unhandled rejection: Incorect Date format!'\r\n ], function (e) { return errorMessage == e }))\r\n return;\r\n\r\n var log = {};\r\n\r\n var promise = _.isString(exception) ? Promise.resolve(exception) : StackTraceService.print(exception);\r\n\r\n //get stack trace\r\n promise\r\n .then(function (result) {\r\n log = {\r\n Code: 0,\r\n Message: \"Message: \" + errorMessage + \"\\n Original Error: \" + JSON.stringify(_.cloneDeep(exception)) + \"\\n Stack Trace: \" + JSON.stringify(result),\r\n Key: sessionInformationService.getUser().id,\r\n Table: \"WEB_ERROR\"\r\n };\r\n\r\n return StorageService.getItem('Errors');\r\n }).then(function (result) {\r\n if (!result)\r\n result = [];\r\n\r\n result.push(log);\r\n\r\n return StorageService.storeItem('Errors', result);\r\n }).catch(function (err) {\r\n $log.warn(\"Error logging failed\");\r\n $log.log(err);\r\n });\r\n };\r\n\r\n return (log);\r\n };\r\n\r\n /**\r\n * Simple factory that saves the logs on server\r\n */\r\n function LogFactory(\r\n $resource,\r\n baseUrlService,\r\n _\r\n ) {\r\n\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var Logs = $resource(api + 'REST/Log.svc/Logs', {}, { save: { method: 'POST', isArray: true } });\r\n\r\n /**\r\n * Make a requests and saves the logs on server\r\n * @param {any} logs\r\n */\r\n this.saveLogs = function (logs) {\r\n if (_.isNil(logs) || _.isEmpty(logs))\r\n return Promise.resolve();\r\n\r\n return Logs.save({}, logs).$promise;\r\n };\r\n\r\n return this;\r\n };\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function executionService() {\r\n\r\n var _page = null;\r\n var _idOfExecutionToOpenFromProjectPage = null;\r\n var _idOfExecutionToOpenFromQualityHandbookPage = null;\r\n\r\n function getPageFromWhereTheExecutionWasOpened() {\r\n return _page;\r\n }\r\n\r\n function setPageFromWhereTheExecutionWasOpened(page) {\r\n _page = page;\r\n }\r\n\r\n function getIdOfExecutionToOpenFromProjectPage() {\r\n return _idOfExecutionToOpenFromProjectPage;\r\n }\r\n\r\n function setIdOfExecutionToOpenFromProjectPage(initiatedId) {\r\n _idOfExecutionToOpenFromProjectPage = initiatedId;\r\n }\r\n\r\n function setIdOfExecutionToOpenFromQualityHandbookPage(initiatedId) {\r\n _idOfExecutionToOpenFromQualityHandbookPage = initiatedId;\r\n }\r\n\r\n function getIdOfExecutionToOpenFromQualityHandbookPage() {\r\n return _idOfExecutionToOpenFromQualityHandbookPage;\r\n }\r\n\r\n return {\r\n getPageFromWhereTheExecutionWasOpened: getPageFromWhereTheExecutionWasOpened,\r\n setPageFromWhereTheExecutionWasOpened: setPageFromWhereTheExecutionWasOpened,\r\n setIdOfExecutionToOpenFromProjectPage: setIdOfExecutionToOpenFromProjectPage,\r\n getIdOfExecutionToOpenFromProjectPage: getIdOfExecutionToOpenFromProjectPage,\r\n setIdOfExecutionToOpenFromQualityHandbookPage: setIdOfExecutionToOpenFromQualityHandbookPage,\r\n getIdOfExecutionToOpenFromQualityHandbookPage: getIdOfExecutionToOpenFromQualityHandbookPage\r\n }\r\n }\r\n\r\n angular\r\n .module('execution')\r\n .service('ExecutionService', executionService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ExecutionFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('execution').factory('ExecutionFactory', ExecutionFactory);\r\n\r\n function ExecutionFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var executionFactory = {};\r\n\r\n var InitiatedProcessList = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/InitiatedProcesslist/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var Executions = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/Executions');\r\n var ExecutionsInProgress = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/ExecutionsInProgress');\r\n var Execution = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/Executions/:id');\r\n var DeactivateExecution = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/DeactivateExecution');\r\n\r\n var NotificationData = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/GetNotificationTemplate');\r\n var OrganizationContacts = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/GetOrganizationContacts');\r\n\r\n var ExecutionExecutedFor = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/ExecutionExecutedFor');\r\n var ExecutionOrganizationExecutedFor = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/ExecutionOrganizationExecutedFor');\r\n var CameraImage = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/CameraImage');\r\n var CameraImages = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/CameraImages', {}, { save: { method: 'POST', isArray: true } });\r\n var PageBreak = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/ChangeReportPageBreak');\r\n\r\n var ExecutionParticipants = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/ExecutionParticipants/:executionId');\r\n var UpdateExecutionParticipants = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/UpdateExecutionParticipants');\r\n\r\n var ManagementExecution = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/Execution/:initiatedId');\r\n var AnswerHistory = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/AnswerHistory/:initiatedProcessListId');\r\n var NotifyQualityHandbookExecutionCreatorAboutUpdate = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/NotifyQualityHandbookExecutionCreatorAboutUpdate');\r\n var RootInitiatedProcessListByWorkingValueId = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/RootInitiatedProcessListByWorkingValueId/:workingValueId');\r\n var RootInitiatedProcessListStartingFrom = $resource(baseUrlService.getBaseUrl() + 'REST/Execution.svc/RootInitiatedProcessListStartingFrom/:initiatedProcessListId');\r\n\r\n /**\r\n * Change the page break value the given item initiated id\r\n * @param {} initiatedId \r\n * @param {} value \r\n * @returns {} \r\n */\r\n executionFactory.changePageBreakValue = function (initiatedId, value) {\r\n var pageBreak = new PageBreak;\r\n return new pageBreak.$save({ initiatedId: initiatedId, value: value });\r\n };\r\n\r\n /**\r\n * Get the initiated process list for the given order id or process list id\r\n * @param {} orderId \r\n * @param {} processListId \r\n * @returns {} \r\n */\r\n executionFactory.initiateProcessList = function (orderId, processListId) {\r\n return InitiatedProcessList.get({ orderId: null, processListId: processListId });\r\n };\r\n\r\n /**\r\n * Get then initiated process list based on the initiated id\r\n * @param {} id\r\n * @param {} skipHierarchy\r\n * @param {} retrieveDescriptionHtmlFromTemplate\r\n * @returns {} \r\n */\r\n executionFactory.getInitiatedProcessList = function (id, skipHierarchy, retrieveDescriptionHtmlFromTemplate) {\r\n return InitiatedProcessList.get({\r\n id: id,\r\n skipHierarchy: skipHierarchy,\r\n retrieveDescriptionHtmlFromTemplate: retrieveDescriptionHtmlFromTemplate\r\n });\r\n };\r\n\r\n /**\r\n * Update any given process list.\r\n * Check whether the list is from execution management window\r\n * @param {} processList \r\n * @param {} fromExecution \r\n * @returns {} \r\n */\r\n executionFactory.updateProcessList = function (processList, fromExecution) {\r\n return processList.$update({ generateEndReport: processList.ProcessListType.ProgId != 'MANAGEMENT', fromExecution: fromExecution });\r\n };\r\n\r\n /**\r\n * Get the list of management executions\r\n * @param {} foreignKey \r\n * @param {} table \r\n * @param {} byAvailableTable used to diferentiate the horizontal ones\r\n * @param {} includeDeactivated used to include the deactivated executions\r\n * @returns {} \r\n */\r\n executionFactory.getExecutions = function (foreignKey, table, byAvailableTable, includeDeactivated) {\r\n return Executions.query({ foreignKey: foreignKey, table: table, byAvailableTable: byAvailableTable, includeDeactivated: includeDeactivated });\r\n };\r\n\r\n /**\r\n * Get basic data to be able to send notifications\r\n * @param {} initiatedProcessListId \r\n * @param {} dataAbout \r\n * @returns {} \r\n */\r\n executionFactory.getNotificationData = function (initiatedProcessListId, dataAbout) {\r\n return NotificationData.get({ initiatedProcessListId: initiatedProcessListId, dataAbout: dataAbout });\r\n }\r\n\r\n /**\r\n * Get the company contacts\r\n * @param {} freetext \r\n * @param {} notificationProgId \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n executionFactory.getOrganizationContacts = function (freetext, notificationProgId, organizationId) {\r\n return OrganizationContacts.query({ freetext: freetext, notificationProgId: notificationProgId, organizationId: organizationId });\r\n }\r\n\r\n /**\r\n * Get those executions that aren't done'\r\n * @param {} includeDeactivated \r\n * @returns {} \r\n */\r\n executionFactory.getExecutionsInProgress = function (includeDeactivated) {\r\n return ExecutionsInProgress.query({ includeDeactivated: includeDeactivated });\r\n };\r\n\r\n /**\r\n * Get the execution for the given id\r\n * @param {} id \r\n * @returns {} \r\n */\r\n executionFactory.getExecution = function (id) {\r\n return Execution.get({ id: id });\r\n };\r\n\r\n /**\r\n * Create a new execution object and save it for the given properties\r\n * @param {} foreignKey \r\n * @param {} processListId \r\n * @param {} participants \r\n * @param {} table \r\n * @returns {} \r\n */\r\n executionFactory.createExecution = function (foreignKey, processListId, participants, table) {\r\n var execution = {\r\n ForeignKey: foreignKey,\r\n Participants: participants,\r\n Table: table\r\n };\r\n\r\n // returns the id of the process list that was initiated for this execution\r\n return Executions.save({ processListId: processListId }, { execution: execution });\r\n };\r\n\r\n /**\r\n * Get the user for who is executed this list for\r\n * @param {} initiatedProcessListId \r\n * @param {} tableProgId \r\n * @returns {} \r\n */\r\n executionFactory.getWhoIsExecutedFor = function (initiatedProcessListId, tableProgId) {\r\n return ExecutionExecutedFor.get({ initiatedProcessListId: initiatedProcessListId, tableProgId: tableProgId });\r\n };\r\n\r\n /**\r\n * Get the company for who is executed this list for\r\n * @param {} initiatedProcessListId \r\n * @param {} tableProgId \r\n * @returns {} \r\n */\r\n executionFactory.getOrganizationExecutedFor = function (initiatedProcessListId, tableProgId) {\r\n return ExecutionOrganizationExecutedFor.get({ initiatedProcessListId: initiatedProcessListId, tableProgId: tableProgId });\r\n };\r\n\r\n /**\r\n * Return a new object to be able to save it later using $resorce\r\n * @returns {} \r\n */\r\n executionFactory.CameraImage = function () {\r\n return new CameraImage();\r\n };\r\n \r\n /**\r\n * Save the image on server\r\n * @param {} cameraImage \r\n * @returns {} \r\n */\r\n executionFactory.saveCameraImage = function (cameraImage) {\r\n return CameraImage.save(cameraImage);\r\n };\r\n\r\n executionFactory.organizationId;//used for management execution\r\n\r\n /**\r\n * Saves a list of images on server\r\n * @param {} cameraImages \r\n * @returns {} \r\n */\r\n executionFactory.saveCameraImages = function (cameraImages) {\r\n return CameraImages.save({}, cameraImages).$promise;\r\n };\r\n\r\n executionFactory.deactivateExecution = function (executionId) {\r\n var deactivateExecution = new DeactivateExecution();\r\n return deactivateExecution.$save({ executionId: executionId });\r\n };\r\n\r\n /**\r\n * Get the list of users that have access to the execution\r\n * @param {} executionId \r\n * @returns {} \r\n */\r\n executionFactory.getExecutionParticipants = function (executionId) {\r\n return ExecutionParticipants.query({ executionId: executionId }).$promise;\r\n };\r\n\r\n /**\r\n * Get the execution for a give initiated id\r\n * @param {} initiatedId \r\n * @returns {} \r\n */\r\n executionFactory.getManagementExecution = function (initiatedId) {\r\n return ManagementExecution.get({ initiatedId: initiatedId }).$promise;\r\n };\r\n\r\n /**\r\n * Update the list of users that have access to the execution\r\n * @param {} executionId \r\n * @param {} participantIds\r\n * @param {} accessPage - The page from which the execution was opened\r\n * @returns {} \r\n */\r\n executionFactory.updateExecutionParticipants = function (executionId, participantIds, accessPage) {\r\n return UpdateExecutionParticipants.save({\r\n executionId: executionId,\r\n participantIds: participantIds,\r\n accessPage: accessPage\r\n }, {}).$promise;\r\n };\r\n\r\n /**\r\n * Get the execution for a give initiated id\r\n * @param {} initiatedId \r\n * @returns {} \r\n */\r\n executionFactory.getAnswerHistory = function (initiatedProcessListId) {\r\n return AnswerHistory.query({ initiatedProcessListId: initiatedProcessListId }).$promise;\r\n };\r\n\r\n executionFactory.notifyQualityHandbookExecutionCreatorAboutUpdate = function (processList) {\r\n\r\n return NotifyQualityHandbookExecutionCreatorAboutUpdate.save(processList)\r\n .$promise;\r\n };\r\n\r\n executionFactory.getRootInitiatedProcessListByWorkingValueId = function(workingValueId) {\r\n\r\n return RootInitiatedProcessListByWorkingValueId.get({\r\n workingValueId: workingValueId\r\n }).$promise;\r\n };\r\n\r\n executionFactory.getRootInitiatedProcessListStartingFrom = function(initiatedProcessListId) {\r\n return RootInitiatedProcessListStartingFrom.get({\r\n initiatedProcessListId: initiatedProcessListId\r\n }).$promise;\r\n };\r\n\r\n return executionFactory;\r\n\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ExecutionHorizontalController.$inject = [\r\n '$scope',\r\n '$timeout',\r\n '$rootScope',\r\n '$routeParams',\r\n 'OrderFactory',\r\n 'ExecutionFactory',\r\n 'dialogService',\r\n 'infoService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('execution').controller('ExecutionHorizontalController', ExecutionHorizontalController);\r\n\r\n function ExecutionHorizontalController(\r\n $scope,\r\n $timeout,\r\n $rootScope,\r\n $routeParams,\r\n OrderFactory,\r\n ExecutionFactory,\r\n dialogService,\r\n infoService,\r\n $filter\r\n ) {\r\n\r\n /*-----------------*/\r\n /* SCOPE functions */\r\n /*-----------------*/\r\n\r\n // variables initialization\r\n var onDestroySubscription = null;\r\n var processListElementId;\r\n if (!$scope.isQualityHandbookPage && !$scope.isProjectPage)\r\n $scope.fromExecution = false;\r\n var container = angular.element(document.getElementById('scroll-container'));\r\n $scope.showHeader = true;\r\n $scope.canHideHeader = false;\r\n\r\n\r\n // if the process list is not initiated, then do so then retrieve the initiated process list. If it was already initiated, then retrieve it\r\n var orderId = OrderFactory.order.id;\r\n var processListId = OrderFactory.order.processListId;\r\n\r\n var initiatedProcessListId;\r\n\r\n if ($routeParams.initiatedProcessListId) {\r\n initiatedProcessListId = $routeParams.initiatedProcessListId;\r\n $scope.fromExecution = true;\r\n\r\n switch ($routeParams.table) {\r\n case 'user':\r\n $scope.table = 'GOT_USER';\r\n break;\r\n case 'organization':\r\n $scope.table = 'GOT_ORGANIZATION';\r\n break;\r\n }\r\n\r\n $scope.foreignKey = $routeParams.foreignKey;\r\n } else if ($scope.isQualityHandbookPage || $scope.isProjectPage) {\r\n initiatedProcessListId = $scope.initiatedProcessListId;\r\n } else {\r\n initiatedProcessListId = OrderFactory.order.initiatedProcessListId;\r\n }\r\n\r\n /**\r\n * Get the initiated process list and make it ready for execution\r\n */\r\n var getProcessList = function () {\r\n var shadowProcessListGet;\r\n\r\n if (initiatedProcessListId > 0) {\r\n shadowProcessListGet = ExecutionFactory.getInitiatedProcessList(initiatedProcessListId);\r\n shadowProcessListGet.$promise.then(function (initiatedProcessList) {\r\n $scope.processListElement = initiatedProcessList;\r\n $scope.processListElement.hasOrderAttachments = OrderFactory.order.hasAttachments;\r\n //clear values for table field\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.Value = '';\r\n });\r\n\r\n if ($scope.processListElement.ListValues.length == 0) {\r\n addCurrentTableFields();\r\n }\r\n\r\n });\r\n } else {\r\n if (orderId && processListId) {\r\n shadowProcessListGet = ExecutionFactory.initiateProcessList(orderId, processListId);\r\n shadowProcessListGet.$promise.then(function (initiatedProcessList) {\r\n $scope.processListElement = initiatedProcessList;\r\n $scope.processListElement.hasOrderAttachments = OrderFactory.order.hasAttachments;\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.Value = '';\r\n });\r\n //if it's first time of the execution \r\n OrderFactory.changeStatusToStarted = true;\r\n\r\n if ($scope.processListElement.ListValues.length == 0) {\r\n addCurrentTableFields();\r\n }\r\n\r\n });\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n getProcessList();\r\n\r\n // if it's the root process list, go to the last page.\r\n $scope.processListDone = function () {\r\n if (processListQueue.length == 0) {\r\n // see what page you are on and go back to it\r\n $scope.close();\r\n }\r\n else {\r\n // go back to the parent process list\r\n $scope.backToParent();\r\n }\r\n }\r\n\r\n $scope.scrollToElement = function (id) {\r\n setTimeout(function () {\r\n var goToElement = angular.element(document.getElementById(id));\r\n\r\n container.scrollTo(goToElement, 0, 300);\r\n }, 400);\r\n };\r\n\r\n /**\r\n * Add a new set of inputs to the horizontal field list\r\n * @returns {} \r\n */\r\n $scope.addItem = function () {\r\n\r\n // set the parent id to tell apart sets of items\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.ParentId = $scope.processListElement.ListValues.length;\r\n tableField.Value.id = null;\r\n });\r\n\r\n // add to ListValues the new row\r\n addCurrentTableFields();\r\n\r\n // clear the tablefields \r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.ParentId = -1;\r\n });\r\n\r\n }\r\n \r\n\r\n $scope.close = function () {\r\n if ($routeParams.orderId != undefined)\r\n $scope.go('/order/' + $routeParams.orderId);\r\n };\r\n\r\n // when you are done with the execution, go back to the identification panel and disable the tab of the \r\n $scope.closeTab = function () {\r\n $scope.tabs.identificationTabActive = true;\r\n $rootScope.$broadcast('endExecution', {});\r\n };\r\n\r\n // if you mark it done and are in a related process list, you will go back to the main process list instead of closing the order\r\n var wasSavedManually = false;\r\n\r\n /**\r\n * Save the process list on server and mark it as completed if the property is provided\r\n * @param {} IsCompleted \r\n * @returns {} \r\n */\r\n $scope.saveProcessList = function (IsCompleted) {\r\n\r\n $scope.processListElement.IsCompleted = IsCompleted;\r\n var saveProcessList = ExecutionFactory.updateProcessList($scope.processListElement, $scope.fromExecution);\r\n saveProcessList.then(function () {\r\n OrderFactory.isExecutionEnded = true;\r\n wasSavedManually = true;\r\n\r\n //infoService.clearInfo();\r\n infoService.changeInfo($filter('translate')('msgProcessListSaved'));\r\n\r\n if (IsCompleted) {\r\n if ($scope.isQualityHandbookPage || $scope.isProjectPage)\r\n $scope.managementObject.finishExecution();\r\n redirectBack();\r\n }\r\n\r\n if ($scope.isQualityHandbookPage) {\r\n ExecutionFactory.notifyQualityHandbookExecutionCreatorAboutUpdate($scope.processListElement);\r\n }\r\n });\r\n };\r\n\r\n if ($scope.isQualityHandbookPage || $scope.isProjectPage)\r\n $scope.managementObject.saveExecution = $scope.saveProcessList;\r\n\r\n function addCurrentTableFields() {\r\n $scope.processListElement.ListValues.push(angular.copy($scope.processListElement.TableFields));\r\n };\r\n\r\n var redirectBack = function () {\r\n if ($scope.table == 'GOT_USER') {\r\n $scope.go('/user/' + $scope.foreignKey);\r\n } else if ($scope.table == 'GOT_ORGANIZATION') {\r\n $scope.go('/organization/' + $scope.foreignKey);\r\n } else if ($scope.isQualityHandbookPage || $scope.isProjectPage)\r\n $scope.managementObject.collapseExecution();\r\n\r\n };\r\n\r\n /**\r\n * Closes the execution\r\n * If the execution was saved previously, skip the modal data loss\r\n * @returns {} \r\n */\r\n $scope.closeExecution = function () {\r\n if (!wasSavedManually)\r\n dialogService.showConfirmDialog('txtCloseExecutionTitle', 'txtCloseExecutionMessage')\r\n .then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n redirectBack();\r\n }\r\n });\r\n else {\r\n redirectBack();\r\n };\r\n };\r\n\r\n onDestroySubscription = $scope.$on('$destroy', function() {\r\n $scope.$emit('onExecutionHorizontalControllerDestroy');\r\n\r\n if (onDestroySubscription) {\r\n onDestroySubscription();\r\n }\r\n });\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ExecutionManagementController.$inject = [\r\n '$scope',\r\n '$route',\r\n '$routeParams',\r\n '$sce',\r\n '$filter',\r\n '$document',\r\n '$uibModal',\r\n 'dialogService',\r\n 'menuService',\r\n 'ExecutionFactory',\r\n 'TaskListFactory',\r\n 'fileReader',\r\n '$q',\r\n '$timeout',\r\n 'DateUtilService',\r\n 'UserFactory',\r\n 'errorService',\r\n 'Idle',\r\n 'sessionInformationService',\r\n 'DownloadService',\r\n '_',\r\n 'ExecutionService',\r\n 'PageRouteUtilService'\r\n ];\r\n\r\n angular.module('execution')\r\n .controller('ExecutionManagementController', ExecutionManagementController);\r\n\r\n //TODO: refactor this controller. OH BOY... Here goes nothing\r\n\r\n function ExecutionManagementController(\r\n $scope,\r\n $route,\r\n $routeParams,\r\n $sce,\r\n $filter,\r\n $document,\r\n $uibModal,\r\n dialogService,\r\n menuService,\r\n ExecutionFactory,\r\n TaskListFactory,\r\n fileReader,\r\n $q,\r\n $timeout,\r\n DateUtilService,\r\n UserFactory,\r\n errorService,\r\n Idle,\r\n sessionInformationService,\r\n DownloadService,\r\n _,\r\n ExecutionService,\r\n PageRouteUtilService\r\n ) {\r\n\r\n if ($scope.isProjectPage || $scope.isQualityHandbookPage) {\r\n var menuToGet = '';\r\n if ($scope.isProjectPage)\r\n menuToGet = '/projects';\r\n else if ($scope.isQualityHandbookPage)\r\n menuToGet = '/qualityHandbook';\r\n else\r\n menuToGet = '/execution';\r\n\r\n var menu = menuService.getMenuByHref(menuToGet);\r\n if (!menu)\r\n menu = menuService.getMenuByHref('/home');\r\n\r\n menuService.setSelectedMenu(menu);\r\n }\r\n var mainProcessListDataAbout;\r\n var initiatedProcessListId;\r\n var foreignKey;\r\n var itemIdParam;\r\n var scrollContainer;\r\n var onDestroySubscription = null;\r\n\r\n // flag for checking if the current execution is already completed\r\n var isAlreadyDone = false;\r\n var lastIndexSet = 0;\r\n var isAutoSaving = false;\r\n\r\n $scope.processListElement = {};\r\n $scope.executionStarted = false;\r\n $scope.currentItemIndex = -1; // description page\r\n $scope.progressBar = { items: [] };\r\n $scope.processListQueue = [];\r\n\r\n $scope.calendar = { visible: false, datetime: null, date: null, time: null, disabled: false };\r\n $scope.executedFor = null;\r\n $scope.intellisense = {\r\n isDropdownOpen: false\r\n };\r\n\r\n var currentDefaultAnswer = {};\r\n var notificationData = {};\r\n\r\n //$scope.previousList = [];\r\n //$scope.nextList = [];\r\n //$scope.previousIndex = 0;\r\n //$scope.nextIndex = 0;\r\n\r\n var notificationEditorModal;\r\n\r\n $scope.hasRight = function (progId) {\r\n return sessionInformationService.hasAccess(progId);\r\n };\r\n\r\n /**\r\n * Open the notification modal and prepare the necessary data\r\n * @param {} processListItem \r\n * @param {} choice \r\n * @returns {} \r\n */\r\n $scope.openNotificationEditorModal = function (processListItem, choice) {\r\n\r\n if ($scope.isNextDisabled($scope.currentItemIndex))\r\n return;\r\n\r\n $scope.currentProcessListItem = processListItem;\r\n\r\n var defaultAnswers, i;\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n currentDefaultAnswer = choice.selectedValue.SelectedDefaultAnswer;\r\n //fill currentDefaultAnswer.Name\r\n defaultAnswers = choice.selectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n for (i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n } else {\r\n currentDefaultAnswer = processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer;\r\n //fill currentDefaultAnswer.Name\r\n defaultAnswers = processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n for (i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n }\r\n\r\n if (currentDefaultAnswer && currentDefaultAnswer.Notification) {\r\n $scope.currentNotificationData = angular.copy(currentDefaultAnswer.Notification);\r\n } else {\r\n $scope.currentNotificationData = angular.copy(notificationData);\r\n }\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE'\r\n && choice.selectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\") {\r\n $scope.currentNotificationData.isSms = true;\r\n } else {\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE'\r\n && processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\") {\r\n $scope.currentNotificationData.isSms = true;\r\n }\r\n }\r\n\r\n $scope.currentNotificationData.organizationId = ExecutionFactory.organizationId;\r\n\r\n if (!choice && processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n $scope.currentNotificationData.readOnly = true;\r\n } else {\r\n if (choice && choice.selectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n $scope.currentNotificationData.readOnly = true;\r\n }\r\n }\r\n\r\n if (currentDefaultAnswer && !$scope.currentNotificationData.TextMessage) {\r\n if (currentDefaultAnswer.ProgId == 'PROG_ANNET') {\r\n $scope.currentNotificationData.TextMessage = currentDefaultAnswer.CommentInput;\r\n } else {\r\n $scope.currentNotificationData.TextMessage = currentDefaultAnswer.Name;\r\n }\r\n }\r\n\r\n notificationEditorModal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalNotificationEditor.html',\r\n size: 'lg',\r\n scope: $scope,\r\n controller: 'ModalNotificationEditorController',\r\n resolve: {\r\n participants: function () {\r\n return getExecutionParticipants($scope.currentExecution.id)\r\n .then(function (response) {\r\n return response;\r\n });\r\n }\r\n }\r\n });\r\n\r\n };\r\n\r\n\r\n /**\r\n * Get notification necessary data from server\r\n * @param {} initiatedProcessListId \r\n * @param {} dataAbout \r\n * @returns {} \r\n */\r\n $scope.getNotificationData = function (initiatedProcessListId, dataAbout) {\r\n var notificationPromise = ExecutionFactory.getNotificationData(initiatedProcessListId, dataAbout);\r\n notificationPromise.$promise.then(function (result) {\r\n notificationData = result;\r\n });\r\n };\r\n\r\n $scope.saveItemNotification = function () {\r\n currentDefaultAnswer.Notification = angular.copy($scope.currentNotificationData);\r\n };\r\n\r\n $scope.deleteItemNotification = function () {\r\n currentDefaultAnswer.Notification = null;\r\n };\r\n\r\n\r\n $scope.init = function () {\r\n if (!$scope.isProjectPage && !$scope.isQualityHandbookPage) {\r\n initiatedProcessListId = $routeParams.initiatedProcessListId;\r\n foreignKey = $routeParams.foreignKey;\r\n itemIdParam = !!$routeParams.itemId ? $routeParams.itemId : null;\r\n\r\n if (!initiatedProcessListId || initiatedProcessListId == ':initiatedProcessListId') {\r\n $scope.go('/home');\r\n } else if (!!initiatedProcessListId) {\r\n getManagementExecution(initiatedProcessListId);\r\n getInitiatedProcessList();\r\n }\r\n } else {\r\n //initiatedProcessListId and foreignKey are passed throught the directive\r\n initiatedProcessListId = $scope.initiatedProcessListId;\r\n foreignKey = $scope.foreignKey;\r\n getManagementExecution(initiatedProcessListId);\r\n getInitiatedProcessList();\r\n }\r\n\r\n\r\n Idle.watch();\r\n };\r\n\r\n var scrollToElement = function (index) {\r\n var elemId = \"processlistitem-\" + index;\r\n setTimeout(function () {\r\n\r\n var executionPanelContainer = document.getElementById('execution-panel-container');\r\n if (!executionPanelContainer)\r\n return;\r\n\r\n var container = executionPanelContainer.getBoundingClientRect();\r\n var element = document.getElementById(elemId);\r\n if (element) {\r\n var elementClientRect = element.getBoundingClientRect();\r\n\r\n if (elementClientRect.top < container.top || elementClientRect.top > container.bottom || (elementClientRect.top + elementClientRect.height) > container.bottom) {\r\n var angularElement = angular.element(document.getElementById(elemId));\r\n scrollContainer.scrollTo(angularElement, 0, 600);\r\n }\r\n\r\n }\r\n\r\n }, 200);\r\n };\r\n\r\n /**\r\n * Get the execution for this initiated process list id\r\n * @param {any} initiatedProcessListId\r\n */\r\n function getManagementExecution(initiatedProcessListId) {\r\n\r\n if (!initiatedProcessListId)\r\n return;\r\n\r\n ExecutionFactory.getManagementExecution(initiatedProcessListId)\r\n .then(function (response) {\r\n\r\n if (response)\r\n $scope.currentExecution = response;\r\n\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Get the object for who the list is executed for\r\n * May be user, organization, project or quality. Others may added later\r\n * @param {any} initiatedProcessListId\r\n * @param {any} tableProgId\r\n */\r\n function getWhoIsExecutedFor(initiatedProcessListId, tableProgId) {\r\n var deferred = $q.defer();\r\n\r\n if (tableProgId == 'GOT_USER')\r\n ExecutionFactory.getWhoIsExecutedFor(initiatedProcessListId, tableProgId).$promise.then(function (executedFor) {\r\n $scope.executedFor = executedFor;\r\n\r\n if (!ExecutionFactory.organizationId && $scope.executedFor.Organization)\r\n ExecutionFactory.organizationId = $scope.executedFor.Organization.id;\r\n\r\n deferred.resolve();\r\n }, function (err) {\r\n console.error(err);\r\n deferred.reject();\r\n });\r\n else if (tableProgId == 'GOT_ORGANIZATION') {\r\n if ($scope.isProjectPage)\r\n tableProgId = 'BOT_PROJECT';\r\n if ($scope.isQualityHandbookPage)\r\n tableProgId = 'BOT_QUALITY_HANDBOOK';\r\n\r\n ExecutionFactory.getOrganizationExecutedFor(initiatedProcessListId, tableProgId).$promise.then(function (executedFor) {\r\n $scope.executedFor = executedFor;\r\n\r\n if (!ExecutionFactory.organizationId && $scope.executedFor.Organization)\r\n ExecutionFactory.organizationId = $scope.executedFor.id;\r\n\r\n deferred.resolve();\r\n }, function (err) {\r\n console.error(err);\r\n deferred.reject();\r\n });\r\n }\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Get the initiated list from server\r\n */\r\n function getInitiatedProcessList() {\r\n\r\n var retrieveDescriptionHtmlFromTemplate = $scope.isQualityHandbookPage ? true : false;\r\n\r\n ExecutionFactory.getInitiatedProcessList(initiatedProcessListId, true, retrieveDescriptionHtmlFromTemplate).$promise.then(function (result) {\r\n\r\n $scope.processListElement = result;\r\n isAlreadyDone = $scope.processListElement.IsCompleted;\r\n\r\n mainProcessListDataAbout = $scope.processListElement.DataAbout.ProgId;\r\n\r\n if ($scope.processListElement.ProcessListType.ProgId != 'HORIZONTAL')\r\n initializeExecution(lastIndexSet);\r\n else\r\n initHorizontal();\r\n\r\n getWhoIsExecutedFor(initiatedProcessListId, $scope.processListElement.DataAbout.ProgId).then(function () {\r\n getUsersDropdown();\r\n $scope.startExecution();\r\n });\r\n\r\n $scope.getNotificationData($scope.processListElement.InitiatedId, $scope.processListElement.DataAbout.ProgId);\r\n });\r\n };\r\n\r\n /**\r\n * Make the list ready for execution\r\n * Prepare the already selected data\r\n * @param {any} currentItemIndex\r\n */\r\n function initializeExecution(currentItemIndex) {\r\n $scope.progressBar = { items: [] };\r\n\r\n // i don't know if any breaking will happen if we modify below code\r\n // so at least for now i will use this variable : currentItemPosition\r\n // to check for what item to not mark as DONE when auto-saving\r\n var currentItemPosition = $scope.currentItemIndex;\r\n\r\n // if an index was passed to the initialization (resume execution from another process list)\r\n // set it as the current item index, else go to the description page\r\n $scope.currentItemIndex = !!currentItemIndex ? currentItemIndex : -1;\r\n\r\n if ($scope.processListElement.ProcessListItems && $scope.processListElement.ProcessListItems.length > 0) {\r\n // firt, well go over each item and mark it as DONE if it applies,\r\n // or keep the default status of NOT_DONE\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n\r\n $scope.progressBar.items.push({ status: 'NOT_DONE' });\r\n\r\n // mark progress\r\n switch (item.InitiatedOption.Type.ProgId) {\r\n case 'DROPDOWN':\r\n if (!!item.InitiatedOption.SelectedValue) {\r\n\r\n // if an auto-saving operation takes place and the current item from the \r\n // iteration is the current one the user answers (the current question)\r\n // skip the completion check to avoid auto-moving to the next question\r\n if (!(isAutoSaving && i === currentItemPosition)) {\r\n $scope.progressBar.items[i].status = !isProcessListItemNotCompleted(item) ? 'DONE' : 'NOT_DONE';\r\n }\r\n\r\n initiateDateTime(item.InitiatedOption.SelectedValue);\r\n }\r\n break;\r\n case 'MULTIPLE_CHOICE':\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n var choice = item.InitiatedOption.Items[j];\r\n var selectedValueForChoice = getSelectedValueForChoice(choice, item.InitiatedOption);\r\n if (!!selectedValueForChoice) {\r\n choice.isChecked = true;\r\n // assign the selected value as a choice property for easy access\r\n choice.selectedValue = selectedValueForChoice;\r\n initiateDateTime(selectedValueForChoice);\r\n }\r\n }\r\n\r\n // if an auto-saving operation takes place and the current item from the \r\n // iteration is the current one the user answers (the current question)\r\n // skip the completion check to avoid auto-moving to the next question\r\n if (!(isAutoSaving && i === currentItemPosition)) {\r\n $scope.progressBar.items[i].status = item.InitiatedOption.SelectedValues.length && !isProcessListItemNotCompleted(item) > 0 ? 'DONE' : 'NOT_DONE';\r\n }\r\n\r\n break;\r\n case 'RADIO_BUTTON':\r\n case 'STANDARD_TEXT':\r\n // check respective radio button based on selected value\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItem) {\r\n item.InitiatedOption.SelectedValue.OptionItem = $filter('filter')(item.InitiatedOption.Items, { InitiatedId: item.InitiatedOption.SelectedValue.OptionItem.InitiatedId })[0];\r\n\r\n // if an auto-saving operation takes place and the current item from the \r\n // iteration is the current one the user answers (the current question)\r\n // skip the completion check to avoid auto-moving to the next question\r\n if (!(isAutoSaving && i === currentItemPosition)) {\r\n $scope.progressBar.items[i].status = !isProcessListItemNotCompleted(item) ? 'DONE' : 'NOT_DONE';\r\n }\r\n\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItemEdited)\r\n item.InitiatedOption.SelectedValue.OptionItem.Text = item.InitiatedOption.SelectedValue.OptionItemEdited;\r\n\r\n initiateDateTime(item.InitiatedOption.SelectedValue);\r\n }\r\n break;\r\n case 'STRING': case 'NUMERIC':\r\n\r\n if (item.InitiatedOption.SelectedValue &&\r\n item.InitiatedOption.SelectedValue.CustomDataType &&\r\n item.InitiatedOption.SelectedValue.CustomDataType.length > 0 &&\r\n !(isAutoSaving && i === currentItemPosition)) {\r\n $scope.progressBar.items[i].status = 'DONE';\r\n }\r\n break;\r\n default:\r\n $scope.progressBar.items[i].status = 'NOT_DONE';\r\n }\r\n\r\n }\r\n\r\n // after marking done items as DONE, we can mark the SKIPPED items.\r\n // this is done by iterating backwards and detecting all the NOT_DONE items,\r\n // after the first DONE item encountered, and marking them as SKIPPED.\r\n var doneItemEncoutered = false;\r\n for (var i = $scope.processListElement.ProcessListItems.length - 1; i >= 0; i--) {\r\n if ($scope.progressBar.items[i].status == 'DONE') doneItemEncoutered = true;\r\n\r\n if (doneItemEncoutered && $scope.progressBar.items[i].status == 'NOT_DONE') {\r\n $scope.progressBar.items[i].status = 'SKIPPED';\r\n }\r\n }\r\n\r\n // also, if a DONE item was encoutered, this means that the execution has been resumed from a paused state\r\n if (doneItemEncoutered) $scope.executionResumed = true;\r\n\r\n // last, we'll mark the AVAILABLE item (the item after the last DONE item)\r\n var lastDoneItemIndex = -1;\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n if ($scope.progressBar.items[i].status == 'DONE') lastDoneItemIndex = i;\r\n }\r\n\r\n // only mark it as AVAILABLE if it's not the last item\r\n if (lastDoneItemIndex + 1 < $scope.processListElement.ProcessListItems.length) {\r\n $scope.progressBar.items[lastDoneItemIndex + 1].status = 'AVAILABLE';\r\n }\r\n\r\n // if an item id was passed as a paremter, go to that step\r\n if (!!itemIdParam) {\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n if ($scope.processListElement.ProcessListItems[i].InitiatedId == itemIdParam) {\r\n $scope.goToItem(i);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n //Load Description text\r\n $scope.toggleDescription($scope.processListElement.DescriptionHtml, false);\r\n }\r\n\r\n\r\n };\r\n\r\n $scope.startExecution = function () {\r\n // go to the available item\r\n for (var i = 0; i < $scope.progressBar.items.length; i++) {\r\n if ($scope.progressBar.items[i].status == 'AVAILABLE') {\r\n $scope.currentItemIndex = i;\r\n }\r\n }\r\n\r\n if ($scope.currentItemIndex < 0)\r\n $scope.currentItemIndex = 0;\r\n\r\n if (lastIndexSet)\r\n $scope.currentItemIndex = lastIndexSet;\r\n\r\n $timeout(function () {\r\n scrollContainer = angular.element(document.getElementById('execution-panel-container'));\r\n scrollToElement($scope.currentItemIndex);\r\n }, 100);\r\n };\r\n\r\n $scope.previous = function () {\r\n for (var i = $scope.currentItemIndex - 1; i >= 0; i--) {\r\n if ($scope.progressBar.items[i].status == 'DONE' || $scope.progressBar.items[i].status == 'AVAILABLE') {\r\n $scope.currentItemIndex = i;\r\n break;\r\n }\r\n }\r\n };\r\n\r\n $scope.canShowDescription = function () {\r\n // check if the description is empty or contains only whitespace\r\n if ($scope.processListElement && $scope.processListElement.DescriptionHtml) {\r\n return !($scope.processListElement.DescriptionHtml.length === 0 || !$scope.processListElement.DescriptionHtml.trim());\r\n }\r\n return false;\r\n };\r\n\r\n $scope.goToItem = function (index) {\r\n\r\n if (!$scope.isNextDisabled($scope.currentItemIndex) && $scope.processListElement.FlexibleExecution) {\r\n $scope.currentItemIndex = index;\r\n scrollToElement($scope.currentItemIndex);\r\n return;\r\n }\r\n\r\n if ($scope.progressBar.items[index].status == 'DONE' || $scope.progressBar.items[index].status == 'AVAILABLE') {\r\n $scope.currentItemIndex = index;\r\n }\r\n scrollToElement($scope.currentItemIndex);\r\n };\r\n\r\n /**\r\n * Takes the user back\r\n * If it's project or quality the execution collapses\r\n * On user and copany the user is redirected back\r\n */\r\n var redirectBack = function () {\r\n //TODO: check whether the redirect works properly on company/user page\r\n // after pausing or finishing execution, go back to the user \r\n // or organization that executed this processlist\r\n //if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER') {\r\n // $scope.go('/user/' + foreignKey);\r\n //} else if ($scope.processListElement.DataAbout.ProgId == 'GOT_ORGANIZATION') {\r\n // $scope.go('/organization/' + foreignKey);\r\n //}\r\n if (!$scope.isProjectPage && !$scope.isQualityHandbookPage) {\r\n // after pausing or finishing execution, go back to the user \r\n // or organization that executed this processlist\r\n // $scope.go('/execution');\r\n if (mainProcessListDataAbout === 'GOT_USER') {\r\n $scope.go('/user/' + foreignKey);\r\n } else if (mainProcessListDataAbout === 'GOT_ORGANIZATION') {\r\n $scope.go('/organization/' + foreignKey);\r\n }\r\n } else {\r\n\r\n if ($scope.isQualityHandbookPage)\r\n ExecutionService.setIdOfExecutionToOpenFromQualityHandbookPage(null);\r\n\r\n $scope.managementObject.collapseExecution();\r\n }\r\n };\r\n\r\n /**\r\n * Set the list as completed and save it\r\n * Redirect the user back/collapse execution\r\n */\r\n var finishExecution = function () {\r\n $scope.processListElement.IsCompleted = true;\r\n\r\n // if it's a child process list\r\n if ($scope.processListQueue.length > 0) {\r\n $scope.goToParent();\r\n\r\n } else {\r\n // save the execution\r\n //TODO: this might be unnecessary due to the latest changes\r\n removeCyclicDependencies();\r\n ExecutionFactory.updateProcessList(angular.copy($scope.processListElement)).then(function () {\r\n redirectBack();\r\n\r\n if ($scope.isProjectPage || $scope.isQualityHandbookPage)\r\n $scope.managementObject.finishExecution();\r\n\r\n if ($scope.isQualityHandbookPage) {\r\n ExecutionFactory.notifyQualityHandbookExecutionCreatorAboutUpdate($scope.processListElement);\r\n }\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Check whether the horizontal form is ok and it has data\r\n * @param {any} data\r\n */\r\n var isHorizontalDataCompleted = function (data) {\r\n if (!data && data.length === 0)\r\n return false;\r\n\r\n for (var row = 0; row < data.length; row++) {\r\n for (var col = 0; col < data[row].length; col++) {\r\n\r\n if (!data[row][col].Value.Value) {\r\n return false;\r\n }\r\n\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks whether the horizontal list is complete\r\n * @param {any} processListElement\r\n */\r\n var checkIfHorizontalIsCompleted = function (processListElement) {\r\n if (processListElement.IsCompleted)\r\n return true;\r\n\r\n if (!processListElement ||\r\n (!processListElement.HeaderFields && !processListElement.TableFields && !processListElement.ListValues) ||\r\n (processListElement.HeaderFields.length === 0 && processListElement.TableFields.length === 0 && processListElement.ListValues.length === 0))\r\n return false;\r\n\r\n if (!isHorizontalDataCompleted(processListElement.HeaderFields) ||\r\n !isHorizontalDataCompleted(processListElement.ListValues)) {\r\n return false;\r\n }\r\n\r\n processListElement.IsCompleted = true;\r\n return true;\r\n }\r\n\r\n /**\r\n * Goes to the parent list\r\n * This applies to the lists from another list action\r\n * @returns {} \r\n */\r\n $scope.goToParent = function (markAsCompleted) {\r\n\r\n if ($scope.processListElement.ProcessListType.ProgId === \"HORIZONTAL\") {\r\n if (!!markAsCompleted)\r\n $scope.processListElement.IsCompleted = true;\r\n\r\n checkIfHorizontalIsCompleted($scope.processListElement);\r\n }\r\n\r\n // before going back to the parent reset lastIndexSet changed in the another process list\r\n lastIndexSet = 0;\r\n\r\n // pop the last element in the queue and set it as the current element\r\n $scope.processListElement = $scope.processListQueue.pop();\r\n initializeExecution($scope.processListElement.lastDoneItemIndex);\r\n\r\n $scope.startExecution();\r\n };\r\n\r\n var wasSavedManually = false;\r\n var notFinishedSaving = false;\r\n /**\r\n * Save the list to the server\r\n * @param {} cameFromButton \r\n * @returns {} \r\n */\r\n $scope.saveExecution = function (cameFromButton) {\r\n removeCyclicDependencies();\r\n notFinishedSaving = true;\r\n return ExecutionFactory.updateProcessList($scope.processListQueue.length > 0 ? $scope.processListQueue[0] : $scope.processListElement)\r\n .then(function (result) {\r\n\r\n $scope.processListElement = result;\r\n\r\n initializeExecution(lastIndexSet);\r\n $scope.startExecution();\r\n wasSavedManually = cameFromButton;\r\n notFinishedSaving = false;\r\n\r\n if ($scope.isQualityHandbookPage && cameFromButton) {\r\n ExecutionFactory.notifyQualityHandbookExecutionCreatorAboutUpdate($scope.processListElement);\r\n }\r\n });\r\n };\r\n //set the delegate function appropiately\r\n if ($scope.isProjectPage || $scope.isQualityHandbookPage)\r\n $scope.managementObject.saveExecution = $scope.saveExecution;\r\n\r\n /**\r\n * Close the current execution\r\n * If there is unsaved data, ask the user if he's sure\r\n * @returns {} \r\n */\r\n $scope.closeExecution = function () {\r\n if (!wasSavedManually)\r\n dialogService.showConfirmDialog('txtCloseExecutionTitle', 'txtCloseExecutionMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n redirectBack();\r\n }\r\n });\r\n else\r\n redirectBack();\r\n };\r\n\r\n /**\r\n * Get the css class for the given item\r\n * @param {} item \r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.getProgresBarItemClass = function (item, index) {\r\n if (index == $scope.currentItemIndex) {\r\n return 'execution-progress-bar-item-current';\r\n } else {\r\n switch (item.status) {\r\n case 'DONE':\r\n return 'execution-progress-bar-item-done';\r\n case 'NOT_DONE':\r\n return 'execution-progress-bar-item-not-done';\r\n case 'SKIPPED':\r\n return 'execution-progress-bar-item-skipped';\r\n case 'AVAILABLE':\r\n return 'execution-progress-bar-item-available';\r\n default:\r\n return 'execution-progress-bar-item-done';\r\n }\r\n }\r\n };\r\n\r\n $scope.descriptionHTML = '';\r\n\r\n /**\r\n * Toggle the description text editor\r\n * @param {} text \r\n * @param {} all \r\n * @returns {} \r\n */\r\n $scope.toggleDescription = function (text, all) {\r\n if (all) {\r\n $scope.descriptionHTML = $scope.trustedText(text, null);\r\n } else {\r\n $scope.descriptionHTML = $scope.trustedText(text, 400);\r\n }\r\n };\r\n\r\n $scope.trustedText = function (text, displayedCharacters) {\r\n var displayedText;\r\n if (displayedCharacters)\r\n displayedText = $filter('shortenText')(text, 'true', displayedCharacters, '...');\r\n else {\r\n displayedText = text;\r\n }\r\n return $sce.trustAsHtml(displayedText);\r\n };\r\n\r\n $scope.attachmentNamePattern = function (name) {\r\n if (name) {\r\n //allow characters, digits, norwegian characters, '-', '_', '.' and space \r\n var regexp = /^[\\w\\d\\u00C5\\u00E5\\u00C6\\u00E6\\u00D8\\u00F8\\-\\_\\.\\ ]{1,250}$/;\r\n return regexp.test(name);\r\n } else\r\n return true;\r\n };\r\n\r\n /**\r\n * Add attachement to the camera image action\r\n * @param {} myFile \r\n * @param {} fileName \r\n * @param {} item \r\n * @returns {} \r\n */\r\n $scope.addAttachment = function (myFile, fileName, item) {\r\n if (!sessionInformationService.hasAccess('UPLOAD_GALLERY')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n var image = {\r\n };\r\n\r\n image.AttachmentName = $filter('date')(new Date().getTime(), 'yyyyMMddhhmmsss') + '.jpeg';\r\n image.ForeignKey = item.ProcessListAction.InitiatedId;\r\n\r\n var response = fileReader.readAsDataUrl(myFile, $scope);\r\n response.then(function (result) {\r\n image.brandNew = true; // used to mark 'removed' images for deletion\r\n image.AttachmentBytes = result;\r\n\r\n var imageToAdd = {\r\n CameraImageOriginal: image,\r\n IncludeInReport: true,\r\n Size: '25%',\r\n SortNumber: 100\r\n };\r\n\r\n item.ProcessListAction.CameraImages.push(imageToAdd);\r\n });\r\n\r\n myFile.clear();\r\n };\r\n\r\n /**\r\n * Open a modal and view the selected image\r\n * @param {} image \r\n * @returns {} \r\n */\r\n $scope.selectImage = function (image) {\r\n $scope.selectedImage = image;\r\n $scope.modal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalViewImage.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n };\r\n\r\n /**\r\n * Remove the image from image list and if it was saved before, put it in CameraImagesToDelete to make sure we delete the attachments on backend as well\r\n * @param {} image \r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.removeImage = function (image, selectedValue) {\r\n // if the removed image was loaded from the server, mark it for deletion\r\n if (!image.brandNew) {\r\n if (!selectedValue.OptionItem.ProcessListAction.CameraImagesToDelete) {\r\n selectedValue.OptionItem.ProcessListAction.CameraImagesToDelete = [];\r\n }\r\n selectedValue.OptionItem.ProcessListAction.CameraImagesToDelete.push(image);\r\n }\r\n\r\n var imageIndex = selectedValue.OptionItem.ProcessListAction.CameraImages.indexOf(image);\r\n if (imageIndex > -1) {\r\n selectedValue.OptionItem.ProcessListAction.CameraImages.splice(imageIndex, 1);\r\n }\r\n };\r\n\r\n $scope.resetAttachment = function (myFile) {\r\n if (myFile != null) {\r\n myFile.clear();\r\n }\r\n };\r\n\r\n /**\r\n * When the user checks/unchecks a multiple choice item, process the data or remove it if the user unchecks it\r\n * @param {} choice \r\n * @param {} selectedValues \r\n * @returns {} \r\n */\r\n $scope.onChoiceCheckedChange = function (choice, selectedValues) {\r\n if (choice.isChecked) {\r\n var newSelectedValue = {\r\n OptionItem: angular.copy(choice)\r\n };\r\n // add the option to this initiatedOption list of selected values\r\n selectedValues.push(newSelectedValue);\r\n\r\n // assign the reference to the choice for easy access\r\n choice.selectedValue = newSelectedValue;\r\n\r\n initiateSelectedDefaultAnswer(choice.selectedValue);\r\n\r\n initializeTempDate(choice.selectedValue);\r\n\r\n } else {\r\n var selectedValueIndex = 0;\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n if (selectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n selectedValueIndex = i;\r\n break;\r\n }\r\n }\r\n selectedValues.splice(selectedValueIndex, 1);\r\n\r\n // remove the references so the action items get hidden\r\n choice.selectedValue = undefined;\r\n }\r\n };\r\n\r\n function getSelectedValueForChoice(choice, initiatedOption) {\r\n for (var i = 0; i < initiatedOption.SelectedValues.length; i++) {\r\n if (initiatedOption.SelectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n return initiatedOption.SelectedValues[i];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n //TODO: check whether this should be used anymore\r\n var removeCyclicDependencies = function () {\r\n\r\n if ($scope.processListElement.ProcessListItems) {\r\n // each choice was assigned a reference to its selected value that needs to be removed before saving\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n item.InitiatedOption.Items[j].selectedValue = null;\r\n }\r\n }\r\n }\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Go to next item\r\n * If any action is available, perform that action and proceed\r\n * @returns {} \r\n */\r\n $scope.continue = function () {\r\n if ($scope.isNextDisabled($scope.currentItemIndex))\r\n return;\r\n var currentProcessListItem = $scope.processListElement.ProcessListItems[$scope.currentItemIndex];\r\n\r\n // first, cover the input for non-multi-select (STRING / NUMERICAL)\r\n if (currentProcessListItem.InitiatedOption.Type.ProgId == \"NUMERIC\" || currentProcessListItem.InitiatedOption.Type.ProgId == \"STRING\") {\r\n goToNextItem($scope.currentItemIndex);\r\n\r\n // handle the DROPDOWN or RADIO button depending on its select\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"DROPDOWN\" || currentProcessListItem.InitiatedOption.Type.ProgId == \"RADIO_BUTTON\") {\r\n if (currentProcessListItem.InitiatedOption.SelectedValue && currentProcessListItem.InitiatedOption.SelectedValue.OptionItem && currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction) {\r\n switch (currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n jumpToStep(currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.ProcessListItem.id);\r\n break;\r\n case \"SMS\": case \"EMAIL\":\r\n \r\n var promise = $q.when();\r\n\r\n // add recipients to notification if it wasn't edited in the modal and the PL has limited access\r\n if (!$scope.currentNotificationData && $scope.processListElement.LimitedAccess) {\r\n currentDefaultAnswer = currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer;\r\n // fill currentDefaultAnswer.Name\r\n var defaultAnswers = currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n var isSms = (currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\");\r\n for (var i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n // add recipients to notification\r\n promise = getExecutionParticipants($scope.currentExecution.id).then(function (participants) {\r\n if (!currentDefaultAnswer.Notification)\r\n currentDefaultAnswer.Notification = angular.copy(notificationData);\r\n\r\n if (_.isNil(currentDefaultAnswer.Notification.TextMessage))\r\n currentDefaultAnswer.Notification.TextMessage = '';\r\n\r\n if (currentDefaultAnswer.ProgId !== 'PROG_ANNET')\r\n currentDefaultAnswer.Notification.TextMessage += currentDefaultAnswer.Name ? currentDefaultAnswer.Name : '';\r\n\r\n currentDefaultAnswer.Notification.TextMessage += currentDefaultAnswer.CommentInput ? currentDefaultAnswer.CommentInput : '';\r\n currentDefaultAnswer.Notification.Recipients = extractRecipients(currentDefaultAnswer.Notification, participants, isSms);\r\n });\r\n }\r\n\r\n promise.then(function() {\r\n\r\n if (!currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.InitiatedId) {\r\n goToNextItem($scope.currentItemIndex);\r\n return;\r\n }\r\n if (currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.SendNotification = false;\r\n } else {\r\n currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n\r\n $scope.processListElement.SendNotification = true;\r\n }\r\n goToNextItem($scope.currentItemIndex);\r\n\r\n });\r\n \r\n break;\r\n case \"CAMERA\": case \"TEXT_FIELD\": case \"SIGNATURE\": case \"ANOTHER_PROCESSLIST\": default:\r\n goToNextItem($scope.currentItemIndex);\r\n break;\r\n\r\n }\r\n } else {\r\n // if there's no action assigned to the process list item option item\r\n goToNextItem($scope.currentItemIndex);\r\n }\r\n // handle multiple choice actions\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"MULTIPLE_CHOICE\") {\r\n // if one of the selected option items has a 'jump to step' action,\r\n // save the process list item id here, to be used after all the other option item actions have been handled\r\n var willJumpToStepAtId = null;\r\n var promiseForMultipleChoice = $q.when();\r\n\r\n if (currentProcessListItem.InitiatedOption.SelectedValues) {\r\n for (var i = 0; i < currentProcessListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = currentProcessListItem.InitiatedOption.SelectedValues[i];\r\n if (selectedValue.OptionItem && selectedValue.OptionItem.ProcessListAction) {\r\n switch (selectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n willJumpToStepAtId = selectedValue.OptionItem.ProcessListAction.ProcessListItem.id;\r\n break;\r\n case \"SMS\": case \"EMAIL\":\r\n\r\n // add recipients to notification if it wasn't edited in the modal and the PL has limited access\r\n if (!$scope.currentNotificationData && $scope.processListElement.LimitedAccess) {\r\n currentDefaultAnswer = selectedValue.SelectedDefaultAnswer;\r\n // fill currentDefaultAnswer.Name\r\n var defaultAnswers = selectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n var isSms = (selectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\");\r\n for (var i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n // add recipients to notification\r\n promiseForMultipleChoice = getExecutionParticipants($scope.currentExecution.id).then(function (participants) {\r\n if (!currentDefaultAnswer.Notification) \r\n currentDefaultAnswer.Notification = angular.copy(notificationData);\r\n\r\n if (_.isNil(currentDefaultAnswer.Notification.TextMessage))\r\n currentDefaultAnswer.Notification.TextMessage = '';\r\n\r\n if (currentDefaultAnswer.ProgId !== 'PROG_ANNET')\r\n currentDefaultAnswer.Notification.TextMessage += currentDefaultAnswer.Name ? currentDefaultAnswer.Name : '';\r\n\r\n currentDefaultAnswer.Notification.TextMessage += currentDefaultAnswer.CommentInput ? currentDefaultAnswer.CommentInput : '';\r\n currentDefaultAnswer.Notification.Recipients = extractRecipients(currentDefaultAnswer.Notification, participants, isSms);\r\n });\r\n }\r\n\r\n promiseForMultipleChoice.then(function() {\r\n if (!selectedValue.SelectedDefaultAnswer.InitiatedId) {\r\n return;\r\n }\r\n if (selectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n selectedValue.SelectedDefaultAnswer.SendNotification = false;\r\n } else {\r\n selectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n $scope.processListElement.SendNotification = true;\r\n }\r\n });\r\n \r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n promiseForMultipleChoice.then(function() {\r\n if (!!willJumpToStepAtId) {\r\n jumpToStep(willJumpToStepAtId);\r\n } else {\r\n goToNextItem($scope.currentItemIndex);\r\n }\r\n });\r\n \r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"STANDARD_TEXT\")\r\n goToNextItem($scope.currentItemIndex);\r\n\r\n currentProcessListItem.isDone = true;\r\n\r\n };\r\n\r\n // if the action is a default one, go to the next element\r\n var goToNextItem = function (currentIndex) {\r\n // if it's the last item\r\n if (currentIndex >= ($scope.processListElement.ProcessListItems.length - 1)) {\r\n finishExecution();\r\n } else {\r\n moveAndMarkNextItems(currentIndex, currentIndex + 1);\r\n }\r\n };\r\n\r\n // if the action is of jump to step type\r\n var jumpToStep = function (destinationItemId) {\r\n var destinationItemIndex;\r\n //get the index of the destination item by comparing it to the ID\r\n for (destinationItemIndex = 0; destinationItemIndex < $scope.processListElement.ProcessListItems.length; destinationItemIndex++) {\r\n if ($scope.processListElement.ProcessListItems[destinationItemIndex].id == destinationItemId) {\r\n break;\r\n }\r\n }\r\n\r\n moveAndMarkNextItems($scope.currentItemIndex, destinationItemIndex);\r\n };\r\n\r\n /**\r\n * Extracts all e-mails or phone numbers from a given list of participants to a execution\r\n * @param {} executionParticipants\r\n * @param {} forSms\r\n * @returns {} \r\n */\r\n function extractRecipients(notificationData, executionParticipants, forSms) {\r\n if (!executionParticipants || executionParticipants.length === 0)\r\n return [];\r\n\r\n var recipients = [];\r\n for (var index = 0; index < executionParticipants.length; index++) {\r\n var currentParticipant = executionParticipants[index].User;\r\n\r\n if (forSms) {\r\n // skip the user for which the list is executed\r\n if (currentParticipant.Phone === notificationData.Contact.Mobile)\r\n continue;\r\n\r\n if (currentParticipant.Phone)\r\n recipients.push(currentParticipant.Phone);\r\n } else {\r\n // skip the user for which the list is executed\r\n if (currentParticipant.Email === (!!notificationData.Contact ? notificationData.Contact.Email : notificationData.Recipients[0]))\r\n continue;\r\n\r\n if (currentParticipant.Email)\r\n recipients.push(currentParticipant.Email);\r\n }\r\n }\r\n\r\n return recipients;\r\n };\r\n\r\n /**\r\n * Go to another list\r\n * Applies only for ANOTHER_PROCESSLIST action\r\n * @param {} destinationProcessList \r\n * @returns {} \r\n */\r\n $scope.jumpToProcessList = function (optionItem, processListItem) {\r\n \r\n if (!optionItem)\r\n return Promise.resolve();\r\n\r\n var action = optionItem.ProcessListAction;\r\n\r\n if (!action)\r\n return Promise.resolve();\r\n\r\n if (!action.ProcessList)\r\n return Promise.resolve();\r\n\r\n if (!action.ProcessList.InitiatedId)\r\n return Promise.resolve();\r\n\r\n // reset lastIndexSet before go to another process list to avoid the issue \r\n // of starting (from question 3 for example) in the another process list\r\n lastIndexSet = 0;\r\n\r\n var initiatedProcessListId = action.ProcessList.InitiatedId;\r\n\r\n if (!!action.ProcessList.downloaded)\r\n return queueCheckList(action.ProcessList);\r\n\r\n var retrieveDescriptionHtmlFromTemplate = $scope.isQualityHandbookPage ? true : false;\r\n\r\n // get the checklist\r\n return ExecutionFactory.getInitiatedProcessList(initiatedProcessListId, true, retrieveDescriptionHtmlFromTemplate)\r\n .$promise\r\n .then(function (result) {\r\n if (!result)\r\n return Promise.resolve();\r\n\r\n result.downloaded = true;\r\n\r\n action.ProcessList = result;\r\n\r\n // get item and set the checklist there as well\r\n var item = _.find(processListItem.InitiatedOption.Items, function (i) { return i.InitiatedId === optionItem.InitiatedId });\r\n\r\n if (!!item) {\r\n item.ProcessListAction.ProcessList = result;\r\n }\r\n\r\n return $timeout(function () { queueCheckList(result) });\r\n });\r\n };\r\n\r\n function queueCheckList(checkList) {\r\n // save the currentItemIndex of the current process list\r\n $scope.processListElement.lastDoneItemIndex = $scope.currentItemIndex;\r\n\r\n // push the current process list in the queue;\r\n $scope.processListQueue.push($scope.processListElement);\r\n\r\n // set the current to destination process list and initialize it\r\n $scope.processListElement = checkList;\r\n \r\n if (checkList.ProcessListType.ProgId != 'HORIZONTAL') {\r\n lastIndexSet = 0;\r\n initializeExecution(null);\r\n $scope.startExecution();\r\n } else {\r\n initHorizontal();\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Do neccessary verifications and set the correct status\r\n * @param {any} oldIndex\r\n * @param {any} newIndex\r\n */\r\n var moveAndMarkNextItems = function (oldIndex, newIndex) {\r\n // mark the previous item as done\r\n $scope.progressBar.items[oldIndex].status = 'DONE';\r\n\r\n // if following this item there's a skipped item, we need to clear the rest first\r\n if ($scope.progressBar.items[$scope.currentItemIndex + 1].status == 'SKIPPED') {\r\n // clear skipped items untill an available item is encountered\r\n for (var i = $scope.currentItemIndex + 1; i < $scope.progressBar.items.length; i++) {\r\n if ($scope.progressBar.items[i].status == 'SKIPPED') {\r\n $scope.progressBar.items[i].status = 'NOT_DONE';\r\n } else if ($scope.progressBar.items[i].status == 'AVAILABLE') {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // mark all skipped items that were jumped\r\n for (var i = oldIndex + 1; i < newIndex; i++) {\r\n $scope.progressBar.items[i].status = 'SKIPPED';\r\n }\r\n\r\n // move forwards\r\n $scope.currentItemIndex = newIndex;\r\n $scope.changeCurrentStep($scope.currentItemIndex, true);\r\n scrollToElement($scope.currentItemIndex);\r\n\r\n // mark current item as available if it's not already done\r\n if ($scope.progressBar.items[$scope.currentItemIndex].status == 'NOT_DONE') {\r\n $scope.progressBar.items[$scope.currentItemIndex].status = 'AVAILABLE';\r\n }\r\n };\r\n\r\n /**\r\n * Checks whether the current selected value contains ANNET as default answer\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.checkIfAnnet = function (selectedValue) {\r\n if (!selectedValue\r\n || !selectedValue.OptionItem\r\n || !selectedValue.OptionItem.ProcessListAction\r\n || !selectedValue.OptionItem.ProcessListAction.DefaultAnswers)\r\n return false;\r\n\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n var filterResult = $filter('filter')(selectedValue.OptionItem.ProcessListAction.DefaultAnswers, {\r\n InitiatedId: selectedValue.SelectedDefaultAnswer.InitiatedId\r\n });\r\n if (filterResult && filterResult.length > 0 && filterResult[0].ProgId == 'PROG_ANNET')\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n // function to check if the button should be disabled \r\n $scope.isNextDisabled = function (index) {\r\n\r\n if (!$scope.processListElement || !$scope.processListElement.ProcessListItems || !$scope.processListElement.ProcessListItems[index])\r\n return false;\r\n\r\n return isProcessListItemNotCompleted($scope.processListElement.ProcessListItems[index]);\r\n };\r\n\r\n\r\n /**\r\n * Checks whether the process list item is completed\r\n * @param {any} processListItem\r\n */\r\n function isProcessListItemNotCompleted(processListItem) {\r\n // if the input is string or numeric, check for its value \r\n if (processListItem.InitiatedOption.Type.ProgId == 'STRING' || processListItem.InitiatedOption.Type.ProgId == 'NUMERIC') {\r\n if (processListItem.InitiatedOption.SelectedValue\r\n && processListItem.InitiatedOption.SelectedValue.CustomDataType\r\n && processListItem.InitiatedOption.SelectedValue.CustomDataType.length > 0)\r\n return false;\r\n else if ($scope.processListElement.FlexibleExecution)\r\n return false;\r\n }\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'STANDARD_TEXT') {\r\n if (!processListItem.InitiatedOption.SelectedValue && !$scope.processListElement.FlexibleExecution)\r\n return true;\r\n if ($scope.isAnyStandardAnswerInEdit(processListItem.InitiatedOption.Items))\r\n return true;\r\n return false;\r\n }\r\n\r\n // if the input is radio or dropdown, check for its selected value \r\n if (processListItem.InitiatedOption.Type.ProgId == 'DROPDOWN' || processListItem.InitiatedOption.Type.ProgId == 'RADIO_BUTTON') {\r\n if (processListItem.InitiatedOption.SelectedValue\r\n && processListItem.InitiatedOption.SelectedValue.OptionItem) {\r\n if (processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction) {\r\n return isSelectedValueWithActionInvalid(processListItem.InitiatedOption.SelectedValue);\r\n } else {\r\n return processListItem.InitiatedOption.SelectedValue.OptionItem.InitiatedId == undefined;\r\n }\r\n } else if ($scope.processListElement.FlexibleExecution)\r\n return false;\r\n }\r\n\r\n // if the input is multiple choice, check for all selected values\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n if (!processListItem.InitiatedOption.SelectedValues || processListItem.InitiatedOption.SelectedValues.length == 0) {\r\n\r\n if ($scope.processListElement.FlexibleExecution)\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n if (processListItem.ChoicesRequired && processListItem.InitiatedOption.SelectedValues.length != processListItem.InitiatedOption.Items.length) {\r\n return true;\r\n }\r\n\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n if (selectedValue.OptionItem && selectedValue.OptionItem.ProcessListAction && isSelectedValueWithActionInvalid(selectedValue)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Check whether the action is invalid\r\n * @param {any} selectedValue\r\n */\r\n var isSelectedValueWithActionInvalid = function (selectedValue) {\r\n switch (selectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"ANOTHER_PROCESSLIST\":\r\n if (selectedValue.OptionItem.ProcessListAction.ProcessList.ProcessListType.ProgId == 'HORIZONTAL')\r\n checkIfHorizontalIsCompleted(selectedValue.OptionItem.ProcessListAction.ProcessList);\r\n return !selectedValue.OptionItem.ProcessListAction.ProcessList.IsCompleted;\r\n case \"CAMERA\":\r\n if (!sessionInformationService.hasAccess('UPLOAD_GALLERY'))\r\n return false;\r\n\r\n if (selectedValue.OptionItem.ProcessListAction.CameraImages &&\r\n selectedValue.OptionItem.ProcessListAction.CameraImages.length > 0)\r\n return false;\r\n else\r\n return true;\r\n case \"SMS\":\r\n if (selectedValue.SelectedDefaultAnswer\r\n && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n\r\n if (selectedValue.SelectedDefaultAnswer.ProgId != \"PROG_ANNET\") {\r\n return false;\r\n } else {\r\n if (selectedValue.SelectedDefaultAnswer.CommentInput\r\n && selectedValue.SelectedDefaultAnswer.CommentInput.length > 0)\r\n return false;\r\n }\r\n }\r\n return true;\r\n case \"EMAIL\":\r\n if (selectedValue.SelectedDefaultAnswer\r\n && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n\r\n if (selectedValue.SelectedDefaultAnswer.ProgId != \"PROG_ANNET\") {\r\n return false;\r\n } else {\r\n if (selectedValue.SelectedDefaultAnswer.CommentInput\r\n && selectedValue.SelectedDefaultAnswer.CommentInput.length > 0)\r\n return false;\r\n }\r\n }\r\n //else {\r\n // if (currentOrder.Customer.Type.ProgId == 'PRIVATE')\r\n // return false;\r\n //}\r\n return true;\r\n case \"TEXT_FIELD\":\r\n if (selectedValue.OptionItem.ProcessListAction.DefaultAnswers.length == 0) {\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.length > 0) {\r\n return false;\r\n }\r\n } else {\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n if (selectedValue.SelectedDefaultAnswer.ProgId != \"PROG_ANNET\") {\r\n return false;\r\n } else {\r\n if (selectedValue.SelectedDefaultAnswer.CommentInput && selectedValue.SelectedDefaultAnswer.CommentInput.length > 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n case \"DATE_PICKER\":\r\n if (selectedValue.CustomDataType) {\r\n return false;\r\n }\r\n return true;\r\n case \"RISK_ANALYSIS\":\r\n if (!!selectedValue) {\r\n if (selectedValue.RiskHead &&\r\n selectedValue.RiskHead.RiskRows &&\r\n selectedValue.RiskHead.RiskRows.length > 0 &&\r\n ($filter('filter')(selectedValue.RiskHead.RiskRows, { Active: true })).length > 0) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n return true;\r\n default:\r\n return selectedValue.OptionItem.InitiatedId == undefined;\r\n }\r\n };\r\n\r\n //TODO: use download service\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n\r\n $scope.openAttachment = function (attach) {\r\n if (attach.IsExternalURL == false)\r\n downloadFile(attach.URL);\r\n else {\r\n var win = window.open(attach.URL, '_blank');\r\n }\r\n return;\r\n };\r\n\r\n // in order for the datepicker disabled attribute to work, the date has to be set to null\r\n $scope.$watch(function () {\r\n return $scope.calendar.disabled;\r\n }, function () {\r\n $scope.calendar.startDate = $scope.calendar.disabled ? null : new Date();\r\n $scope.calendar.endDate = $scope.calendar.disabled ? null : new Date();\r\n $scope.calendar.startTime = $scope.calendar.disabled ? null : new Date();\r\n $scope.calendar.endTime = $scope.calendar.disabled ? null : new Date();\r\n });\r\n\r\n $scope.putInCalendar = function (calendar) {\r\n dialogService.showConfirmDialog('txtPutInCalendar', ['txtPutInCalendarMessage']).then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n saveTask(calendar).then(function () {\r\n $scope.saveExecution().then(function () {\r\n redirectBack();\r\n });\r\n });\r\n }\r\n });\r\n };\r\n\r\n function initiateDateTime(selectedValue) {\r\n // in the UI, the date part and the time part are bound separately,\r\n // so we need to initiate them with the complete date value from db\r\n if (selectedValue &&\r\n selectedValue.OptionItem &&\r\n selectedValue.OptionItem.ProcessListAction &&\r\n (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'PUT_IN_CALENDAR' || selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'DATE_PICKER')) {\r\n selectedValue.tempDate = new Date(DateUtilService.getLongWithoutOffset(Number(angular.copy(selectedValue.CustomDataType))));//$filter('date')(Number(angular.copy(selectedValue.CustomDataType)), 'dd-MM-yyyy');\r\n selectedValue.tempTime = DateUtilService.getLongWithoutOffset(Number(angular.copy(selectedValue.CustomDataType)));\r\n }\r\n };\r\n\r\n /**\r\n * Prepare the selected value with the selected date\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.onDateTimePickerChanged = function (selectedValue) {\r\n var datePart = selectedValue.tempDate;\r\n var timePart = selectedValue.tempTime;\r\n\r\n if (!timePart) {\r\n timePart = new Date();\r\n } else {\r\n timePart = new Date(timePart);\r\n }\r\n\r\n if (!datePart) {\r\n datePart = new Date();\r\n } else {\r\n datePart = new Date(datePart);\r\n }\r\n\r\n var newDate = new Date(datePart.getFullYear(),\r\n datePart.getMonth(),\r\n datePart.getDate(),\r\n timePart.getHours(),\r\n timePart.getMinutes());\r\n\r\n selectedValue.CustomDataType = DateUtilService.getLongWithOffset(newDate);\r\n };\r\n\r\n $scope.onCalendarChanged = function (calendar) {\r\n if (!calendar.startTime) {\r\n calendar.startTime = new Date();\r\n }\r\n\r\n calendar.startDate = new Date(calendar.startDate.getFullYear(),\r\n calendar.startDate.getMonth(),\r\n calendar.startDate.getDate(),\r\n calendar.startTime.getHours(),\r\n calendar.startTime.getMinutes(),\r\n calendar.startTime.getSeconds());\r\n\r\n if (!calendar.endTime)\r\n calendar.endTime = new Date();\r\n\r\n calendar.endDate = new Date(calendar.endDate.getFullYear(),\r\n calendar.endDate.getMonth(),\r\n calendar.endDate.getDate(),\r\n calendar.endTime.getHours(),\r\n calendar.endTime.getMinutes(),\r\n calendar.endTime.getSeconds());\r\n };\r\n\r\n /**\r\n * Check whether the end date is wrong\r\n * @param {} calendar \r\n * @returns {} \r\n */\r\n $scope.isEndDateWrong = function (calendar) {\r\n //TODO: find a simpler way\r\n if (calendar.disabled || !calendar.startDate || !calendar.startTime ||\r\n !calendar.endDate || !calendar.endTime)\r\n return false;\r\n\r\n if (calendar.endDate.getFullYear() < calendar.startDate.getFullYear())\r\n return true;\r\n else if (calendar.endDate.getFullYear() == calendar.startDate.getFullYear()) {\r\n if (calendar.endDate.getMonth() < calendar.startDate.getMonth())\r\n return true;\r\n\r\n else if (calendar.endDate.getMonth() == calendar.startDate.getMonth()) {\r\n if (calendar.endDate.getDate() < calendar.startDate.getDate())\r\n return true;\r\n\r\n else if (calendar.endDate.getDate() == calendar.startDate.getDate()) {\r\n if (calendar.endTime.getHours() < calendar.startTime.getHours())\r\n return true;\r\n\r\n else if (calendar.endTime.getHours() == calendar.startTime.getHours()) {\r\n if (calendar.endTime.getMinutes() <= calendar.startTime.getMinutes())\r\n return true;\r\n return false;\r\n }\r\n return false;\r\n }\r\n return false;\r\n }\r\n return false;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Get a list of users for a given organization\r\n */\r\n function getUsersDropdown() {\r\n var users = UserFactory.getUsersByOrganizationId(ExecutionFactory.organizationId);\r\n users.$promise.then(function (result) {\r\n $scope.users = result;\r\n });\r\n };\r\n\r\n /**\r\n * Create a task after the user has set dates and set the foreign key as the item\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n $scope.saveItemTask = function (processListItem) {\r\n\r\n if (!processListItem.Task) {\r\n processListItem.Task = {\r\n };\r\n }\r\n\r\n\r\n processListItem.Task.ForeignKey = processListItem.InitiatedId;\r\n processListItem.Task.Table = \"BOT_INITIATED_PROCESSLIST_ITEM_CALENDAR\";\r\n processListItem.Task.Execution = {\r\n InitiatedProcessList: { Name: $scope.processListElement.Name }\r\n };\r\n processListItem.Task.Description = processListItem.calendar.description;\r\n processListItem.Task.StartDate = processListItem.calendar.disabled ? null : DateUtilService.getLongWithOffset(processListItem.calendar.startDate);\r\n processListItem.Task.EndDate = processListItem.calendar.disabled ? null : DateUtilService.getLongWithOffset(processListItem.calendar.endDate);\r\n processListItem.Task.Active = true;\r\n processListItem.Task.disabled = processListItem.calendar.disabled;\r\n processListItem.Task.User = processListItem.calendar.user;\r\n\r\n processListItem.isCalendarVisible = false;\r\n };\r\n\r\n /**\r\n * Load the dates from the item and process the dates\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n $scope.loadCalendarFromItem = function (processListItem) {\r\n if (!processListItem.Task) {\r\n processListItem.calendar = {\r\n visible: false, datetime: null, date: null, time: null, disabled: false\r\n };\r\n\r\n processListItem.calendar.startDate = processListItem.calendar.disabled ? null : new Date();\r\n processListItem.calendar.endDate = processListItem.calendar.disabled ? null : new Date();\r\n processListItem.calendar.startTime = processListItem.calendar.disabled ? null : new Date();\r\n processListItem.calendar.endTime = processListItem.calendar.disabled ? null : new Date();\r\n } else {\r\n processListItem.calendar = {\r\n visible: false, datetime: null, date: null, time: null, disabled: false\r\n };\r\n\r\n processListItem.calendar.description = processListItem.Task.Description;\r\n processListItem.calendar.startDate = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.StartDate));\r\n processListItem.calendar.startTime = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.StartDate));\r\n processListItem.calendar.endDate = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.EndDate));\r\n processListItem.calendar.endTime = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.EndDate));\r\n processListItem.calendar.user = processListItem.Task.User;\r\n\r\n if (!(processListItem.Task.StartDate) && !(processListItem.Task.EndDate)) {\r\n processListItem.calendar.disabled = true;\r\n } else {\r\n processListItem.calendar.disabled = processListItem.Task.disabled;\r\n }\r\n\r\n\r\n }\r\n };\r\n\r\n\r\n /**\r\n * Save the task to server\r\n * @param {any} calendar\r\n */\r\n var saveTask = function (calendar) {\r\n var loggedUser = sessionInformationService.getUser();\r\n var taskToSave = TaskListFactory.getTaskToSave(), deferred = $q.defer(), taskToSaveExecutionFor;\r\n\r\n // the foreignkey is the initiatedId of the current execution item\r\n taskToSave.ForeignKey = $scope.processListElement.ProcessListItems[$scope.currentItemIndex].InitiatedId;\r\n taskToSave.Table = \"BOT_INITIATED_PROCESSLIST_ITEM\";\r\n\r\n taskToSave.Execution = {\r\n InitiatedProcessList: { Name: $scope.processListElement.Name }\r\n };\r\n\r\n // save either the user, when the execution is about 'GOT_USER\", \r\n // or the logged user when is about 'GOT_ORGANIZATION'\r\n if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER') {\r\n taskToSave.User = {\r\n id: foreignKey\r\n };\r\n } else if ($scope.processListElement.DataAbout.ProgId == 'GOT_ORGANIZATION') {\r\n taskToSave.User = {\r\n id: loggedUser.id\r\n };\r\n }\r\n\r\n // if the event wasn't triggered by the user\r\n // force trigger it so the date gets built using the pre-selected values\r\n if (calendar && !calendar.disabled && !calendar.datetime) {\r\n $scope.onCalendarChanged(calendar);\r\n }\r\n\r\n taskToSave.StartDate = (calendar.startDate) ? DateUtilService.getLongWithOffset(calendar.startDate) : calendar.startDate;\r\n taskToSave.EndDate = (calendar.endDate) ? DateUtilService.getLongWithOffset(calendar.endDate) : calendar.endDate;\r\n taskToSave.Active = true;\r\n\r\n taskToSave.Description = calendar.description;\r\n\r\n if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER' && loggedUser.id != foreignKey) {\r\n //create the same task but for the user that is executing for\r\n taskToSaveExecutionFor = angular.copy(taskToSave);\r\n taskToSaveExecutionFor.User = {\r\n id: loggedUser.id\r\n };\r\n taskToSaveExecutionFor.Active = true;\r\n }\r\n\r\n TaskListFactory.saveTask(taskToSave).then(function () {\r\n if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER' && taskToSaveExecutionFor)\r\n return TaskListFactory.saveTask(taskToSaveExecutionFor);\r\n else return $q.when();\r\n }).then(function () {\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Set the first default answer as the default one\r\n * @param {any} selectedValue\r\n */\r\n function initiateSelectedDefaultAnswer(selectedValue) {\r\n if (!(_.get(selectedValue, 'OptionItem.ProcessListAction.DefaultAnswers') && !_.isEmpty(selectedValue.OptionItem.ProcessListAction.DefaultAnswers)))\r\n return;\r\n\r\n // find one answer which is not annet\r\n var notAnnet = _.find(selectedValue.OptionItem.ProcessListAction.DefaultAnswers, function (defaultAnswer) { return defaultAnswer.ProgId != 'PROG_ANNET' });\r\n\r\n if (notAnnet)\r\n selectedValue.SelectedDefaultAnswer = notAnnet;\r\n else\r\n // select annet as default\r\n selectedValue.SelectedDefaultAnswer = _.find(selectedValue.OptionItem.ProcessListAction.DefaultAnswers, function (defaultAnswer) { return defaultAnswer.ProgId == 'PROG_ANNET' });\r\n };\r\n\r\n /**\r\n * Initialize the first date with one temporary\r\n * @param {any} selectedValue\r\n */\r\n function initializeTempDate(selectedValue) {\r\n\r\n if (selectedValue\r\n && selectedValue.OptionItem\r\n && selectedValue.OptionItem.ProcessListAction\r\n && selectedValue.OptionItem.ProcessListAction.Type\r\n && selectedValue.OptionItem.ProcessListAction.Type.ProgId === \"PUT_IN_CALENDAR\"\r\n && !selectedValue.tempDate) {\r\n\r\n $scope.onDateTimePickerChanged(selectedValue);\r\n\r\n initiateDateTime(selectedValue);\r\n\r\n }\r\n\r\n };\r\n\r\n /**\r\n * When the dropdown value changes, init the selected value with the necessary data\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.onDropdownChange = function (selectedValue) {\r\n\r\n // clear previous selected default answer if any\r\n if (selectedValue.SelectedDefaultAnswer) {\r\n selectedValue.SelectedDefaultAnswer = null;\r\n }\r\n\r\n selectedValue.CustomDataType = null;\r\n\r\n initiateSelectedDefaultAnswer(selectedValue);\r\n\r\n initializeTempDate(selectedValue);\r\n };\r\n\r\n /**\r\n * When the radio button changes, init the selected value with the necessary data\r\n * @param {} item \r\n * @param {} initiatedOption \r\n * @returns {} \r\n */\r\n $scope.onRadioButtonChange = function (item, initiatedOption) {\r\n\r\n // clear previous selected default answer if any\r\n if (initiatedOption && initiatedOption.SelectedValue && initiatedOption.SelectedValue.SelectedDefaultAnswer) {\r\n initiatedOption.SelectedValue.SelectedDefaultAnswer = null;\r\n }\r\n\r\n if (!!item\r\n && !!initiatedOption.SelectedDefaultAnswer\r\n && !!initiatedOption.SelectedValue\r\n && !(initiatedOption.SelectedDefaultAnswer.NotificationMessageId > 0\r\n || initiatedOption.SelectedValue.OptionItem.ProcessListAction.Signature\r\n || initiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImages.length > 0)) {\r\n initiatedOption.SelectedValue.OptionItem = item;\r\n }\r\n\r\n if (!!initiatedOption.SelectedValue) {\r\n\r\n initiatedOption.SelectedValue.CustomDataType = null;\r\n\r\n initiateSelectedDefaultAnswer(initiatedOption.SelectedValue);\r\n\r\n initializeTempDate(initiatedOption.SelectedValue);\r\n }\r\n };\r\n\r\n /**\r\n * Check whether any standard answer is in edit mode.\r\n * @param {} items \r\n * @returns {} \r\n */\r\n $scope.isAnyStandardAnswerInEdit = function (items) {\r\n if (!items || items.length == 0)\r\n return false;\r\n for (var i = 0; i < items.length; i++)\r\n if (items[i].EditMode)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Check whether the item at the given indes is disabled\r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.isItemDisabled = function (index) {\r\n if ($scope.processListElement.FlexibleExecution || $scope.progressBar.items[index] &&\r\n ($scope.progressBar.items[index].status == 'DONE' ||\r\n $scope.progressBar.items[index].status == 'AVAILABLE'))\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Go to the given index\r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.changeCurrentStep = function (index, skipScroll) {\r\n if ($scope.isItemDisabled(index) || isProcessListItemNotCompleted($scope.processListElement.ProcessListItems[$scope.currentItemIndex]))\r\n return;\r\n\r\n $scope.currentItemIndex = index;\r\n lastIndexSet = index;\r\n\r\n if (!skipScroll)\r\n scrollToElement($scope.currentItemIndex);\r\n };\r\n\r\n var savedAfterEnteringIdle = false;\r\n\r\n onDestroySubscription = $scope.$on('$destroy', function () {\r\n Idle.unwatch();\r\n console.log('idle unwatch');\r\n document.removeEventListener('mousemove', onMouseMove);\r\n $scope.$emit('onExecutionManagementControllerDestroy');\r\n\r\n if (onDestroySubscription) {\r\n onDestroySubscription();\r\n }\r\n });\r\n\r\n $scope.$on('IdleStart', function () {\r\n console.log('idle start');\r\n });\r\n\r\n $scope.$on('IdleWarn', function (e, countdown) {\r\n console.log('idle warn');\r\n });\r\n\r\n $scope.$on('IdleTimeout', function () {\r\n if ($scope.processListElement.ProcessListType.ProgId == 'HORIZONTAL')\r\n return;\r\n //If last save process has not yet finished, don't try to save again\r\n if (notFinishedSaving)\r\n return;\r\n console.log('idle timeout');\r\n\r\n if ($scope.processListQueue.length > 0) {\r\n console.log('User is execution an another checlist, so not saving');\r\n savedAfterEnteringIdle = true;\r\n return;\r\n }\r\n\r\n isAutoSaving = true;\r\n\r\n $scope.saveExecution().then(function () {\r\n isAutoSaving = false;\r\n savedAfterEnteringIdle = true;\r\n });\r\n });\r\n\r\n $scope.$on('IdleEnd', function () {\r\n console.log('I\\'m alive');\r\n });\r\n\r\n $scope.$on('Keepalive', function () {\r\n console.log('I like to move it move it');\r\n });\r\n\r\n function onMouseMove() {\r\n //if he was not idle before\r\n //ignore\r\n if (!savedAfterEnteringIdle)\r\n return;\r\n\r\n //if he was idle and he's back\r\n //resume watch\r\n Idle.unwatch();\r\n savedAfterEnteringIdle = false;\r\n $timeout(function () {\r\n Idle.watch();\r\n });\r\n };\r\n\r\n document.addEventListener('mousemove', onMouseMove);\r\n\r\n /**\r\n * Checks whether the private comment should be shown\r\n * @param {} item \r\n * @returns {} \r\n */\r\n $scope.showPrivateComment = function (item) {\r\n var loggedUser = sessionInformationService.getUser();\r\n if ((loggedUser.Group.ProgId == 'ADMIN' || loggedUser.Group.ProgId == 'MANAGER') && $scope.currentExecution && loggedUser.id === $scope.currentExecution.CreatedBy.id) {\r\n\r\n if (!$scope.processListElement.LimitedAccess)\r\n return false;\r\n\r\n if (item.LastUpdatedBy && item.LastUpdatedBy.id && item.LastUpdatedBy.id != loggedUser.id)\r\n return false;\r\n\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the process list warning for flexible should be shown\r\n * @param {} processListItem \r\n * @param {} isFlexibleExecution \r\n * @returns {} \r\n */\r\n $scope.displayProcessListItemWarning = function (processListItem, isFlexibleExecution) {\r\n\r\n if (!isFlexibleExecution)\r\n return false;\r\n\r\n if (processListItem.InitiatedOption.LastUpdatedBy && processListItem.InitiatedOption.LastUpdatedBy.id)\r\n return false;\r\n\r\n if ((!processListItem.InitiatedOption.LastUpdatedBy || !processListItem.InitiatedOption.LastUpdatedBy.id) && processListItem.isDone)\r\n return false;\r\n\r\n return true;\r\n\r\n };\r\n\r\n //#region PARTICIPANTS MODAL\r\n /**\r\n * Get the ids sepparated by | from any given list of participants\r\n * @param {any} participants\r\n */\r\n function extractParticipantsIds(participants) {\r\n if (!participants || participants.length === 0)\r\n return null;\r\n\r\n var participantIds = \"\";\r\n for (var index = 0; index < participants.length; index++) {\r\n var currentParticipant = participants[index];\r\n if (index === participants.length - 1) {\r\n participantIds += currentParticipant.User.id;\r\n } else {\r\n participantIds += currentParticipant.User.id + \"|\";\r\n }\r\n }\r\n return participantIds;\r\n }\r\n\r\n $scope.addParticipant = function (user) {\r\n $scope.participants.push({ User: user });\r\n };\r\n\r\n $scope.removeParticipant = function (participant) {\r\n var index = $scope.participants.indexOf(participant);\r\n if (index > -1) {\r\n $scope.participants.splice(index, 1);\r\n }\r\n };\r\n\r\n /**\r\n * Open the participant modal and view the current participants for this execution\r\n * After the modal closes, save the participants\r\n * @returns {} \r\n */\r\n $scope.openParticipantsModal = function () {\r\n\r\n getExecutionParticipants($scope.currentExecution.id)\r\n .then(function (response) {\r\n\r\n $scope.participants = response;\r\n\r\n $scope.participantsModal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalExecutionParticipants.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n\r\n $scope.participantsModal.result.then(function () {\r\n\r\n if ($scope.participants && $scope.participants.length > 0) {\r\n\r\n var pageThatOpenedTheExecution = ExecutionService.getPageFromWhereTheExecutionWasOpened();\r\n \r\n ExecutionFactory.updateExecutionParticipants($scope.currentExecution.id, extractParticipantsIds($scope.participants), pageThatOpenedTheExecution)\r\n .then(function (result) {\r\n\r\n // below call is a fix for an issue where when the logged user's company\r\n // does not have a license and the management execution page is reloaded\r\n // the user is redirected to demo-content page\r\n setCurrentPageForExecution(pageThatOpenedTheExecution);\r\n\r\n // redirect to execution\r\n $route.reload();\r\n });\r\n }\r\n });\r\n\r\n });\r\n\r\n };\r\n\r\n function setCurrentPageForExecution(pageThatOpenedTheExecution) {\r\n\r\n if (!pageThatOpenedTheExecution) {\r\n return;\r\n }\r\n\r\n var page = null;\r\n\r\n if (Array.isArray(pageThatOpenedTheExecution)) {\r\n if (pageThatOpenedTheExecution.length > 0) {\r\n // array can contain elements such as 'USERS','MY_PROFILE'\r\n // and we need only the first element to identify the page\r\n page = pageThatOpenedTheExecution[0];\r\n }\r\n } else {\r\n page = pageThatOpenedTheExecution;\r\n }\r\n\r\n PageRouteUtilService.setCurrentPageForExecution(page);\r\n }\r\n\r\n /**\r\n * Get the users for participants\r\n * @param {} searchedUserText \r\n * @param {} isDropdownOpen \r\n * @returns {} \r\n */\r\n $scope.getUsers = function (searchedUserText, isDropdownOpen) {\r\n UserFactory.getUsersByOrganizationId($scope.loggedUser.Organization.id, searchedUserText)\r\n .$promise.then(function (response) {\r\n $scope.users = response;\r\n $scope.intellisense.isDropdownOpen = isDropdownOpen;\r\n });\r\n };\r\n\r\n function getExecutionParticipants(executionId) {\r\n return ExecutionFactory.getExecutionParticipants(executionId);\r\n };\r\n\r\n /**\r\n * Checkes whether the user is selected or not\r\n * @param {} user \r\n * @returns {} \r\n */\r\n $scope.notYetSelected = function (user) {\r\n return ($filter('filter')($scope.participants, function (participant) {\r\n\r\n return participant.User.id === user.id;\r\n\r\n })).length <= 0;\r\n };\r\n\r\n // end #region PARTICIPANTS MODAL\r\n\r\n\r\n //TODO: this should belong in a component\r\n // #region HORIZONTAL\r\n\r\n /**\r\n * Init the execution for horizontal lists\r\n */\r\n function initHorizontal() {\r\n\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.Value = '';\r\n });\r\n\r\n if ($scope.processListElement.ListValues.length == 0) {\r\n addCurrentTableFields();\r\n }\r\n\r\n $scope.isFromManagement = true;\r\n\r\n };\r\n\r\n function addCurrentTableFields() {\r\n $scope.processListElement.ListValues.push(angular.copy($scope.processListElement.TableFields));\r\n };\r\n\r\n $scope.addItem = function () {\r\n // set the parent id to tell apart sets of items\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.ParentId = $scope.processListElement.ListValues.length;\r\n tableField.Value.id = null;\r\n });\r\n\r\n // add to ListValues the new row\r\n addCurrentTableFields();\r\n\r\n // clear the tablefields \r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.ParentId = -1;\r\n });\r\n }\r\n\r\n /**\r\n * Check whether the button is disabled for adding horizontal items\r\n * @returns {} \r\n */\r\n $scope.disabledAddItem = function () {\r\n var response = false;\r\n\r\n if ($scope.processListElement != undefined &&\r\n $scope.processListElement.ListValues != undefined &&\r\n $scope.processListElement.ListValues.length > 0) {\r\n\r\n var listLength = $scope.processListElement.ListValues.length;\r\n\r\n angular.forEach($scope.processListElement.ListValues[listLength - 1], function (currentField) {\r\n if (currentField.Value.Value == \"\")\r\n response = true;\r\n });\r\n\r\n }\r\n\r\n return response;\r\n }\r\n\r\n // end #region HORIZONTAL\r\n }\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module('execution').directive('executionManagementStep', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/execution/executionManagementStepPartial.html',\r\n scope: true\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ExecutionVerticalController.$inject = [\r\n '$scope',\r\n '$filter',\r\n '$document',\r\n '$uibModal',\r\n 'OrganizationUtilService',\r\n 'OrderFactory',\r\n 'ExecutionFactory',\r\n 'ProcessListFactory',\r\n 'ProjectFactory',\r\n 'dialogService',\r\n '$sce',\r\n '$rootScope',\r\n '$timeout',\r\n '_'\r\n ];\r\n\r\n angular.module('execution').controller('ExecutionVerticalController', ExecutionVerticalController);\r\n\r\n //TODO: refactor this into multiple components\r\n function ExecutionVerticalController(\r\n $scope,\r\n $filter,\r\n $document,\r\n $uibModal,\r\n OrganizationUtilService,\r\n OrderFactory,\r\n ExecutionFactory,\r\n ProcessListFactory,\r\n ProjectFactory,\r\n dialogService,\r\n $sce,\r\n $rootScope,\r\n $timeout,\r\n _\r\n ) {\r\n\r\n var notificationData = {};\r\n var currentDefaultAnswer = {};\r\n\r\n $scope.currentNotificationData = {};\r\n $scope.currentProcessListItem = {};\r\n $scope.currentListHistory = {};\r\n\r\n //#region VERTICAL\r\n // variables initialization\r\n\r\n var processListQueue = [];\r\n $scope.canBack = false;\r\n var attachmentsModal = {};\r\n $scope.status = {};\r\n\r\n $scope.saveLocation = 'newOrder';\r\n\r\n var orderModal;\r\n var notificationEditorModal;\r\n\r\n //set the orgId in ExecutionFactory \r\n ExecutionFactory.organizationId = OrganizationUtilService.getOrganizationId();\r\n\r\n $scope.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n /**\r\n * Open the notification modal and prepare any necessary data\r\n * @param {} processListItem \r\n * @param {} choice \r\n * @returns {} \r\n */\r\n $scope.openNotificationEditorModal = function (processListItem, choice) {\r\n\r\n if (!choice && processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer == null) {\r\n return;\r\n } else {\r\n if ((choice && choice.selectedValue.SelectedDefaultAnswer == null)) {\r\n return;\r\n }\r\n }\r\n\r\n var defaultAnswers, i;\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n currentDefaultAnswer = choice.selectedValue.SelectedDefaultAnswer;\r\n //fill currentDefaultAnswer.Name\r\n defaultAnswers = choice.selectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n for (i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n\r\n } else {\r\n currentDefaultAnswer = processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer;\r\n //fill currentDefaultAnswer.Name\r\n defaultAnswers = processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n for (i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n }\r\n\r\n if (currentDefaultAnswer && currentDefaultAnswer.Notification) {\r\n $scope.currentNotificationData = angular.copy(currentDefaultAnswer.Notification);\r\n } else {\r\n $scope.currentNotificationData = angular.copy(notificationData);\r\n }\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE'\r\n && choice.selectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\") {\r\n $scope.currentNotificationData.isSms = true;\r\n } else {\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE'\r\n && processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\") {\r\n $scope.currentNotificationData.isSms = true;\r\n }\r\n }\r\n\r\n\r\n $scope.currentNotificationData.organizationId = $scope.loggedUser.Organization.id;\r\n\r\n if (!choice && processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n $scope.currentNotificationData.readOnly = true;\r\n } else {\r\n if (choice && choice.selectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n $scope.currentNotificationData.readOnly = true;\r\n }\r\n }\r\n\r\n if (currentDefaultAnswer && !$scope.currentNotificationData.TextMessage) {\r\n if (currentDefaultAnswer.ProgId == 'PROG_ANNET') {\r\n $scope.currentNotificationData.TextMessage = currentDefaultAnswer.CommentInput;\r\n } else {\r\n $scope.currentNotificationData.TextMessage = currentDefaultAnswer.Name;\r\n }\r\n }\r\n\r\n notificationEditorModal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalNotificationEditor.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Get necessary data for notification for the current list\r\n * @param {} initiatedProcessListId \r\n * @param {} dataAbout \r\n * @returns {} \r\n */\r\n $scope.getNotificationData = function (initiatedProcessListId, dataAbout) {\r\n var notificationPromise = ExecutionFactory.getNotificationData(initiatedProcessListId, dataAbout);\r\n notificationPromise.$promise.then(function (result) {\r\n notificationData = result;\r\n });\r\n };\r\n\r\n $scope.saveItemNotification = function () {\r\n currentDefaultAnswer.Notification = angular.copy($scope.currentNotificationData);\r\n };\r\n\r\n $scope.deleteItemNotification = function () {\r\n currentDefaultAnswer.Notification = null;\r\n };\r\n\r\n $scope.resetSelectedOptionNotification = function (selectedOption) {\r\n if (selectedOption) {\r\n }\r\n };\r\n\r\n //$scope.getStatusList = function () {\r\n // var statusList = OrderFactory.getStatusList();\r\n // statusList.$promise.then(function (result) {\r\n // $scope.statusList = result;\r\n // });\r\n //};\r\n\r\n //$scope.getCustomers = function () {\r\n // var customers = OrderFactory.getCustomersForOrder(orderId);\r\n // customers.$promise.then(function (result) {\r\n // $scope.customers = result;\r\n // });\r\n //};\r\n\r\n //$scope.getProcesslists = function () {\r\n // var processlists = ProcessListFactory.getProcessList();\r\n // processlists.$promise.then(function (result) {\r\n // var allProcesslists = result;\r\n // for (var index = 0; index < allProcesslists.length; index++) {\r\n // allProcesslists[index].id = parseInt(allProcesslists[index].id);\r\n // }\r\n // allProcesslists = $filter('orderBy')(allProcesslists, \"id\", true);\r\n // for (var index = 0; index < allProcesslists.length; index++) {\r\n // allProcesslists[index].id = allProcesslists[index].id.toString();\r\n // }\r\n // $scope.Processlists = allProcesslists;\r\n // });\r\n //};\r\n\r\n //$scope.getProjects = function () {\r\n // var projects = ProjectFactory.getProjects();\r\n // projects.$promise.then(function (result) {\r\n // $scope.projects = result;\r\n // });\r\n //};\r\n\r\n //$scope.getUsers = function () {\r\n // var users = OrderFactory.getUsersForOrder();\r\n // users.$promise.then(function (result) {\r\n // result.forEach(function (user) {\r\n // user.FullName = user.FirstName + \" \" + user.LastName;\r\n // });\r\n // $scope.users = result;\r\n // });\r\n //};\r\n\r\n //$scope.disableSaveOrderExec = function (order) {\r\n // if (order) {\r\n // if (order.id) return false;\r\n // if (order.Status && order.Customer && order.ProcessList)\r\n // return false;\r\n // return true;\r\n // }\r\n // return true;\r\n //};\r\n\r\n //$scope.saveOrder = function (saveLocation) {\r\n // if (saveLocation == 'newOrder') {\r\n // $scope.currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Order.ParentId = null;\r\n // $scope.currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Order.Active = true;\r\n // }\r\n // else if (saveLocation == 'subOrder') {\r\n // $scope.currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Order.ParentId = OrderFactory.order.id;\r\n // $scope.currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Order.Active = true;\r\n // }\r\n // else if (saveLocation == 'siblingOrder') {\r\n // $scope.currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Order.ParentId = OrderFactory.order.ParentId;\r\n // $scope.currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Order.Active = true;\r\n // }\r\n //};\r\n\r\n //$scope.orderAlreadyCreated = function (order) {\r\n // if (order) {\r\n // if (order.id) {\r\n // return true;\r\n // }\r\n // }\r\n // return false;\r\n //};\r\n // if the process list is not initiated, then do so then retrieve the initiated process list. If it was already initiated, then retrieve it\r\n var orderId = OrderFactory.order.id;\r\n var orderStatus = OrderFactory.order.Status;\r\n var processListId = OrderFactory.order.processListId;\r\n var initiatedProcessListId = OrderFactory.order.initiatedProcessListId;\r\n\r\n /**\r\n * Get the initiated list from server\r\n */\r\n var getProcessList = function () {\r\n var shadowProcessListGet;\r\n\r\n if (initiatedProcessListId > 0) {\r\n shadowProcessListGet = ExecutionFactory.getInitiatedProcessList(initiatedProcessListId, true);\r\n shadowProcessListGet.$promise.then(function (initiatedProcessList) {\r\n $scope.processListElement = initiatedProcessList;\r\n $scope.orderLevel = OrderFactory.order.level;\r\n $scope.processListElement.hasOrderAttachments = OrderFactory.order.hasAttachments;\r\n\r\n initExecution();\r\n\r\n $scope.getNotificationData(initiatedProcessList.InitiatedId, initiatedProcessList.DataAbout.ProgId);\r\n });\r\n } else {\r\n if (orderId && processListId) {\r\n shadowProcessListGet = ExecutionFactory.initiateProcessList(orderId, processListId);\r\n shadowProcessListGet.$promise.then(function (initiatedProcessList) {\r\n $scope.processListElement = initiatedProcessList;\r\n $scope.orderLevel = OrderFactory.order.level;\r\n $scope.processListElement.hasOrderAttachments = OrderFactory.order.hasAttachments;\r\n\r\n //if it's first time of the execution \r\n OrderFactory.changeStatusToStarted = true;\r\n initExecution();\r\n\r\n $scope.getNotificationData(initiatedProcessList.InitiatedId, initiatedProcessList.DataAbout.ProgId);\r\n });\r\n }\r\n\r\n }\r\n };\r\n\r\n getProcessList();\r\n /**\r\n * Get the initiated list and prepare it for execution\r\n */\r\n var initExecution = function () {\r\n //get history for answers\r\n getAnswerHistory();\r\n\r\n var index = 0;\r\n angular.forEach($scope.processListElement.ProcessListItems, function (item) {\r\n if ($scope.processListElement.FlexibleExecution)\r\n item.isLocked = false;\r\n else\r\n item.isLocked = true;\r\n\r\n item.isOpen = false;\r\n\r\n //if it's not \"jumped\", unlock the item\r\n if (item.InitiatedOption.SelectedValue) {\r\n if (item.InitiatedOption.SelectedValue.OptionItem && item.InitiatedOption.SelectedValue.OptionItem.InitiatedId > 0) {\r\n item.isLocked = false;\r\n $scope.processListElement.lastItem = index;\r\n\r\n item.InitiatedOption.SelectedValue.OptionItem = $filter('filter')(item.InitiatedOption.Items, { InitiatedId: item.InitiatedOption.SelectedValue.OptionItem.InitiatedId })[0];\r\n } else {\r\n if (item.InitiatedOption.SelectedValue.CustomDataType && item.InitiatedOption.SelectedValue.CustomDataType.length > 0) {\r\n item.isLocked = false;\r\n $scope.processListElement.lastItem = index;\r\n }\r\n }\r\n }\r\n\r\n if (item.InitiatedOption.Type.ProgId == 'DROPDOWN' || item.InitiatedOption.Type.ProgId == 'RADIO_BUTTON') {\r\n $scope.checkForCompletedChildProcessList(item.InitiatedOption.SelectedValue);\r\n }\r\n\r\n else if (item.InitiatedOption.Type.ProgId == 'STANDARD_TEXT') {\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItemEdited)\r\n item.InitiatedOption.SelectedValue.OptionItem.Text = item.InitiatedOption.SelectedValue.OptionItemEdited;\r\n }\r\n //multiple choice\r\n else if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n //if ($filter('filter')(item.InitiatedOption.Items, { IsChecked: true }).length > 0) {\r\n // $scope.processListElement.lastItem = index;\r\n // item.isLocked = false;\r\n //}\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n var choice = item.InitiatedOption.Items[j];\r\n var selectedValueForChoice = getSelectedValueForChoice(choice, item.InitiatedOption);\r\n if (!!selectedValueForChoice) {\r\n choice.isChecked = true;\r\n // assign the selected value as a choice property for easy access\r\n choice.selectedValue = selectedValueForChoice;\r\n\r\n $scope.processListElement.lastItem = index;\r\n item.isLocked = false;\r\n }\r\n }\r\n }\r\n index++;\r\n });\r\n\r\n if (!$scope.processListElement.lastItem && $scope.processListElement.ProcessListItems.length > 0) {\r\n $scope.processListElement.ProcessListItems[0].isOpen = true;\r\n $scope.processListElement.ProcessListItems[0].isLocked = false;\r\n $scope.processListElement.lastItem = 0;\r\n } else {\r\n if ($scope.processListElement.ProcessListItems[$scope.processListElement.lastItem])\r\n $scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].isLocked = false;\r\n if ($scope.processListElement.lastItem != $scope.processListElement.ProcessListItems.length - 1)\r\n $scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].isOpen = true;\r\n }\r\n\r\n if ($scope.processListElement.lastItem + 1 == $scope.processListElement.ProcessListItems.length)\r\n $scope.processListElement.IsCompleted = true;\r\n\r\n scrollToElement($scope.processListElement.lastItem);\r\n };\r\n\r\n function getAnswerHistory() {\r\n $scope.currentListHistory = null;\r\n\r\n return ExecutionFactory.getAnswerHistory($scope.processListElement.InitiatedId)\r\n .then(function (result) {\r\n $scope.currentListHistory = result;\r\n });\r\n };\r\n\r\n // if the action is of jump to step type\r\n var jumpToStep = function (destinationItemId) {\r\n //get the index of the destination item by comparing it to the ID\r\n for (var destinationItemIndex = 0; destinationItemIndex < $scope.processListElement.ProcessListItems.length; destinationItemIndex++) {\r\n if ($scope.processListElement.ProcessListItems[destinationItemIndex].id == destinationItemId) {\r\n break;\r\n }\r\n }\r\n\r\n // set the status of the accordions\r\n if ($scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].PreventCollapse == true)\r\n $scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].isOpen = true;\r\n else {\r\n $scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].isOpen = false;\r\n }\r\n $scope.processListElement.ProcessListItems[destinationItemIndex].isOpen = true;\r\n $scope.processListElement.ProcessListItems[destinationItemIndex].isLocked = false;\r\n $scope.processListElement.lastItem = destinationItemIndex;\r\n\r\n scrollToElement($scope.processListElement.lastItem);\r\n };\r\n\r\n // if the action is a default one, go to the next element\r\n var goToNextItem = function (currentIndex) {\r\n if (!$scope.processListElement.ProcessListItems[currentIndex + 1]) {\r\n $scope.processListElement.IsCompleted = true;\r\n if (!$scope.processListElement.ProcessListItems[currentIndex].PreventCollapse)\r\n $scope.processListElement.ProcessListItems[currentIndex].isOpen = false;\r\n\r\n return;\r\n }\r\n\r\n if ($scope.processListElement.ProcessListItems[currentIndex + 1] != undefined) {\r\n if ($scope.processListElement.ProcessListItems[currentIndex].PreventCollapse == true) {\r\n $scope.processListElement.ProcessListItems[currentIndex].isOpen = true;\r\n } else {\r\n $scope.processListElement.ProcessListItems[currentIndex].isOpen = false;\r\n }\r\n $scope.processListElement.ProcessListItems[currentIndex + 1].isOpen = true;\r\n $scope.processListElement.ProcessListItems[currentIndex + 1].isLocked = false;\r\n $scope.processListElement.lastItem = currentIndex + 1;\r\n\r\n scrollToElement($scope.processListElement.lastItem);\r\n }\r\n\r\n\r\n };\r\n\r\n var scrollToElement = function (id) {\r\n id = \"item\" + id;\r\n setTimeout(function () {\r\n var goToElement = angular.element(document.getElementById(id));\r\n $document.scrollToElementAnimated(goToElement, 200, 600);\r\n }, 200);\r\n };\r\n\r\n //TODO: check whether this is needed anymore\r\n var removeCyclicDependencies = function () {\r\n // each choice was assigned a reference to its selected value that needs to be removed before saving\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n item.InitiatedOption.Items[j].selectedValue = null;\r\n }\r\n }\r\n }\r\n };\r\n\r\n var getSelectedValueForChoice = function (choice, initiatedOption) {\r\n for (var i = 0; i < initiatedOption.SelectedValues.length; i++) {\r\n if (initiatedOption.SelectedValues[i].OptionItem && initiatedOption.SelectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n return initiatedOption.SelectedValues[i];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Check whether the action is invalid\r\n * @param {any} selectedValue\r\n */\r\n var isSelectedValueWithActionInvalid = function (selectedValue) {\r\n switch (selectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"ANOTHER_PROCESSLIST\":\r\n return !selectedValue.OptionItem.ProcessListAction.ProcessList.IsCompleted;\r\n case \"TEXT_FIELD\":\r\n if (selectedValue.OptionItem.ProcessListAction.DefaultAnswers.length == 0) {\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.length > 0) {\r\n return false;\r\n }\r\n } else {\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n if (selectedValue.SelectedDefaultAnswer.ProgId != \"PROG_ANNET\") {\r\n return false;\r\n } else {\r\n if (selectedValue.SelectedDefaultAnswer.CommentInput && selectedValue.SelectedDefaultAnswer.CommentInput.length > 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n case \"DATE_PICKER\":\r\n if (selectedValue.CustomDataType) {\r\n return false;\r\n }\r\n return true;\r\n case \"RISK_ANALYSIS\":\r\n if (!!selectedValue) {\r\n if (selectedValue.RiskHead &&\r\n selectedValue.RiskHead.RiskRows &&\r\n selectedValue.RiskHead.RiskRows.length > 0 &&\r\n ($filter('filter')(selectedValue.RiskHead.RiskRows, { Active: true })).length > 0) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n return true;\r\n case \"ORDER\":\r\n return $scope.disableSaveOrderExec(selectedValue.OptionItem.ProcessListAction.Order);\r\n default:\r\n return selectedValue.OptionItem.InitiatedId == undefined;\r\n }\r\n };\r\n\r\n /**\r\n * Check whether the process list is not completed\r\n * @param {any} processListItem\r\n */\r\n var isProcessListItemNotCompleted = function (processListItem) {\r\n // if the input is string or numeric, check for its value \r\n if (processListItem.InitiatedOption.Type.ProgId == 'STRING' || processListItem.InitiatedOption.Type.ProgId == 'NUMERIC') {\r\n if (processListItem.InitiatedOption.SelectedValue\r\n && processListItem.InitiatedOption.SelectedValue.CustomDataType\r\n && processListItem.InitiatedOption.SelectedValue.CustomDataType.length > 0)\r\n return false;\r\n }\r\n // if the input is radio or dropdown, check for its selected value \r\n if (processListItem.InitiatedOption.Type.ProgId == 'DROPDOWN' || processListItem.InitiatedOption.Type.ProgId == 'RADIO_BUTTON') {\r\n if (processListItem.InitiatedOption.SelectedValue\r\n && processListItem.InitiatedOption.SelectedValue.OptionItem) {\r\n if (processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction) {\r\n return isSelectedValueWithActionInvalid(processListItem.InitiatedOption.SelectedValue);\r\n } else {\r\n return processListItem.InitiatedOption.SelectedValue.OptionItem.InitiatedId == undefined;\r\n }\r\n }\r\n }\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'STANDARD_TEXT') {\r\n if (!processListItem.InitiatedOption.SelectedValue)\r\n return true;\r\n if ($scope.isAnyStandardAnswerInEdit(processListItem.InitiatedOption.Items))\r\n return true;\r\n return false;\r\n }\r\n\r\n // if the input is multiple choice, check for all selected values\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n\r\n\r\n if (!processListItem.InitiatedOption.SelectedValues || processListItem.InitiatedOption.SelectedValues.length == 0) {\r\n return true;\r\n }\r\n\r\n //if (processListItem.ChoicesRequired && processListItem.InitiatedOption.SelectedValues.length != processListItem.InitiatedOption.Items.length) {\r\n // return true;\r\n //}\r\n\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n if (selectedValue.OptionItem && selectedValue.OptionItem.ProcessListAction && isSelectedValueWithActionInvalid(selectedValue)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n /**********************************************/\r\n /* SCOPE functions */\r\n /**********************************************/\r\n\r\n // if the action is of jump to another process list type\r\n $scope.jumpToProcessList = function (optionItem, processListItem) {\r\n if (!optionItem)\r\n return Promise.resolve();\r\n\r\n var action = optionItem.ProcessListAction;\r\n\r\n if (!action)\r\n return Promise.resolve();\r\n\r\n if (!action.ProcessList)\r\n return Promise.resolve();\r\n\r\n if (!action.ProcessList.InitiatedId)\r\n return Promise.resolve();\r\n\r\n var initiatedProcessListId = action.ProcessList.InitiatedId;\r\n\r\n if (!!action.ProcessList.downloaded)\r\n return queueCheckList(action.ProcessList);\r\n\r\n // get the checklist\r\n return ExecutionFactory.getInitiatedProcessList(initiatedProcessListId, true)\r\n .$promise\r\n .then(function (result) {\r\n if (!result)\r\n return Promise.resolve();\r\n\r\n result.downloaded = true;\r\n\r\n action.ProcessList = result;\r\n\r\n // get item and set the checklist there as well\r\n var item = _.find(processListItem.InitiatedOption.Items, function (i) { return i.InitiatedId === optionItem.InitiatedId });\r\n\r\n if (!!item) {\r\n item.ProcessListAction.ProcessList = result;\r\n }\r\n\r\n return $timeout(function () { queueCheckList(result) });\r\n });\r\n };\r\n\r\n function queueCheckList(checkList) {\r\n // push the current process list in the queue;\r\n processListQueue.push($scope.processListElement);\r\n\r\n // set the current to destination process list and initialize it\r\n $scope.processListElement = checkList;\r\n\r\n $scope.canBack = true;\r\n if (checkList.ProcessListType.ProgId === 'VERTICAL' || checkList.ProcessListType.ProgId === 'MANAGEMENT') {\r\n initExecution();\r\n\r\n } else {\r\n initHorizontal();\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n // go back to the parent from a child Process list\r\n $scope.backToParent = function (asCompleted) {\r\n if (processListQueue.length > 0) {\r\n if (!!asCompleted) {\r\n if ($scope.isCompleted())\r\n $scope.processListElement.IsCompleted = true;\r\n else\r\n return dialogService.showAlertDialog('txtWarning', 'errYouHaveUnfinishedAction');\r\n } else\r\n $scope.processListElement.isCompleted = false;\r\n\r\n // set the current element to the one before it and pop the queue\r\n $scope.processListElement = processListQueue[processListQueue.length - 1];\r\n processListQueue.pop();\r\n\r\n if (processListQueue.length == 0) {\r\n $scope.canBack = false;\r\n }\r\n initExecution();\r\n scrollToElement($scope.processListElement.lastItem);\r\n }\r\n };\r\n\r\n /**\r\n * Check if the given selected value has the default answers selected equal to ANNET\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.checkIfAnnet = function (selectedValue) {\r\n if (!selectedValue\r\n || !selectedValue.OptionItem\r\n || !selectedValue.OptionItem.ProcessListAction\r\n || !selectedValue.OptionItem.ProcessListAction.DefaultAnswers)\r\n return false;\r\n\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n var filterResult = $filter('filter')(selectedValue.OptionItem.ProcessListAction.DefaultAnswers, {\r\n InitiatedId: selectedValue.SelectedDefaultAnswer.InitiatedId\r\n });\r\n if (filterResult && filterResult.length > 0 && filterResult[0].ProgId == 'PROG_ANNET')\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.removeTextFromChoice = function (choice) {\r\n if (choice.IsChecked == false) {\r\n choice.UserComment = null;\r\n }\r\n };\r\n\r\n // when the user clicks on the Check button of a current action\r\n $scope.itemDone = function (index) {\r\n var currentProcessListItem = $scope.processListElement.ProcessListItems[index];\r\n\r\n // first, cover the input for non-multi-select (STRING / NUMERICAL)\r\n if (currentProcessListItem.InitiatedOption.Type.ProgId == \"NUMERIC\" || currentProcessListItem.InitiatedOption.Type.ProgId == \"STRING\") {\r\n goToNextItem(index);\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"DROPDOWN\" || currentProcessListItem.InitiatedOption.Type.ProgId == \"RADIO_BUTTON\") {\r\n // handle the DROPDOWN or RADIO button depending on it's select\r\n if (currentProcessListItem.InitiatedOption.SelectedValue && currentProcessListItem.InitiatedOption.SelectedValue.OptionItem && currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction) {\r\n switch (currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n jumpToStep(currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.ProcessListItem.id);\r\n break;\r\n case \"SMS\": case \"EMAIL\":\r\n if (currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.NotificationMessageId > 0)\r\n currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.SendNotification = false;\r\n else {\r\n currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n }\r\n goToNextItem(index);\r\n break;\r\n case \"ANOTHER_PROCESSLIST\":\r\n if (currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.ProcessList.IsCompleted)\r\n goToNextItem(index);\r\n else\r\n $scope.jumpToProcessList(currentProcessListItem.InitiatedOption.SelectedValue.OptionItem, currentProcessListItem);\r\n break;\r\n case \"CAMERA\": case \"TEXT_FIELD\": case \"SIGNATURE\": default:\r\n goToNextItem(index);\r\n break;\r\n }\r\n // if there's no action assigned to the process list item option item :)\r\n } else {\r\n goToNextItem(index);\r\n }\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"MULTIPLE_CHOICE\") {\r\n // if one of the selected option items has a 'jump to step' action,\r\n // save the process list item id here, to be used after all the other option item actions have been handled\r\n var willJumpToStepAtId = null;\r\n\r\n if (currentProcessListItem.InitiatedOption.SelectedValues) {\r\n for (var i = 0; i < currentProcessListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = currentProcessListItem.InitiatedOption.SelectedValues[i];\r\n if (selectedValue.OptionItem && selectedValue.OptionItem.ProcessListAction) {\r\n //if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == \"JUMP_TO_STEP\")\r\n switch (selectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n willJumpToStepAtId = selectedValue.OptionItem.ProcessListAction.ProcessListItem.id;\r\n break;\r\n case \"SMS\":\r\n selectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n break;\r\n case \"EMAIL\":\r\n selectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n break;\r\n case \"CAMERA\":\r\n case \"TEXT_FIELD\": case \"SIGNATURE\": case \"ANOTHER_PROCESSLIST\": default:\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!!willJumpToStepAtId) {\r\n jumpToStep(willJumpToStepAtId);\r\n } else {\r\n goToNextItem(index);\r\n }\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"STANDARD_TEXT\")\r\n goToNextItem(index);\r\n\r\n currentProcessListItem.isDone = true;\r\n };\r\n\r\n // function to check if the button should be disabled \r\n $scope.isDisabled = function (index) {\r\n\r\n if (!$scope.processListElement || !$scope.processListElement.ProcessListItems[index]) return false;\r\n\r\n if ($scope.processListElement.FlexibleExecution) {\r\n if ($scope.processListElement.ProcessListItems[index].InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE' &&\r\n (!$scope.processListElement.ProcessListItems[index].InitiatedOption || !$scope.processListElement.ProcessListItems[index].InitiatedOption.SelectedValue))\r\n return false;\r\n if ($scope.processListElement.ProcessListItems[index].InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE' &&\r\n (!$scope.processListElement.ProcessListItems[index].InitiatedOption.SelectedValues || $scope.processListElement.ProcessListItems[index].InitiatedOption.SelectedValues.length == 0))\r\n return false;\r\n }\r\n\r\n return isProcessListItemNotCompleted($scope.processListElement.ProcessListItems[index]);\r\n };\r\n\r\n // if a previously completed item is selected, jump to that element\r\n $scope.itemSelected = function (index) {\r\n if (!$scope.processListElement.ProcessListItems[index].isLocked) {\r\n //close lastItem if PreventCollapse = false\r\n if (!$scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].PreventCollapse)\r\n $scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].isOpen = false;\r\n $scope.processListElement.lastItem = index;\r\n }\r\n };\r\n\r\n // check if a process list is fully completed to show the 'done' button - currently does nothing or goes back to parent\r\n $scope.isCompleted = function () {\r\n if ($scope.processListElement.ProcessListType.ProgId === 'HORIZONTAL')\r\n return true;\r\n\r\n //if ($scope.processListElement\r\n // && $scope.processListElement.lastItem == $scope.processListElement.ProcessListItems.length - 1\r\n // && $scope.isDisabled($scope.processListElement.lastItem) == false) \r\n // return true;\r\n //else\r\n // return false;\r\n\r\n if (_.some($scope.processListElement.ProcessListItems, function (pli, index) {\r\n return $scope.isDisabled(index)\r\n }))\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n // decide which type of class an item should have (between locked, completed and current)\r\n $scope.getClass = function (index) {\r\n if ($scope.processListElement.ProcessListItems[index].isLocked)\r\n return 'simulation-selected-item';\r\n else if (index == $scope.processListElement.lastItem)\r\n return 'simulation-selected-item';\r\n else\r\n return 'simulation-selected-item';\r\n };\r\n\r\n function isEverythingCompletedForFlexible() {\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n if (isProcessListItemNotCompleted($scope.processListElement.ProcessListItems[i]))\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n /**\r\n * Save initiated list on server\r\n */\r\n function saveProcessList() {\r\n //TODO: check if we need this anymore\r\n removeCyclicDependencies();\r\n ExecutionFactory.updateProcessList($scope.processListElement).then(function () {\r\n OrderFactory.isExecutionEnded = true;\r\n });\r\n };\r\n\r\n /**\r\n * Save the list and mark it as completed if supplied with\r\n * @param {} isCompleted \r\n * @returns {} \r\n */\r\n $scope.saveProcessList = function (isCompleted) {\r\n if (processListQueue.length > 0) {\r\n $scope.backToParent(isCompleted);\r\n return;\r\n }\r\n\r\n if (!$scope.processListElement.FlexibleExecution) {\r\n $scope.processListElement.IsCompleted = isCompleted;\r\n\r\n saveProcessList();\r\n return;\r\n }\r\n\r\n // commented out because of task 15852\r\n //if (!isEverythingCompletedForFlexible() && !!isCompleted) {\r\n // dialogService.showAlertDialog('txtWarning', 'errYouHaveUnfinishedAction');\r\n // return; \r\n //}\r\n\r\n dialogService.showConfirmDialog('txtConfirm', isCompleted ? 'txtAreYouSureToEnd' : 'EXECUTION.PAUSE_EXECUTION_CONFIRM')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n $scope.processListElement.IsCompleted = isCompleted;\r\n\r\n saveProcessList();\r\n });\r\n };\r\n\r\n /**\r\n * Do the necessary changes when the user checks/unchecks the multiple choice\r\n * @param {} choice \r\n * @param {} selectedValues \r\n * @returns {} \r\n */\r\n $scope.onChoiceCheckedChange = function (choice, selectedValues) {\r\n if (choice.isChecked) {\r\n var newSelectedValue = { OptionItem: angular.copy(choice) };\r\n // add the option to this initiatedOption list of selected values\r\n selectedValues.push(newSelectedValue);\r\n\r\n // assign the reference to the choice for easy access\r\n choice.selectedValue = newSelectedValue;\r\n } else {\r\n var selectedValueIndex = 0;\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n if (selectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n selectedValueIndex = i;\r\n break;\r\n }\r\n }\r\n selectedValues.splice(selectedValueIndex, 1);\r\n\r\n // remove the references so the action items get hidden\r\n choice.selectedValue = undefined;\r\n }\r\n };\r\n\r\n /**\r\n * Check if we have completed another lists\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.checkForCompletedChildProcessList = function (selectedValue) {\r\n\r\n // marks the selectedValue processlist as completed and returns the result\r\n if (selectedValue && selectedValue.OptionItem &&\r\n selectedValue.OptionItem.ProcessListAction &&\r\n selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n\r\n var currentProcessList = selectedValue.OptionItem.ProcessListAction.ProcessList;\r\n\r\n if (currentProcessList && currentProcessList.ProcessListType && currentProcessList.ProcessListType.ProgId) {\r\n\r\n if (currentProcessList.ProcessListType.ProgId === \"HORIZONTAL\") {\r\n currentProcessList.IsCompleted = currentProcessList.IsCompleted;\r\n\r\n } else if (!currentProcessList.FlexibleExecution) {\r\n var itemsOfAnotherProcessList = currentProcessList.ProcessListItems;\r\n\r\n if (itemsOfAnotherProcessList && itemsOfAnotherProcessList.length > 0) {\r\n\r\n var lastItemOfAnotherProcessList = itemsOfAnotherProcessList[itemsOfAnotherProcessList.length - 1];\r\n\r\n currentProcessList.IsCompleted = !isProcessListItemNotCompleted(lastItemOfAnotherProcessList);\r\n\r\n }\r\n }\r\n\r\n return currentProcessList.IsCompleted;\r\n\r\n }\r\n\r\n }\r\n return false;\r\n };\r\n\r\n $scope.openAttachment = function (attach) {\r\n if (attach.IsExternalURL == false)\r\n downloadFile(attach.URL);\r\n else {\r\n var win = window.open(attach.URL, '_blank');\r\n //win.focus();\r\n }\r\n return;\r\n };\r\n\r\n $scope.clickImage = function (editMode, image) {\r\n if (editMode) {\r\n image.CameraImageOriginal.selected = !image.CameraImageOriginal.selected;\r\n } else {\r\n //$scope.openAttachment(image);\r\n $scope.openImage(image);\r\n }\r\n };\r\n\r\n $scope.doneEditing = function (processListItem) {\r\n processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImages.forEach(function (image) {\r\n image.CameraImageOriginal.selected = false;\r\n });\r\n };\r\n\r\n $scope.deleteImages = function (processListItem) {\r\n if (!processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImagesToDelete)\r\n processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImagesToDelete = [];\r\n\r\n var images = processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImages;\r\n for (var index = images.length - 1; index >= 0; index--) {\r\n if (images[index].CameraImageOriginal.selected) {\r\n if (images[index].CameraImageOriginal.id > 0)\r\n processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImagesToDelete.push(images[index]);\r\n images.splice(index, 1);\r\n }\r\n }\r\n };\r\n\r\n //TODO: use DownloadService\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n\r\n /**\r\n * Check whether the radio or dropdown is disabled\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.isRadioButtonOrDropdownDisabled = function (selectedValue) {\r\n if (!selectedValue)\r\n return false;\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.NotificationMessageId > 0)\r\n return true;\r\n if (!selectedValue.OptionItem)\r\n return false;\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n return false;\r\n if (selectedValue.OptionItem.ProcessListAction.Signature)\r\n return true;\r\n if (selectedValue.OptionItem.ProcessListAction.CameraImages.length > 0)\r\n return true;\r\n if (selectedValue.OptionItem.ProcessListAction.ProcessList && selectedValue.OptionItem.ProcessListAction.ProcessList.IsCompleted)\r\n return true;\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.length > 0)\r\n return true;\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.CommentInput &&\r\n selectedValue.SelectedDefaultAnswer.CommentInput.length > 0)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Check whether the dropdown for the default answer should be shown\r\n * @param {} selectedValue \r\n * @returns {} \r\n */\r\n $scope.showDropdownForDefaultAnswers = function (selectedValue) {\r\n if (selectedValue && selectedValue.OptionItem && selectedValue.OptionItem.ProcessListAction && selectedValue.OptionItem.ProcessListAction.DefaultAnswers.length > 0) {\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'TEXT_FIELD')\r\n return true;\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'SMS')\r\n return true;\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'EMAIL')\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Check whether any standard answer is in edit mode\r\n * @param {} items \r\n * @returns {} \r\n */\r\n $scope.isAnyStandardAnswerInEdit = function (items) {\r\n if (!items || items.length == 0)\r\n return false;\r\n for (var i = 0; i < items.length; i++)\r\n if (items[i].EditMode)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * When the option item is changed set the selected value\r\n * @param {} optionItem \r\n * @param {} processListItemSelectedValue \r\n * @returns {} \r\n */\r\n $scope.onOptionItemChanged = function (optionItem, processListItemSelectedValue) {\r\n if (!(_.get(processListItemSelectedValue, 'OptionItem.ProcessListAction.DefaultAnswers') && !_.isEmpty(processListItemSelectedValue.OptionItem.ProcessListAction.DefaultAnswers)))\r\n return;\r\n\r\n // find one answer which is not annet\r\n var notAnnet = _.find(processListItemSelectedValue.OptionItem.ProcessListAction.DefaultAnswers, function (defaultAnswer) { return defaultAnswer.ProgId != 'PROG_ANNET' });\r\n\r\n if (notAnnet)\r\n processListItemSelectedValue.SelectedDefaultAnswer = notAnnet;\r\n else\r\n // select annet as default\r\n processListItemSelectedValue.SelectedDefaultAnswer = _.find(processListItemSelectedValue.OptionItem.ProcessListAction.DefaultAnswers, function (defaultAnswer) { return defaultAnswer.ProgId == 'PROG_ANNET' });\r\n\r\n };\r\n\r\n\r\n /************************************************/\r\n /* Order attachments */\r\n /************************************************/\r\n $scope.openOrdersAttachmentModal = function (index) {\r\n\r\n attachmentsModal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/attachmentsSimulationModal.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n\r\n attachmentsModal.result.finally(function () {\r\n $scope.processListElement.ProcessListItems[index].isOpen = true;\r\n });\r\n };\r\n\r\n $scope.closeAttachmentModal = function () {\r\n attachmentsModal.close();\r\n };\r\n\r\n //#region IMAGES MODAL \r\n //TODO: refactor and move into component\r\n var imageModal = null;\r\n $scope.openImage = function (cameraImage) {\r\n $scope.CameraImage = cameraImage;\r\n imageModal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalCameraImage.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n };\r\n\r\n $scope.closeCameraEditModal = function () {\r\n if (imageModal || imageModal != null)\r\n imageModal.close();\r\n }\r\n\r\n var canvas, context, rects = [], pencils = [], circles = [], newRect = {}, newCircle = {};\r\n var height, width;\r\n var isPencil = false, isSquare = false, isCircle = false, pencil = false, square = false, circle = false;\r\n var lastX = 0, lastY = 0, currentX = 0, currentY = 0, points = [];\r\n $scope.colors = ['#000', '#fff', '#2ecc71', '#3498db', '#9b59b6', '#e67e22', '#e74c3c', '#f1c40f'], $scope.colorIndex = 0;\r\n $scope.showEdit = false;\r\n\r\n $scope.showEdited = function () {\r\n $scope.showEdit = !$scope.showEdit;\r\n }\r\n\r\n $scope.downloadImage = function (cameraImage) {\r\n $scope.openAttachment(cameraImage);\r\n };\r\n\r\n /**\r\n * Draw all points, rectangles and circles\r\n * @param {any} hasImage - clear the rect if this property is false\r\n */\r\n function drawAll(hasImage) {\r\n if (!hasImage)\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n for (var i = 0; i < rects.length; i++) {\r\n var r = rects[i];\r\n context.strokeStyle = r.color;\r\n context.strokeRect(r.left, r.top, r.right - r.left, r.bottom - r.top);\r\n }\r\n for (var i = 0; i < pencils.length; i++) {\r\n var p1 = pencils[i][0];\r\n\r\n context.beginPath();\r\n context.strokeStyle = p1.color;\r\n context.moveTo(p1.x, p1.y);\r\n\r\n for (var j = 1, len = pencils[i].length; j < len; j++) {\r\n context.lineTo(pencils[i][j].x, pencils[i][j].y);\r\n }\r\n context.stroke();\r\n }\r\n for (var i = 0; i < circles.length; i++) {\r\n context.strokeStyle = circles[i].color;\r\n context.beginPath();\r\n context.moveTo(circles[i].moveTo.first, circles[i].moveTo.second);\r\n context.bezierCurveTo(circles[i].firstBezier.first, circles[i].firstBezier.second, circles[i].firstBezier.third, circles[i].firstBezier.fourth, circles[i].firstBezier.fifth, circles[i].firstBezier.sixth);\r\n context.bezierCurveTo(circles[i].secondBezier.first, circles[i].secondBezier.second, circles[i].secondBezier.third, circles[i].secondBezier.fourth, circles[i].secondBezier.fifth, circles[i].secondBezier.sixth);\r\n context.closePath();\r\n context.stroke();\r\n }\r\n }\r\n\r\n /**\r\n * Set up the canvas for drawing\r\n * @param {any} image\r\n */\r\n function canvasSetup(image) {\r\n canvas = document.getElementById('camera-image-canvas');\r\n canvas.height = image.height;\r\n canvas.width = image.width;\r\n height = canvas.height;\r\n width = canvas.width;\r\n context = canvas.getContext('2d');\r\n context.lineWidth = 4;\r\n context.lineJoin = context.lineCap = 'round';\r\n context.shadowBlur = 1;\r\n context.shadowColor = 'rgb(0, 0, 0)';\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n reset();//reset all \r\n addEventListeners();\r\n }\r\n\r\n //TODO: is this used anymore\r\n function initDrawings() {\r\n if ($scope.CameraImage.CameraImageEdit == '' || !$scope.CameraImage.CameraImageEdit || $scope.CameraImage.CameraImageEdit == null) {\r\n $scope.showEdit = false;\r\n return;\r\n }\r\n\r\n if ($scope.CameraImage.CameraImageEdit.charAt(0) === '~')\r\n $scope.CameraImage.CameraImageEdit = $scope.CameraImage.CameraImageEdit.substr(1).slice(0, -1);\r\n var data = angular.fromJson($scope.CameraImage.CameraImageEdit);\r\n rects = data.rects;\r\n pencils = data.pencils;\r\n circles = data.circles;\r\n\r\n var heightRatio = 0;\r\n var widthRatio = 0;\r\n\r\n\r\n widthRatio = width / data.width;\r\n heightRatio = height / data.height;\r\n\r\n\r\n for (var i = 0; i < pencils.length; i++) {\r\n for (var j = 0; j < pencils[i].length; j++) {\r\n pencils[i][j].x = pencils[i][j].x * widthRatio;\r\n pencils[i][j].y = pencils[i][j].y * heightRatio;\r\n }\r\n }\r\n\r\n for (var i = 0; i < rects.length; i++) {\r\n var rect = rects[i];\r\n rect.left *= widthRatio;\r\n rect.right *= widthRatio;\r\n rect.top *= heightRatio;\r\n rect.bottom *= heightRatio;\r\n }\r\n\r\n for (var i = 0; i < circles.length; i++) {\r\n var circle = circles[i];\r\n circle.moveTo.first *= widthRatio;\r\n circle.moveTo.second *= heightRatio;\r\n\r\n circle.firstBezier.first *= widthRatio;\r\n circle.firstBezier.second *= heightRatio;\r\n circle.firstBezier.third *= widthRatio;\r\n circle.firstBezier.fourth *= heightRatio;\r\n circle.firstBezier.fifth *= widthRatio;\r\n circle.firstBezier.sixth *= heightRatio;\r\n\r\n circle.secondBezier.first *= widthRatio;\r\n circle.secondBezier.second *= heightRatio;\r\n circle.secondBezier.third *= widthRatio;\r\n circle.secondBezier.fourth *= heightRatio;\r\n circle.secondBezier.fifth *= widthRatio;\r\n circle.secondBezier.sixth *= heightRatio;\r\n\r\n }\r\n\r\n $scope.showEdit = true;\r\n\r\n }\r\n\r\n function setColor() {\r\n document.getElementById('camera-set-color').style.color = $scope.colors[$scope.colorIndex];\r\n }\r\n\r\n $scope.initCanvas = function () {\r\n var image = document.getElementById('camera-image-tag');\r\n image.onload = function () {\r\n canvasSetup(image);\r\n setColor();\r\n // initDrawings();\r\n //drawAll();\r\n }\r\n\r\n }\r\n\r\n $scope.changeColor = function () {\r\n if ($scope.colorIndex == $scope.colors.length - 1)\r\n $scope.colorIndex = 0;\r\n else\r\n $scope.colorIndex++;\r\n context.strokeStyle = $scope.colors[$scope.colorIndex];\r\n setColor();\r\n\r\n }\r\n\r\n $scope.addSelectedClass = function (pencil, square, circle) {\r\n addSelectedClass(pencil, square, circle);\r\n };\r\n\r\n function addSelectedClass(pencil, square, circle) {\r\n document.getElementById('camera-pencil').classList.remove('edit-button-selected');\r\n document.getElementById('camera-square').classList.remove('edit-button-selected');\r\n document.getElementById('camera-circle').classList.remove('edit-button-selected');\r\n if (pencil)\r\n document.getElementById('camera-pencil').classList.add('edit-button-selected');\r\n if (square)\r\n document.getElementById('camera-square').classList.add('edit-button-selected');\r\n if (circle)\r\n document.getElementById('camera-circle').classList.add('edit-button-selected');\r\n };\r\n\r\n $scope.setPencil = function () {\r\n pencil = true;\r\n square = false;\r\n circle = false;\r\n addSelectedClass(true, false, false);\r\n };\r\n\r\n $scope.setSquare = function () {\r\n square = true;\r\n pencil = false;\r\n circle = false;\r\n addSelectedClass(false, true, false);\r\n };\r\n\r\n $scope.setCircle = function () {\r\n circle = true;\r\n pencil = false;\r\n square = false;\r\n addSelectedClass(false, false, true);\r\n };\r\n\r\n function reset() {\r\n pencil = false;\r\n square = false;\r\n circle = false;\r\n isPencil = false;\r\n isSquare = false;\r\n isCircle = false;\r\n }\r\n\r\n $scope.clearAll = function () {\r\n rects = [];\r\n pencils = [];\r\n circles = [];\r\n points = [];\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n context.strokeStyle = $scope.colors[$scope.colorIndex];\r\n }\r\n\r\n $scope.editComplete = function () {\r\n reset();\r\n\r\n var drawings = {};\r\n drawings.width = canvas.width;\r\n drawings.height = canvas.height;\r\n drawings.rects = rects;\r\n drawings.pencils = pencils;\r\n drawings.circles = circles;\r\n $scope.CameraImage.CameraImageEdit = '~' + angular.toJson(drawings) + '~';\r\n };\r\n\r\n\r\n //#region DRAWING\r\n\r\n function setLastPoints(event) {\r\n lastX = event.offsetX;\r\n lastY = event.offsetY;\r\n\r\n points.push({ x: lastX, y: lastY, color: $scope.colors[$scope.colorIndex] });\r\n };\r\n\r\n /**\r\n * Add necessary event listeners for drawing\r\n */\r\n function addEventListeners() {\r\n\r\n canvas.addEventListener('mousedown', function (event) {\r\n\r\n if (pencil) {\r\n setLastPoints(event);\r\n isPencil = true;\r\n } else if (square) {\r\n isSquare = true;\r\n setLastPoints(event);\r\n } else if (circle) {\r\n setLastPoints(event);\r\n isCircle = true;\r\n }\r\n });\r\n\r\n canvas.addEventListener('mousemove', function (event) {\r\n if (pencil) {\r\n if (isPencil) {\r\n currentX = event.offsetX;\r\n currentY = event.offsetY;\r\n\r\n points.push({ x: currentX, y: currentY, color: $scope.colors[$scope.colorIndex] });\r\n\r\n drawAll();\r\n\r\n //draw current\r\n var p1 = points[0];\r\n\r\n context.beginPath();\r\n context.strokeStyle = p1.color;\r\n context.moveTo(p1.x, p1.y);\r\n\r\n for (var i = 1, len = points.length; i < len; i++) {\r\n context.lineTo(points[i].x, points[i].y);\r\n }\r\n context.stroke();\r\n }\r\n\r\n } else if (square) {\r\n if (isSquare) {\r\n currentX = event.offsetX;\r\n currentY = event.offsetY;\r\n\r\n newRect = {\r\n left: Math.min(points[0].x, currentX),\r\n right: Math.max(points[0].x, currentX),\r\n top: Math.min(points[0].y, currentY),\r\n bottom: Math.max(points[0].y, currentY),\r\n color: $scope.colors[$scope.colorIndex]\r\n };\r\n\r\n drawAll();\r\n context.strokeStyle = $scope.colors[$scope.colorIndex];\r\n context.strokeRect(points[0].x, points[0].y, currentX - points[0].x, currentY - points[0].y);\r\n\r\n }\r\n\r\n } else if (circle) {\r\n if (isCircle) {\r\n currentX = event.offsetX;\r\n currentY = event.offsetY;\r\n\r\n newCircle = {\r\n moveTo: {\r\n first: points[0].x,\r\n second: points[0].y + (currentY - points[0].y) / 2\r\n },\r\n firstBezier: {\r\n first: points[0].x,\r\n second: points[0].y,\r\n third: currentX,\r\n fourth: points[0].y,\r\n fifth: currentX,\r\n sixth: points[0].y + (currentY - points[0].y) / 2\r\n },\r\n secondBezier: {\r\n first: currentX,\r\n second: currentY,\r\n third: points[0].x,\r\n fourth: currentY,\r\n fifth: points[0].x,\r\n sixth: points[0].y + (currentY - points[0].y) / 2\r\n },\r\n color: $scope.colors[$scope.colorIndex]\r\n };\r\n\r\n drawAll();\r\n context.strokeStyle = $scope.colors[$scope.colorIndex];\r\n\r\n //draw the circle/oval\r\n context.beginPath();\r\n context.moveTo(newCircle.moveTo.first, newCircle.moveTo.second);\r\n context.bezierCurveTo(newCircle.firstBezier.first, newCircle.firstBezier.second, newCircle.firstBezier.third, newCircle.firstBezier.fourth, newCircle.firstBezier.fifth, newCircle.firstBezier.sixth);\r\n context.bezierCurveTo(newCircle.secondBezier.first, newCircle.secondBezier.second, newCircle.secondBezier.third, newCircle.secondBezier.fourth, newCircle.secondBezier.fifth, newCircle.secondBezier.sixth);\r\n context.closePath();\r\n context.stroke();\r\n }\r\n }\r\n });\r\n\r\n function cleanup() {\r\n isPencil = false;\r\n isSquare = false;\r\n isCircle = false;\r\n\r\n if (pencil)\r\n pencils.push(points);\r\n else if (square)\r\n rects.push(newRect);\r\n else if (circle)\r\n circles.push(newCircle);\r\n\r\n drawAll();\r\n\r\n points = [];\r\n };\r\n\r\n canvas.addEventListener('mouseup', function (event) {\r\n cleanup();\r\n });\r\n\r\n canvas.addEventListener('mouseout', function (event) {\r\n if (isPencil || isSquare || isCircle)//only if drawing\r\n cleanup();\r\n });\r\n\r\n };\r\n\r\n //#endregion DRAWING\r\n\r\n //#endregion IMAGES MODAL\r\n\r\n /**\r\n * Checks whether the warning should be dispalyed for flexible executions\r\n * @param {} processListItem \r\n * @param {} isFlexibleExecution \r\n * @returns {} \r\n */\r\n $scope.displayProcessListItemWarning = function (processListItem, isFlexibleExecution) {\r\n\r\n if (!isFlexibleExecution)\r\n return false;\r\n\r\n if (orderStatus !== \"DONE\")\r\n return false;\r\n\r\n if (processListItem.InitiatedOption.LastUpdatedBy && processListItem.InitiatedOption.LastUpdatedBy.id)\r\n return false;\r\n\r\n if ((!processListItem.InitiatedOption.LastUpdatedBy || !processListItem.InitiatedOption.LastUpdatedBy.id) && processListItem.isDone)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n //#endregion VERTICAL\r\n\r\n\r\n //#region HORIZONTAL\r\n\r\n /**\r\n * Init execution execution\r\n */\r\n function initHorizontal() {\r\n\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.Value = '';\r\n });\r\n\r\n if ($scope.processListElement.ListValues.length == 0) {\r\n addCurrentTableFields();\r\n }\r\n\r\n };\r\n\r\n function addCurrentTableFields() {\r\n $scope.processListElement.ListValues.push(angular.copy($scope.processListElement.TableFields));\r\n };\r\n\r\n $scope.addItem = function () {\r\n // set the parent id to tell apart sets of items\r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.ParentId = $scope.processListElement.ListValues.length;\r\n tableField.Value.id = null;\r\n });\r\n\r\n // add to ListValues the new row\r\n addCurrentTableFields();\r\n\r\n // clear the tablefields \r\n angular.forEach($scope.processListElement.TableFields, function (tableField) {\r\n tableField.Value.ParentId = -1;\r\n });\r\n }\r\n\r\n $scope.disabledAddItem = function () {\r\n var response = false;\r\n\r\n if ($scope.processListElement != undefined &&\r\n $scope.processListElement.ListValues != undefined &&\r\n $scope.processListElement.ListValues.length > 0) {\r\n\r\n var listLength = $scope.processListElement.ListValues.length;\r\n\r\n angular.forEach($scope.processListElement.ListValues[listLength - 1], function (currentField) {\r\n if (currentField.Value.Value == \"\")\r\n response = true;\r\n });\r\n\r\n }\r\n\r\n return response;\r\n }\r\n\r\n //#endregion HORIZONTAL\r\n\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ModalNotificationEditorController.$inject = \r\n [\r\n '$scope',\r\n 'participants'\r\n ]\r\n\r\n function ModalNotificationEditorController($scope, participants) {\r\n\r\n\r\n /**\r\n * Extracts all e-mails or phone numbers from a given list of participants to a execution\r\n * @param {} executionParticipants\r\n * @param {} forSms\r\n * @returns {} \r\n */ \r\n function extractRecipients(executionParticipants, forSms) {\r\n\r\n if (!executionParticipants || executionParticipants.length === 0)\r\n return [];\r\n\r\n var recipients = [];\r\n\r\n for (var index = 0; index < executionParticipants.length; index++) {\r\n\r\n var currentParticipant = executionParticipants[index].User;\r\n \r\n if (forSms) {\r\n\r\n // skip the user for who is executed the list\r\n if (currentParticipant.Phone === $scope.currentNotificationData.Contact.Mobile)\r\n continue;\r\n\r\n if (currentParticipant.Phone)\r\n recipients.push(currentParticipant.Phone);\r\n\r\n } else {\r\n\r\n // skip the user for who is executed the list\r\n if (currentParticipant.Email === $scope.currentNotificationData.Contact.Email)\r\n continue;\r\n\r\n if (currentParticipant.Email)\r\n recipients.push(currentParticipant.Email);\r\n\r\n }\r\n\r\n }\r\n\r\n return recipients;\r\n\r\n };\r\n\r\n // TO DO - Replace with $onInit\r\n function init() {\r\n\r\n // for limited access process lists get execution participants and display them in recipient list\r\n if ($scope.processListElement.LimitedAccess) \r\n $scope.currentNotificationData.Recipients = extractRecipients(participants, $scope.currentNotificationData.isSms);\r\n\r\n }\r\n\r\n init();\r\n \r\n }\r\n\r\n angular.module('execution')\r\n .controller('ModalNotificationEditorController', ModalNotificationEditorController);\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('gdpr')\r\n .component('vbGdpr', {\r\n templateUrl: 'Scripts/gdpr/gdpr.component.html',\r\n controller: 'GdprController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n closeGdprModal: '&',\r\n firstTimeLogin: '='\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n GdprController.$inject = [\r\n '_',\r\n 'sessionInformationService',\r\n 'dialogService',\r\n '$translate',\r\n 'GdprFactory',\r\n '$location',\r\n '$routeParams',\r\n '$scope',\r\n 'UserFactory',\r\n '$q',\r\n 'UserSettingsFactory',\r\n 'OrganizationSettingFactory'\r\n ];\r\n\r\n angular\r\n .module('gdpr')\r\n .controller('GdprController', GdprController);\r\n\r\n /**\r\n * Controller that handles the gdpr agreement. Also, here is handled the impersonation setting for both users and company\r\n */\r\n function GdprController(\r\n _,\r\n sessionInformationService,\r\n dialogService,\r\n $translate,\r\n GdprFactory,\r\n $location,\r\n $routeParams,\r\n $scope,\r\n UserFactory,\r\n $q,\r\n UserSettingsFactory,\r\n OrganizationSettingFactory\r\n ) {\r\n var vm = this;\r\n var sessionId = null;\r\n var loggedUser = sessionInformationService.getUser();\r\n var gdpr = loggedUser ? loggedUser.Gdpr : null;\r\n\r\n vm.answer = null;\r\n vm.gdpr = gdpr;\r\n vm.userSettings = { AllowImpersonation: true, AllowImpersonationOnce: false };\r\n vm.companySettings = { IsCentralAllowedToView: true, AllowImpersonate: true, NumberOfYearsForCustomerGdprNotification: 2 };\r\n\r\n vm.saveUserResponse = saveUserResponse;\r\n vm.$onInit = onInit;\r\n vm.isExternal = isExternal;\r\n vm.isLoggedUserAdmin = isLoggedUserAdmin;\r\n vm.saveUserImpersonateSettings = saveUserSettings;\r\n vm.saveCompanyImpersonateSettings = saveCompanySettings;\r\n\r\n function onInit() {\r\n //get any external session\r\n sessionId = $routeParams.sessionId;\r\n //get the current gdpr and process it\r\n processExistingGdpr();\r\n\r\n\r\n if (!isExternal())//get impersonation settings if the user is not comin from email\r\n Promise.all([\r\n getUserSettings(),\r\n getCompanySettings()\r\n ]);\r\n };\r\n\r\n /**\r\n * Triggered when the user agrees/rejects gdpr agreement\r\n */\r\n function saveUserResponse() {\r\n var message = vm.answer ? 'GDPR.GDPR_ACCEPTED' : ['GDPR.GDPR_NOT_ACCEPTED', 'GDPR.GDPR_NOT_ACCEPTED3'];\r\n\r\n dialogService.showConfirmDialog('GDPR.GDPR_CONFIRMATION_TITLE', message, null, false, 'txtYes', 'txtCancel')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(true);\r\n\r\n if (!gdpr)\r\n gdpr = {};\r\n\r\n gdpr.IsGdprAccepted = vm.answer;\r\n gdpr.Table = 'GOT_USER';\r\n\r\n if (loggedUser)\r\n gdpr.ForeignKey = loggedUser.id;\r\n\r\n\r\n //if we don't have logged user -> we'll set the user id on server based on the session id\r\n return dialogResponse();\r\n })\r\n .then(function (result) {\r\n if (result === true)\r\n return Promise.resolve(true);\r\n\r\n if (isExternal())\r\n return Promise.resolve();\r\n //we must save the settings that the user chose\r\n return Promise.all([\r\n saveUserSettings(),\r\n saveCompanySettings()\r\n ]);\r\n })\r\n .then(function (result) {\r\n if (result === true)\r\n return;\r\n\r\n if (vm.closeGdprModal && vm.firstTimeLogin)//close modal if we have one\r\n vm.closeGdprModal()();\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Triggered when the user confirms his action\r\n */\r\n function dialogResponse() {\r\n //if it came from email\r\n if ((!loggedUser || !loggedUser.id) && sessionId)\r\n return saveGdprWithAGivenSession();\r\n //save gdpr\r\n return GdprFactory.save(gdpr).then(function (result) {\r\n if (!result.IsGdprAccepted)\r\n logOut();\r\n else if (loggedUser)\r\n loggedUser.Gdpr = result;\r\n });\r\n };\r\n\r\n /**\r\n * Saves the impersonation choice for user\r\n */\r\n function saveUserSettings() {\r\n //if the user has chosen allow impersonation, we must set a start date\r\n if (vm.userSettings.AllowImpersonation && vm.firstTimeLogin) {\r\n vm.userSettings.FromDate = moment().valueOf();\r\n vm.userSettings.ToDate = null;\r\n }\r\n //if the user chose allow impersonation once => make sure that we clear from and to\r\n else if (vm.userSettings.AllowImpersonationOnce) {\r\n vm.userSettings.FromDate = null;\r\n vm.userSettings.ToDate = null;\r\n }\r\n\r\n return UserFactory.saveUserSettingsGdpr(vm.userSettings);\r\n };\r\n\r\n /**\r\n * Saves the impersonation choice for companies\r\n */\r\n function saveCompanySettings() {\r\n return OrganizationSettingFactory.saveOrganizationSettings(vm.companySettings);\r\n };\r\n\r\n /**\r\n * Saves the gdpr response but with the external session provided\r\n */\r\n function saveGdprWithAGivenSession() {\r\n return GdprFactory.saveFromEmail(gdpr, sessionId)\r\n .then(function () {\r\n //TODO: Show success message\r\n $location.path('/login');\r\n });\r\n };\r\n\r\n function logOut() {\r\n $scope.$emit('onLogout');\r\n };\r\n\r\n /**\r\n * Processes the existing gdpr on user\r\n */\r\n function processExistingGdpr() {\r\n if (!gdpr) {\r\n vm.answer = null;\r\n return;\r\n }\r\n\r\n if (gdpr.IsGdprAccepted === true)\r\n vm.answer = true;\r\n else if (gdpr.IsGdprAccepted === false)\r\n vm.answer = false;\r\n };\r\n\r\n /**\r\n * Gets the impersonation setting for user\r\n */\r\n function getUserSettings() {\r\n return UserSettingsFactory.get()\r\n .then(function (result) {\r\n vm.userSettings = result;\r\n\r\n if (vm.firstTimeLogin) {\r\n vm.userSettings.AllowImpersonation = true;\r\n vm.userSettings.AllowImpersonationOnce = false;\r\n vm.userSettings.FromDate = moment().valueOf();\r\n vm.userSettings.ToDate = null;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the impersonation setting for company\r\n */\r\n function getCompanySettings() {\r\n if (!isLoggedUserAdmin())\r\n return Promise.resolve();\r\n\r\n return OrganizationSettingFactory.getOrganizationSettingsByOrganizationId(loggedUser.Organization.id)\r\n .then(function (result) {\r\n vm.companySettings = result;\r\n\r\n if (vm.firstTimeLogin) {\r\n vm.companySettings.IsCentralAllowedToView = true;\r\n vm.companySettings.AllowImpersonate = true;\r\n vm.companySettings.NumberOfYearsForCustomerGdprNotification = 2;\r\n }\r\n });\r\n };\r\n\r\n function isLoggedUserAdmin() {\r\n return loggedUser && loggedUser.Group && _.some(['ADMIN', 'ADMIN_ALL'], function (role) { return role === loggedUser.Group.ProgId });\r\n };\r\n\r\n function isExternal() {\r\n return !!sessionId;\r\n };\r\n\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n GdprFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('gdpr')\r\n .factory('GdprFactory', GdprFactory);\r\n\r\n /**\r\n * Simple factory that handles all the gdpr requests\r\n */\r\n function GdprFactory(\r\n baseUrlService,\r\n $resource,\r\n $q\r\n ) {\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var GdprApi = $resource(api + 'REST/Gdpr.svc/Gdpr');\r\n var GdprFromEmailApi = $resource(api + 'REST/Gdpr.svc/GdprFromEmail');\r\n var GdprUserRequestedDeleteApi = $resource(api + 'REST/Gdpr.svc/GdprUserRequestDelete');\r\n var GdprOrganizationRequestedDeleteApi = $resource(api + 'REST/Gdpr.svc/GdprOrganizationRequestDelete');\r\n var GdprConfirmDeleteApi = $resource(api + 'REST/Gdpr.svc/GdprConfirmDelete');\r\n var GdprDeclineDeleteApi = $resource(api + 'REST/Gdpr.svc/GdprDeclineDelete');\r\n var GdprCustomerNotificationApi = $resource(api + 'REST/Gdpr.svc/GdprCustomerNotification');\r\n var NotifyCustomersForGdprApi = $resource(api + 'REST/Gdpr.svc/NotifyCustomersWithEmail');\r\n var MarkCustomerAsDeletedApi = $resource(api + 'REST/Gdpr.svc/MarkCustomerAsDeleted');\r\n var GdprOverviewApi = $resource(api + 'REST/Gdpr.svc/GdprOverview');\r\n var MarkCustomerAsDeletedWebApi = $resource(api + 'REST/Gdpr.svc/MarkCustomerAsDeletedWeb');\r\n var UsersWhichRejectedGdpr = $resource(api + 'REST/Gdpr.svc/UsersWhichRejectedGdpr/:organizationId');\r\n var CustomersWithoutOrders = $resource(api + 'REST/Gdpr.svc/CustomersWithoutOrders/:organizationId');\r\n\r\n this.get = function (gdprId) {\r\n return GdprApi.get({ gdprId: gdprId });\r\n };\r\n\r\n this.save = function (gdpr) {\r\n gdpr = Object.assign(new GdprApi(), gdpr);\r\n\r\n return gdpr.$save();\r\n };\r\n\r\n this.saveFromEmail = function (gdpr, sessionId) {\r\n var gdprFromEmailApiObject = new GdprFromEmailApi();\r\n\r\n gdprFromEmailApiObject.gdpr = gdpr;\r\n gdprFromEmailApiObject.sessionId = sessionId;\r\n\r\n return gdprFromEmailApiObject.$save();\r\n };\r\n\r\n this.getUsersThatHaveRequestedDelete = function () {\r\n return GdprUserRequestedDeleteApi.query().$promise;\r\n };\r\n\r\n this.getOrganizationsThatHaveRequestedDelete = function () {\r\n return GdprOrganizationRequestedDeleteApi.query().$promise;\r\n };\r\n\r\n this.declineDelete = function (table, foreignKey, password) {\r\n var gdprDeclineDeleteObject = new GdprDeclineDeleteApi();\r\n\r\n gdprDeclineDeleteObject.table = table;\r\n gdprDeclineDeleteObject.foreignKey = foreignKey;\r\n gdprDeclineDeleteObject.password = password;\r\n\r\n return gdprDeclineDeleteObject.$save();\r\n };\r\n\r\n this.confirmDelete = function (table, foreignKey, password) {\r\n var gdprConfirmDeleteApiObject = new GdprConfirmDeleteApi();\r\n\r\n gdprConfirmDeleteApiObject.table = table;\r\n gdprConfirmDeleteApiObject.foreignKey = foreignKey;\r\n gdprConfirmDeleteApiObject.password = password;\r\n\r\n return gdprConfirmDeleteApiObject.$save();\r\n };\r\n\r\n this.getCustomerGdprNotificationInfo = function (organizationId) {\r\n return GdprCustomerNotificationApi.get({\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n this.notifyCustomersForGdpr = function (organizationId) {\r\n var notifyCustomersForGdprApiObject = new NotifyCustomersForGdprApi();\r\n\r\n notifyCustomersForGdprApiObject.organizationId = organizationId;\r\n\r\n return notifyCustomersForGdprApiObject.$save();\r\n };\r\n\r\n this.markCustomerAsDeleted = function (sessionId) {\r\n var markCustomerAsDeletedApiObject = new MarkCustomerAsDeletedApi();\r\n\r\n markCustomerAsDeletedApiObject.sessionId = sessionId;\r\n\r\n return markCustomerAsDeletedApiObject.$save();\r\n };\r\n\r\n this.getGdprOverview = function (organizationId) {\r\n return GdprOverviewApi.get({\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n this.markCustomerAsDeletedFromWeb = function (customerId, password) {\r\n var markCustomerAsDeletedWebApiObject = new MarkCustomerAsDeletedWebApi();\r\n\r\n markCustomerAsDeletedWebApiObject.customerId = customerId;\r\n markCustomerAsDeletedWebApiObject.password = password;\r\n\r\n return markCustomerAsDeletedWebApiObject.$save();\r\n }\r\n\r\n this.getUsersWhichRejectedGdpr = function(organizationId) {\r\n return UsersWhichRejectedGdpr.query({\r\n organizationId: organizationId\r\n }).$promise;\r\n }\r\n\r\n this.getCustomersWithoutOrders = function(organizationId) {\r\n return CustomersWithoutOrders.query({\r\n organizationId : organizationId\r\n }).$promise;\r\n }\r\n\r\n return this;\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('info')\r\n .component('vbHome',\r\n {\r\n templateUrl: 'Scripts/home/home.component.html',\r\n controller: 'HomeController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n HomeController.$inject = [\r\n 'OrganizationFactory',\r\n 'sessionInformationService',\r\n '_',\r\n 'SessionFactory',\r\n 'OrderFactory',\r\n 'errorService',\r\n 'TaskListFactory',\r\n 'dialogService',\r\n '$location',\r\n 'PageRouteUtilService',\r\n 'AllAccessPage',\r\n 'titleService',\r\n '$filter'\r\n ];\r\n\r\n angular\r\n .module('info')\r\n .controller('HomeController', HomeController);\r\n\r\n function HomeController(\r\n OrganizationFactory,\r\n sessionInformationService,\r\n _,\r\n SessionFactory,\r\n OrderFactory,\r\n errorService,\r\n TaskListFactory,\r\n dialogService,\r\n $location,\r\n PageRouteUtilService,\r\n AllAccessPage,\r\n titleService,\r\n $filter\r\n ) {\r\n var vm = this;\r\n\r\n vm.loggedUser = null;\r\n vm.organizations = [];\r\n vm.shadowLoginInfo = null;\r\n vm.todaysOrders = [];\r\n vm.tasks = [];\r\n vm.failedCordelOrders = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.$onDestroy = onDestroy;\r\n vm.shadowLogin = shadowLogin;\r\n vm.setOrderFullyDone = setOrderFullyDone;\r\n vm.getTaskCount = getTaskCount;\r\n vm.onTaskClick = onTaskClick;\r\n vm.go = go;\r\n vm.hasLoggedUserFullAccess = hasLoggedUserFullAccess;\r\n\r\n function onInit() {\r\n titleService.changeTitle($filter('translate')('Home'));\r\n vm.loggedUser = sessionInformationService.getUser();\r\n\r\n // skip below requests if the logged user's organization doesn't have a license\r\n // this is a fix for when you shadow login and the route is reloaded and the\r\n // home component is initialized again before redirecting to demo-content\r\n if (!hasLoggedUserFullAccess()) {\r\n return;\r\n }\r\n\r\n getOrganizationsForAccess();\r\n getTodaysOrders();\r\n getTaskList();\r\n getFailedCordelOrders();\r\n };\r\n\r\n function hasLoggedUserFullAccess() {\r\n return sessionInformationService.hasLoggedUserFullAccess();\r\n }\r\n\r\n function getOrganizationsForAccess() {\r\n return OrganizationFactory.getOrganizationUserAccess(vm.loggedUser.id, AllAccessPage.Home)\r\n .$promise\r\n .then(function (result) {\r\n vm.organizations = _.filter(result, function (o) { return !!o.HasAccess; });\r\n\r\n if (!_.isNil(vm.organizations) && !_.isEmpty(vm.organizations))\r\n vm.organizations.unshift({\r\n HasAccess: true,\r\n id: vm.loggedUser.Organization.id,\r\n Name: vm.loggedUser.Organization.Name\r\n });\r\n });\r\n };\r\n\r\n function getTodaysOrders() {\r\n return OrderFactory.getTodaysOrdersForFrontPage()\r\n .then(function (result) {\r\n vm.todaysOrders = result;\r\n });\r\n };\r\n\r\n function shadowLogin() {\r\n return SessionFactory.shadowLoginCallback(vm.shadowLoginInfo.id);\r\n };\r\n\r\n function setOrderFullyDone(order) {\r\n if (!sessionInformationService.hasAccess('NEW_EDIT_ORDER')) {\r\n order.FullyDone = !order.FullyDone;\r\n errorService.setNoRightError();\r\n return Promise.resolve();\r\n }\r\n\r\n order.Organization = { id: vm.loggedUser.Organization.id };\r\n\r\n return OrderFactory.setOrderFullyDone(order);\r\n };\r\n\r\n function getTaskList() {\r\n return TaskListFactory.getExecutionTasks(vm.loggedUser.id, true)\r\n .$promise\r\n .then(function (result) {\r\n vm.tasks = result;\r\n });\r\n };\r\n\r\n function getTaskCount() {\r\n return _.filter(vm.tasks, function (t) { return t.Execution.Status.ProgId == 'STARTED' }).length;\r\n };\r\n\r\n function go(url) {\r\n $location.path(url);\r\n };\r\n\r\n /**\r\n * Go to execution based on the selected task\r\n * User is asked before if he wants to continue execution\r\n * @param {} task \r\n * @returns {} \r\n */\r\n function onTaskClick(task) {\r\n dialogService.showConfirmDialog('txtResumeTaskTitle', 'txtResumeTaskMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.Users);\r\n\r\n $location.path('/managementExecution/'\r\n + vm.loggedUser.id\r\n + '/' + task.Execution.InitiatedProcessList.InitiatedId\r\n + '/' + task.ForeignKey);\r\n }\r\n });\r\n };\r\n\r\n function getFailedCordelOrders() {\r\n var organizationId = vm.loggedUser.Organization.id;\r\n\r\n OrderFactory.getFailedCordelOrders(organizationId).then(function (result) {\r\n vm.failedCordelOrders = result;\r\n\r\n if (!!vm.failedCordelOrders && vm.failedCordelOrders.length > 0)\r\n for (var i = 0; i < vm.failedCordelOrders.length; i++) {\r\n vm.failedCordelOrders[i].template = 'Scripts/home/failedCordelOrderPopup.html';\r\n vm.failedCordelOrders[i].deleteOrderCallback = deleteOrder;\r\n }\r\n });\r\n }\r\n\r\n function deleteOrder(order) {\r\n order.popupOpen = false;\r\n dialogService.showConfirmDialog('txtConfirm', 'ORDER_MODEL.DELETE_ORDER_CONFIRM').then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n OrderFactory.markOrderAsDeleted(order)\r\n .then(function () {\r\n getFailedCordelOrders();\r\n });\r\n });\r\n }\r\n\r\n function onDestroy() {\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n InfoController.$inject = [\r\n '$scope',\r\n '$filter',\r\n 'titleService',\r\n 'TaskListFactory',\r\n 'dialogService',\r\n 'OrganizationFactory',\r\n 'PageRouteUtilService',\r\n 'AllAccessPage'\r\n ];\r\n\r\n angular.module('info').controller('InfoController', InfoController);\r\n\r\n function InfoController(\r\n $scope,\r\n $filter,\r\n titleService,\r\n TaskListFactory,\r\n dialogService,\r\n OrganizationFactory,\r\n PageRouteUtilService,\r\n AllAccessPage\r\n ) {\r\n titleService.changeTitle('Home');\r\n\r\n //$scope.hideCancel = true;\r\n //$scope.hidePrint = true; \r\n\r\n //TASKS\r\n $scope.allTasks = [];\r\n\r\n /**\r\n * Get the list of tasks\r\n */\r\n var getTaskList = function () {\r\n TaskListFactory.getExecutionTasks($scope.loggedUser.id, true).$promise.then(function (result) {\r\n $scope.allTasks = result;\r\n });\r\n };\r\n\r\n /**\r\n * Get the number of tasks based on the given type\r\n * @param {} taskType \r\n * @returns {} \r\n */\r\n $scope.getTaskCount = function (taskType) {\r\n // returns in progress tasks count only\r\n return $filter('filter')($scope.allTasks, { Execution: { Status: { ProgId: 'STARTED' } } }).length;\r\n };\r\n\r\n /**\r\n * Go to execution based on the selected task\r\n * User is asked before if he wants to continue execution\r\n * @param {} task \r\n * @returns {} \r\n */\r\n $scope.onTaskItemClick = function (task) {\r\n dialogService.showConfirmDialog('txtResumeTaskTitle', 'txtResumeTaskMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.Users);\r\n\r\n $scope.go('/managementExecution/'\r\n + $scope.loggedUser.id\r\n + '/' + task.Execution.InitiatedProcessList.InitiatedId\r\n + '/' + task.ForeignKey);\r\n }\r\n });\r\n };\r\n\r\n //TASKS\r\n\r\n /**\r\n * Get the companies that the user has access to\r\n */\r\n function getOrganizationThatTheUserHasAccess() {\r\n OrganizationFactory.getOrganizationUserAccess($scope.loggedUser.id, AllAccessPage.Home)\r\n .$promise\r\n .then(function (result) {\r\n $scope.organizationsAccess = result;\r\n if (result.length > 0 && $scope.getValidOrganizationsToLogin().length > 0)\r\n //also add the organization that the user is logged in\r\n $scope.organizationsAccess.unshift({\r\n HasAccess: true,\r\n id: $scope.loggedUser.Organization.id,\r\n Name: $scope.loggedUser.Organization.Name\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the user has access to any company\r\n * @returns {} \r\n */\r\n $scope.getValidOrganizationsToLogin = function () {\r\n return $filter('filter')($scope.organizationsAccess, { HasAccess: true });\r\n };\r\n\r\n (function () {\r\n getTaskList();\r\n getOrganizationThatTheUserHasAccess();\r\n })();\r\n\r\n };\r\n\r\n\r\n})();","(function () {\r\n\r\n TranslateUtils.$inject = [\r\n '$http',\r\n '$translate'\r\n ];\r\n\r\n function TranslateUtils(\r\n $http,\r\n $translate\r\n ) {\r\n\r\n function changeLanguage(language) {\r\n\r\n if (!language) {\r\n\r\n if ($http.defaults.headers.common['culture'] == null)\r\n $http.defaults.headers.common['culture'] = \"en_US\";\r\n\r\n return;\r\n }\r\n \r\n $http.defaults.headers.common['culture'] = language;\r\n $translate.use(language);\r\n\r\n }\r\n\r\n return {\r\n changeLanguage: changeLanguage\r\n };\r\n }\r\n\r\n angular\r\n .module('VBSmart')\r\n .factory('TranslateUtils', TranslateUtils);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('laws')\r\n .component('vbLawsAndRegulationsTabs', {\r\n templateUrl: 'Scripts/laws-regulations/laws-regulations-tabs.component.html',\r\n controller: 'LawsAndRegulationsTabsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n project: '<',\r\n order:'<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n LawsAndRegulationsTabsController.$inject = [\r\n 'sessionInformationService',\r\n 'menuService',\r\n 'titleService',\r\n '$filter'\r\n ];\r\n\r\n angular\r\n .module('laws')\r\n .controller('LawsAndRegulationsTabsController', LawsAndRegulationsTabsController);\r\n\r\n function LawsAndRegulationsTabsController(\r\n sessionInformationService,\r\n menuService,\r\n titleService,\r\n $filter\r\n ) {\r\n var vm = this;\r\n var canUserSeeSection = false;\r\n\r\n vm.loggedUser = sessionInformationService.getUser();\r\n vm.$onInit = onInit;\r\n vm.isSectionVisibleToUser = isSectionVisibleToUser;\r\n\r\n function onInit() {\r\n\r\n titleService.changeTitle($filter('translate')('Laws and regulations'));\r\n\r\n var menuItem = menuService.getMenuByHref('/lawsAndRegulations');\r\n\r\n canUserSeeSection = menuItem ? true : false;\r\n };\r\n\r\n function isSectionVisibleToUser() {\r\n\r\n return (vm.loggedUser.Organization.Central && vm.loggedUser.Group.ProgId != 'ADMIN' && canUserSeeSection) ||\r\n (!vm.loggedUser.Organization.Central && canUserSeeSection) ||\r\n vm.project;\r\n }\r\n\r\n };\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n LawsAndRegulationsController.$inject = [\r\n '$scope',\r\n '$q',\r\n '$sce',\r\n '$timeout',\r\n '$filter',\r\n 'infoService',\r\n 'F5ReportFactory',\r\n 'titleService',\r\n 'ProjectFactory',\r\n 'LawsAndRegulationsFactory',\r\n 'DownloadService',\r\n 'ProcessListFactory',\r\n '$modal',\r\n 'OrganizationUtilService',\r\n '$compile',\r\n '_',\r\n 'sessionInformationService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('laws').controller('LawsAndRegulationsController', LawsAndRegulationsController);\r\n\r\n function LawsAndRegulationsController(\r\n $scope,\r\n $q,\r\n $sce,\r\n $timeout,\r\n $filter,\r\n infoService,\r\n F5ReportFactory,\r\n titleService,\r\n ProjectFactory,\r\n LawsAndRegulationsFactory,\r\n DownloadService,\r\n ProcessListFactory,\r\n $modal,\r\n OrganizationUtilService,\r\n $compile,\r\n _,\r\n sessionInformationService,\r\n $translate\r\n ) {\r\n var vm = this;\r\n\r\n vm.lawsReport = null;\r\n vm.attachments = [];\r\n vm.isEditMode = false;\r\n\r\n var oldContent = null;\r\n var valueTypes = [];\r\n\r\n if (!ProjectFactory.lawsMenuSelected)\r\n titleService.changeTitle($filter('translate')('Laws and regulations'));\r\n\r\n vm.$onInit = onInit;\r\n\r\n function onInit() {\r\n console.log(vm);\r\n };\r\n\r\n vm.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n vm.getLoggedUser = function () {\r\n return sessionInformationService.getUser();\r\n };\r\n\r\n /**\r\n * Process all html links and add ng-click to them\r\n * @returns {} \r\n */\r\n function addActionToDocuments() {\r\n $timeout(function () {\r\n var attachmentElements = angular.element(document).find('a[id^=\"attachmentId\"]');\r\n\r\n for (var i = 0; i < attachmentElements.length; i++) {\r\n var value = attachmentElements[i].innerHTML.replace(/<[^>]*>/g, \"\");\r\n attachmentElements[i].innerHTML = \"\";\r\n attachmentElements[i].removeAttribute(\"href\");\r\n\r\n var id = getIdValue(attachmentElements[i].id, \"attachmentId#\", \"#\");\r\n var html = \"\" + value + \"\";\r\n\r\n var elem = angular.element(attachmentElements[i]);\r\n var elem2 = $compile(html)($scope);\r\n elem.append(elem2);\r\n }\r\n });\r\n\r\n };\r\n\r\n function getIdValue(str, first, last) {\r\n return str.replace(first, \"\").replace(last, \"\");\r\n };\r\n\r\n function getContentPage() {\r\n F5ReportFactory.getReport(\"LawsAndRegulations\")\r\n .$promise\r\n .then(function (result) {\r\n vm.lawsReport = result;\r\n\r\n addActionToDocuments();\r\n });\r\n };\r\n\r\n vm.newAttachment = function () {\r\n return F5ReportFactory.newAttachment();\r\n };\r\n\r\n vm.saveAttachment = function (attach) {\r\n var deferred = $q.defer();\r\n\r\n attach.ForeignKey = vm.lawsReport.id;\r\n F5ReportFactory.saveAttachment(attach).then(function (result) {\r\n\r\n deferred.resolve(result);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n vm.startEditing = function () {\r\n $timeout(function () {\r\n angular.element('text-angular[name=lawsEditor]').find('*[id*=taTextElement]').focus();\r\n });\r\n\r\n oldContent = angular.copy(vm.lawsReport.ReportCode);\r\n };\r\n\r\n vm.cancelEditing = function () {\r\n vm.lawsReport.ReportCode = angular.copy(oldContent);\r\n oldContent = null;\r\n };\r\n\r\n /**\r\n * Save the laws and regulation as report\r\n * @returns {} \r\n */\r\n vm.saveReport = function () {\r\n F5ReportFactory.save(vm.lawsReport).then(function () {\r\n\r\n //compare oldContent with new one to check if any attachments were deleted \r\n var oldAttachIds = findStringBetween(oldContent, \"attachmentId#\", \"#\");\r\n\r\n var newAttachIds = findStringBetween(vm.lawsReport.ReportCode, \"attachmentId#\", \"#\");\r\n\r\n if (oldAttachIds && oldAttachIds.length > 0) {\r\n var attachToDelete;\r\n if (!newAttachIds || newAttachIds.length == 0)\r\n attachToDelete = oldAttachIds;\r\n else\r\n attachToDelete = $filter('filter')(oldAttachIds, function (oldAttach) {\r\n if (newAttachIds.indexOf(oldAttach) == -1)\r\n return true;\r\n return false;\r\n });\r\n\r\n if (attachToDelete && attachToDelete.length > 0) {\r\n angular.forEach(attachToDelete,\r\n function (attach) {\r\n var attachId = attach.replace(\"attachmentId#\", \"\").replace(\"#\", \"\");\r\n F5ReportFactory.deleteAttachment(attachId);\r\n });\r\n\r\n }\r\n }\r\n\r\n infoService.changeInfo($filter('translate')(\"msgPageSaved\"));\r\n\r\n getContentPage();\r\n\r\n\r\n });\r\n };\r\n\r\n function findStringBetween(str, first, last) {\r\n var r = new RegExp(first + '(.*?)' + last, 'gm');\r\n return str.match(r);\r\n };\r\n\r\n vm.getMappedPdfs = function () {\r\n LawsAndRegulationsFactory.getMappedPdfs()\r\n .$promise\r\n .then(function (result) {\r\n vm.mappedPdfs = result;\r\n\r\n if (_.isNil(vm.mappedPdfs) || _.isEmpty(vm.mappedPdfs))\r\n return;\r\n\r\n for (var i = 0; i < vm.mappedPdfs.length; i++)\r\n vm.mappedPdfs[i].AttachmentName = vm.mappedPdfs[i].AttachmentName.replace('Mapped_', '');\r\n });\r\n };\r\n\r\n vm.downloadAttachment = function (attach) {\r\n if (!attach || !attach.URL)\r\n return;\r\n\r\n DownloadService.download(attach.URL);\r\n };\r\n\r\n vm.getPdfMappings = function (pdfMappingId) {\r\n getPdfMappingTypes();\r\n LawsAndRegulationsFactory.getPdfMappings(pdfMappingId)\r\n .$promise\r\n .then(function (result) {\r\n vm.pdfMappings = result;\r\n });\r\n };\r\n\r\n vm.config = {};\r\n\r\n vm.savePdfMappings = function (mappedPdfId) {\r\n var filteredList = _.filter(vm.pdfMappings, function (i) {\r\n return i.Value || (!i.Value && _.some(['BOT_CUSTOM_NUMBER', 'BOT_CUSTOM_TEXT', 'BOT_CUSTOM_DATE'], function (s) { return i.ParentValue && s == i.ParentValue.ProgId }));\r\n });\r\n\r\n return LawsAndRegulationsFactory.savePdfMappings(filteredList, mappedPdfId);\r\n };\r\n\r\n vm.disableGetFilledPdf = function () {\r\n var notFilledValues = _.filter(vm.filledPdfMappingTypes, function (item) {\r\n return !item.Value;\r\n });\r\n\r\n return !notFilledValues || notFilledValues.length == 0 ? false : true;\r\n };\r\n\r\n\r\n function getPdfMappingTypes() {\r\n LawsAndRegulationsFactory.getPdfMappingTypes()\r\n .$promise\r\n .then(function (result) {\r\n valueTypes = result;\r\n });\r\n };\r\n\r\n vm.getTypes = function () {\r\n return _.filter(valueTypes, function (type) {\r\n return !type.Parent || !type.Parent.id;\r\n });\r\n };\r\n\r\n vm.getValues = function (input) {\r\n return _.filter(valueTypes, function (t) {\r\n return t.Parent && t.Parent.id == input.ParentValue.id;\r\n });\r\n };\r\n\r\n vm.hideValueInput = function (input) {\r\n if (!input.ParentValue)\r\n return false;\r\n\r\n return _.some(['BOT_CUSTOM_NUMBER', 'BOT_CUSTOM_TEXT', 'BOT_CUSTOM_DATE'], function (s) { return s == input.ParentValue.ProgId });\r\n };\r\n\r\n vm.showFillInput = function (input) {\r\n return !_.some(['BOT_CUSTOM_NUMBER', 'BOT_CUSTOM_TEXT', 'BOT_CUSTOM_DATE'], function (s) { return s == input.ProgId });\r\n };\r\n\r\n /**\r\n * Get data for 'intellisense' dropdown based on the search criteria\r\n * @param {} table \r\n * @param {} freetext \r\n * @param {} mappingType \r\n * @returns {} \r\n */\r\n vm.getIntellisense = function (table, freetext, mappingType) {\r\n var organizationId = OrganizationUtilService.getOrganizationId();\r\n\r\n //TODO: this should be renamed or copied into a service\r\n ProcessListFactory.getRiskAnalysisIntellisense(table, organizationId, freetext).$promise.then(function (result) {\r\n mappingType.IntellisenseList = result;\r\n });\r\n };\r\n\r\n vm.selectAssociatedObject = function (object, mappingType) {\r\n mappingType.freetext = angular.copy(object.id + ' ' + object.Name);\r\n mappingType.Value = object.ForeignKey;\r\n };\r\n\r\n\r\n vm.filledPdfModal = {};\r\n vm.openFilledPdfModal = function (pdfId, mappedPdfId) {\r\n vm.config.pdfId = pdfId;\r\n vm.config.mappedPdfId = mappedPdfId;\r\n\r\n\r\n getFilledPdfMappingTypes(pdfId, mappedPdfId).then(function () {\r\n vm.filledPdfModal = $modal.open({\r\n templateUrl: 'Scripts/lawsAndRegulations/modalFilledPdfPartial.html',\r\n scope: $scope,\r\n size: 'lg'\r\n });\r\n });\r\n };\r\n\r\n function getFilledPdfMappingTypes(pdfId, mappedPdfId) {\r\n return LawsAndRegulationsFactory.getFilledPdfMappingTypes(pdfId, mappedPdfId)\r\n .$promise\r\n .then(function (result) {\r\n vm.filledPdfMappingTypes = result;\r\n });\r\n };\r\n\r\n vm.downloadRegularPdf = function () {\r\n DownloadService.download(vm.config.regularPdf.URL);\r\n };\r\n\r\n vm.saveConfigAndOpenPdfModal = function () {\r\n vm.savePdfMappings(vm.config.currentMappedPdf.id)\r\n .then(function () {\r\n vm.openFilledPdfModal(null, vm.config.currentMappedPdf.id);\r\n });\r\n };\r\n\r\n vm.getFilledPdf = function () {\r\n if (vm.disableGetFilledPdf())\r\n return;\r\n\r\n for (var i = 0; i < vm.filledPdfMappingTypes.length; i++) {\r\n switch (vm.filledPdfMappingTypes[i].ProgId) {\r\n case 'BOT_CUSTOM_DATE':\r\n var date = _.cloneDeep(vm.filledPdfMappingTypes[i].Value);\r\n date = moment(date).valueOf();\r\n\r\n vm.filledPdfMappingTypes[i].Value = date;\r\n break;\r\n }\r\n }\r\n\r\n LawsAndRegulationsFactory.getFilledPdfUrl(vm.config.pdfId, vm.config.mappedPdfId, vm.filledPdfMappingTypes)\r\n .then(function (result) {\r\n DownloadService.download(result.URL);\r\n });\r\n };\r\n\r\n vm.getRegularPdf = function (pdfId, mappedPdfId) {\r\n LawsAndRegulationsFactory.getRegularPdf(vm.config.pdfId, vm.config.mappedPdfId).$promise.then(function (result) {\r\n vm.config.regularPdf = result;\r\n vm.downloadRegularPdf();\r\n });\r\n };\r\n\r\n vm.onUseProjectCustomerChange = function (input) {\r\n if (input.useProjectCustomer) {\r\n if (!vm.project || !vm.project.Order || !vm.project.Order.Customer)\r\n return;\r\n\r\n input.freetext = vm.project.Order.Customer.FullName;\r\n input.Value = vm.project.Order.Customer.id;\r\n } else {\r\n input.freeText = null;\r\n input.Value = null;\r\n }\r\n };\r\n\r\n vm.isInputDisabled = function (input) {\r\n if (input.ProgId == 'BOT_CUSTOMER' && input.useProjectCustomer)\r\n return true;\r\n\r\n if (input.ProgId == 'BOT_ORDER' && input.useProjectOrder)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n vm.onUseProjectOrderChange = function (input) {\r\n if (input.useProjectOrder) {\r\n if (!vm.project || !vm.project.Order)\r\n return;\r\n\r\n input.freetext = $translate.instant('txtOrder') + ' ' + (vm.project.Order.OrderNumber ? + vm.project.Order.OrderNumber : vm.project.Order.id);\r\n input.Value = vm.project.Order.id;\r\n } else {\r\n input.freeText = null;\r\n input.Value = null;\r\n }\r\n };\r\n\r\n getContentPage();\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n LawsAndRegulationsFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n 'DateUtilService'\r\n ];\r\n\r\n angular.module('laws').factory('LawsAndRegulationsFactory', LawsAndRegulationsFactory);\r\n\r\n /**\r\n * Factory used for retrieving and saving documents that are added in the laws and regulations menu item\r\n */\r\n function LawsAndRegulationsFactory(\r\n $resource,\r\n baseUrlService,\r\n DateUtilService\r\n ) {\r\n var lawsAndRegulationsFactory = {};\r\n\r\n var MappedPdfs = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/MappedPdfs');\r\n var PdfMappings = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/PdfMappings');\r\n var PdfMappingTypes = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/PdfMappingTypes');\r\n var FilledPdfMappings = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/FilledPdfMappings');\r\n var FilledPdfMappingTypes = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/FilledPdfMappingTypes');\r\n var RegularPdf = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/RegularPdf');\r\n var ConvertToFile = $resource(baseUrlService.getBaseUrl() + 'REST/LawsAndRegulations.svc/ConvertToFile', {}, { save: { method: 'POST', isArray: true } });\r\n\r\n lawsAndRegulationsFactory.getRegularPdf = function (pdfId, mappedPdfId) {\r\n return RegularPdf.get({ pdfId: pdfId, mappedPdfId: mappedPdfId });\r\n }\r\n\r\n lawsAndRegulationsFactory.getFilledPdfMappingTypes = function (pdfId, mappedPdfId) {\r\n return FilledPdfMappingTypes.query({ pdfId: pdfId, mappedPdfId: mappedPdfId });\r\n }\r\n\r\n lawsAndRegulationsFactory.getPdfMappingTypes = function (mappedPdfId) {\r\n return PdfMappingTypes.query();\r\n }\r\n\r\n lawsAndRegulationsFactory.getFilledPdfUrl = function (pdfId, mappedPdfId, filledPdfTypes) {\r\n var filledPdfApiObject = new FilledPdfMappings();\r\n\r\n filledPdfApiObject.pdfId = pdfId;\r\n filledPdfApiObject.mappedPdfId = mappedPdfId;\r\n filledPdfApiObject.filledPdfTypes = filledPdfTypes;\r\n\r\n return filledPdfApiObject.$save();\r\n }\r\n\r\n lawsAndRegulationsFactory.getMappedPdfs = function () {\r\n return MappedPdfs.query();\r\n }\r\n\r\n lawsAndRegulationsFactory.getPdfMappings = function (mappedPdfId) {\r\n return PdfMappings.query({ mappedPdfId: mappedPdfId });\r\n }\r\n\r\n lawsAndRegulationsFactory.savePdfMappings = function(pdfMappings, mappedPdfId) {\r\n return PdfMappings.save({ mappedPdfId: mappedPdfId }, pdfMappings).$promise;\r\n };\r\n\r\n lawsAndRegulationsFactory.convertToFile = function(urls) {\r\n return ConvertToFile.save({}, urls).$promise;\r\n };\r\n\r\n\r\n lawsAndRegulationsFactory.newAttachment = null;\r\n lawsAndRegulationsFactory.saveAttachment = null;\r\n\r\n return lawsAndRegulationsFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DataDetailsController.$inject = [\r\n '$scope',\r\n '$location',\r\n '$filter',\r\n '$uibModal',\r\n '$q',\r\n 'ExecutionFactory',\r\n 'ProcessListFactory',\r\n 'UserFactory',\r\n 'sessionInformationService',\r\n 'PageRouteUtilService',\r\n 'AllAccessPage'\r\n ];\r\n\r\n angular.module('execution').controller('DataDetailsController', DataDetailsController);\r\n\r\n function DataDetailsController(\r\n $scope,\r\n $location,\r\n $filter,\r\n $uibModal,\r\n $q,\r\n ExecutionFactory,\r\n ProcessListFactory,\r\n UserFactory,\r\n sessionInformationService,\r\n PageRouteUtilService,\r\n AllAccessPage\r\n ) {\r\n\r\n $scope.availableProcessLists = [];\r\n $scope.inProgressExecutions = [];\r\n $scope.finishedExecutions = [];\r\n\r\n $scope.organizations = [];\r\n $scope.users = [];\r\n $scope.participants = [];\r\n\r\n $scope.participantsModal = null;\r\n $scope.includeDeactivatedItems = { value: false };\r\n\r\n $scope.selectedItems = { available: null, inProgress: null, finished: null };\r\n $scope.selectedItem = { organization: sessionInformationService.getUser().Organization };\r\n\r\n $scope.loggedUser = sessionInformationService.getUser();\r\n $scope.onIncludeDeactivatedItemsChange = onIncludeDeactivatedItemsChange;\r\n loadProcessLists();\r\n loadExecutions();\r\n\r\n /**\r\n * Get process lists by data details\r\n */\r\n function loadProcessLists() {\r\n // if ($scope.loggedUser.Group.ProgId != 'USER')\r\n $scope.getProcessLists({ dataDetails: $scope.details }).then(function (result) {\r\n if ($scope.table === 'GOT_ORGANIZATION')\r\n _.remove(result, function (p) { return !!p.LimitedAccess });\r\n\r\n $scope.availableProcessLists = result;\r\n });\r\n }\r\n\r\n /**\r\n * Get executions by data details\r\n */\r\n function loadExecutions() {\r\n $scope.getExecutions({ dataDetails: $scope.details, includeDeactivatedItems: $scope.includeDeactivatedItems.value }).then(function (result) {\r\n\r\n //filter based on includeDeactivatedItems\r\n if ($scope.includeDeactivatedItems.value) $scope.inProgressExecutions = result.filter(function (item) { return (item.Status.ProgId == 'STARTED' || item.Status.ProgId == 'DEACTIVATED'); });\r\n else $scope.inProgressExecutions = $filter('filter')(result, { Status: { ProgId: 'STARTED' } });\r\n //order them by last updated date desc\r\n $scope.inProgressExecutions = $filter('orderBy')($scope.inProgressExecutions, '-LastUpdatedDate');\r\n\r\n //filter based on includeDeactivatedItems\r\n if ($scope.includeDeactivatedItems.value) $scope.finishedExecutions = result.filter(function (item) { return (item.Status.ProgId == 'DONE' || item.Status.ProgId == 'DEACTIVATED'); });\r\n else $scope.finishedExecutions = $filter('filter')(result, { Status: { ProgId: 'DONE' } });\r\n //order them by last updated date desc\r\n $scope.finishedExecutions = $filter('orderBy')($scope.finishedExecutions, '-LastUpdatedDate');\r\n });\r\n };\r\n\r\n function userExists(user) {\r\n for (var i = 0; i < $scope.participants.length; i++)\r\n if ($scope.participants[i] && $scope.participants[i].id == user.id)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Start execution of any given process list\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n $scope.startProcessList = function (processList) {\r\n notifyParentComponentAboutExecutionStart();\r\n // if the processlist has limited access,\r\n // prompt the user to select a list of participants\r\n if (processList.LimitedAccess) {\r\n getParticipants(processList);\r\n } else {\r\n ExecutionFactory.createExecution($scope.foreignKey, processList.id, null, $scope.table).$promise.then(function (result) {\r\n // redirect to execution\r\n\r\n switch ($scope.table) {\r\n case 'GOT_USER':\r\n\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.Users);\r\n\r\n if ($scope.horizontalExecution)\r\n $location.path('/horizontalExecution/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId + '/user/' + $scope.foreignKey);\r\n else\r\n $location.path('/managementExecution/' + $scope.foreignKey + '/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId);\r\n break;\r\n case 'GOT_ORGANIZATION':\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.MyOrganization);\r\n\r\n if ($scope.horizontalExecution)\r\n $location.path('/horizontalExecution/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId + '/organization/' + $scope.foreignKey);\r\n else\r\n $location.path('/managementExecution/' + $scope.foreignKey + '/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId);\r\n break;\r\n }\r\n\r\n });\r\n }\r\n };\r\n\r\n function getParticipantFromId(id) {\r\n for (var i = 0; i < $scope.users.length; i++)\r\n if ($scope.users[i].id == id)\r\n return $scope.users[i];\r\n return null;\r\n };\r\n\r\n /**\r\n * Get the list of users and open a modal and display the participants for the processlist\r\n * @param {any} processList\r\n */\r\n var getParticipants = function (processList) {\r\n // get users for current organization\r\n getUsers().then(function () {\r\n $scope.participants = [];\r\n if ($scope.foreignKey)\r\n if (!userExists({ id: $scope.foreignKey })) {\r\n var participant = getParticipantFromId($scope.foreignKey);\r\n if (participant && participant.id)\r\n $scope.addParticipant(participant);\r\n }\r\n\r\n if (!userExists($scope.loggedUser))\r\n $scope.addParticipant($scope.loggedUser);\r\n $scope.participantsModal = $uibModal.open({\r\n templateUrl: 'Scripts/management/modalExecutionParticipants.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n\r\n $scope.participantsModal.result.then(function () {\r\n\r\n if ($scope.participants && $scope.participants.length > 0) {\r\n ExecutionFactory.createExecution($scope.foreignKey, processList.id, $scope.participants).$promise.then(function (result) {\r\n\r\n PageRouteUtilService.setCurrentPageForExecution(processList.DataAbout.ProgId === 'GOT_ORGANIZATION' ? AllAccessPage.MyOrganization : AllAccessPage.Users);\r\n // redirect to execution\r\n $location.path('/managementExecution/' + $scope.foreignKey + '/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId);\r\n });\r\n }\r\n });\r\n });\r\n };\r\n\r\n $scope.notYetSelected = function (user) {\r\n return ($filter('filter')($scope.participants, { id: user.id })) <= 0;\r\n };\r\n\r\n $scope.getUsers = function (orgaizationId, freeText) {\r\n if (orgaizationId == null) orgaizationId = $scope.loggedUser.Organization.id;\r\n\r\n var usersPromise = UserFactory.getUsersByOrganizationId(orgaizationId, freeText);\r\n usersPromise.$promise.then(function (result) {\r\n $scope.users = result;\r\n });\r\n };\r\n\r\n var getUsers = function () {\r\n var deferred = $q.defer();\r\n if ($scope.users.length > 0) {\r\n deferred.resolve();\r\n return deferred.promise;\r\n }\r\n var usersPromise = UserFactory.getUsersByOrganizationId($scope.loggedUser.Organization.id, null);\r\n usersPromise.$promise.then(function (result) {\r\n $scope.users = result;\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n $scope.addParticipant = function (user) {\r\n $scope.participants.push(user);\r\n };\r\n\r\n $scope.removeParticipant = function (user) {\r\n var index = $scope.participants.indexOf(user);\r\n if (index > -1) {\r\n $scope.participants.splice(index, 1);\r\n }\r\n };\r\n\r\n /**\r\n * Redirect the user to the execution page. Execution may be horizontal or management\r\n * @param {} execution \r\n * @returns {} \r\n */\r\n $scope.resumeExecution = function (execution) {\r\n\r\n notifyParentComponentAboutExecutionResume();\r\n\r\n switch ($scope.table) {\r\n case 'GOT_USER':\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.Users);\r\n\r\n if ($scope.horizontalExecution)\r\n $location.path('/horizontalExecution/' + execution.InitiatedProcessList.InitiatedId + '/user/' + $scope.foreignKey);\r\n else\r\n $location.path('/managementExecution/' + $scope.foreignKey + '/' + execution.InitiatedProcessList.InitiatedId);\r\n break;\r\n case 'GOT_ORGANIZATION':\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.MyOrganization);\r\n if ($scope.horizontalExecution)\r\n $location.path('/horizontalExecution/' + execution.InitiatedProcessList.InitiatedId + '/organization/' + $scope.foreignKey);\r\n else\r\n $location.path('/managementExecution/' + $scope.foreignKey + '/' + execution.InitiatedProcessList.InitiatedId);\r\n break;\r\n }\r\n };\r\n\r\n /**\r\n * Edit process list\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n $scope.editProcessList = function (processList) {\r\n ProcessListFactory.ProcessListType = processList.ProcessListType.ProgId;\r\n $location.path('/processListElement/' + processList.id);\r\n $location.search('location', $scope.table);\r\n };\r\n\r\n /**\r\n * Deactivate any execution by the given id\r\n * @param {} executionId \r\n * @returns {} \r\n */\r\n $scope.deactivateExecution = function (executionId) {\r\n $scope.deactivateExecutionModal = $uibModal.open({\r\n templateUrl: 'Scripts/management/modalDeactivateExecution.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n\r\n $scope.deactivateExecutionModal.confirm = function () {\r\n ExecutionFactory.deactivateExecution(executionId).then(function () {\r\n loadExecutions();\r\n });\r\n }\r\n\r\n\r\n\r\n };\r\n\r\n /**\r\n * Create a new processlist based on the table\r\n * @returns {} \r\n */\r\n $scope.newProcessList = function () {\r\n if ($scope.horizontalExecution) {\r\n ProcessListFactory.ProcessListType = 'HORIZONTAL';\r\n } else {\r\n ProcessListFactory.ProcessListType = 'MANAGEMENT';\r\n }\r\n\r\n $location.path('/processListElement');\r\n $location.search('location', $scope.table);\r\n $location.search('foreignKey', $scope.foreignKey);\r\n };\r\n\r\n function onIncludeDeactivatedItemsChange() {\r\n loadExecutions();\r\n }\r\n\r\n function notifyParentComponentAboutExecutionStart() {\r\n if ($scope.onExecutionStart && typeof $scope.onExecutionStart === 'function') {\r\n $scope.onExecutionStart();\r\n }\r\n }\r\n\r\n function notifyParentComponentAboutExecutionResume() {\r\n if ($scope.onExecutionResume && typeof $scope.onExecutionResume === 'function') {\r\n $scope.onExecutionResume();\r\n }\r\n }\r\n };\r\n\r\n})();","(function () {\r\n angular.module('user')\r\n .directive('datatypeDetails', function () { // can't have one of the words be 'data' because angular will strip it\r\n return {\r\n restrict: 'EA',\r\n templateUrl: 'Scripts/management/dataDetailsTemplate.html',\r\n scope: {\r\n details: '=',\r\n getProcessLists: '&',\r\n getExecutions: '&',\r\n foreignKey: '=',\r\n table: '=',\r\n horizontalExecution: '=',\r\n onExecutionStart: '&?',\r\n onExecutionResume: '&?'\r\n },\r\n controller: 'DataDetailsController'\r\n };\r\n });\r\n\r\n})();","//TODO: remove this file\r\n//Execution window has been replaced with Quality Handbook\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n ExecutionController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$location',\r\n '$filter',\r\n '$uibModal',\r\n 'dialogService',\r\n 'UserFactory',\r\n 'OrganizationFactory',\r\n 'ProcessListFactory',\r\n 'ExecutionFactory',\r\n '$q',\r\n 'sessionInformationService',\r\n 'titleService',\r\n 'PageRouteUtilService',\r\n 'AllAccessPage'\r\n ];\r\n\r\n angular.module('execution').controller('ExecutionController', ExecutionController);\r\n\r\n function ExecutionController(\r\n $scope,\r\n $routeParams,\r\n $location,\r\n $filter,\r\n $uibModal,\r\n dialogService,\r\n UserFactory,\r\n OrganizationFactory,\r\n ProcessListFactory,\r\n ExecutionFactory,\r\n $q,\r\n sessionInformationService,\r\n titleService,\r\n PageRouteUtilService,\r\n AllAccessPage\r\n ) {\r\n\r\n titleService.changeTitle($filter('translate')('Execution'));\r\n\r\n $scope.selectedCategories = [null, null, null];\r\n $scope.categoryHierarchy = [];\r\n $scope.modal = null;\r\n\r\n $scope.reverseProcessLists = ProcessListFactory.reverseProcessList;\r\n $scope.predicateProcessLists = ProcessListFactory.predicateProcessList;\r\n $scope.reverseExecutions = false;\r\n $scope.predicateExecutions = 'id';\r\n\r\n $scope.executionParameters = {};\r\n $scope.executionParameters.includeDeactivatedItems = ProcessListFactory.includeDeactivatedItems;\r\n\r\n var mode = $routeParams.mode;\r\n var allProcessLists = [];\r\n var allExecutions = [];\r\n $scope.processLists = [];\r\n $scope.executions = [];\r\n\r\n $scope.users = [];\r\n $scope.organizations = [];\r\n $scope.participants = [];\r\n\r\n $scope.selectedItem = { user: null, organization: sessionInformationService.getUser().Organization };\r\n $scope.selectedProcessList = {};\r\n $scope.participantsModal = null;\r\n\r\n $scope.hideNavigation = false;\r\n $scope.currentPageProcessLists = 1;\r\n $scope.currentPageExecutions = 1;\r\n $scope.itemsPerPage = 10;\r\n $scope.numPages = 0; // readonly\r\n\r\n $scope.userFilter = { Name: '' };\r\n\r\n $scope.selectedOrganization = null;\r\n\r\n $scope.intellisense = { isUserOpen: false };\r\n\r\n\r\n $scope.init = function () {\r\n // the organization for the process list query will be preselected\r\n // by default, regardless of whether it can be changed or not\r\n $scope.selectedOrganization = ProcessListFactory.selectedOrganization;\r\n if (!$scope.selectedOrganization) {\r\n $scope.selectedOrganization = ProcessListFactory.selectedOrganization = $scope.loggedUser.Organization;\r\n }\r\n\r\n $scope.getProcessList($scope.selectedOrganization.id);\r\n $scope.getProcessListCategoryHierarchy($scope.selectedOrganization.id);\r\n\r\n if ($scope.loggedUser.Organization.Central) {\r\n getOrganizations();\r\n }\r\n\r\n $scope.getExecutions();\r\n\r\n };\r\n\r\n /**\r\n * When organization changes, get the processlists and the categories\r\n * @param {} selectedOrganization \r\n * @returns {} \r\n */\r\n $scope.onSelectedOrganizationChange = function (selectedOrganization) {\r\n $scope.selectedOrganization = ProcessListFactory.selectedOrganization = selectedOrganization;\r\n $scope.getProcessList($scope.selectedOrganization.id);\r\n $scope.getProcessListCategoryHierarchy($scope.selectedOrganization.id);\r\n };\r\n\r\n /**\r\n * Get processlist categories\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n $scope.getProcessListCategoryHierarchy = function (organizationId) {\r\n var categoryHierarchyPromise = ProcessListFactory.getProcessListCategoryHierarchy(organizationId);\r\n categoryHierarchyPromise.$promise.then(function (result) {\r\n $scope.categoryHierarchy = result;\r\n });\r\n };\r\n\r\n /**\r\n * Get processlists by any given organizations\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n $scope.getProcessList = function (organizationId) {\r\n ProcessListFactory.includeDeactivatedItems = $scope.executionParameters.includeDeactivatedItems;\r\n\r\n var processListPromise = ProcessListFactory.getProcessList(null, null, $scope.executionParameters.includeDeactivatedItems, true, organizationId);\r\n processListPromise.$promise.then(function (result) {\r\n allProcessLists = result;\r\n for (var index = 0; index < allProcessLists.length; index++) {\r\n allProcessLists[index].id = parseInt(allProcessLists[index].id);\r\n allProcessLists[index].ProcessListType.Name = $filter('translate')(allProcessLists[index].ProcessListType.ProgId);\r\n }\r\n allProcessLists = $filter('orderBy')(allProcessLists, ProcessListFactory.predicateProcessList, ProcessListFactory.reverseProcessList);\r\n\r\n $scope.processLists = filterByCategory();\r\n });\r\n };\r\n\r\n /**\r\n * Get all executions in progress. It may get those inactive as well based on the setting includeDeactivatedItems\r\n * @returns {} \r\n */\r\n $scope.getExecutions = function () {\r\n ProcessListFactory.includeDeactivatedItems = $scope.executionParameters.includeDeactivatedItems;\r\n\r\n var executionsPromise = ExecutionFactory.getExecutionsInProgress($scope.executionParameters.includeDeactivatedItems);\r\n executionsPromise.$promise.then(function (result) {\r\n allExecutions = result;\r\n\r\n allExecutions = $filter('orderBy')(allExecutions, $scope.predicateExecutions, $scope.reverseExecutions);\r\n\r\n $scope.executions = filterExecutionsByCategory();\r\n });\r\n };\r\n\r\n /**\r\n * Get the list of users based on the search criteria\r\n * @param {} selectedOrganization \r\n * @param {} freeText \r\n * @param {} isUserOpen \r\n * @returns {} \r\n */\r\n $scope.getUsers = function (selectedOrganization, freeText, isUserOpen) {\r\n if (selectedOrganization == null) selectedOrganization = $scope.loggedUser.Organization;\r\n\r\n var usersPromise = UserFactory.getUsersByOrganizationId(selectedOrganization.id, freeText);\r\n usersPromise.$promise.then(function (result) {\r\n $scope.users = result;\r\n $scope.intellisense.isUserOpen = isUserOpen;\r\n });\r\n };\r\n\r\n /**\r\n * Get the list of companies\r\n */\r\n var getOrganizations = function () {\r\n var deferred = $q.defer();\r\n if ($scope.organizations.length > 0) {\r\n deferred.resolve();\r\n return deferred.promise;\r\n }\r\n var organizationsPromise = OrganizationFactory.getOrganizationsDropdown();\r\n organizationsPromise.$promise.then(function (result) {\r\n $scope.organizations = result;\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n //TODO: check if this is used anymore\r\n var getUsers = function () {\r\n var deferred = $q.defer();\r\n\r\n var usersPromise = UserFactory.getUsersByOrganizationId($scope.loggedUser.Organization.id, null);\r\n usersPromise.$promise.then(function (result) {\r\n $scope.users = result;\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n function cleanup() {\r\n $scope.userFilter.Name = '';\r\n $scope.selectedItem.user = null;\r\n //$scope.selectedItem.organization = null;\r\n }\r\n\r\n /**\r\n * Open a modal where the user has to select whether for which user to execute or for which company\r\n * If the list has limited access, a modal with participants will appear\r\n * @param {} item \r\n * @returns {} \r\n */\r\n $scope.onProcessListItemClick = function (item) {\r\n $scope.selectedProcessList = item;\r\n //$scope.selectedItem.organization = null;\r\n $scope.selectedItem.user = null;\r\n getOrganizations().then(function () {\r\n switch (item.DataAbout.ProgId) {\r\n case 'GOT_USER':\r\n $scope.dataAbout = 'GOT_USER';\r\n\r\n cleanup();\r\n\r\n // preselect logged user's organization\r\n $scope.selectedItem.organization = $filter('filter')($scope.organizations, function (o) { return o.id == $scope.loggedUser.Organization.id; })[0];\r\n $scope.getUsers($scope.selectedItem.organization, '');\r\n\r\n $scope.modal = $uibModal.open({\r\n templateUrl: 'Scripts/management/modalDataAbout.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n\r\n break;\r\n case 'GOT_ORGANIZATION':\r\n $scope.dataAbout = 'GOT_ORGANIZATION';\r\n\r\n // if logged user is from central, open modal for organization selection\r\n if ($scope.loggedUser.Organization.Central) {\r\n cleanup();\r\n\r\n // preselect logged user's organization\r\n $scope.selectedItem.organization = $filter('filter')($scope.organizations, { id: $scope.loggedUser.Organization.id })[0];\r\n $scope.getUsers($scope.selectedItem.organization, '');\r\n\r\n $scope.modal = $uibModal.open({\r\n templateUrl: 'Scripts/management/modalDataAbout.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n } else { // otherwise, start execution for logged user's organization\r\n $scope.selectedItem.organization = $scope.loggedUser.Organization;\r\n\r\n dialogService.showConfirmDialog('txtConfirmExecution', 'txtConfirmExecutionMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n $scope.startExecution();\r\n }\r\n });\r\n }\r\n\r\n break;\r\n case 'BOT_ORDER': case 'BOT_DEVIATION': case 'BOT_PROJECT':\r\n $scope.go('/orders');\r\n break;\r\n }\r\n });\r\n\r\n\r\n };\r\n\r\n $scope.setSelectedUser = function (user) {\r\n $scope.selectedItem.user = user;\r\n $scope.userFilter.Name = user.FirstName + ' ' + user.LastName;\r\n };\r\n\r\n // ------------------------- MODAL FUNCTIONS ----------------------------\r\n\r\n function userExists(user) {\r\n for (var i = 0; i < $scope.participants.length; i++)\r\n if ($scope.participants[i] && $scope.participants[i].id == user.id)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Create a new execution for the user/company that the user is on\r\n * @returns {} \r\n */\r\n $scope.startExecution = function () {\r\n ExecutionFactory.organizationId = $scope.selectedItem.organization.id;\r\n\r\n if (!!$scope.modal) $scope.modal.close();\r\n\r\n if ($scope.selectedProcessList.LimitedAccess) {\r\n\r\n getParticipants().then(function () {\r\n if ($scope.selectedItem.user)\r\n if (!userExists($scope.selectedItem.user))\r\n $scope.addParticipant($scope.selectedItem.user);\r\n if (!userExists($scope.loggedUser))\r\n $scope.addParticipant($scope.loggedUser);\r\n });\r\n } else {\r\n var foreignKey = null;\r\n if ($scope.dataAbout == 'GOT_USER') {\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.Users);\r\n foreignKey = $scope.selectedItem.user.id;\r\n } else if ($scope.dataAbout == 'GOT_ORGANIZATION') {\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.MyOrganization);\r\n foreignKey = $scope.selectedItem.organization.id;\r\n }\r\n\r\n ExecutionFactory.createExecution(foreignKey, $scope.selectedProcessList.id).$promise.then(function (result) {\r\n // redirect to execution\r\n $location.path('/managementExecution/' + foreignKey + '/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId);\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Get the list of participants and display them in the modal\r\n */\r\n var getParticipants = function () {\r\n var deferred = $q.defer();\r\n // get users for current organization\r\n getUsers().then(function () {\r\n $scope.participants = [];\r\n $scope.userFilter.Name = '';\r\n\r\n $scope.participantsModal = $uibModal.open({\r\n templateUrl: 'Scripts/management/modalExecutionParticipants.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n\r\n deferred.resolve();\r\n\r\n $scope.participantsModal.result.then(function () {\r\n\r\n if ($scope.participants && $scope.participants.length > 0) {\r\n var foreignKey = null;\r\n if ($scope.dataAbout == 'GOT_USER') {\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.Users);\r\n foreignKey = $scope.selectedItem.user.id;\r\n } else if ($scope.dataAbout == 'GOT_ORGANIZATION') {\r\n PageRouteUtilService.setCurrentPageForExecution(AllAccessPage.MyOrganization);\r\n foreignKey = $scope.selectedItem.organization.id;\r\n }\r\n\r\n ExecutionFactory.createExecution(foreignKey, $scope.selectedProcessList.id, $scope.participants).$promise.then(function (result) {\r\n // redirect to execution\r\n $location.path('/managementExecution/' + foreignKey + '/' + result.CreateExecutionResult.InitiatedProcessList.InitiatedId);\r\n });\r\n }\r\n });\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n $scope.disableStartExecution = function () {\r\n if ($scope.dataAbout == 'GOT_USER') {\r\n if ($scope.selectedItem.user == null) return true;\r\n } else if ($scope.dataAbout == 'GOT_ORGANIZATION') {\r\n if ($scope.selectedItem.organization == null) return true;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.filterByOrganization = function (user) {\r\n if (!!$scope.selectedItem.organization) {\r\n return user.Organization.id == $scope.selectedItem.organization.id;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.notYetSelected = function (user) {\r\n return ($filter('filter')($scope.participants, { id: user.id })) <= 0;\r\n };\r\n\r\n $scope.addParticipant = function (user) {\r\n $scope.participants.push(user);\r\n };\r\n\r\n $scope.removeParticipant = function (user) {\r\n var index = $scope.participants.indexOf(user);\r\n if (index > -1) {\r\n $scope.participants.splice(index, 1);\r\n }\r\n };\r\n\r\n // --------------------- END OF MODAL FUNCTIONS -------------------------\r\n\r\n /**\r\n * Filter those lists that belong to the 'mode' that is provided\r\n */\r\n function modeFiltration() {\r\n var pls = [];\r\n allProcessLists.forEach(function (pl) {\r\n //this can be expanded for future use if a function is provided for equality check.\r\n if (pl.Categories && pl.Categories[0] && checkForCategory(pl.Categories[0] || [], mode, mode === 'Utførelse'))\r\n pls.push(pl);\r\n });\r\n return pls;\r\n }\r\n\r\n function checkForCategory(arr, val, isLike) {\r\n return arr.some(function (arrVal) {\r\n if (isLike)\r\n return arrVal.Name === val;\r\n else\r\n return arrVal.Name !== val;\r\n });\r\n }\r\n\r\n /**\r\n * Filter the lists by the selected category\r\n */\r\n var filterByCategory = function () {\r\n if (mode) {\r\n var pls = modeFiltration();\r\n mode = undefined;\r\n return pls;\r\n } else {\r\n var categoryFilteredProcessList = [];\r\n\r\n for (var i = 0; i < allProcessLists.length; i++) {\r\n allProcessLists[i].pushToList = false;\r\n if ($scope.selectedCategories[0])\r\n if (($filter('filter')(allProcessLists[i].Categories[0], { id: $scope.selectedCategories[0].id })).length > 0) {\r\n allProcessLists[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n\r\n if ($scope.selectedCategories[1])\r\n if (($filter('filter')(allProcessLists[i].Categories[1], { id: $scope.selectedCategories[1].id })).length > 0) {\r\n allProcessLists[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n if ($scope.selectedCategories[2])\r\n if (($filter('filter')(allProcessLists[i].Categories[2], { id: $scope.selectedCategories[2].id })).length > 0) {\r\n allProcessLists[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n if (allProcessLists[i].pushToList)\r\n categoryFilteredProcessList.push(allProcessLists[i]);\r\n }\r\n\r\n return categoryFilteredProcessList;\r\n }\r\n };\r\n\r\n /**\r\n * Filter te executions by the selected category\r\n */\r\n var filterExecutionsByCategory = function () {\r\n var filteredExecutions = [];\r\n\r\n for (var i = 0; i < allExecutions.length; i++) {\r\n allExecutions[i].pushToList = false;\r\n if (!allExecutions[i].InitiatedProcessList.Categories) continue;\r\n if ($scope.selectedCategories[0])\r\n if (($filter('filter')(allExecutions[i].InitiatedProcessList.Categories[0], { id: $scope.selectedCategories[0].id })).length > 0) {\r\n allExecutions[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n\r\n if ($scope.selectedCategories[1])\r\n if (($filter('filter')(allExecutions[i].InitiatedProcessList.Categories[1], { id: $scope.selectedCategories[1].id })).length > 0) {\r\n allExecutions[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n if ($scope.selectedCategories[2])\r\n if (($filter('filter')(allExecutions[i].InitiatedProcessList.Categories[2], { id: $scope.selectedCategories[2].id })).length > 0) {\r\n allExecutions[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n if (allExecutions[i].pushToList)\r\n filteredExecutions.push(allExecutions[i]);\r\n }\r\n return filteredExecutions;\r\n };\r\n\r\n $scope.selectCategory = function (level, category) {\r\n switch (level) {\r\n case 0:\r\n $scope.selectedCategories[0] = $scope.selectedCategories[0] == category ? null : category;\r\n $scope.selectedCategories[1] = null;\r\n $scope.selectedCategories[2] = null;\r\n break;\r\n case 1:\r\n $scope.selectedCategories[1] = $scope.selectedCategories[1] == category ? null : category;\r\n $scope.selectedCategories[2] = null;\r\n break;\r\n case 2:\r\n $scope.selectedCategories[2] = $scope.selectedCategories[2] == category ? null : category;\r\n break;\r\n }\r\n\r\n $scope.processLists = filterByCategory();\r\n $scope.executions = filterExecutionsByCategory();\r\n };\r\n\r\n $scope.clearCategoryLevel = function (level) {\r\n switch (level) {\r\n case 0:\r\n $scope.selectedCategories[0] = $scope.selectedCategories[1] = $scope.selectedCategories[2] = null;\r\n break;\r\n case 1:\r\n $scope.selectedCategories[1] = $scope.selectedCategories[2] = null;\r\n break;\r\n case 2:\r\n $scope.selectedCategories[2] = null;\r\n break;\r\n default:\r\n break;\r\n }\r\n $scope.processLists = filterByCategory();\r\n $scope.executions = filterExecutionsByCategory();\r\n }\r\n\r\n $scope.getCategoryBoxClass = function (level, category) {\r\n var className = \"category-box-\";\r\n className += (level + 1) + \"-\";\r\n className += category == $scope.selectedCategories[level] ? \"selected\" : \"normal\";\r\n return className;\r\n };\r\n\r\n $scope.resumeExecution = function (execution) {\r\n console.log(execution);\r\n $location.path('/managementExecution/' + execution.ForeignKey + '/' + execution.InitiatedProcessList.InitiatedId);\r\n };\r\n\r\n $scope.canShowInProgressTab = function () {\r\n return $scope.loggedUser\r\n && $scope.loggedUser.Organization.Central\r\n && ($scope.loggedUser.Group.ProgId == 'ADMIN' || $scope.loggedUser.Group.ProgId == 'MANAGER');\r\n };\r\n\r\n $scope.changeProcessListsOrder = function (orderBy) {\r\n if (orderBy != $scope.predicateProcessLists) {\r\n $scope.predicateProcessLists = orderBy;\r\n ProcessListFactory.predicateProcessList = orderBy;\r\n } else {\r\n $scope.reverseProcessLists = !$scope.reverseProcessLists;\r\n ProcessListFactory.reverseProcessList = $scope.reverseProcessLists;\r\n }\r\n\r\n allProcessLists = $filter('orderBy')(allProcessLists, ProcessListFactory.predicateProcessList, ProcessListFactory.reverseProcessList);\r\n\r\n $scope.processLists = filterByCategory();\r\n };\r\n\r\n $scope.changeExecutionsOrder = function (orderBy) {\r\n if (orderBy != $scope.predicateExecutions) {\r\n $scope.predicateExecutions = orderBy;\r\n } else {\r\n $scope.reverseExecutions = !$scope.reverseExecutions;\r\n }\r\n\r\n allExecutions = $filter('orderBy')(allExecutions, $scope.predicateExecutions, $scope.reverseExecutions);\r\n\r\n $scope.executions = filterExecutionsByCategory();\r\n };\r\n\r\n\r\n\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n MenuController.$inject = [\r\n '$scope',\r\n 'menuService',\r\n '$location',\r\n '$uibModal',\r\n 'F5ReportFactory',\r\n '$timeout',\r\n 'sessionInformationService',\r\n '$localStorage',\r\n 'OrderFactory',\r\n '$rootScope',\r\n '$window',\r\n '$sessionStorage'\r\n ];\r\n\r\n angular.module('menu').controller('MenuController', MenuController);\r\n\r\n function MenuController(\r\n $scope,\r\n menuService,\r\n $location,\r\n $uibModal,\r\n F5ReportFactory,\r\n $timeout,\r\n sessionInformationService,\r\n $localStorage,\r\n OrderFactory,\r\n $rootScope,\r\n $window,\r\n $sessionStorage\r\n ) {\r\n\r\n var isNavigatingFromMenu = false;\r\n $scope.menus = [];\r\n $scope.menuSelected = {};\r\n $scope.menuCollapsed = false;\r\n $scope.isProjectPage = false;\r\n $scope.isOrderPage = false;\r\n $scope.includeDeactivatedSubOrders = {\r\n value: false\r\n };\r\n $scope.isQualityPage = false;\r\n\r\n /**\r\n * Get the list of the current menus that the user has access to\r\n * @returns {} \r\n */\r\n $scope.getCurrentMenus = function () {\r\n $scope.menus = menuService.getMenus();\r\n };\r\n\r\n /**\r\n * Checks whether the given selectedMenu is equal to currentMenu\r\n * @param {} selectedMenu \r\n * @param {} currentMenu \r\n * @returns {} \r\n */\r\n $scope.isSubmenuSelected = function (selectedMenu, currentMenu) {\r\n if (currentMenu.MenuItems) {\r\n for (var i = 0; i < currentMenu.MenuItems.length; i++) {\r\n if (selectedMenu.id == currentMenu.MenuItems[i].id)\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Set the given menu as the selected one\r\n * if we are on project or quality handbook the menu will collapse to make way for the new menu that is used there\r\n * @param {} menu \r\n * @param {} isChild \r\n * @param {} event \r\n * @returns {} \r\n */\r\n $scope.setSelectedMenu = function (menu, isChild, menuItem) {\r\n if ($scope.isUrl(menu.Href)) {\r\n $window.open(menu.Href, '_blank');\r\n }\r\n else if (($scope.isProjectPage && menu.Href == '/projects') ||\r\n ($scope.isQualityPage && menu.Href == 'qualityHandbook' && _.some(['ADMIN', 'ADMIN_ALL', 'MANAGER'], function (r) { return r === sessionInformationService.getUser().Group.ProgId })) ||\r\n ($scope.isOrderPage && menu.Href === '/orders'))\r\n $scope.menuCollapsed = true;\r\n else {\r\n menuService.setSelectedMenu(menu, isChild, menuItem);\r\n $scope.go(menu.Href);\r\n }\r\n };\r\n\r\n //watch the selected menu and when it changes update it here as well\r\n $scope.$watch(function () {\r\n return menuService.getSelectedMenu();\r\n }, function (data) {\r\n $scope.menuSelected = data;\r\n });\r\n\r\n //watch the menu list (this applies mostly to shadow)\r\n $scope.$watch(function () {\r\n return menuService.getMenus();\r\n }, function (data) {\r\n $scope.menus = data;\r\n });\r\n\r\n $scope.isUrl = function (href) {\r\n return href.indexOf('http') > -1;\r\n };\r\n\r\n $scope.convertExtUrl = function (href) {\r\n if (href[0] === '/')\r\n href[0] = '';\r\n\r\n return href;\r\n };\r\n\r\n //watch for location\r\n //when on project, collapse the menu\r\n $scope.$watch(function () {\r\n return $location.$$path;\r\n }, function (data) {\r\n if (data == '/project' || data.indexOf('/project/') > -1) {\r\n $scope.isProjectPage = true;\r\n $scope.isQualityPage = false;\r\n $scope.menuCollapsed = true;\r\n $scope.isOrderPage = false;\r\n } else if (data == '/qualityHandbook' && _.some(['ADMIN', 'ADMIN_ALL', 'MANAGER'], function (r) { return r === sessionInformationService.getUser().Group.ProgId })) {\r\n $scope.isQualityPage = true;\r\n $scope.isProjectPage = false;\r\n $scope.menuCollapsed = true;\r\n $scope.isOrderPage = false;\r\n } else if (data === '/order' || data.indexOf('/order/') > -1) {\r\n $scope.isQualityPage = false;\r\n $scope.isProjectPage = false;\r\n $scope.isOrderPage = true;\r\n $scope.menuCollapsed = true;\r\n } else {\r\n $scope.isProjectPage = false;\r\n $scope.isQualityPage = false;\r\n $scope.menuCollapsed = false;\r\n $scope.isOrderPage = false;\r\n }\r\n });\r\n\r\n $scope.toggleMenu = function () {\r\n $scope.menuCollapsed = !$scope.menuCollapsed;\r\n };\r\n\r\n $scope.navigateToPage = function (menu, menuItem, password) {\r\n\r\n F5ReportFactory.checkForOrganizationActiveUsersReportPassword(password)\r\n .then(function () {\r\n $scope.setSelectedMenu(menu, true, menuItem);\r\n $scope.go(menuItem.Href);\r\n });\r\n\r\n $timeout(function () {\r\n isNavigatingFromMenu = false;\r\n }, 500);\r\n }\r\n\r\n function openPasswordModal() {\r\n\r\n //open the modal and ask for password\r\n $uibModal.open({\r\n template: '',\r\n scope: $scope\r\n })\r\n .result\r\n .then(function () { },\r\n function () {\r\n $scope.go('/home');\r\n });\r\n }\r\n\r\n $scope.goTo = function (menu, menuItem) {\r\n\r\n if (menuItem.Name !== 'Report_OrganizationActiveUsers') {\r\n $scope.setSelectedMenu(menu, true, menuItem);\r\n $scope.go(menuItem.Href);\r\n } else {\r\n\r\n // assign menu and menu item on $scope to be able to send them as arguments to navigateToPage\r\n $scope.selectedMenu = menu;\r\n $scope.selectedMenuItem = menuItem;\r\n\r\n openPasswordModal();\r\n isNavigatingFromMenu = true;\r\n }\r\n };\r\n\r\n $scope.canShowMenuItem = function (menuItem) {\r\n\r\n if (menuItem.Name !== 'Report_OrganizationActiveUsers')\r\n return true;\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (loggedUser.Group.ProgId === 'ADMIN' && loggedUser.Organization.Central)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n $scope.notifyAboutMenuItemSelection = function (menuItem) {\r\n $rootScope.$broadcast('onMenuItemSelected', menuItem);\r\n }\r\n\r\n $scope.hasLoggedUserFullAccess = function () {\r\n return sessionInformationService.hasLoggedUserFullAccess();\r\n }\r\n\r\n $scope.handleIncludeDeactivatedSubOrdersChangeFromChild = function (includeDeactivatedSubOrders) {\r\n $scope.includeDeactivatedSubOrders.value = includeDeactivatedSubOrders;\r\n }\r\n\r\n //watch if we are on order page\r\n $scope.$watch('isOrderPage', function () {\r\n $sessionStorage.isOrderPage = $scope.isOrderPage;\r\n\r\n // reset includeDeactivatedSubOrders when leaving order page\r\n if (!$scope.isOrderPage) {\r\n $scope.includeDeactivatedSubOrders.value = false;\r\n }\r\n\r\n });\r\n //watch if we are on project page\r\n $scope.$watch('isProjectPage', function () {\r\n $sessionStorage.isProjectPage = $scope.isProjectPage;\r\n });\r\n //watch if we are on quality page\r\n $scope.$watch('isQualityPage', function () {\r\n $sessionStorage.isQualityPage = $scope.isQualityPage;\r\n });\r\n //watch for when the menu collapses\r\n $scope.$watch('menuCollapsed', function () {\r\n $sessionStorage.menuCollapsed = $scope.menuCollapsed;\r\n });\r\n\r\n $scope.$watch(function () {\r\n return OrderFactory.mainOrder;\r\n }, function (newValue, oldValue) {\r\n\r\n if (newValue && newValue !== oldValue) {\r\n $scope.order = newValue;\r\n }\r\n\r\n }, true);\r\n\r\n $scope.$on('$routeChangeStart',\r\n function (event, next, current) {\r\n\r\n // if the next page is organization active users, stop the navigation if it is not made from the menu\r\n if (next.pathParams &&\r\n next.pathParams.reportProgid &&\r\n next.pathParams.reportProgid === 'Report_OrganizationActiveUsers') {\r\n\r\n if (!isNavigatingFromMenu)\r\n event.preventDefault();\r\n }\r\n });\r\n\r\n $scope.$on('onOrderTabSelectedFromProjectDetailsPage', function (event) {\r\n\r\n $scope.isOrderTabFromProjectPage = true;\r\n event.preventDefault();\r\n });\r\n\r\n $scope.$on('onOrderTabDeselectedFromProjectDetailsPage', function (event) {\r\n\r\n $scope.isOrderTabFromProjectPage = false;\r\n event.preventDefault();\r\n });\r\n };\r\n\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('menu').service('titleService', titleService);\r\n /**\r\n * Service that handles the title changes\r\n */\r\n function titleService() {\r\n var title = \"\";\r\n var infoText = \"\";\r\n\r\n return {\r\n changeTitle: function (theTitle) {\r\n title = theTitle;\r\n },\r\n\r\n getTitle: function () {\r\n return title;\r\n },\r\n\r\n changeInfoText: function (theInfoText) {\r\n infoText = theInfoText;\r\n },\r\n\r\n getInfoText: function () {\r\n return infoText;\r\n }\r\n };\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n menuService.$inject = [\r\n 'searchService',\r\n '$localStorage',\r\n 'TabUtilService'\r\n ];\r\n\r\n angular.module('menu').service('menuService', menuService);\r\n\r\n function menuService(\r\n searchService,\r\n $localStorage,\r\n TabUtilService\r\n ) {\r\n var selectedMenu;\r\n var selectedMenuItem;\r\n var userMenus;\r\n\r\n return {\r\n /**\r\n * Stores any given list of menus. Menus are stored in session storage as well\r\n * @param {} menus \r\n * @returns {} \r\n */\r\n setMenus: function (menus) {\r\n for (var i = 0; i < menus.length; i++) {\r\n if (!menus[i].MenuItems || menus[i].MenuItems.length == 0)\r\n delete menus[i].MenuItems;\r\n else {\r\n // set the current menu's item href equal to the first one in the child list\r\n menus[i].Href = _.first(menus[i].MenuItems).Href;\r\n }\r\n }\r\n\r\n //$cookieStore.put(\"Menus\", menus);\r\n $localStorage.Menus = menus;\r\n userMenus = menus;\r\n },\r\n\r\n /**\r\n * Return the list of menus\r\n * @returns {} \r\n */\r\n getMenus: function () {\r\n if (!userMenus) {\r\n // userMenus = $cookieStore.get(\"Menus\");\r\n userMenus = $localStorage.Menus;\r\n if (userMenus)\r\n this.setMenus(userMenus);\r\n }\r\n return userMenus;\r\n },\r\n\r\n /**\r\n * Sets the given menu as selected\r\n * @param {} menu \r\n * @param {} isChild \r\n * @returns {} \r\n */\r\n setSelectedMenu: function (menu, isChild, menuItem) {\r\n if (isChild || (menu.Href && menu.Href.indexOf('http') == -1)) {\r\n //$cookieStore.put(\"SelectedMenu\", menu);\r\n $localStorage.SelectedMenu = menu;\r\n $localStorage.SelectedMenuItem = menuItem;\r\n\r\n if (selectedMenu && selectedMenu.id != menu.id) {\r\n searchService.clearSearch();\r\n TabUtilService.clearConfiguration();\r\n }\r\n selectedMenu = menu;\r\n selectedMenuItem = menuItem;\r\n }\r\n },\r\n\r\n /**\r\n * Get the current selected menu\r\n * @returns {} \r\n */\r\n getSelectedMenu: function () {\r\n if (!selectedMenu) {\r\n //selectedMenu = $cookieStore.get(\"SelectedMenu\");\r\n selectedMenu = $localStorage.SelectedMenu;\r\n selectedMenuItem = $localStorage.SelectedMenuItem;\r\n if (selectedMenu)\r\n this.setSelectedMenu(selectedMenu, true, selectedMenuItem);\r\n }\r\n return selectedMenu;\r\n },\r\n\r\n getSelectedMenuItem: function () {\r\n if (!selectedMenuItem)\r\n selectedMenuItem = $localStorage.SelectedMenuItem;\r\n\r\n return selectedMenuItem || selectedMenu;\r\n },\r\n\r\n /**\r\n * Get a menu by the href provided\r\n * @param {} href \r\n * @returns {} \r\n */\r\n getMenuByHref: function (href) {\r\n if (userMenus && userMenus.length > 0) {\r\n var root = href.split(\"/\");\r\n\r\n for (var i = 0; i < userMenus.length; i++) {\r\n if (userMenus[i].Href != '') {\r\n if (userMenus[i].Href.toLowerCase().indexOf(root[1].toLowerCase()) > -1)\r\n return userMenus[i];\r\n } else if (userMenus[i].MenuItems)\r\n for (var j = 0; j < userMenus[i].MenuItems.length; j++)\r\n if (userMenus[i].MenuItems[j].Href.toLowerCase().indexOf(root[1].toLowerCase()) > -1)\r\n return userMenus[i].MenuItems[j];\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * Get the parent meny by the href provided\r\n * @param {} href \r\n * @returns {} \r\n */\r\n getParentMenuByHref: function (href) {\r\n\r\n var menuName = _.last(_.split(href, '/'));\r\n\r\n if (_.isEmpty(menuName))\r\n return null;\r\n\r\n menuName = menuName.toLowerCase();\r\n\r\n for (var i = 0; i < userMenus.length; i++) {\r\n var menu = userMenus[i];\r\n\r\n if (_.isEmpty(menu.MenuItems)) {\r\n if (menu.Href.toLowerCase().indexOf(menuName) > -1)\r\n return menu;\r\n }\r\n else {\r\n var exists = _.some(menu.MenuItems, m => m.Href.toLowerCase().indexOf(menuName) > -1)\r\n\r\n if (!!exists)\r\n return menu;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n /**\r\n * Checks whether the current user has access to the given menu\r\n * @param {} requiredMenu \r\n * @returns {} \r\n */\r\n checkMenuAccess: function (requiredMenu) {\r\n var menuName = _.last(_.split(requiredMenu, '/'));\r\n\r\n if (_.isEmpty(menuName))\r\n return false;\r\n\r\n menuName = menuName.toLowerCase();\r\n\r\n for (var i = 0; i < userMenus.length; i++) {\r\n var menu = userMenus[i];\r\n\r\n if (_.isEmpty(menu.MenuItems)) {\r\n if (menu.Href.toLowerCase().indexOf(menuName) > -1)\r\n return true;\r\n } else {\r\n var hasAccess = _.some(menu.MenuItems, m => m.Href.toLowerCase().indexOf(menuName) > -1);\r\n\r\n if (!!hasAccess)\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n };\r\n };\r\n\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n snapService.$inject = [\r\n '$location'\r\n ];\r\n\r\n angular.module('menu').service('snapService', snapService);\r\n /**\r\n * Service that handles the resize of the menu. \r\n * @param {any} $location\r\n */\r\n function snapService($location) {\r\n var isSnapOpen = false;\r\n return {\r\n setSnap: function () {\r\n //if we are on the project page, qh page or order page do not close the snap\r\n if ($location.$$path.indexOf('/project/') > -1 ||\r\n $location.$$path.indexOf('/qualityHandbook') > -1 ||\r\n $location.$$path.indexOf('/order/') > -1) {\r\n\r\n isSnapOpen = false;\r\n return;\r\n }\r\n isSnapOpen = !isSnapOpen;\r\n },\r\n\r\n getSnap: function () {\r\n return isSnapOpen;\r\n }\r\n };\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('menu').service('searchService', searchService);\r\n /**\r\n * Service that handles the search inputs and stores what the user has searched.\r\n * If the user navigates away from the page (like from Orders to Customers) the search is cleared\r\n */\r\n function searchService() {\r\n var search = { text: null, fromDate: null, toDate: null, currentTabId: null, Organization: null };\r\n var categoryFilter = { category: null, category2: null, category3: null };\r\n var productSearch = { text: null, ProductCatalog: {}, Provider: {}, NRF: null, keywords: [], organization: null };\r\n return {\r\n /**\r\n * Set the info for the general search\r\n * @param {} freeText \r\n * @param {} fromDate \r\n * @param {} toDate \r\n * @param {} currentTabId \r\n * @param {} currentSecondLevelTabId \r\n * @returns {} \r\n */\r\n setSearch: function (freeText, fromDate, toDate, currentTabId, currentSecondLevelTabId) {\r\n search.text = freeText;\r\n search.fromDate = fromDate;\r\n search.toDate = toDate;\r\n search.currentTabId = currentTabId;\r\n search.currentSecondLevelTabId = currentSecondLevelTabId;\r\n },\r\n\r\n /**\r\n * Set the search for list categories\r\n * @param {} category \r\n * @returns {} \r\n */\r\n setCategoryFilter: function (category) {\r\n categoryFilter = category;\r\n },\r\n\r\n /**\r\n * Return the selected category\r\n * @returns {} \r\n */\r\n getCategoryFilter: function () {\r\n return categoryFilter;\r\n },\r\n\r\n /**\r\n * Get the whole search object\r\n * @returns {} \r\n */\r\n getSearch: function () {\r\n return search;\r\n },\r\n\r\n /**\r\n * Get only the search text\r\n * @returns {} \r\n */\r\n getSearchText: function () {\r\n return search.text;\r\n },\r\n\r\n /**\r\n * Clear the search\r\n * @returns {} \r\n */\r\n clearSearch: function () {\r\n search = { text: null, fromDate: null, toDate: null, currentTabId: null, Organization: null };\r\n categoryFilter = { category: null, category2: null, category3: null };\r\n productSearch = { text: null, ProductCatalog: {}, Provider: {}, NRF: null, keywords: [], organization: null };\r\n },\r\n\r\n /**\r\n * Set the product search\r\n * @param {} search \r\n * @returns {} \r\n */\r\n setProductSearch: function (search) {\r\n productSearch = search;\r\n },\r\n\r\n /**\r\n * Return the product serach\r\n * @returns {} \r\n */\r\n getProductSearch: function () {\r\n return productSearch;\r\n }\r\n };\r\n };\r\n\r\n\r\n})();","//TODO: this should be removed\r\n(function () {\r\n 'use strict';\r\n\r\n MenuFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('menu').factory('MenuFactory', MenuFactory);\r\n\r\n function MenuFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var menuFactory = {};\r\n\r\n //var CurrentMenus = $resource(baseUrlService.getBaseUrl() + 'REST/Menu.svc/CurrentMenus');\r\n //var AllMenus = $resource(baseUrlService.getBaseUrl() + 'REST/Menu.svc/AllMenus');\r\n\r\n //menuFactory.getCurrentMenus = function() {\r\n // return CurrentMenus.query();\r\n //};\r\n\r\n //menuFactory.getAllMenus = function () {\r\n // return AllMenus.query();\r\n //};\r\n\r\n return menuFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n menuItemFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource',\r\n '_'\r\n ];\r\n\r\n function menuItemFactory(\r\n baseUrlService,\r\n $resource,\r\n _\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var DemoContentForMenuItem = $resource(baseUrl + 'REST/Menu.svc/DemoContent');\r\n var MenuItems = $resource(baseUrl + 'REST/Menu.svc/AllMenuItems');\r\n\r\n function saveDemoContentForMenuItem(demoContent, menuItemId) {\r\n\r\n return DemoContentForMenuItem.save({\r\n menuItemId: menuItemId\r\n }, demoContent).$promise;\r\n }\r\n\r\n function getAllMenuItems(excludeCentralOnlyItems) {\r\n\r\n if (_.isNil(excludeCentralOnlyItems)) {\r\n excludeCentralOnlyItems = false;\r\n }\r\n\r\n return MenuItems.query({ excludeCentralOnlyItems: excludeCentralOnlyItems }).$promise;\r\n }\r\n\r\n return {\r\n saveDemoContentForMenuItem: saveDemoContentForMenuItem,\r\n getAllMenuItems: getAllMenuItems\r\n };\r\n }\r\n\r\n angular\r\n .module('menuItem')\r\n .factory('MenuItemFactory', menuItemFactory);\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n DialogController.$inject = [\r\n '$scope',\r\n '$uibModalInstance',\r\n 'dialogTitle',\r\n 'dialogMessages',\r\n 'dialogButtons',\r\n 'dialogInputs',\r\n 'showWarningIcon',\r\n '_'\r\n ];\r\n\r\n angular.module('message').controller('DialogController', DialogController);\r\n /**\r\n * Controller that handles the dialog modal\r\n */\r\n function DialogController(\r\n $scope,\r\n $uibModalInstance,\r\n dialogTitle,\r\n dialogMessages,\r\n dialogButtons,\r\n dialogInputs,\r\n showWarningIcon,\r\n _\r\n ) {\r\n\r\n $scope.dialogTitle = dialogTitle;\r\n $scope.dialogMessages = dialogMessages;\r\n $scope.dialogButtons = dialogButtons;\r\n $scope.dialogInputs = dialogInputs;\r\n $scope.showWarningIcon = showWarningIcon;\r\n\r\n /**\r\n * Close the modal instance\r\n * @param {} button \r\n * @returns {} \r\n */\r\n $scope.onButtonClick = function (button) {\r\n if (!$scope.dialogInputs || $scope.dialogInputs.length == 0)\r\n $uibModalInstance.close(button);\r\n else if ($scope.dialogInputs && button.id == 1)\r\n $uibModalInstance.close({ button: button });\r\n else if (!isAnyInputEmpty())\r\n $uibModalInstance.close({ button: button, inputs: $scope.dialogInputs });\r\n };\r\n\r\n function isAnyInputEmpty() {\r\n return _.some($scope.dialogInputs, function (e) { return !e.model });\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n dialogService.$inject = [\r\n '$uibModal',\r\n '$q',\r\n '$filter'\r\n ];\r\n\r\n angular.module('message').service('dialogService', dialogService);\r\n\r\n function dialogService(\r\n $uibModal,\r\n $q,\r\n $filter\r\n ) {\r\n\r\n /**\r\n * Display a basic dialog modal\r\n * @param {any} title\r\n * @param {any} messages\r\n * @param {any} buttons\r\n * @param {any} size\r\n */\r\n function showDialog(title, messages, buttons, size, inputs, showWarningIcon) {\r\n var modal = $uibModal.open({\r\n templateUrl: 'Scripts/message/dialogTemplate.html',\r\n size: size,\r\n controller: 'DialogController',\r\n resolve: {\r\n dialogTitle: function () { return title; },\r\n dialogMessages: function () { return messages; },\r\n dialogButtons: function () { return buttons; },\r\n dialogInputs: function () { return inputs; },\r\n showWarningIcon: function () { return showWarningIcon; }\r\n }\r\n });\r\n\r\n return modal.result;\r\n }\r\n\r\n /**\r\n * Create a list of buttons with an unique id and text\r\n * @param {any} buttonValues\r\n */\r\n function createButtons(buttonValues) {\r\n var buttons = [];\r\n\r\n for (var i = 0; i < buttonValues.length; i++) {\r\n buttons[i] = { id: i, text: buttonValues[i] };\r\n }\r\n\r\n return buttons;\r\n }\r\n\r\n /**\r\n * Creates a list of messages to be displayed\r\n * Messages are translated as well\r\n * @param {any} message\r\n */\r\n function parseMessage(message) {\r\n var messageList = [];\r\n\r\n if (message instanceof Array) {\r\n for (var i = 0; i < message.length; i++) {\r\n messageList.push($filter('translate')(message[i]));\r\n }\r\n } else {\r\n messageList = [$filter('translate')(message)];\r\n }\r\n\r\n return messageList;\r\n }\r\n\r\n // modal dialog size constants\r\n this.DIALOG_SIZE_LARGE = 'lg';\r\n this.DIALOG_SIZE_MEDIUM = 'md';\r\n this.DIALOG_SIZE_SMALL = 'sm';\r\n\r\n // modal dialog result constants\r\n var DIALOG_RESULT_OK = this.DIALOG_RESULT_OK = 'OK';\r\n var DIALOG_RESULT_CANCEL = this.DIALOG_RESULT_CANCEL = 'CANCEL';\r\n\r\n // alert dialog: has an OK button\r\n // the response is DIALOG_RESULT_OK\r\n this.showAlertDialog = function (title, message, size, showWarningIcon) {\r\n var deferred = $q.defer();\r\n\r\n var title = $filter('translate')(title);\r\n var message = parseMessage(message);\r\n var okButton = $filter('translate')('txtOK');\r\n\r\n showDialog(title, message, createButtons([okButton]), size || this.DIALOG_SIZE_MEDIUM, [], showWarningIcon).then(function (selectedButton) {\r\n if (selectedButton.id == 0) {\r\n deferred.resolve(DIALOG_RESULT_OK);\r\n }\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n // confirm dialog: has an OK button and a CANCEL button\r\n // the response is either DIALOG_RESULT_OK or DIALOG_RESULT_CANCEL\r\n this.showConfirmDialog = function (title, message, size, showWarningIcon, okButtonText, cancelButtonText) {\r\n var deferred = $q.defer();\r\n\r\n var title = $filter('translate')(title);\r\n var message = parseMessage(message);\r\n var okButton = $filter('translate')(!!okButtonText ? okButtonText : 'txtYes');\r\n var cancelButton = $filter('translate')(!!cancelButtonText ? cancelButtonText : 'txtNo');\r\n\r\n showDialog(title, message, createButtons([okButton, cancelButton]), size || this.DIALOG_SIZE_MEDIUM, [], showWarningIcon).then(function (selectedButton) {\r\n if (selectedButton.id == 0) {\r\n deferred.resolve(DIALOG_RESULT_OK);\r\n } else if (selectedButton.id == 1) {\r\n deferred.resolve(DIALOG_RESULT_CANCEL);\r\n }\r\n }).finally(function () {\r\n deferred.resolve();\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n // custom dialog: has a list of custom buttons\r\n // the response is the id (position) of the selected button\r\n this.showCustomDialog = function (title, message, buttons, size, showWarningIcon) {\r\n var deferred = $q.defer();\r\n\r\n var title = $filter('translate')(title);\r\n var message = parseMessage(message);\r\n\r\n for (var i = 0; i < buttons.length; i++) {\r\n buttons[i] = $filter('translate')(buttons[i]);\r\n }\r\n\r\n showDialog(title, message, createButtons(buttons), size || this.DIALOG_SIZE_MEDIUM, [], showWarningIcon).then(function (selectedButon) {\r\n deferred.resolve(selectedButon.id);\r\n }).finally(function () {\r\n deferred.resolve();\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n this.showDialogWithInputs = function (title, message, size, inputs, showWarningIcon) {\r\n var deferred = $q.defer();\r\n var title = $filter('translate')(title);\r\n var message = parseMessage(message);\r\n var okButton = $filter('translate')('txtOK');\r\n var cancelButton = $filter('translate')('txtCancel');\r\n\r\n showDialog(title, message, createButtons([okButton, cancelButton]), size || this.DIALOG_SIZE_MEDIUM, inputs, showWarningIcon)\r\n .then(function (result) {\r\n if (result.button.id == 0) {\r\n deferred.resolve({ result: DIALOG_RESULT_OK, inputs: result.inputs });\r\n } else if (result.button.id == 1) {\r\n deferred.resolve({ result: DIALOG_RESULT_CANCEL });\r\n }\r\n }).finally(function () {\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n MessageController.$inject = [\r\n '$scope',\r\n '$timeout',\r\n 'errorService',\r\n 'infoService'\r\n ];\r\n\r\n angular.module('message').controller('MessageController', MessageController);\r\n\r\n function MessageController(\r\n $scope,\r\n $timeout,\r\n errorService,\r\n infoService\r\n ) {\r\n $scope.alerts = [];\r\n\r\n //watch for any error messages and display them\r\n //todo: not always firing\r\n $scope.$watch(function () {\r\n return errorService.getError().errorMessage;\r\n }, function (data) {\r\n $scope.error = errorService.getError();\r\n if ($scope.error.hasError) {\r\n var alert = ({ type: 'danger', message: $scope.error.errorMessage });\r\n $scope.alerts.push(alert);\r\n $scope.removeAlertOnTimeout(alert, 15);\r\n }\r\n else {\r\n for (var i = 0; i < $scope.alerts.length; i++) {\r\n if ($scope.alerts[i].type == 'danger') {\r\n $scope.alerts.splice(i, 1);\r\n }\r\n }\r\n }\r\n });\r\n\r\n //watch for any info messages and display them\r\n //todo: not always showing\r\n $scope.$watch(function () {\r\n return infoService.getInfo().infoMessage;\r\n }, function (data) {\r\n $scope.info = infoService.getInfo();\r\n if ($scope.info.hasInfo) {\r\n var alert = { type: 'success', message: $scope.info.infoMessage };\r\n $scope.alerts.push(alert);\r\n $scope.removeAlertOnTimeout(alert, 10);\r\n }\r\n });\r\n\r\n /**\r\n * Remove the message after a given timeout\r\n * @param {} alert \r\n * @param {} timeoutSeconds \r\n * @returns {} \r\n */\r\n $scope.removeAlertOnTimeout = function (alert, timeoutSeconds) {\r\n $timeout(function () {\r\n var index = $scope.alerts.indexOf(alert);\r\n if (index != -1) {\r\n $scope.alerts.splice(index, 1);\r\n\r\n switch (alert.type) {\r\n case 'danger':\r\n errorService.clearError();\r\n break;\r\n case 'success':\r\n infoService.clearInfo();\r\n break;\r\n default:\r\n }\r\n }\r\n }, timeoutSeconds * 1000);\r\n };\r\n\r\n /**\r\n * Manually close an alert at a given index\r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.closeAlert = function (index) {\r\n $scope.alerts.splice(index, 1);\r\n var hasInfo = false;\r\n var hasError = false;\r\n for (var i = 0; i < $scope.alerts.length; i++) {\r\n if ($scope.alerts[i].type == 'success') {\r\n hasInfo = true;\r\n }\r\n else {\r\n hasError = true;\r\n }\r\n }\r\n if (hasInfo == false) {\r\n infoService.clearInfo();\r\n }\r\n if (hasError == false) {\r\n errorService.clearError();\r\n }\r\n };\r\n };\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n\r\n errorService.$inject = [\r\n '$filter'\r\n ];\r\n\r\n angular.module('message').service('errorService', errorService);\r\n /**\r\n * Service that handles the errors\r\n */\r\n function errorService($filter) {\r\n var error = {};\r\n error.hasError = false;\r\n error.isForbbiden = false;\r\n error.errorMessage = \"\";\r\n\r\n return {\r\n /**\r\n * Change the error with the given message\r\n * @param {} message \r\n * @returns {} \r\n */\r\n changeError: function (message) {\r\n error.hasError = true;\r\n error.errorMessage = message;\r\n },\r\n\r\n /**\r\n * Clear any errors\r\n * @returns {} \r\n */\r\n clearError: function () {\r\n if (error.isForbbiden == false) {\r\n error.hasError = false;\r\n error.errorMessage = \"\";\r\n }\r\n },\r\n\r\n /**\r\n * Get the current error\r\n * @returns {} \r\n */\r\n getError: function () {\r\n return error;\r\n },\r\n\r\n /**\r\n * Set the error as a forbidden error\r\n * @param {} value \r\n * @returns {} \r\n */\r\n setErrorForbidden: function (value) {\r\n error.isForbbiden = value;\r\n },\r\n\r\n /**\r\n * Set the No access error\r\n * @returns {} \r\n */\r\n setNoRightError: function () {\r\n this.changeError($filter('translate')(\"txtNoRights\"));\r\n }\r\n };\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('message').service('infoService', infoService);\r\n /**\r\n * Service that handles the info messages\r\n */\r\n function infoService() {\r\n var info = {};\r\n info.hasInfo = false;\r\n info.infoMessage = \"\";\r\n\r\n return {\r\n /**\r\n * Change the current message\r\n * @param {} message \r\n * @returns {} \r\n */\r\n changeInfo: function (message) {\r\n info.hasInfo = true;\r\n info.infoMessage = message;\r\n },\r\n /**\r\n * Clear the info message\r\n * @returns {} \r\n */\r\n clearInfo: function () {\r\n info.hasInfo = false;\r\n info.infoMessage = \"\";\r\n },\r\n\r\n /**\r\n * Retrieve the current info\r\n * @returns {} \r\n */\r\n getInfo: function () {\r\n return info;\r\n }\r\n };\r\n };\r\n})();","(function() {\r\n 'use strict';\r\n\r\n notificationFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function notificationFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n var MyNotifications = $resource(baseUrl + 'REST/NotificationData.svc/MyNotifications');\r\n var MarkNotificationAsSeen = $resource(baseUrl + 'REST/NotificationData.svc/MarkNotificationAsSeen');\r\n var NotificationMessages = $resource(baseUrl + 'REST/NotificationData.svc/NotificationMessages');\r\n var MarkNotificationsAsSeen = $resource(baseUrl + 'REST/NotificationData.svc/MarkNotificationsAsSeen');\r\n var Notification = $resource(baseUrl + 'REST/NotificationData.svc/Notification/:notificationId');\r\n\r\n function getMyNotifications() {\r\n return MyNotifications.query().$promise;\r\n }\r\n\r\n function markNotificationAsSeen(notificationId) {\r\n return MarkNotificationAsSeen.save({ notificationId: notificationId}).$promise;\r\n }\r\n\r\n function getNotificationMessages(foreignKey, table) {\r\n return NotificationMessages.query({\r\n foreignKey: foreignKey,\r\n table: table\r\n }).$promise;\r\n }\r\n\r\n function markNotificationsAsSeen(notifications) {\r\n return MarkNotificationsAsSeen.save(notifications).$promise;\r\n }\r\n\r\n function getNotificationById(notificationId) {\r\n return Notification.get({ notificationId: notificationId}).$promise;\r\n }\r\n\r\n return {\r\n getMyNotifications: getMyNotifications,\r\n markNotificationAsSeen: markNotificationAsSeen,\r\n getNotificationMessages: getNotificationMessages,\r\n markNotificationsAsSeen: markNotificationsAsSeen,\r\n getNotificationById: getNotificationById\r\n };\r\n }\r\n\r\n angular\r\n .module('notification')\r\n .factory('NotificationFactory', notificationFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n orderDetailsService.$inject = [\r\n '_',\r\n 'orderStatuses',\r\n 'dialogService',\r\n 'sessionInformationService',\r\n 'errorService',\r\n 'OrderFactory',\r\n 'ParticipantService',\r\n 'DateUtilService'\r\n ];\r\n\r\n function orderDetailsService(\r\n _,\r\n orderStatuses,\r\n dialogService,\r\n sessionInformationService,\r\n errorService,\r\n OrderFactory,\r\n ParticipantService,\r\n DateUtilService\r\n ) {\r\n\r\n /**\r\n * Copies all the data from the parent order when adding a new suborder\r\n * @param order\r\n * @returns\r\n */\r\n function copyOrderData(order) {\r\n\r\n var subOrder = {};\r\n\r\n if (order) {\r\n subOrder.Active = true;\r\n subOrder.Building = angular.copy(order.Building);\r\n subOrder.Comment = angular.copy(order.Comment);\r\n subOrder.CreatedDate = angular.copy(order.CreatedDate);\r\n subOrder.Customer = angular.copy(order.Customer);\r\n subOrder.CustomerContact = angular.copy(order.CustomerContact);\r\n subOrder.CustomerReference = angular.copy(order.CustomerReference);\r\n subOrder.Description = angular.copy(order.Description);\r\n subOrder.EndDate = angular.copy(order.EndDate);\r\n subOrder.InternalNote = angular.copy(order.InternalNote);\r\n subOrder.InternalOrder = angular.copy(order.InternalOrder);\r\n subOrder.InvoiceCustomer = angular.copy(order.InvoiceCustomer);\r\n subOrder.IsTask = angular.copy(order.IsTask);\r\n subOrder.IsVisibleInApp = angular.copy(order.IsVisibleInApp);\r\n subOrder.LastUpdatedBy = angular.copy(order.LastUpdatedBy);\r\n subOrder.LastUpdatedDate = angular.copy(order.LastUpdatedDate);\r\n subOrder.Note = angular.copy(order.Note);\r\n subOrder.Officer = angular.copy(order.Officer);\r\n subOrder.OrderDate = angular.copy(order.OrderDate);\r\n subOrder.OrderType = angular.copy(order.OrderType);\r\n subOrder.Organization = angular.copy(order.Organization);\r\n subOrder.OurReference = angular.copy(order.OurReference);\r\n subOrder.Project = angular.copy(order.Project);\r\n subOrder.SiteAddress = angular.copy(order.SiteAddress);\r\n if (subOrder.SiteAddress) {\r\n subOrder.SiteAddress.id = null;\r\n subOrder.SiteAddress.Active = true;\r\n }\r\n subOrder.SortNr = angular.copy(order.SortNr);\r\n subOrder.StartDate = angular.copy(order.StartDate);\r\n subOrder.Tag = angular.copy(order.Tag);\r\n }\r\n\r\n return subOrder;\r\n }\r\n\r\n /**\r\n * Gets the parent order for the given order\r\n * @param order\r\n * @param orders\r\n * @returns\r\n */\r\n function getParentForOrder(order, orders) {\r\n var orderToReturn = null;\r\n firstLoop:\r\n for (var i = 0; i < orders.length; i++) {\r\n var mainOrder = orders[i];\r\n\r\n if (!mainOrder.SubOrders || mainOrder.SubOrders.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < mainOrder.SubOrders.length; j++) {\r\n var subOrder = mainOrder.SubOrders[j];\r\n\r\n if (subOrder == order) {\r\n orderToReturn = mainOrder;\r\n break firstLoop;\r\n }\r\n\r\n if (subOrder.SubOrders && subOrder.SubOrders.length > 0) {\r\n orderToReturn = getParentForOrder(order, mainOrder.SubOrders);\r\n if (orderToReturn)\r\n break firstLoop;\r\n }\r\n }\r\n }\r\n\r\n return orderToReturn;\r\n }\r\n\r\n /**\r\n * Sets the order active state\r\n * @param order\r\n * @param updateChildren\r\n * @param mainOrder\r\n */\r\n function setOrderActive(order, updateChildren, mainOrder) {\r\n\r\n if (order.Active == true) {\r\n order.UpdateChildren = true;\r\n } else {\r\n order.UpdateChildren = updateChildren;\r\n }\r\n\r\n if (!(order.Active == true && updateChildren == false)) {\r\n\r\n order.Active = !order.Active;\r\n\r\n ParticipantService.convertParticipantDatesToMillisecondsForParticipants(mainOrder.Participants);\r\n\r\n return OrderFactory.saveOrder(mainOrder);\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Displays the modal and warns the user if he wants to continue\r\n * @param order\r\n */\r\n function openDisableOrderModal(mainOrder, order) {\r\n\r\n var messages = [];\r\n\r\n var modalMessage;\r\n\r\n if (order.Active) {\r\n\r\n if (order.ParentId) {\r\n modalMessage = 'ORDER_MODEL.DISABLE_SUBORDER';\r\n } else {\r\n modalMessage = 'ORDER_MODEL.DISABLE_ORDER';\r\n }\r\n\r\n } else {\r\n\r\n if (order.ParentId) {\r\n modalMessage = 'ORDER_MODEL.ENABLE_SUBORDER';\r\n } else {\r\n modalMessage = 'ORDER_MODEL.ENABLE_ORDER';\r\n }\r\n }\r\n\r\n messages.push(modalMessage);\r\n\r\n var buttons = [];\r\n buttons.push('COMMON.YES'); // button 0\r\n buttons.push('COMMON.NO'); // button 1\r\n \r\n return dialogService.showCustomDialog('txtWarning', messages, buttons).then(function (dialogResult) {\r\n if (order.Active) { // when disabling\r\n if (dialogResult == 0) { // Disable\r\n return setOrderActive(order, true, mainOrder);\r\n }\r\n } else { // when enabling\r\n if (dialogResult == 0) { // Enable\r\n return setOrderActive(order, false, mainOrder);\r\n }\r\n }\r\n\r\n return Promise.resolve();\r\n });\r\n }\r\n\r\n /**\r\n * Deselects any given order to be able to select another order\r\n * @param order\r\n */\r\n function deselectOrder(order) {\r\n\r\n if (_.isNil(order)) {\r\n return;\r\n }\r\n\r\n order.showCurrentOrder = false;\r\n\r\n if (order.SubOrders) {\r\n for (var i = 0; i < order.SubOrders.length; i++) {\r\n deselectOrder(order.SubOrders[i]);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Filters the statuses based on the given status\r\n * If the list isn't initiated the user can only change between pre-order and ready\r\n * But after it has been initiated the status can only be changed to started or done\r\n * @param statuses\r\n * @param statusProgId\r\n */\r\n function filterOrderStatuses(statuses, statusProgId) {\r\n\r\n if (_.isNil(statuses)) {\r\n return [];\r\n }\r\n\r\n if (_.isNil(statusProgId)) {\r\n return statuses;\r\n }\r\n\r\n var filteredStatusList;\r\n \r\n if (statusProgId === orderStatuses.preorder || statusProgId === orderStatuses.ready)\r\n filteredStatusList = _.filter(statuses, function (status) {\r\n return status.ProgId === orderStatuses.preorder || status.ProgId === orderStatuses.ready;\r\n });\r\n else\r\n filteredStatusList = _.filter(statuses, function (status) {\r\n return status.ProgId === orderStatuses.started || status.ProgId === orderStatuses.done;\r\n });\r\n\r\n return filteredStatusList;\r\n }\r\n\r\n function handleOrderActiveClick(mainOrder, order) {\r\n\r\n if (_.isNil(order) || _.isNil(order.id))\r\n return Promise.reject();\r\n\r\n //If the order is from cordel, do not allow the user to deactivate it\r\n if (order.OrderNumber && order.Active) {\r\n dialogService.showAlertDialog('txtWarning', 'txtDeactivateCordelOrder');\r\n return Promise.reject();\r\n }\r\n\r\n if (order.ParentId > 0 && !sessionInformationService.hasAccess('NEW_EDIT_SUBORDER')) {\r\n errorService.setNoRightError();\r\n return Promise.reject();\r\n }\r\n\r\n if (!sessionInformationService.hasAccess('NEW_EDIT_ORDER')) {\r\n errorService.setNoRightError();\r\n return Promise.reject();\r\n }\r\n\r\n return openDisableOrderModal(mainOrder, order);\r\n }\r\n\r\n\r\n /**\r\n * Checks whether the user can add a suborder\r\n * @param order\r\n * @param mainOrder\r\n * @returns\r\n */\r\n function canAddSubOrder(order, mainOrder) {\r\n\r\n // If the user doesn't have the right, just return false\r\n if (!sessionInformationService.hasAccess('NEW_EDIT_SUBORDER'))\r\n return false;\r\n\r\n if (order && order.Status && order.Status.id &&\r\n order.Active && order.OrderType && order.OrderType.id) {\r\n\r\n if (order.OrderNumber && (order.OrderNumber == '**KONTRAKT**' || order.OrderNumber == '**TILLEGG**'))\r\n return true;\r\n\r\n //var parentOrder = getParentForOrder(order, [mainOrder]);\r\n\r\n //if (order.ParentId && parentOrder && (parentOrder.OrderNumber == '**KONTRAKT**' || parentOrder.OrderNumber == '**TILLEGG**'))\r\n // return true;\r\n if (order.ParentId || order.isSubOrder)\r\n return false;\r\n if (order.Customer && order.Customer.id)\r\n return true;\r\n\r\n }\r\n return false;\r\n }\r\n\r\n function addSubOrderForOrder(order, statusToAdd) {\r\n\r\n if (!sessionInformationService.hasAccess('NEW_EDIT_SUBORDER')) {\r\n errorService.setNoRightError();\r\n return null;\r\n }\r\n\r\n var subOrder = copyOrderData(order);\r\n\r\n subOrder.Participants = [];\r\n subOrder.ParentId = order.id;\r\n subOrder.ProcessList = null;\r\n subOrder.Status = statusToAdd;\r\n subOrder.CostsAllowed = true;\r\n\r\n //must have something unique for resource planner;\r\n subOrder.key = Math.random();\r\n subOrder.OrderDate = new Date();\r\n subOrder.StartDate = new Date();\r\n subOrder.EndDate = moment(new Date()).add(1, 'hours');\r\n //subOrder.WorkingHoursStartDate = new Date();\r\n //subOrder.WorkingHoursEndDate = new Date();\r\n\r\n if (!order.SubOrders || order.SubOrders == null) {\r\n order.SubOrders = [];\r\n }\r\n\r\n if (!order.ParentId && order.SubOrders.length > 0) {\r\n order.SubOrders.splice(order.SubOrders.length - 1, 0, subOrder);\r\n } else {\r\n order.SubOrders.push(subOrder);\r\n }\r\n \r\n subOrder.isSubOrder = true;\r\n\r\n return subOrder;\r\n }\r\n\r\n function removeHierarchy(orders) {\r\n var ordersToReturn = [];\r\n\r\n for (var i = 0; i < orders.length; i++) {\r\n ordersToReturn.push(orders[i]);\r\n\r\n if (orders[i].SubOrders && orders[i].SubOrders.length > 0) {\r\n var subOrders = removeHierarchy(orders[i].SubOrders);\r\n\r\n Array.prototype.push.apply(ordersToReturn, subOrders);\r\n }\r\n }\r\n\r\n return ordersToReturn;\r\n };\r\n\r\n function sortOrderListByOrderNumber(orders, convertOrderNumber) {\r\n\r\n if (!orders || orders.length === 0) {\r\n return;\r\n }\r\n\r\n orders.sort(function(firstOrder, secondOrder) {\r\n\r\n var firstOrderExternalId =\r\n convertOrderNumber ? parseInt(firstOrder.OrderNumber) : firstOrder.OrderNumber;\r\n\r\n var secondOrderExternalId =\r\n convertOrderNumber ? parseInt(secondOrder.OrderNumber) : secondOrder.OrderNumber;\r\n\r\n // null and undefined values are treated as empty strings\r\n if (_.isNil(firstOrderExternalId)) {\r\n firstOrderExternalId = '';\r\n }\r\n\r\n if (_.isNil(secondOrderExternalId)) {\r\n secondOrderExternalId = '';\r\n }\r\n\r\n if (firstOrderExternalId < secondOrderExternalId) {\r\n return -1;\r\n }\r\n\r\n if (firstOrderExternalId > secondOrderExternalId) {\r\n return 1;\r\n }\r\n\r\n // first = second\r\n return 0;\r\n });\r\n }\r\n\r\n function sortOrderHierarchy(order) {\r\n\r\n if (!order) {\r\n return;\r\n }\r\n\r\n if (!order.SubOrders || order.SubOrders.length === 0) {\r\n return;\r\n }\r\n\r\n // get sub-orders which have a number external id\r\n var subOrdersWithNumberExternalId = order.SubOrders.filter(function(subOrder) {\r\n return !isNaN(parseInt(subOrder.OrderNumber));\r\n });\r\n\r\n sortOrderListByOrderNumber(subOrdersWithNumberExternalId, true);\r\n\r\n // get sub-orders which doesn't have a number external id\r\n var subOrdersWithoutNumberExternalId = order.SubOrders.filter(function(subOrder) {\r\n return isNaN(parseInt(subOrder.OrderNumber));\r\n });\r\n\r\n sortOrderListByOrderNumber(subOrdersWithoutNumberExternalId, false);\r\n \r\n // re-concat the sub-order lists\r\n order.SubOrders = subOrdersWithoutNumberExternalId.concat(subOrdersWithNumberExternalId);\r\n \r\n order.SubOrders.forEach(function(subOrder) {\r\n sortOrderHierarchy(subOrder);\r\n });\r\n }\r\n\r\n function removeFromOrderSubOrdersWithEndProcessList(order, startAndEndProcessLists) {\r\n\r\n if (!order) {\r\n return [];\r\n }\r\n\r\n if (!order.SubOrders || order.SubOrders.length === 0) {\r\n return [];\r\n }\r\n\r\n if (!order.ProcessList) {\r\n return [];\r\n }\r\n\r\n if (!startAndEndProcessLists || startAndEndProcessLists.length === 0) {\r\n return [];\r\n }\r\n\r\n if (order.ProcessList.id !== startAndEndProcessLists[0].id) {\r\n return [];\r\n }\r\n\r\n var endProcessList = startAndEndProcessLists[1];\r\n\r\n return _.remove(order.SubOrders, function (subOrder) {\r\n\r\n var isOrderNumberEmptyString = (subOrder.OrderNumber === '');\r\n\r\n return subOrder.ProcessList && subOrder.ProcessList.id === endProcessList.id &&\r\n (_.isNil(subOrder.OrderNumber) || isOrderNumberEmptyString);\r\n });\r\n }\r\n\r\n function addOrdersToTheEndOfOrderList(ordersToAdd, orderList) {\r\n\r\n if (!ordersToAdd || ordersToAdd.length === 0) {\r\n return;\r\n }\r\n\r\n if (!orderList) {\r\n return;\r\n }\r\n\r\n ordersToAdd.forEach(function(orderToAdd) {\r\n orderList.push(orderToAdd);\r\n });\r\n }\r\n\r\n function convertOrderDateFieldsToMilliseconds(order) {\r\n\r\n if (!order) {\r\n return;\r\n }\r\n\r\n if (order.OrderDate) {\r\n // set hour, minute and second to 0 for the order to be successfully saved in Cordel\r\n var orderDate = moment(order.OrderDate).toDate();\r\n orderDate.setHours(0);\r\n orderDate.setMinutes(0);\r\n orderDate.setSeconds(0);\r\n order.OrderDate = DateUtilService.getLongWithOffset(orderDate);\r\n }\r\n\r\n if (order.StartDate) {\r\n order.StartDate = moment(order.StartDate).subtract(moment(order.StartDate).utcOffset(), 'minutes').valueOf(); // DateUtilService.getLongWithOffset(moment(order.StartDate).toDate());\r\n }\r\n\r\n if (order.EndDate) {\r\n order.EndDate = moment(order.EndDate).subtract(moment(order.EndDate).utcOffset(), 'minutes').valueOf(); // DateUtilService.getLongWithOffset(moment(order.EndDate).toDate());\r\n }\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0) {\r\n order.SubOrders.forEach(function(subOrder) {\r\n convertOrderDateFieldsToMilliseconds(subOrder);\r\n });\r\n }\r\n }\r\n\r\n return {\r\n deselectOrder: deselectOrder,\r\n filterOrderStatuses: filterOrderStatuses,\r\n handleOrderActiveClick: handleOrderActiveClick,\r\n canAddSubOrder: canAddSubOrder,\r\n addSubOrderForOrder: addSubOrderForOrder,\r\n flattenHierarchy: removeHierarchy,\r\n sortOrderHierarchy: sortOrderHierarchy,\r\n removeFromOrderSubOrdersWithEndProcessList: removeFromOrderSubOrdersWithEndProcessList,\r\n addOrdersToTheEndOfOrderList: addOrdersToTheEndOfOrderList,\r\n convertOrderDateFieldsToMilliseconds: convertOrderDateFieldsToMilliseconds\r\n };\r\n }\r\n\r\n angular\r\n .module('order')\r\n .service('OrderDetailsService', orderDetailsService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n orderTypeService.$inject = [\r\n '_'\r\n ];\r\n\r\n /**\r\n * Service which is responsible with business logic for entities of type OrderType \r\n */\r\n function orderTypeService(\r\n _\r\n ) {\r\n\r\n var serviceOrderTypeProgId = 'SERVICE';\r\n\r\n /**\r\n * From a given list of order types returns the order type which has the progid 'SERVICE'.\r\n * @param {any} orderTypes\r\n */\r\n this.getServiceOrderType = function(orderTypes) {\r\n\r\n if (!orderTypes || orderTypes.length === 0) {\r\n return null;\r\n }\r\n\r\n return _.find(orderTypes, function(orderType) {\r\n return orderType.ProgId === serviceOrderTypeProgId;\r\n });\r\n }\r\n\r\n }\r\n\r\n angular\r\n .module('order')\r\n .service('OrderTypeService', orderTypeService);\r\n\r\n})();","(function () {\r\n\r\n OrderController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$route',\r\n '$uibModal',\r\n '$filter',\r\n 'sessionInformationService',\r\n 'titleService',\r\n 'errorService',\r\n 'infoService',\r\n 'dialogService',\r\n 'menuService',\r\n 'OrderFactory',\r\n 'CustomerFactory',\r\n 'ProcessListFactory',\r\n 'ProjectFactory',\r\n 'fileReader',\r\n '$q',\r\n 'DateUtilService',\r\n 'ResourcePlannerFactory',\r\n 'ProductFactory',\r\n '$timeout',\r\n 'OrganizationUtilService',\r\n 'formChangeDetector',\r\n 'formChanges',\r\n 'OfficerFactory',\r\n '$rootScope',\r\n '_',\r\n 'OrderTypeService',\r\n 'ParticipantService',\r\n 'ParticipantDatesService',\r\n 'TabUtilService',\r\n 'OrderDetailsService'\r\n ];\r\n \r\n angular.module('order').controller('OrderController', OrderController);\r\n\r\n function OrderController(\r\n $scope,\r\n $routeParams,\r\n $route,\r\n $uibModal,\r\n $filter,\r\n sessionInformationService,\r\n titleService,\r\n errorService,\r\n infoService,\r\n dialogService,\r\n menuService,\r\n OrderFactory,\r\n CustomerFactory,\r\n ProcessListFactory,\r\n ProjectFactory,\r\n fileReader,\r\n $q,\r\n DateUtilService,\r\n ResourcePlannerFactory,\r\n ProductFactory,\r\n $timeout,\r\n OrganizationUtilService,\r\n formChangeDetector,\r\n formChanges,\r\n OfficerFactory,\r\n $rootScope,\r\n _,\r\n OrderTypeService,\r\n ParticipantService,\r\n ParticipantDatesService,\r\n TabUtilService,\r\n OrderDetailsService\r\n ) {\r\n\r\n $scope.headerHierarchyHeight = 0;\r\n\r\n if (!$scope.isProjectPage && !$scope.isFromResourcePlanner)\r\n titleService.changeTitle($filter('translate')('Orders'));\r\n\r\n var ordersMenu = menuService.getMenuByHref('/orders');\r\n if (ordersMenu && !$scope.isProjectPage && !$scope.isFromResourcePlanner)\r\n menuService.setSelectedMenu(ordersMenu);\r\n var dateChangeWarningShown = false;\r\n var markOrderEditDeregistration = null;\r\n\r\n var orderList = [];\r\n var changesMade = false;\r\n // for managing form changes for all order hierarchy\r\n $scope.entityId = 0;\r\n\r\n var isRouteReloading = false;\r\n // var originalOrder = undefined;\r\n var workingHourModal;\r\n var contactModal;\r\n var allStatuses = [];\r\n var endSubOrder;\r\n var onOrderSelectFromLeftMenuWatcher = null;\r\n var onOrderActiveClickFromLeftMenuWatcher = null;\r\n var onSubOrderAddFromLeftMenuWatcher = null;\r\n\r\n $scope.intellisense = { isCustomerOpen: false, isInvoiceCustomerOpen: false, isProcessListOpen: false, isProductOpen: false, isParticipantOpen: false, isOrderTypeOpen: false };\r\n $scope.tabs = {\r\n activeTab: 'IDENTIFICATION'\r\n };\r\n $scope.activeTab = 'IDENTIFICATION';\r\n $scope.showExecutionTab = false;\r\n $scope.resourcePlanner = {};\r\n //property used for communication between order controller and working-hour controller\r\n $scope.workingHour = {};\r\n //property used for communication between order controller and material controller\r\n $scope.material = {};\r\n //property used for communication between order controller and trip controller\r\n $scope.trip = {};\r\n //property for knowing if we are using the resource planner or the old way to add participants\r\n //the old view is always default\r\n $scope.resourcePlanner.oldPersonnel = true;\r\n $scope.orderId = $routeParams.orderId;\r\n\r\n //reset data in factory for execution\r\n OrderFactory.isExecutionEnded = false;\r\n OrderFactory.order = {};\r\n $scope.endProcessList = null;\r\n $scope.customerAddress = {\r\n copyCustomerAddress: true,\r\n customerHasAddress: true\r\n };\r\n\r\n $scope.isNavigatingToOrderListFromButton = false;\r\n $scope.isNavigatingFromCloseOrder = false;\r\n $scope.pageReady = false;\r\n\r\n $scope.setUpHeaderHeight = _.throttle(initHeaderHeight, 250, { leading: false, trailing: true });\r\n\r\n if (OrderFactory.displayCordelGetMessage) {\r\n $timeout(function () {\r\n infoService.changeInfo($filter('translate')('ORDER_MODEL.INFO.CORDEL_ORDER_RETRIEVED'));\r\n OrderFactory.displayCordelGetMessage = false;\r\n }, 100);\r\n };\r\n\r\n if (OrderFactory.displayCordelPostMessage) {\r\n $timeout(function () {\r\n infoService.changeInfo($filter('translate')('ORDER_MODEL.INFO.CORDEL_ORDER_SENT'));\r\n OrderFactory.displayCordelPostMessage = false;\r\n }, 100);\r\n };\r\n\r\n function init() {\r\n if ($scope.orderId) {\r\n\r\n var retrievedOrder;\r\n getOfficerList(getOrganizationId());\r\n $scope.currentOrder = {};\r\n\r\n return OrderFactory.getOrder($scope.orderId).$promise.then(function (result) {\r\n retrievedOrder = result;\r\n return OrderFactory.getStartAndEndProcessLists(retrievedOrder.Organization.id);\r\n })\r\n .then(function (startAndEndProcessLists) {\r\n\r\n var subOrdersWithEndProcessList\r\n = OrderDetailsService.removeFromOrderSubOrdersWithEndProcessList(retrievedOrder, startAndEndProcessLists);\r\n\r\n OrderDetailsService.sortOrderHierarchy(retrievedOrder);\r\n\r\n OrderDetailsService.addOrdersToTheEndOfOrderList(subOrdersWithEndProcessList, retrievedOrder.SubOrders);\r\n\r\n initOrder(retrievedOrder);\r\n });\r\n } else if (!$scope.isProjectPage) {\r\n $scope.order = OrderFactory.getOrderForSave();\r\n\r\n $scope.order.Organization = {};\r\n $scope.order.Organization.id = $scope.loggedUser.Organization.Central ? OrganizationUtilService.getOrganizationId() : $scope.loggedUser.Organization.id;\r\n\r\n $scope.order.entityId = $scope.entityId;\r\n $scope.order.Participants = [];\r\n $scope.order.IsVisibleInApp = true;\r\n // by default the order is connected with the resource planner.\r\n $scope.order.ConnectWithPlanner = true;\r\n $scope.order.showCurrentOrder = true;\r\n $scope.order.Active = true;\r\n $scope.currentOrder = $scope.order;\r\n $scope.currentOrder.isSubOrder = false;\r\n\r\n\r\n getStatusList();\r\n //order used for participant resource planner\r\n $scope.resourcePlanner.mainOrder = $scope.order;\r\n //must have something unique for resource planner;\r\n $scope.order.key = Math.random();\r\n // add SelectedStartDate and SelectedEndDate for manage properly DatePicker and Timepicker\r\n addDatePickerDateAttributes(orderList);\r\n\r\n fixTimezone($scope.order);\r\n // originalOrder = angular.copy($scope.order);\r\n formChanges.setEntityId($scope.entityId);\r\n formChanges.setPreviousEntityId($scope.entityId);\r\n\r\n if (!$scope.isProjectPage && !$scope.isFromResourcePlanner)\r\n titleService.changeTitle($filter('translate')('txtNewOrder'));\r\n // store the current order in the OrderFactory\r\n OrderFactory.mainOrder = $scope.order;\r\n $scope.pageReady = true;\r\n\r\n setTimeout(function () {\r\n initHeaderHeight();\r\n });\r\n return Promise.resolve();\r\n } else if ($scope.isProjectPage) {\r\n $scope.currentOrder = {};\r\n\r\n return Promise.resolve();\r\n };\r\n }\r\n\r\n $scope.init = init;\r\n\r\n init();\r\n\r\n function getCustomerFullName(customer) {\r\n return (customer.FirstName ? customer.FirstName + ' ' : '') + (customer.LastName ? customer.LastName : '');\r\n };\r\n\r\n\r\n function filterStatuses(statusProgId) {\r\n\r\n $scope.statusList = OrderDetailsService.filterOrderStatuses(allStatuses, statusProgId);\r\n }\r\n\r\n /**\r\n * Gets the officer list\r\n * @param organizationId\r\n */\r\n function getOfficerList(organizationId) {\r\n OfficerFactory.getOfficers(organizationId)\r\n .then(function (result) {\r\n $scope.officerList = result;\r\n });\r\n };\r\n\r\n function preSelectOrderType(orderTypes) {\r\n\r\n var serviceOrderType = OrderTypeService.getServiceOrderType(orderTypes);\r\n\r\n // pre-select service order type\r\n if (serviceOrderType) {\r\n $scope.order.OrderType = serviceOrderType;\r\n $scope.onOrderTypeChange(serviceOrderType);\r\n }\r\n\r\n }\r\n\r\n //get the types and colors\r\n (function getOrderTypes() {\r\n OrderFactory.getOrderTypes().$promise.then(function (orderTypes) {\r\n\r\n orderTypes.forEach(function (orderType) {\r\n orderType.Name = $filter('translate')(orderType.ProgId);\r\n });\r\n\r\n $scope.orderTypes = orderTypes;\r\n\r\n // if a new order is creating pre-select service order type\r\n if ($scope.order && !$scope.order.id) {\r\n preSelectOrderType($scope.orderTypes);\r\n }\r\n\r\n OrderFactory.getColorSettings()\r\n .then(function (colors) {\r\n for (var i = 0; i < $scope.orderTypes.length; i++)\r\n for (var j = 0; j < colors.length; j++)\r\n if ($scope.orderTypes[i].id == colors[j].ForeignKey)\r\n $scope.orderTypes[i].Color = colors[j];\r\n $scope.resourcePlanner.colors = colors;\r\n });\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n })();\r\n\r\n //color options\r\n $scope.$on('colorpicker-closed', function (values) {\r\n $scope.intellisense.isOrderTypeOpen = true;\r\n console.log(values.targetScope.orderType.Color);\r\n values.targetScope.orderType.Color.OrganizationId = sessionInformationService.getUser().Organization.id;\r\n values.targetScope.orderType.Color.Table = 'GOT_TYPE';\r\n values.targetScope.orderType.Color.ForeignKey = values.targetScope.orderType.id;\r\n OrderFactory.saveColorSetting(values.targetScope.orderType.Color).then(function (result) {\r\n values.targetScope.orderType.Color.id = result.id;\r\n });\r\n });\r\n\r\n /**\r\n * Gets the statuses for orders\r\n * @returns\r\n */\r\n function getStatusList() {\r\n return OrderFactory.getStatusList().$promise\r\n .then(function (result) {\r\n allStatuses = result;\r\n if (!$scope.orderId && !$scope.isProjectPage) {\r\n $scope.currentOrder.Status = allStatuses[0];\r\n }\r\n if ($scope.currentOrder.Status)\r\n filterStatuses($scope.currentOrder.Status.ProgId);\r\n });\r\n };\r\n\r\n /**\r\n * Changes the order type for all order hierarchy\r\n * @param order\r\n * @param orderType\r\n */\r\n function changeOrderType(order, orderType) {\r\n order.OrderType = orderType;\r\n if (!order || !order.SubOrders || order.SubOrders.length == 0)\r\n return;\r\n for (var i = 0; i < order.SubOrders.length; i++) {\r\n order.SubOrders[i].OrderType = orderType;\r\n if (!order.SubOrders[i].SubOrders || order.SubOrders[i].SubOrders.length == 0)\r\n continue;\r\n changeOrderType(order.SubOrders[i], orderType);\r\n }\r\n };\r\n\r\n /**\r\n * Sets the start and end process list for order\r\n * Order must be of type project or service\r\n * @returns\r\n */\r\n function setStartAndEndProcessList() {\r\n if ($scope.order.InitiatedProcessListId)\r\n return $q.when();\r\n\r\n if ($scope.order.OrderType.ProgId == 'SERVICE' || $scope.order.OrderType.ProgId == 'PROSJEKT') {\r\n var organizationId = $scope.order.Organization.id;\r\n //get start and end processlists\r\n return OrderFactory.getStartAndEndProcessLists(organizationId)\r\n .then(function (processLists) {\r\n if (!processLists || processLists.length == 0)\r\n return;\r\n if ($scope.order.ProcessList &&\r\n $scope.order.ProcessList.id &&\r\n $scope.order.ProcessList.id != processLists[0].id)\r\n return;\r\n $scope.order.ProcessList = processLists[0];\r\n $scope.endProcessList = processLists[1];\r\n\r\n //set the status to ready for initialization\r\n $scope.order.Status = $filter('filter')($scope.statusList, { ProgId: 'READY' })[0];\r\n\r\n //show the checkbox for end processlist\r\n $scope.order.generateEndProcessList = true;\r\n });\r\n }\r\n //reset the processlist if there is no start and end\r\n $scope.order.ProcessList = {};\r\n\r\n $scope.endProcessList = null;\r\n\r\n //set the status to preorder\r\n $scope.order.Status = $filter('filter')($scope.statusList, { ProgId: 'PREORDER' })[0];\r\n\r\n //hide the checkbox for end processlist;\r\n $scope.order.generateEndProcessList = false;\r\n return $q.when();\r\n };\r\n\r\n function setMainOrderAsCurrentOrder() {\r\n\r\n // un-select sub-order from the hierarchy\r\n $scope.currentOrder.showCurrentOrder = false;\r\n\r\n $scope.currentOrder = $scope.order;\r\n\r\n // select main order in the hierarchy\r\n $scope.currentOrder.showCurrentOrder = true;\r\n }\r\n\r\n $scope.manageEndSubOrder = function () {\r\n if ($scope.order.generateEndProcessList) {\r\n addSubOrder($scope.order);\r\n endSubOrder = $scope.order.SubOrders[$scope.order.SubOrders.length - 1];\r\n endSubOrder.arrayIndex = $scope.order.SubOrders.length - 1;\r\n endSubOrder.ProcessList = $scope.endProcessList;\r\n endSubOrder.Status = $filter('filter')($scope.statusList, { ProgId: 'READY' })[0];\r\n setMainOrderAsCurrentOrder();\r\n } else {\r\n if (endSubOrder && !_.isNil(endSubOrder.arrayIndex) && $scope.order.SubOrders) {\r\n\r\n _.remove($scope.order.SubOrders, function (order) {\r\n return order.arrayIndex === endSubOrder.arrayIndex;\r\n });\r\n\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * When the type changes it must be changed for all hierarchy\r\n * @param orderType\r\n */\r\n $scope.onOrderTypeChange = function (orderType) {\r\n setStartAndEndProcessList()\r\n .then(function () {\r\n $scope.manageEndSubOrder();\r\n });\r\n\r\n //the type can be changed only on main, if it changes, set all of its suborders to that type\r\n if ($scope.order && $scope.order.SubOrders && $scope.order.SubOrders.length > 0)\r\n changeOrderType($scope.order, orderType);\r\n };\r\n\r\n /**\r\n * Checks whether the order has hours\r\n * @param order\r\n * @returns\r\n */\r\n var hasWorkingHours = function (order) {\r\n if ((order.WorkingHours && order.WorkingHours.length > 0) || order.WorkingHoursCount > 0)\r\n return true;\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0) {\r\n for (var i = 0; i < order.SubOrders.length; i++) {\r\n if (hasWorkingHours(order.SubOrders[i]))\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the order has materials\r\n * @param order\r\n * @returns\r\n */\r\n var hasMaterials = function (order) {\r\n if ((order.Materials && order.Materials.length > 0) || order.MaterialsCount > 0)\r\n return true;\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0) {\r\n for (var i = 0; i < order.SubOrders.length; i++) {\r\n if (hasMaterials(order.SubOrders[i])) return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n $scope.hasWorkingHours = hasWorkingHours;\r\n $scope.hasMaterials = hasMaterials;\r\n\r\n /**\r\n * Gets the contacts for the selected customer\r\n * @param customerId\r\n */\r\n function getContactsForCustomer(customerId) {\r\n if (!customerId)\r\n return;\r\n\r\n OrderFactory.getContactsForCustomer(customerId).$promise.then(function (result) {\r\n $scope.customerContacts = result;\r\n if (result.length > 0 && !$scope.order.CustomerContact)\r\n $scope.order.CustomerContact = result[0];\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Due to the fact that Cordel does not offer a UTC date, we must add/remove the offset everytime we handle dates\r\n * @param order\r\n */\r\n function fixTimezone(order) {\r\n if (order.StartDate)\r\n order.StartDate = DateUtilService.getLongWithoutOffset(order.StartDate);\r\n else {\r\n //set the start date to current date at 07:00\r\n order.StartDate = angular.copy(new Date());\r\n order.StartDate.setHours(7, 0, 0, 0);\r\n order.StartDate = order.StartDate.getTime();\r\n }\r\n\r\n if (order.EndDate)\r\n order.EndDate = DateUtilService.getLongWithoutOffset(order.EndDate);\r\n else {\r\n //set the end date to current date at 15:00\r\n order.EndDate = angular.copy(new Date());\r\n order.EndDate.setHours(15, 0, 0, 0);\r\n order.EndDate = order.EndDate.getTime();\r\n }\r\n\r\n if (order.WorkingHoursStartDate)\r\n order.WorkingHoursStartDate = new Date(order.WorkingHoursStartDate).getTime();\r\n\r\n if (order.WorkingHoursEndDate)\r\n order.WorkingHoursEndDate = new Date(order.WorkingHoursEndDate).getTime();\r\n\r\n if (order.OrderDate)\r\n order.OrderDate = DateUtilService.getLongWithoutOffset(order.OrderDate);\r\n else {//provide a default date\r\n //set the order date to current date at 00:00\r\n order.OrderDate = angular.copy(new Date());\r\n order.OrderDate.setHours(0, 0, 0, 0);\r\n order.OrderDate = order.OrderDate.getTime();\r\n }\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0)\r\n for (var i = 0; i < order.SubOrders.length; i++)\r\n fixTimezone(order.SubOrders[i]);\r\n };\r\n\r\n $scope.resourcePlanner.fixTimezone = fixTimezone;\r\n\r\n /**\r\n * Flattens an order hierarchy for better handling\r\n * @param orders\r\n * @returns\r\n */\r\n function removeHierarchy(orders) {\r\n var ordersToReturn = [];\r\n\r\n for (var i = 0; i < orders.length; i++) {\r\n ordersToReturn.push(orders[i]);\r\n\r\n if (orders[i].SubOrders && orders[i].SubOrders.length > 0) {\r\n var subOrders = removeHierarchy(orders[i].SubOrders);\r\n\r\n Array.prototype.push.apply(ordersToReturn, subOrders);\r\n }\r\n }\r\n\r\n return ordersToReturn;\r\n };\r\n\r\n /**\r\n * Gets the orders as a list\r\n * @returns\r\n */\r\n $scope.resourcePlanner.getOrderList = function () {\r\n if ($scope.order)\r\n return removeHierarchy([$scope.order]);\r\n return [];\r\n };\r\n\r\n /**\r\n * Sets the customer to all order hierarchy\r\n * @param order\r\n * @param customer\r\n */\r\n function setCustomerToHierarchy(order, customer) {\r\n order.Customer = customer;\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0)\r\n for (var i = 0; i < order.SubOrders.length; i++)\r\n setCustomerToHierarchy(order.SubOrders[i], customer);\r\n };\r\n\r\n /**\r\n * Gets the main order\r\n * @param orderList\r\n * @returns\r\n */\r\n function getMainOrder(orderList) {\r\n if (!orderList || orderList.length === 0)\r\n return null;\r\n\r\n var mainOrder = null;\r\n for (var index = 0; index < orderList.length; index++) {\r\n\r\n var currentOrder = orderList[index];\r\n\r\n if (!currentOrder.ParentId) {\r\n mainOrder = currentOrder;\r\n }\r\n }\r\n return mainOrder;\r\n };\r\n\r\n /**\r\n * for getDeviationsForOrder property of the main order and its children\r\n * add a reference to getDeviations function from deviationListCtrl\r\n * @param order\r\n * @param getDeviationsReference\r\n */\r\n function addGetDeviationsReference(order, getDeviationsReference) {\r\n if (!order)\r\n return;\r\n\r\n order.getDeviationsForOrder = getDeviationsReference;\r\n\r\n if (!order.SubOrders || order.SubOrders.length === 0)\r\n return;\r\n\r\n for (var index = 0; index < order.SubOrders.length; index++) {\r\n\r\n var currentSubOrder = order.SubOrders[index];\r\n\r\n addGetDeviationsReference(currentSubOrder, getDeviationsReference);\r\n }\r\n };\r\n\r\n function notifySelectedOrder(getDeviationsReference) {\r\n if (!getDeviationsReference || typeof (getDeviationsReference) !== \"function\")\r\n return;\r\n\r\n var mainOrder = getMainOrder(orderList);\r\n addGetDeviationsReference(mainOrder, getDeviationsReference);\r\n };\r\n\r\n // add a function which will be used from deviationListCtrl to notify the current selected order\r\n // when a new instance of deviationListCtrl is created \r\n // we need the added function to know when to update the reference to getDeviations function from deviationListCtrl for each order\r\n function addFunctionToOrder(order) {\r\n if (!order)\r\n return;\r\n\r\n order.notifySelectedOrder = notifySelectedOrder;\r\n\r\n if (!order.SubOrders || order.SubOrders.length === 0)\r\n return;\r\n\r\n for (var index = 0; index < order.SubOrders.length; index++) {\r\n var currentSubOrder = order.SubOrders[index];\r\n addFunctionToOrder(currentSubOrder);\r\n }\r\n };\r\n\r\n function addReferenceToMainOrderForSubOrderHierarchy(subOrder, mainOrderId) {\r\n\r\n subOrder.mainOrderId = mainOrderId;\r\n\r\n if (!subOrder.SubOrders || subOrder.SubOrders.length === 0) {\r\n return;\r\n }\r\n\r\n subOrder.SubOrders.forEach(function(currentSubOrder) {\r\n addReferenceToMainOrderForSubOrderHierarchy(currentSubOrder, mainOrderId);\r\n });\r\n }\r\n\r\n function addReferenceToMainOrder(mainOrder) {\r\n if (!mainOrder || !mainOrder.SubOrders || mainOrder.SubOrders.length === 0)\r\n return;\r\n\r\n for (var index = 0; index < mainOrder.SubOrders.length; index++) {\r\n var currentSubOrder = mainOrder.SubOrders[index];\r\n addReferenceToMainOrderForSubOrderHierarchy(currentSubOrder, mainOrder.id);\r\n }\r\n };\r\n\r\n /**\r\n * Copies the start/end date so we can change the time separately\r\n * @param orderList\r\n */\r\n function addDatePickerDateAttributes(orderList) {\r\n if (!orderList || orderList.length === 0)\r\n return;\r\n\r\n //don't even think about removing the timeout\r\n //I don't even know why the heck the code isn't working when you remove this timeout\r\n $timeout(function () {\r\n for (var index = 0; index < orderList.length; index++) {\r\n var currentOrder = orderList[index];\r\n\r\n if (currentOrder.StartDate)\r\n currentOrder.SelectedStartDate = angular.copy(new Date(currentOrder.StartDate));\r\n\r\n if (currentOrder.EndDate)\r\n currentOrder.SelectedEndDate = angular.copy(new Date(currentOrder.EndDate));\r\n }\r\n\r\n }, 100);\r\n };\r\n\r\n /**\r\n * Gets all the attachments from the suborders and puts them on the main\r\n */\r\n function processOrderAttachments(orders) {\r\n if (_.isNil(orders) || _.isEmpty(orders))\r\n return;\r\n\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n\r\n if (order.Attachments)\r\n Array.prototype.push.apply($scope.order.Attachments, order.Attachments);\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0)\r\n processOrderAttachments(order.SubOrders);\r\n }\r\n };\r\n\r\n /**\r\n * Init the order for the form\r\n * @param order\r\n */\r\n function initOrder(order) {\r\n\r\n markOrderEditDeregistration = $scope.$on('mark-order:edit', markOrderAsEdit);\r\n\r\n $scope.order = order;\r\n\r\n //order used for participant resource planner\r\n $scope.resourcePlanner.mainOrder = $scope.order;\r\n\r\n $scope.order.showCurrentOrder = true;\r\n\r\n $scope.currentOrder.Changes = [];\r\n\r\n if (!$scope.order.Participants) {\r\n $scope.order.Participants = [];\r\n $scope.Participants = [];\r\n }\r\n\r\n orderList = removeHierarchy([$scope.order]);\r\n addReferenceToMainOrder($scope.order);\r\n addFunctionToOrder($scope.order);\r\n // add SelectedStartDate and SelectedEndDate for manage properly DatePicker and Timepicker\r\n addDatePickerDateAttributes(orderList);\r\n\r\n if (!OrderFactory.selectedOrderId)\r\n $scope.currentOrder = $scope.order;\r\n else {\r\n if ($filter('filter')(orderList, function (o) { return o.id == OrderFactory.selectedOrderId }).length > 0)\r\n goOrder($filter('filter')(orderList, function (o) { return o.id == OrderFactory.selectedOrderId })[0]);\r\n else\r\n $scope.currentOrder = $scope.order;\r\n }\r\n\r\n //fix timezone for dates\r\n fixTimezone($scope.order);\r\n\r\n getContactsForCustomer($scope.order.Customer.id);\r\n\r\n $scope.order.Customer.Name = $scope.currentOrder.Customer.Name = getCustomerFullName($scope.order.Customer);\r\n\r\n if ($scope.order.InvoiceCustomer)\r\n $scope.order.InvoiceCustomer.FullName = $scope.currentOrder.InvoiceCustomer.FullName = getCustomerFullName($scope.order.InvoiceCustomer);\r\n\r\n //process the attachments\r\n if (!$scope.order.Attachments)\r\n $scope.order.Attachments = [];\r\n processOrderAttachments($scope.order.SubOrders ? $scope.order.SubOrders : []);\r\n\r\n\r\n getStatusList()\r\n .then(function () {\r\n if ($scope.order.OrderType.ProgId == 'SERVICE' || $scope.order.OrderType.ProgId == 'PROSJEKT' || $scope.order.OrderType.ProgId == 'GENERELL')\r\n return setStartAndEndProcessList();\r\n return $q.when();\r\n })\r\n .then(function () {\r\n //set the customer to whole hierarchy so that the isSaveDisabled function works properly\r\n setCustomerToHierarchy($scope.order, $scope.order.Customer);\r\n\r\n // save the current main order into the OrderFactory\r\n OrderFactory.mainOrder = $scope.order;\r\n });\r\n\r\n $scope.orderCameraImage.orders = _.filter(removeHierarchy(angular.copy([$scope.order])), function (order) { return order.InitiatedProcessListId && order.Active });\r\n $scope.order.key = Math.random();\r\n formChanges.setEntityId($scope.orderId);\r\n formChanges.setPreviousEntityId($scope.orderId);\r\n\r\n if ($scope.isProjectPage)\r\n $scope.projectObject.projectReportBuilder.orders = $scope.orderCameraImage.orders;\r\n\r\n initTabs();\r\n\r\n $scope.pageReady = true;\r\n\r\n $timeout(function () {\r\n initHeaderHeight();\r\n refreshSelectedTab();\r\n });\r\n };\r\n\r\n /**\r\n * Gets the deviations for the selected order\r\n * @param selectedOrder\r\n */\r\n $scope.getDeviationsForSelectedOrder = function (selectedOrder) {\r\n if (!selectedOrder || !selectedOrder.getDeviationsForOrder || typeof (selectedOrder.getDeviationsForOrder) !== \"function\")\r\n return;\r\n\r\n selectedOrder.getDeviationsForOrder(selectedOrder.id);\r\n };\r\n\r\n /**\r\n * Sets the organization\r\n * @param order\r\n */\r\n function setOrderOrganization(order) {\r\n if (!order)\r\n return;\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (loggedUser.Group.ProgId === 'ADMIN' && loggedUser.Organization.Central) {\r\n\r\n if (!OrganizationUtilService.getOrganizationId()) {\r\n order.Organization = loggedUser.Organization;\r\n } else\r\n order.Organization = { id: OrganizationUtilService.getOrganizationId() };\r\n } else\r\n order.Organization = loggedUser.Organization;\r\n };\r\n\r\n /**\r\n * Gets the organization id\r\n * @returns\r\n */\r\n function getOrganizationId() {\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (loggedUser.Group.ProgId === 'ADMIN' && loggedUser.Organization.Central) {\r\n\r\n if (!OrganizationUtilService.getOrganizationId()) {\r\n return loggedUser.Organization.id;\r\n } else {\r\n return OrganizationUtilService.getOrganizationId();\r\n }\r\n\r\n } else\r\n return loggedUser.Organization.id;\r\n };\r\n\r\n /**\r\n * When the date changes we must make sure we don't change the time as well\r\n * @param date\r\n * @param orderDateToChange\r\n * @param isOrderStartDate\r\n */\r\n $scope.onDatePickerDateChanged = function (date, orderDateToChange, isOrderStartDate) {\r\n\r\n if (!date || !orderDateToChange)\r\n return;\r\n\r\n var changeToAdd = isOrderStartDate ? OrderFactory.orderChange.StartDate : OrderFactory.orderChange.EndDate;\r\n\r\n if (_.isNil($scope.currentOrder.Changes))\r\n $scope.currentOrder.Changes = [];\r\n\r\n if (!_.some($scope.currentOrder.Changes, function (c) { return c == changeToAdd }))\r\n $scope.currentOrder.Changes.push(changeToAdd);\r\n\r\n $scope.currentOrder.Change = OrderFactory.applicationChange.EDIT;\r\n\r\n if (isOrderStartDate) {\r\n\r\n // check if the selected start date is greater than the end date\r\n if (moment(date).isAfter(moment($scope.order.EndDate))) {\r\n\r\n $scope.currentOrder.EndDate = moment(date).valueOf();\r\n // mark EndDate as changed\r\n $scope.currentOrder.Changes.push(OrderFactory.orderChange.EndDate);\r\n } else {\r\n $scope.currentOrder.EndDate = $scope.order.EndDate;\r\n }\r\n \r\n $scope.currentOrder.StartDate = moment(date).valueOf();\r\n } else {\r\n $scope.currentOrder.StartDate = moment(date).isBefore(moment($scope.currentOrder.StartDate)) ? moment(date).valueOf() : $scope.order.StartDate;\r\n $scope.currentOrder.EndDate = moment(date).valueOf();\r\n }\r\n\r\n addDatePickerDateAttributes([$scope.currentOrder]);\r\n\r\n askUserToRemoveConnectWithPlanner();\r\n };\r\n\r\n function askUserToRemoveConnectWithPlanner() {\r\n if (dateChangeWarningShown)\r\n return;\r\n\r\n if ($scope.order.ConnectWithPlanner)\r\n return;\r\n\r\n dateChangeWarningShown = true;\r\n dialogService.showCustomDialog('COMMON.CONFIRM', 'txtConfirmConnectToPlannerChangeOrderDate', ['txtChangeAndRemovePeriodisering', 'txtChangeAndKeepPeriodisering', 'txtCancel'], null, true)\r\n .then(function (result) {\r\n if (result == 2) {\r\n return;\r\n }\r\n\r\n if (result == 0)\r\n $scope.order.ConnectWithPlanner = true;\r\n });\r\n };\r\n\r\n $scope.askUserToRemoveConnectWithPlanner = askUserToRemoveConnectWithPlanner;\r\n\r\n /**\r\n * Gets the customers based on the search criteria\r\n * @param freeText\r\n * @param isCustomer\r\n * @param isInvoiceCustomer\r\n */\r\n $scope.getCustomers = function (freeText, isCustomer, isInvoiceCustomer) {\r\n OrderFactory.getCustomersForOrder($scope.order.id, $scope.order.Organization.id, angular.copy(freeText), false).$promise\r\n .then(function (result) {\r\n $scope.customers = result;\r\n $scope.intellisense.isCustomerOpen = isCustomer;\r\n $scope.intellisense.isInvoiceCustomerOpen = isInvoiceCustomer;\r\n });\r\n };\r\n\r\n /**\r\n * Opens the modal with the customer form\r\n * @param action\r\n */\r\n $scope.openNewCustomerModal = function (action) {\r\n \r\n if (action == 'UPDATE' && $scope.order.Customer && $scope.order.Customer.id)\r\n $scope.currentCustomerIdFromOrder = $scope.order.Customer.id;\r\n \r\n $uibModal.open({\r\n template: ' \\\r\n ',\r\n scope: $scope,\r\n size: 'lg'\r\n })\r\n //listen to the close promise and get the customer object that has been passed\r\n .result.then(function (customerSaved) {\r\n if (customerSaved) {\r\n $scope.setCurrentCustomer(customerSaved);\r\n //Add the new customer to the entire hierarchy\r\n $scope.setCustomerToEntireHierarchy($scope.order, customerSaved)\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the processlists based on search criteria\r\n * @param freeText\r\n */\r\n $scope.getProcessLists = function (freeText) {\r\n var organizationId = $scope.order.Organization.id;\r\n ProcessListFactory.getProcessListOrder(angular.copy(freeText), organizationId).$promise\r\n .then(function (result) {\r\n var allProcesslists = result;\r\n for (var index = 0; index < allProcesslists.length; index++) {\r\n allProcesslists[index].id = parseInt(allProcesslists[index].id);\r\n }\r\n allProcesslists = $filter('orderBy')(allProcesslists, \"id\", true);\r\n $scope.processLists = allProcesslists;\r\n $scope.intellisense.isProcessListOpen = true;\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the address is empty or not\r\n * @param address\r\n * @returns\r\n */\r\n function hasAddress(address) {\r\n if (!address)\r\n return false;\r\n\r\n var addressToReturn = [];\r\n if (address.Street)\r\n addressToReturn.push(address.Street);\r\n if (address.Street2)\r\n addressToReturn.push(address.Street2);\r\n if (address.Street3)\r\n addressToReturn.push(address.Street3);\r\n if (address.PostalPlace)\r\n addressToReturn.push(address.PostalPlace);\r\n if (address.PostalCode)\r\n addressToReturn.push(address.PostalCode);\r\n\r\n return addressToReturn.length > 0;\r\n };\r\n\r\n /**\r\n * Copies the customer address to order\r\n * @param customer\r\n */\r\n function copyAddressFromCustomer(customer) {\r\n if (!customer || !customer.id)\r\n return;\r\n\r\n //add address if the COPY CUSTOMER ADDRESS is true ONLY if the order is new\r\n if ($scope.customerAddress.copyCustomerAddress && $scope.order && !$scope.order.id) {\r\n if (!hasAddress(customer.PostalAddress)) {\r\n $scope.customerAddress.customerHasAddress = false;\r\n $scope.order.SiteAddress = {\r\n };\r\n return;\r\n }\r\n $scope.customerAddress.customerHasAddress = true;\r\n $scope.order.SiteAddress = {\r\n Active: true,\r\n Street: customer.PostalAddress.Street,\r\n Street2: customer.PostalAddress.Street2,\r\n Street3: customer.PostalAddress.Street3,\r\n PostalCode: customer.PostalAddress.PostalCode,\r\n PostalPlace: customer.PostalAddress.PostalPlace\r\n };\r\n } else if (!$scope.customerAddress.copyCustomerAddress)\r\n //if unchecked remove the address;\r\n $scope.order.SiteAddress = {\r\n };\r\n };\r\n\r\n /**\r\n * Sets the given process list to the selected order\r\n * @param processList\r\n */\r\n $scope.setCurrentProcessList = function (processList) {\r\n $scope.currentOrder.ProcessList = angular.copy(processList);\r\n $scope.currentOrder.ProcessList.Name = angular.copy(processList.Name);\r\n //set also the status to READY\r\n $scope.currentOrder.Status = $filter('filter')($scope.statusList, { ProgId: 'READY' })[0];\r\n $scope.intellisense.isProcessListOpen = false;\r\n };\r\n\r\n /**\r\n * Sets the given customer to the selected order\r\n * @param customer\r\n */\r\n $scope.setCurrentCustomer = function (customer) {\r\n $scope.order.Customer = angular.copy(customer);\r\n $scope.order.Customer.Name = getCustomerFullName(customer);\r\n getContactsForCustomer(customer.id);\r\n copyAddressFromCustomer(customer);\r\n };\r\n\r\n /**\r\n * Sets the given invoice customer to the selected order\r\n * @param invoiceCustomer\r\n */\r\n $scope.setCurrentInvoiceCustomer = function (invoiceCustomer) {\r\n $scope.currentOrder.InvoiceCustomer = invoiceCustomer;\r\n $scope.currentOrder.InvoiceCustomer.FullName = invoiceCustomer.FirstName + ' ' + invoiceCustomer.LastName;\r\n };\r\n\r\n $scope.clearProcessList = function () {\r\n $scope.currentOrder.ProcessList = {\r\n };\r\n //set also the status to PREORDER\r\n $scope.currentOrder.Status = $filter('filter')($scope.statusList, { ProgId: 'PREORDER' })[0];\r\n\r\n //if it had end processlist, clear\r\n $scope.endProcessList = null;\r\n $scope.order.generateEndProcessList = false;\r\n };\r\n\r\n /**\r\n * Activates or disables an order\r\n * Checks whether the user has access\r\n * @param order\r\n */\r\n $scope.onOrderActiveClick = function (order) {\r\n\r\n OrderDetailsService.handleOrderActiveClick($scope.order, order)\r\n .then(function () {\r\n isRouteReloading = true;\r\n $route.reload();\r\n });\r\n };\r\n\r\n /**\r\n * Sets the given type to the current order\r\n * @param orderType\r\n */\r\n $scope.setCurrentOrderType = function (orderType) {\r\n $scope.currentOrder.OrderType = orderType;\r\n $scope.intellisense.isOrderTypeOpen = false;\r\n };\r\n\r\n $scope.toggleOrderTypeDropdown = function () {\r\n $timeout(function () {\r\n $scope.intellisense.isOrderTypeOpen = !$scope.intellisense.isOrderTypeOpen;\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the status dropdown is disabled\r\n * @returns\r\n */\r\n $scope.disableStatusDropdown = function () {\r\n if ($scope.currentOrder.Status && $scope.currentOrder.Status.ProgId == 'DONE' && $scope.loggedUser.Group.ProgId == 'ADMIN')\r\n return false;\r\n if ($scope.currentOrder.InitiatedProcessListId)\r\n return true;\r\n if (!$scope.currentOrder.ProcessList || !$scope.currentOrder.ProcessList.id)\r\n return true;\r\n if ($scope.currentOrder\r\n && $scope.currentOrder.Status\r\n && $scope.currentOrder.id > 0) {\r\n if ($scope.currentOrder.Status.ProgId == \"STARTED\" || $scope.currentOrder.Status.ProgId == 'DONE')\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * If the status changes, change for all hierarchy\r\n * @param currentOrder\r\n * @param oldStatus\r\n */\r\n $scope.updateStatus = function (currentOrder, oldStatus) {\r\n var old = JSON.parse(oldStatus);\r\n if (old.ProgId == 'DONE' && currentOrder.Status.ProgId == 'STARTED')\r\n OrderFactory.changeStatusOrder(currentOrder);\r\n };\r\n\r\n /**\r\n * Prepares the order for execution\r\n */\r\n $scope.startOrder = function () {\r\n OrderFactory.order = {\r\n id: $scope.currentOrder.id,\r\n processListId: $scope.currentOrder.ProcessList.id,\r\n initiatedProcessListId: $scope.currentOrder.InitiatedProcessListId,\r\n hasAttachments: $scope.currentOrder.Attachments.length > 0 ? true : false,\r\n progress: $scope.currentOrder.Progress,\r\n //level: $scope.orderLevel, // isn't correctly\r\n ParentId: $scope.currentOrder.ParentId,\r\n Status: $scope.currentOrder.Status.ProgId\r\n };\r\n\r\n // set the tabs\r\n $scope.showExecutionTab = true;\r\n $timeout(function () {\r\n $scope.tabs.activeTab = 'EXECUTION';\r\n });\r\n };\r\n\r\n\r\n // if execution ended, move to identification tab\r\n $scope.$watch(function () {\r\n return OrderFactory.isExecutionEnded;\r\n },\r\n function (data) {\r\n if (data) {\r\n $scope.showExecutionTab = false;\r\n $scope.tabs.activeTab = 'IDENTIFICATION';\r\n\r\n if (!$scope.isProjectPage) {\r\n if ($scope.orderId) {\r\n isRouteReloading = true;\r\n $route.reload();\r\n\r\n }\r\n else\r\n $scope.go('/orders');\r\n } else {\r\n $timeout(function () {\r\n getProjectOrderDetails($scope.currentOrder);\r\n OrderFactory.isExecutionEnded = false;\r\n });\r\n }\r\n }\r\n }, true);\r\n\r\n /**\r\n * Get the details for the order that is of type PROSJEKT\r\n * @param order\r\n */\r\n function getProjectOrderDetails(order) {\r\n if (!order || (!order.mainOrderId && !order.id))\r\n return;\r\n\r\n ProjectFactory.getProjectOrderDetails((order.mainOrderId) ? order.mainOrderId : order.id)\r\n .$promise\r\n .then(function (response) {\r\n var project = $scope.projectObject.getProject();\r\n project.Order = response;\r\n setUpProjectOrder(project.Order);\r\n initOrder(project.Order);\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Set atributes necessarry for identification tab of Project\r\n * @param order\r\n */\r\n function setUpProjectOrder(order) {\r\n //set name for order\r\n if (order.OrderNumber)\r\n order.Name = 'EXT. ID ' + order.OrderNumber;\r\n else\r\n order.Name = 'ID ' + order.id;\r\n\r\n //set full name for customer and invoice customer\r\n if (order.Customer)\r\n order.Customer.FullName = getCustomerFullName(order.Customer);\r\n\r\n if (order.InvoiceCustomer)\r\n order.InvoiceCustomer.FullName = getCustomerFullName(order.InvoiceCustomer);\r\n }\r\n\r\n /**\r\n * Deselects any given order to be able to select another order\r\n * @param order\r\n */\r\n function deselectOrder(order) {\r\n if (order == null) {\r\n deselectOrder($scope.order);\r\n } else {\r\n formChanges.setEntityId($scope.entityId);\r\n $scope.currentOrder.entityId = $scope.entityId;\r\n }\r\n }\r\n\r\n // the entire formChanges needs to be re-thinked or removed\r\n function setEntityIdForFormChanges() {\r\n if ($scope.currentOrder.id) {\r\n formChanges.setEntityId($scope.currentOrder.id);\r\n } else if ($scope.currentOrder.entityId != undefined) {\r\n formChanges.setEntityId($scope.currentOrder.entityId);\r\n } else {\r\n formChanges.setEntityId($scope.entityId);\r\n $scope.currentOrder.entityId = $scope.entityId;\r\n }\r\n }\r\n\r\n /**\r\n * Selects and sets as default any given order\r\n * @param order\r\n */\r\n\r\n function goOrder(order) {\r\n\r\n $scope.showExecutionTab = false;\r\n\r\n if (!order) {\r\n OrderDetailsService.deselectOrder($scope.order, $scope.order);\r\n } else {\r\n OrderDetailsService.deselectOrder(order, $scope.order);\r\n }\r\n\r\n order.showCurrentOrder = true;\r\n\r\n $scope.currentOrder = order;\r\n\r\n filterStatuses($scope.currentOrder.Status.ProgId);\r\n\r\n setEntityIdForFormChanges();\r\n };\r\n\r\n $scope.removeProject = function () {\r\n $scope.currentOrder.Project = undefined;\r\n };\r\n\r\n /**\r\n * Checks whether the order can be edited\r\n * @param order\r\n * @returns\r\n */\r\n $scope.IsEditable = function (order) {\r\n if (order.ParentId && $scope.hasRight('NEW_EDIT_SUBORDER'))\r\n return true;\r\n\r\n if (!order.ParentId && $scope.hasRight('NEW_EDIT_ORDER'))\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Adds a new suborder to the order hierarchy\r\n * @param order\r\n */\r\n function addSubOrder(order) {\r\n\r\n $scope.currentOrder = OrderDetailsService.addSubOrderForOrder(order, allStatuses[0]);\r\n\r\n // generate a new id for new suborder for managing his form changes\r\n $scope.entityId--;\r\n\r\n goOrder($scope.currentOrder);\r\n };\r\n\r\n var orderSortChanged = false;\r\n $scope.orderOptions = {\r\n dropped: function (event) {\r\n orderSortChanged = true;\r\n }\r\n };\r\n\r\n function convertParticipantDates() {\r\n ParticipantService.convertParticipantDatesToMillisecondsForParticipants($scope.order.Participants);\r\n }\r\n\r\n /**\r\n * Saves the current order\r\n */\r\n $scope.saveOrder = function (noReload) {\r\n\r\n if ($scope.isSaveOrderDisabled())\r\n return Promise.resolve();\r\n\r\n //if we have address \r\n //set the active = true\r\n if ($scope.order.SiteAddress)\r\n $scope.order.SiteAddress.Active = true;\r\n\r\n convertParticipantDates();\r\n\r\n return OrderFactory.saveOrder($scope.order)\r\n .then(function (resultedOrder) {\r\n infoService.changeInfo($filter('translate')('msgOrderSaved'));\r\n\r\n $scope.order.id = resultedOrder.id;\r\n OrderFactory.displaySaveMessage = true;\r\n\r\n if (!noReload) {\r\n $scope.reload();\r\n }\r\n\r\n\r\n formChanges.resetChanges();\r\n changesMade = false;\r\n });\r\n };\r\n\r\n $scope.reload = function () {\r\n if ($scope.isFromResourcePlanner) {\r\n $scope.$dismiss();\r\n } else if ($scope.orderId) {\r\n isRouteReloading = true;\r\n $route.reload();\r\n } else {\r\n isRouteReloading = true;\r\n navigate();\r\n }\r\n };\r\n\r\n //Helpful functions for cordel sync\r\n $scope.reloadFromCordel = function () {\r\n isRouteReloading = true;\r\n $route.reload();\r\n };\r\n\r\n $scope.navigateFromCordel = navigate;\r\n\r\n /**\r\n * Checks whether the address fields have the correct lengths\r\n * @param address\r\n * @returns\r\n */\r\n function isAddressLengthOk(address) {\r\n if (address.PostalPlace && address.PostalPlace.length > 30)\r\n return false;\r\n if (address.PostalCode && address.PostalCode.length > 10)\r\n return false;\r\n if (address.Street && address.Street.length > 50)\r\n return false;\r\n if (address.Street2 && address.Street2.length > 50)\r\n return false;\r\n if (address.Street3 && address.Street3.length > 50)\r\n return false;\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks whether the save button is disabled\r\n * @returns\r\n */\r\n $scope.isSaveOrderDisabled = function () {\r\n if (!$scope.order)\r\n return true;\r\n //check the needed properties and see if the lengths are correct\r\n //get the hierarchy as a list to verify suborders easily\r\n var orders = removeHierarchy([$scope.order]);\r\n if (!orders || orders.length == 0)\r\n return true;\r\n\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n if (!order.Customer || !order.Customer.id)\r\n return true;\r\n\r\n if (!order.Status || !order.Status.id)\r\n return true;\r\n\r\n if (!order.OrderType || !order.OrderType.id)\r\n return true;\r\n\r\n if (order.CustomerReference && order.CustomerReference.length > 25)\r\n return true;\r\n\r\n if (order.Tag && order.Tag.length > 25)\r\n return true;\r\n\r\n if (order.OurReference && order.OurReference.length > 25)\r\n return true;\r\n\r\n //check for address fields length\r\n if ($scope.currentOrder.SiteAddress && !isAddressLengthOk($scope.currentOrder.SiteAddress))\r\n return true;\r\n }\r\n\r\n //if the sorting of the orders changed, return here\r\n if (orderSortChanged)\r\n return false;\r\n\r\n return false;\r\n };\r\n\r\n //if we are on project page, set some useful delegates\r\n if ($scope.isProjectPage) {\r\n $scope.projectObject.canSaveOrders = function () {\r\n return !$scope.isSaveOrderDisabled();\r\n };\r\n\r\n $scope.projectObject.setOrder = function (order) {\r\n initOrder(order);\r\n $scope.projectId = ProjectFactory.projectId;\r\n };\r\n\r\n $scope.projectObject.clearOrder = function () {\r\n $scope.currentOrder = $scope.order = {};\r\n };\r\n\r\n $scope.projectObject.projectReportBuilder.getCameraImages = function (orderId, initiatedId) {\r\n return $scope.orderCameraImage.getCameraImages(orderId, initiatedId);\r\n };\r\n\r\n $scope.projectObject.setUpHeaderHeight = $scope.setUpHeaderHeight;\r\n\r\n $scope.projectObject.convertParticipantDates = convertParticipantDates;\r\n\r\n $scope.projectObject.onDatePickerDateChanged = $scope.onDatePickerDateChanged;\r\n }\r\n\r\n /**\r\n * When the toggle for copy customer is changed, process the order address\r\n */\r\n $scope.onCopyCustomerAddressChange = function () {\r\n copyAddressFromCustomer($scope.order.Customer);\r\n };\r\n\r\n /**\r\n * Closes the order window\r\n * If there are any changes, the modal appears asking the user if he wants to save before exiting\r\n * @param newUrl\r\n */\r\n function closeOrder(newUrl) {\r\n if ($scope.isProjectPage)\r\n return;\r\n //if (formChanges.hasBeenMadeFormChanges() || changesMade) {\r\n // dialogService.showConfirmDialog('txtCloseOrderTitle', 'txtCloseOrderMessage').then(function (dialogResult) {\r\n // if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n // if (!$scope.isFromResourcePlanner) {\r\n // $scope.isNavigatingFromCloseOrder = true;\r\n // navigate(newUrl);\r\n // }\r\n // else {\r\n // $scope.$dismiss();\r\n // }\r\n // } else {\r\n\r\n // $scope.isNavigatingToOrderListFromButton = false;\r\n\r\n // var ordersMenu = menuService.getMenuByHref(\"/orders\");\r\n // menuService.setSelectedMenu(ordersMenu, false);\r\n\r\n // }\r\n // });\r\n //} else {\r\n if (!$scope.isFromResourcePlanner) {\r\n navigate(newUrl);\r\n }\r\n else\r\n $scope.$dismiss();\r\n //}\r\n };\r\n\r\n $scope.closeOrder = function () {\r\n $scope.isNavigatingToOrderListFromButton = true;\r\n closeOrder(\"/orders\");\r\n };\r\n\r\n\r\n function navigate(url) {\r\n if (url)\r\n $scope.go(url);\r\n else {\r\n $scope.go('/order/' + $scope.order.id);\r\n }\r\n };\r\n\r\n $scope.showProgressBar = function () {\r\n if (!$scope.order || !$scope.order.id)\r\n return false;\r\n if (!$scope.order.Status)\r\n return false;\r\n if ($scope.order.Status && $scope.order.Status.ProgId == 'PREORDER')\r\n return false;\r\n if ($scope.isProjectPage)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n $scope.header = {\r\n showFullOrderStack: false\r\n };\r\n $scope.orderCameraImage = {\r\n orders: []\r\n };\r\n\r\n /**\r\n * Checks whether it should show the camera image tab\r\n * @returns\r\n */\r\n $scope.showCameraImageTab = function () {\r\n if (!$scope.orderId)\r\n return false;\r\n\r\n if (!$scope.orderCameraImage.orders || $scope.orderCameraImage.orders.length == 0)\r\n return false;\r\n\r\n for (var i = 0; i < $scope.orderCameraImage.orders.length; i++) {\r\n var order = $scope.orderCameraImage.orders[i];\r\n if (order.InitiatedProcessListId)\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n $scope.orderCameraImage.getCameraImages = function (orderId, initiatedId) {\r\n return OrderFactory.getCameraImagesForOrder(orderId, initiatedId);\r\n };\r\n\r\n $scope.onFocusControl = function (id, $event, controlType, value) {\r\n formChangeDetector.onFocusControl(id, $event, controlType, value);\r\n };\r\n\r\n $scope.onValueChanged = function (newValue) {\r\n formChangeDetector.onValueChanged(newValue);\r\n };\r\n\r\n $scope.onDropdownOptionChanged = function (id, newValue) {\r\n\r\n var currentChange = formChangeDetector.getChange();\r\n\r\n if (!currentChange.id) {\r\n $scope.onFocusControl(id, null, 'dropdown', newValue);\r\n }\r\n\r\n $scope.onValueChanged(newValue);\r\n\r\n };\r\n\r\n /**\r\n * Opens the contact form for adding a new contact to the selected customer\r\n */\r\n $scope.addNewContact = function () {\r\n\r\n if (!$scope.order.Customer || !$scope.order.Customer.id)\r\n return;\r\n\r\n $scope.contact = CustomerFactory.getContactToSave();\r\n $scope.contact.Active = true;\r\n $scope.contact.Table = 'BOT_CUSTOMER';\r\n $scope.contact.ForeignKey = $scope.order.Customer.id;\r\n\r\n contactModal = $uibModal.open({\r\n templateUrl: 'Scripts/contact/contact-modal/contact-modal.html',\r\n controller: 'ContactModalController',\r\n resolve: {\r\n contact: function () {\r\n return $scope.contact;\r\n },\r\n isFromOrderPage: function () {\r\n return true;\r\n }\r\n },\r\n size: 'lg'\r\n });\r\n\r\n contactModal.result.then(function (result) {\r\n\r\n $scope.contact.id = result.id;\r\n $scope.contact.wasSaved = true;\r\n\r\n $scope.customerContacts.push(angular.copy($scope.contact));\r\n $scope.order.CustomerContact = angular.copy($scope.contact);\r\n\r\n });\r\n\r\n };\r\n\r\n\r\n /**\r\n * Gets the address from the given customer\r\n * @param customer\r\n * @returns\r\n */\r\n $scope.getSelectedCustomerAddress = function (customer) {\r\n\r\n if (!customer || !customer.PostalAddress)\r\n return \"\";\r\n\r\n var addressArray = [];\r\n\r\n if (customer.PostalAddress.Street)\r\n addressArray.push(customer.PostalAddress.Street);\r\n if (customer.PostalAddress.Street2)\r\n addressArray.push(customer.PostalAddress.Street2);\r\n if (customer.PostalAddress.Street3)\r\n addressArray.push(customer.PostalAddress.Street3);\r\n if (customer.PostalAddress.PostalCode)\r\n addressArray.push(customer.PostalAddress.PostalCode);\r\n if (customer.PostalAddress.PostalPlace)\r\n addressArray.push(customer.PostalAddress.PostalPlace);\r\n\r\n if (addressArray.length === 0)\r\n return \"\";\r\n\r\n return addressArray.map(function (address) { return \" \" + address }).toString();\r\n };\r\n\r\n $scope.setCustomerToEntireHierarchy = function (order, customer) {\r\n\r\n var subOrders = order.SubOrders;\r\n\r\n if (subOrders && subOrders.length > 0) {\r\n for (var index = 0; index < subOrders.length; index++) {\r\n var currentSubOrder = subOrders[index];\r\n currentSubOrder.Customer = customer;\r\n $scope.setCustomerToEntireHierarchy(currentSubOrder, customer);\r\n }\r\n }\r\n };\r\n\r\n if (!$scope.isProjectPage)\r\n\r\n $scope.$on(\"$routeChangeStart\", function (event, next, current) {\r\n if (isRouteReloading) {\r\n isRouteReloading = false;\r\n }\r\n //else {\r\n // if (next.$$route) {\r\n\r\n // var nextRoute = next.$$route.originalPath;\r\n\r\n // if (nextRoute === \"/login\") {\r\n // return;\r\n // } else {\r\n // if (nextRoute === \"/orders\" && $scope.isNavigatingToOrderListFromButton) {\r\n // return;\r\n // } else if (changesMade || formChanges.hasBeenMadeFormChanges() && !$scope.isNavigatingFromCloseOrder) {\r\n // event.preventDefault();\r\n // closeOrder(nextRoute);\r\n // }\r\n // }\r\n\r\n // }\r\n //}\r\n\r\n });\r\n\r\n function initHeaderHeight() {\r\n $timeout(function () {\r\n var headerHierarchyElement = angular.element('.order-hierarchy-sticky');\r\n $scope.headerHierarchyHeight = headerHierarchyElement.height() + 10;\r\n }, 500);\r\n };\r\n\r\n function markOrderAsEdit() {\r\n $scope.currentOrder.Change = OrderFactory.applicationChange.EDIT;\r\n\r\n if (_.isNil($scope.currentOrder.Changes))\r\n $scope.currentOrder.Changes = [];\r\n };\r\n\r\n $scope.reopenOrder = function () {\r\n for (var i = 0; i < $scope.order.Participants.length; i++) {\r\n var participant = $scope.order.Participants[i];\r\n participant.Finished = false;\r\n participant.Change = OrderFactory.applicationChange.EDIT;\r\n }\r\n\r\n $scope.saveOrder();\r\n };\r\n\r\n ParticipantDatesService.getOrderDates = function () {\r\n return {\r\n StartDate: moment($scope.order.StartDate)\r\n .add(moment($scope.order.StartDate).utcOffset(), 'minutes')\r\n .valueOf(),\r\n EndDate: moment($scope.order.EndDate)\r\n .add(moment($scope.order.EndDate).utcOffset(), 'minutes')\r\n .valueOf()\r\n };\r\n };\r\n\r\n onOrderSelectFromLeftMenuWatcher = $scope.$on('onOrderSelectFromLeftMenu', function (event, args) {\r\n\r\n $scope.showExecutionTab = false;\r\n\r\n // get the event data\r\n var eventData = args[0];\r\n\r\n $scope.currentOrder = eventData.selectedOrder;\r\n\r\n filterStatuses($scope.currentOrder.Status.ProgId);\r\n\r\n setEntityIdForFormChanges();\r\n\r\n $scope.getDeviationsForSelectedOrder($scope.currentOrder);\r\n\r\n refreshSelectedTab(); \r\n\r\n event.preventDefault();\r\n });\r\n\r\n onOrderActiveClickFromLeftMenuWatcher = $scope.$on('onOrderActiveClickFromLeftMenu', function (event) {\r\n\r\n isRouteReloading = true;\r\n $route.reload();\r\n\r\n event.preventDefault();\r\n });\r\n\r\n onSubOrderAddFromLeftMenuWatcher = $scope.$on('onSubOrderAddFromLeftMenu', function (event, args) {\r\n\r\n // get the event data\r\n var eventData = args[0];\r\n\r\n addSubOrder(eventData.order);\r\n\r\n event.preventDefault();\r\n });\r\n\r\n $scope.$on('$destroy', function () {\r\n\r\n OrderFactory.selectedOrderId = $scope.currentOrder.id;\r\n formChanges.resetChanges();\r\n OrderFactory.mainOrder = {};\r\n\r\n // un-register watchers\r\n\r\n if (markOrderEditDeregistration && typeof markOrderEditDeregistration === 'function') {\r\n markOrderEditDeregistration();\r\n }\r\n\r\n if (onOrderSelectFromLeftMenuWatcher && typeof onOrderSelectFromLeftMenuWatcher === 'function') {\r\n onOrderSelectFromLeftMenuWatcher();\r\n }\r\n\r\n if (onOrderActiveClickFromLeftMenuWatcher && typeof onOrderActiveClickFromLeftMenuWatcher === 'function') {\r\n onOrderActiveClickFromLeftMenuWatcher();\r\n }\r\n\r\n if (onSubOrderAddFromLeftMenuWatcher && typeof onSubOrderAddFromLeftMenuWatcher === 'function') {\r\n onSubOrderAddFromLeftMenuWatcher();\r\n }\r\n });\r\n\r\n $scope.selectTab = function (tabName) {\r\n if (tabName === 'IDENTIFICATION')\r\n handleSelectIdentificationTab();\r\n\r\n $scope.tabs.activeTab = tabName;\r\n\r\n TabUtilService.setCurrentTab(TabUtilService.pages.ORDER_DETAIL, tabName);\r\n };\r\n\r\n function handleSelectIdentificationTab() {\r\n if ($scope.resourcePlanner.oldPersonnel)\r\n return;\r\n\r\n OrderFactory.getStartAndEndDate($scope.order.id)\r\n .then(function (result) {\r\n $scope.order.StartDate = DateUtilService.getLongWithoutOffset(result.StartDate);\r\n $scope.order.EndDate = DateUtilService.getLongWithoutOffset(result.EndDate);\r\n\r\n addDatePickerDateAttributes([$scope.order]);\r\n });\r\n }\r\n\r\n function initTabs() {\r\n var currentTab = TabUtilService.getCurrentTab(TabUtilService.pages.ORDER_DETAIL);\r\n\r\n if (_.isNil(currentTab)) {\r\n $scope.tabs.activeTab = 'IDENTIFICATION';\r\n return;\r\n } else if (currentTab === 'REPORT_BUILDER') {\r\n $timeout(function () {\r\n $scope.orderCameraImage.init();\r\n }, 1000);\r\n }\r\n\r\n $scope.tabs.activeTab = currentTab;\r\n };\r\n\r\n function refreshSelectedTab() {\r\n\r\n switch ($scope.tabs.activeTab) {\r\n case 'WORKING_HOURS':\r\n $scope.workingHour.getWorkingHours();\r\n break;\r\n case 'MATERIALS':\r\n $scope.material.getMaterials();\r\n break;\r\n case 'TRIPS':\r\n $scope.trip.getTrips();\r\n break;\r\n }\r\n }\r\n };\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n OrderFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n 'DateUtilService'\r\n ];\r\n\r\n angular.module('order').factory('OrderFactory', OrderFactory);\r\n\r\n function OrderFactory(\r\n $resource,\r\n baseUrlService,\r\n DateUtilService\r\n ) {\r\n var orderFactory = {};\r\n\r\n //set up angular resource apis\r\n var Orders = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/Orders');\r\n var StatusList = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderStatuses');\r\n var Order = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/Order/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var StartEndDate = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/StartEndDate/:id', { id: '@id' });\r\n var OrderFullyDone = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderSaveFullyDone');\r\n var OrderActive = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderActive');\r\n var CustomersForOrder = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/CustomersForOrder');\r\n var UsersForWorkingHour = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/UsersForWorkingHour');\r\n var Attachment = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/Attachment/:id', { id: '@id' });\r\n var WorkingHours = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/WorkingHours');\r\n var WorkingHourCategories = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/WorkingHourCategories');\r\n var ContactsForCustomer = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderCustomer/:customerId', { customerId: '@customerId' });\r\n var Materials = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderMaterials');\r\n var OrderTypes = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderTypes');\r\n var Products = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/SearchProducts');\r\n var StartAndEndProcessLists = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/StartAndEndProcessLists');\r\n var OrderStatus = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderStatus/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var ColorSettings = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ColorSettings');\r\n var CameraImages = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/CameraImages');\r\n var IncludeInReportStatus = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/IncludeInReport');\r\n var IrrelevantStatus = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/SetIrrelevantStatus');\r\n var ProjectOrders = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/ProjectOrders');\r\n var CordelOrderFetch = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/CordelOrderFetch');\r\n var CordelOrderPost = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/CordelOrderPost');\r\n var CordelNewOrderSync = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/CordelNewOrderSync');\r\n var OrdersForCustomers = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrdersForCustomer/:customerId');\r\n var ReportBuilderSortNumber = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/SaveOrdersReportBuilderSortNr');\r\n var ProjectOrdersByProjectId = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/ProjectOrdersByProjectId');\r\n\r\n var OrderIsVisibleInApp = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/UpdateAppVisibility');\r\n var OrdersForOrganizationPage = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrdersForOrganizationPage');\r\n var RiskAnalysisVisibilityState = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/order/risk-analysis/toggle-visibility');\r\n var TodaysOrdersFrontPage = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/TodaysOrdersFrontPage');\r\n var OrderCordelStatus = $resource(baseUrlService.getBaseUrl() + 'REST/OrderCordel.svc/CordelDoneStatus');\r\n\r\n var Trips = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/Trips');\r\n var UnassignTrip = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/UnassignTrip');\r\n var OrderTrip = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/OrderTrip');\r\n var FailedCordelOrders = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/FailedCordelOrders/:organizationId', { organizationId: '@organizationId' });\r\n\r\n /**\r\n * Gets the order from Cordel\r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.getOrderFromCordel = function (orderId) {\r\n var cordelOrderFetch = new CordelOrderFetch();\r\n return cordelOrderFetch.$save({ orderId: orderId });\r\n };\r\n\r\n /**\r\n * Sends the order to cordel\r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.postOrderToCordel = function (orderId) {\r\n var cordelOrderPost = new CordelOrderPost();\r\n return cordelOrderPost.$save({ orderId: orderId });\r\n };\r\n\r\n /**\r\n * Gets new order from cordel that doesn't exist already in Dextro\r\n * @param orderExternalId\r\n * @param organizationId\r\n * @returns\r\n */\r\n orderFactory.syncNewOrderToCordel = function (orderExternalId, organizationId) {\r\n return CordelNewOrderSync.get({ orderExternalId: orderExternalId, organizationId: organizationId });\r\n };\r\n\r\n //orderFactory.searchProducts = function (freeText, organizationId, productCatalogId, providerId, NRF) {\r\n // return Products.query({\r\n // freeText: freeText,\r\n // organizationId: organizationId,\r\n // productCatalogId: productCatalogId,\r\n // providerId: providerId,\r\n // NRF: NRF\r\n // });\r\n //};\r\n\r\n /**\r\n * Gets the customers based on the seach criteria\r\n * @param orderId\r\n * @param organizationId\r\n * @param freeText\r\n * @returns\r\n */\r\n orderFactory.getCustomersForOrder = function (orderId, organizationId, freeText, includeInactive) {\r\n return CustomersForOrder.query({ orderId: orderId, organizationId: organizationId, freeText: freeText, includeInactive: includeInactive });\r\n };\r\n\r\n /**\r\n * Gets the users for the given organization id\r\n * @param orderId\r\n * @param organizationId\r\n * @returns\r\n */\r\n orderFactory.getUsersForOrder = function (orderId, organizationId) {\r\n return UsersForWorkingHour.query({ orderId: orderId, organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the hours for the given order\r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.getWorkingHours = function (orderId) {\r\n return WorkingHours.query({ orderId: orderId });\r\n };\r\n\r\n /**\r\n * Gets the working hour categories \r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.getWorkingHourCategories = function (orderId) {\r\n return WorkingHourCategories.query({ orderId: orderId });\r\n };\r\n\r\n /**\r\n * Gets the materials for the given order/task id\r\n * @param orderId\r\n * @param taskId\r\n * @returns\r\n */\r\n orderFactory.getMaterials = function (orderId, taskId) {\r\n return Materials.query({ orderId: orderId, taskId: taskId });\r\n };\r\n\r\n /**\r\n * Gets the contacts for the given customer id\r\n * @param customerId\r\n * @returns\r\n */\r\n orderFactory.getContactsForCustomer = function (customerId) {\r\n return ContactsForCustomer.query({ customerId: customerId });\r\n };\r\n\r\n orderFactory.getOrderActive = function () {\r\n return new OrderActive();\r\n };\r\n\r\n /**\r\n * Gets the list of orders based on the search criteria\r\n * @param freeText\r\n * @param includeDeactivated\r\n * @param includeCompleted\r\n * @param organizationId\r\n * @param fromDate\r\n * @param toDate\r\n * @param orderTypeId\r\n * @param participantId\r\n * @returns\r\n */\r\n orderFactory.getOrders = function (\r\n freeText,\r\n includeDeactivated,\r\n includeCompleted,\r\n organizationId,\r\n fromDate,\r\n toDate,\r\n orderTypeId,\r\n participantId\r\n ) {\r\n return Orders.query(\r\n {\r\n freeText: freeText,\r\n includeDeactivated: includeDeactivated,\r\n includeCompleted: includeCompleted,\r\n organizationId: organizationId,\r\n fromDate: fromDate,\r\n toDate: toDate,\r\n orderTypeId: orderTypeId,\r\n participantId: participantId\r\n });\r\n };\r\n\r\n /**\r\n * Gets the list of statuses\r\n * @returns\r\n */\r\n orderFactory.getStatusList = function () {\r\n return StatusList.query();\r\n };\r\n\r\n /**\r\n * Returns a new attachment object for saving it later with $resource\r\n * @returns\r\n */\r\n orderFactory.Attachment = function () {\r\n return new Attachment();\r\n };\r\n\r\n /**\r\n * Deletes the given attachment\r\n * @param attachment\r\n * @returns\r\n */\r\n orderFactory.deleteAttachment = function (attachment) {\r\n var a = new Attachment();\r\n a.id = attachment.id;\r\n return a.$delete();\r\n };\r\n\r\n /**\r\n * Saves the given attachment\r\n * @param attachment\r\n * @returns\r\n */\r\n orderFactory.saveAttachment = function (attachment) {\r\n attachment.Table = 'BOT_ORDER';\r\n return attachment.$save();\r\n };\r\n\r\n /**\r\n * Gets the order based on the given id\r\n * @param id\r\n * @returns\r\n */\r\n orderFactory.getOrder = function (id) {\r\n orderFactory.orderId = id;\r\n return Order.get({ id: id });\r\n };\r\n\r\n orderFactory.getStartAndEndDate = function (id) {\r\n return StartEndDate.get({ id: id }).$promise;\r\n }\r\n\r\n /**\r\n * Gets order object to be saved later with $resource\r\n * @returns\r\n */\r\n orderFactory.getOrderForSave = function () {\r\n return new Order();\r\n };\r\n\r\n /**\r\n * Sets the dates so the order can be successfully saved in Cordel\r\n * @param order\r\n */\r\n function setDate(order) {\r\n if (order.OrderDate) { //set the hour, minute, second to 0 -> Cordel problem\r\n var orderDate = new Date(order.OrderDate);\r\n orderDate.setHours(0);\r\n orderDate.setMinutes(0);\r\n orderDate.setSeconds(0);\r\n order.OrderDate = DateUtilService.getLongWithOffset(orderDate);\r\n }\r\n if (order.StartDate)\r\n order.StartDate = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n if (order.EndDate)\r\n order.EndDate = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n if (order.WorkingHoursStartDate)\r\n order.WorkingHoursStartDate = (new Date(order.WorkingHoursStartDate)).getTime();\r\n if (order.WorkingHoursEndDate)\r\n order.WorkingHoursEndDate = (new Date(order.WorkingHoursEndDate)).getTime();\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0) {\r\n for (var i = 0; i < order.SubOrders.length; i++)\r\n setDate(order.SubOrders[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Saves the given order\r\n * @param order\r\n * @returns\r\n */\r\n orderFactory.saveOrder = function (order) {\r\n setDate(order);\r\n if (order.id)\r\n return order.$update();\r\n else\r\n return order.$save();\r\n };\r\n\r\n /**\r\n * Sets the fully done status/completed to the given order\r\n * @param order\r\n * @returns\r\n */\r\n orderFactory.setOrderFullyDone = function (order) {\r\n\r\n var orderFullyDone = new OrderFullyDone;\r\n orderFullyDone.FullyDone = order.FullyDone;\r\n orderFullyDone.id = order.id;\r\n orderFullyDone.Organization = order.Organization;\r\n\r\n return orderFullyDone.$save();\r\n }\r\n\r\n /**\r\n * Saves the active status for the given order\r\n * @param orderActive\r\n * @returns\r\n */\r\n orderFactory.saveOrderActive = function (orderActive) {\r\n return orderActive.$save();\r\n };\r\n\r\n /**\r\n * Gets the order types\r\n * @returns\r\n */\r\n orderFactory.getOrderTypes = function () {\r\n return OrderTypes.query();\r\n };\r\n\r\n /**\r\n * Gets the start and end process list\r\n * @param organizationId\r\n * @returns\r\n */\r\n orderFactory.getStartAndEndProcessLists = function (organizationId) {\r\n return StartAndEndProcessLists.query({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n /**\r\n * Changes the status for order\r\n * @param order\r\n * @returns\r\n */\r\n orderFactory.changeStatusOrder = function (order) {\r\n var orderstatus = new OrderStatus();\r\n orderstatus.id = order.id;\r\n orderstatus.Status = order.Status;\r\n return orderstatus.$update({ id: order.id });\r\n };\r\n\r\n /**\r\n * Gets the color settings\r\n * @returns\r\n */\r\n orderFactory.getColorSettings = function () {\r\n return ColorSettings.query().$promise;\r\n };\r\n\r\n /**\r\n * Saves the given color setting\r\n * @param colorSetting\r\n * @returns\r\n */\r\n orderFactory.saveColorSetting = function (colorSetting) {\r\n var color = new ColorSettings();\r\n color.colorSetting = colorSetting;\r\n return color.$save();\r\n };\r\n\r\n /**\r\n * Gets the images for the given order id\r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.getCameraImagesForOrder = function (orderId, initiatedId) {\r\n return CameraImages.query({ orderId: orderId, initiatedId: initiatedId }).$promise;\r\n };\r\n\r\n /**\r\n * Sets the include in end report status\r\n * @param order\r\n * @returns\r\n */\r\n orderFactory.setIncludeInReportStatus = function (order) {\r\n var include = new IncludeInReportStatus();\r\n include.order = {\r\n OrderId: order.id,\r\n IncludeInReport: order.IncludeInReport\r\n };\r\n return include.$save();\r\n };\r\n\r\n /**\r\n * Sets the irrelevant status for user and order\r\n * @param participant\r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.setIrrelevantStatus = function (participant, orderId) {\r\n var irrelevantStatus = new IrrelevantStatus();\r\n irrelevantStatus.participant = { id: participant.id, IsIrrelevant: participant.IsIrrelevant }\r\n irrelevantStatus.orderId = orderId;\r\n\r\n return irrelevantStatus.$save();\r\n };\r\n\r\n /**\r\n * Gets the orders of type project\r\n * @param freeText\r\n * @param organizationId\r\n * @returns\r\n */\r\n orderFactory.getProjectOrders = function (freeText, organizationId) {\r\n return ProjectOrders.query({\r\n freeText: freeText,\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the orders for the given customer id\r\n * @param customerId\r\n * @returns\r\n */\r\n orderFactory.getOrdersForCustomer = function (customerId) {\r\n return OrdersForCustomers.query({ customerId: customerId });\r\n };\r\n\r\n /**\r\n * Saves report builder sort number\r\n * @param orders\r\n */\r\n orderFactory.saveOrdersReportBuilderSortNumber = function (orders) {\r\n ReportBuilderSortNumber.save(orders);\r\n };\r\n\r\n /**\r\n * Gets the order by the given project id\r\n * @param projectId\r\n * @returns\r\n */\r\n orderFactory.getProjectOrdersByProjectId = function (projectId) {\r\n return ProjectOrdersByProjectId.query({ projectId: projectId }).$promise;\r\n };\r\n\r\n /**\r\n * Updates the visible in app status for the given order id\r\n * @param orderId\r\n * @param isVisibleInApp\r\n * @returns\r\n */\r\n orderFactory.updateIsVisibleInApp = function (orderId, isVisibleInApp) {\r\n OrderIsVisibleInApp.save({\r\n orderId: orderId,\r\n isVisibleInApp: isVisibleInApp\r\n }, {});\r\n };\r\n\r\n /**\r\n * Gets the orders for the company page\r\n * @param organizationId\r\n * @param freeText\r\n * @returns\r\n */\r\n orderFactory.getOrdersForOrganizationPage = function (organizationId, freeText) {\r\n return OrdersForOrganizationPage.query({\r\n organizationId: organizationId,\r\n freeText: freeText\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the parent order that is not a task\r\n * @param parentId\r\n * @param order\r\n * @returns\r\n */\r\n orderFactory.getParentOrderIdThatIsNotTask = function (parentId, order) {\r\n if (order.id == parentId && !order.IsTask)\r\n return order.id;\r\n\r\n if (!order.Suborders)\r\n return null;\r\n\r\n for (var i = 0; i < order.SubOrders.length; i++) {\r\n var parentIdToReturn = orderFactory.getParentOrderIdThatIsNotTask(parentId, order.SubOrders[i]);\r\n if (parentIdToReturn)\r\n return parentIdToReturn;\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets if risk analysis for a given order will be included in its end-report or not\r\n * @param {any} mainOrder\r\n */\r\n orderFactory.toggleRiskAnalysisVisibilityInReport = function (mainOrder) {\r\n return RiskAnalysisVisibilityState.save({ id: mainOrder.id, IncludeRiskAnalysisInReport: mainOrder.IncludeRiskAnalysisInReport }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the status of the order in Cordel\r\n * @param {any} order\r\n */\r\n orderFactory.getOrderCordelStatus = function (order) {\r\n return OrderCordelStatus.get({ orderExternalId: order.OrderNumber, orderId: order.id }).$promise;\r\n };\r\n\r\n orderFactory.getTodaysOrdersForFrontPage = function () {\r\n return TodaysOrdersFrontPage.query().$promise;\r\n };\r\n\r\n /**\r\n * Gets the trips for the given order\r\n * @param orderId\r\n * @returns\r\n */\r\n orderFactory.getTrips = function (orderId) {\r\n return Trips.query({ orderId: orderId });\r\n };\r\n\r\n orderFactory.unassignTrip = function (tripId, orderId, assignedUserId) {\r\n var unassignTrip = new UnassignTrip();\r\n unassignTrip.tripId = tripId;\r\n unassignTrip.orderId = orderId;\r\n unassignTrip.assignedUserId = assignedUserId;\r\n return unassignTrip.$save();\r\n }\r\n\r\n orderFactory.saveOrderTrip = function (trip, orderId) {\r\n var orderTrip = new OrderTrip();\r\n orderTrip.TripId = trip.id;\r\n orderTrip.OrderId = orderId;\r\n orderTrip.Distance = trip.DistanceKilometers;\r\n orderTrip.IncludeTollPassesIntoHours = trip.IncludeTollPassesIntoHours;\r\n orderTrip.AssignedUserId = trip.Driver.UserId;\r\n orderTrip.TripDetails = trip;\r\n return orderTrip.$save();\r\n }\r\n\r\n orderFactory.getFailedCordelOrders = function (organizationId) {\r\n return FailedCordelOrders.query({ organizationId: organizationId }).$promise;\r\n }\r\n\r\n orderFactory.markOrderAsDeleted = function (failedCordelOrder) {\r\n var failedOrder = new FailedCordelOrders();\r\n\r\n failedOrder = _.merge(failedOrder, failedCordelOrder);\r\n\r\n return failedOrder.$save();\r\n }\r\n\r\n\r\n //used for OrdersController\r\n orderFactory.reverseOrders = true;\r\n orderFactory.predicateOrders = \"id\";\r\n orderFactory.currentPageOrders = 1;\r\n orderFactory.includeDeactivatedItems = false;\r\n orderFactory.includeCompletedItems = false;\r\n //used for OrderController\r\n orderFactory.order = {};\r\n orderFactory.isExecutionEnded = false;\r\n orderFactory.selectedOrderId = null;\r\n orderFactory.useOldPersonnel = true;\r\n\r\n orderFactory.mainOrder = {};\r\n orderFactory.displaySaveMessage = false;\r\n orderFactory.displayCordelGetMessage = false;\r\n orderFactory.displayCordelPostMessage = false;\r\n orderFactory.applicationChange = {\r\n CREATE: 0,\r\n EDIT: 1,\r\n DELETE: 2\r\n };\r\n orderFactory.orderChange = {\r\n OrderDate: 0,\r\n StartDate: 1,\r\n EndDate: 2\r\n };\r\n\r\n return orderFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n NotificationEditorController.$inject = [\r\n '$scope',\r\n '$sce',\r\n 'ExecutionFactory'\r\n ];\r\n\r\n angular.module('NotificationEditor').controller('NotificationEditorController', NotificationEditorController);\r\n\r\n /**\r\n * Controller used for the email notification template\r\n */\r\n function NotificationEditorController(\r\n $scope,\r\n $sce,\r\n ExecutionFactory\r\n ) {\r\n\r\n $scope.hasFocus = false;\r\n\r\n if ($scope.isSms && !$scope.readOnly) {\r\n var footerText;\r\n var headerText;\r\n var contentText;\r\n\r\n\r\n footerText = $scope.notificationTemplate.Footer;\r\n\r\n try {\r\n headerText = angular.element($scope.notificationTemplate.Header).text();\r\n } catch (ex) {\r\n headerText = $scope.notificationTemplate.Header;\r\n }\r\n\r\n try {\r\n contentText = angular.element($scope.notificationContent).text();\r\n } catch (ex) {\r\n contentText = $scope.notificationContent;\r\n }\r\n\r\n\r\n if (footerText) {\r\n $scope.notificationTemplate.Footer = footerText;\r\n }\r\n\r\n if (headerText) {\r\n $scope.notificationTemplate.Header = headerText;\r\n }\r\n\r\n if (contentText) {\r\n $scope.notificationContent = contentText;\r\n }\r\n };\r\n\r\n if ($scope.notificationRecipients == null) {\r\n $scope.notificationRecipients = [];\r\n };\r\n\r\n $scope.editor = {\r\n editingHeader: false,\r\n editingFooter: false,\r\n editingContent: false,\r\n editingRecipients: false,\r\n tempContent: '',\r\n tempHeader: '',\r\n tempFooter: '',\r\n tempRecipients: []\r\n };\r\n\r\n var notificationPattern = function (value) {\r\n var regexp;\r\n\r\n if ($scope.isSms) {\r\n regexp = /^[0-9]*$/;\r\n } else {\r\n regexp = /^([\\w.\\-\\_]{2,30})+@([\\w-\\_]{1,30})+([\\.]{1,1}[\\w]{1,30}|[\\.]{1,1})+([\\w]{1,10})$/;\r\n }\r\n\r\n return regexp.test(value);\r\n };\r\n\r\n /**\r\n * Turns any given string into a list of emails\r\n * Each recipient is verfied to meet the correct pattern\r\n * @param {any} string\r\n */\r\n var notificationStringToList = function (string) {\r\n string = string.replace(/^[\\s,\\|;]+/, '');\r\n string = string.replace(/[\\s,\\|;]+$/, '');\r\n\r\n if (!string && !string.replace(/[\\s,\\|;]+/, '')) {\r\n return [];\r\n }\r\n\r\n var list = string.split(/[\\s,\\|;]+/);\r\n\r\n var error = false;\r\n angular.forEach(list, function (item) {\r\n if (notificationPattern(item) == false) error = true;\r\n });\r\n\r\n if (!error) {\r\n $scope.recipientsError = false;\r\n return list;\r\n }\r\n else {\r\n $scope.recipientsError = true;\r\n return null;\r\n }\r\n };\r\n\r\n $scope.editor.tempRecipients = $scope.notificationRecipients;\r\n //FIX: what is this supposed to do??\r\n if ($scope.notificationRecipients != null && $scope.notificationRecipients.length > 0) {\r\n $scope.editor.tempRecipients = $scope.notificationRecipients;\r\n };\r\n\r\n $scope.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n /**\r\n * Sets the given section as editable\r\n * @param {any} section \r\n */\r\n $scope.editNotificationTemplate = function (section) {\r\n if (section == 'HEADER') {\r\n $scope.editor.tempHeader = $scope.notificationTemplate.Header;\r\n $scope.editor.editingHeader = true;\r\n } else if (section == 'FOOTER') {\r\n $scope.editor.tempFooter = $scope.notificationTemplate.Footer;\r\n $scope.editor.editingFooter = true;\r\n } else if (section == 'CONTENT') {\r\n $scope.editor.tempContent = $scope.notificationContent;\r\n $scope.editor.editingContent = true;\r\n }\r\n };\r\n\r\n /**\r\n * Sets the given section as non editable\r\n * Save changes if provided\r\n * @param {} section \r\n * @param {} saveChanges \r\n * @returns {} \r\n */\r\n $scope.closeNotificationTemplate = function (section, saveChanges) {\r\n if (section == 'HEADER') {\r\n if (saveChanges) $scope.notificationTemplate.Header = $scope.editor.tempHeader;\r\n $scope.editor.tempHeader = '';\r\n $scope.editor.editingHeader = false;\r\n } else if (section == 'FOOTER') {\r\n if (saveChanges) $scope.notificationTemplate.Footer = $scope.editor.tempFooter;\r\n $scope.editor.tempFooter = '';\r\n $scope.editor.editingFooter = false;\r\n } else if (section == 'CONTENT') {\r\n if (saveChanges) $scope.notificationContent = $scope.editor.tempContent;\r\n $scope.editor.tempContent = '';\r\n $scope.editor.editingContent = false;\r\n }\r\n };\r\n\r\n /**\r\n * Adds any given text as recipient if the text meets the required expectations\r\n * @param {} freetext \r\n * @returns {} \r\n */\r\n $scope.addCustomRecipients = function (freetext) {\r\n\r\n var list = notificationStringToList(freetext);\r\n\r\n if (list != null && list.length > 0) {\r\n\r\n angular.forEach(list, function (item) {\r\n $scope.addRecipient(item);\r\n });\r\n\r\n $scope.recipientsError = false;\r\n } else {\r\n $scope.recipientsError = true;\r\n }\r\n };\r\n\r\n /**\r\n * Gets the list of contacts for the current company\r\n * @param {} freetext \r\n * @returns {} \r\n */\r\n $scope.getOrganizationContacts = function (freetext) {\r\n var promise = ExecutionFactory.getOrganizationContacts(freetext, $scope.isSms ? 'PHONE' : 'EMAIL', $scope.notificationOrganizationId);\r\n promise.$promise.then(function (result) {\r\n $scope.organizationContacts = result;\r\n });\r\n };\r\n\r\n /**\r\n * Adds the given recipient to the recipient list\r\n * @param {} item \r\n * @returns {} \r\n */\r\n $scope.addRecipient = function (item) {\r\n\r\n if (recipientExists(item) == false) {\r\n $scope.editor.tempRecipients.push(item);\r\n $scope.notificationRecipients = $scope.editor.tempRecipients;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Checks if the given recipient exists\r\n * @param {any} item\r\n */\r\n function recipientExists(item) {\r\n var returnData = false;\r\n\r\n var notifInfo = $scope.isSms ? $scope.notificationContact.Mobile : $scope.notificationContact.Email;\r\n\r\n if (notifInfo == item) {\r\n return true;\r\n };\r\n\r\n if ($scope.editor.tempRecipients != null && $scope.editor.tempRecipients.length > 0) {\r\n angular.forEach($scope.editor.tempRecipients, function (notif) {\r\n if (notif == item) {\r\n returnData = true;\r\n };\r\n });\r\n } else {\r\n return false;\r\n }\r\n\r\n return returnData;\r\n }\r\n\r\n /**\r\n * Removes the recipient at the given index\r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.removeRecipient = function (index) {\r\n $scope.editor.tempRecipients.splice(index, 1);\r\n $scope.notificationRecipients = $scope.editor.tempRecipients;\r\n };\r\n\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n angular.module('NotificationEditor').directive('notificationEditor', function () { // can't have one of the words be 'data' because angular will strip it\r\n return {\r\n restrict: 'EA',\r\n templateUrl: 'Scripts/organization/notificationEditorTemplate.html',\r\n scope: {\r\n notificationTemplate: '=?',\r\n notificationContent: '=?',\r\n notificationRecipients: '=?',\r\n notificationContact: '=?',\r\n fullyEditable: '=?',//if true is used for edit emails, if false is used onty to edit template\r\n isSms: '=?', //if true editor is used for sms else is used for emails\r\n readOnly: '=?', //used to see existing message,displays notificationContent and recipients\r\n notificationOrganizationId: '=?'\r\n },\r\n controller: 'NotificationEditorController'\r\n };\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$filter',\r\n '$q',\r\n '$uibModal',\r\n '$sce',\r\n 'titleService',\r\n 'menuService',\r\n 'dialogService',\r\n 'errorService',\r\n 'infoService',\r\n 'OrganizationFactory',\r\n 'ProcessListFactory',\r\n 'ExecutionFactory',\r\n 'ProductFactory',\r\n 'UserFactory',\r\n 'loadingService',\r\n '$interval',\r\n 'PingService',\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n 'OrderFactory',\r\n '$route',\r\n '_',\r\n '$localStorage',\r\n 'TabUtilService',\r\n '$rootScope',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular.module('organization').controller('OrganizationController', OrganizationController);\r\n\r\n function OrganizationController(\r\n $scope,\r\n $routeParams,\r\n $filter,\r\n $q,\r\n $uibModal,\r\n $sce,\r\n titleService,\r\n menuService,\r\n dialogService,\r\n errorService,\r\n infoService,\r\n OrganizationFactory,\r\n ProcessListFactory,\r\n ExecutionFactory,\r\n ProductFactory,\r\n UserFactory,\r\n loadingService,\r\n $interval,\r\n PingService,\r\n $timeout,\r\n QualityHandbookFactory,\r\n OrderFactory,\r\n $route,\r\n _,\r\n $localStorage,\r\n TabUtilService,\r\n $rootScope,\r\n sessionInformationService\r\n ) {\r\n\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 10;\r\n $scope.numPages = 1;\r\n $scope.activeTab = 'IDENTIFICATION';\r\n $scope.pageReady = false;\r\n $scope.hasLoggedUserFullAccess = hasLoggedUserFullAccess;\r\n\r\n var organizationOriginal = {};\r\n var organizationsAccessOriginal = {};\r\n\r\n var allDataTypes = [];\r\n var processListsByDataAbout = [];\r\n var processListsByAvailability = [];\r\n var reports = [];\r\n var executions = [], executionsAvailability = [];\r\n var workingHourCategoryModal;\r\n\r\n var processListsByDataAboutPromise = null;\r\n var executionsPromise = null, executionsAvailabilityPromise = null;\r\n\r\n $scope.identificationTab = { tabName: 'identification', tabActive: true };\r\n $scope.settings = { tabName: 'settings', tabActive: false };\r\n $scope.orgChartTab = {}\r\n $scope.dataDetailsTypes = [];\r\n $scope.catalogs = [];\r\n $scope.showVismaError = false;\r\n $scope.showJobOfficeError = false;\r\n $scope.hideIntegrationInputFields = true;\r\n var organizationId = $routeParams.organizationId;\r\n $scope.intellisense = { isOrderOpen: false, isContractOpen: false, isAdditionalOpen: false, isStartOpen: false, isEndOpen: false };\r\n\r\n $scope.workingHourCategoryPredicate = 'Description';\r\n $scope.workingHourCategoryReverse = false;\r\n\r\n //Must be object, otherwise it won't work\r\n $scope.includeDeactivated = { value: false };\r\n $scope.getOrganizationWorkingHourCategories = getOrganizationWorkingHourCategories;\r\n\r\n $scope.global = {};\r\n\r\n $scope.editor = { editingHeader: false, editingFooter: false, tempHeader: '', tempFooter: '' };\r\n\r\n $scope.users = [];\r\n $scope.print = { showPrintButton: false };\r\n\r\n /**\r\n * Gets the order name, either with cordel id or vbsmart id\r\n */\r\n function getOrderName() {\r\n return ($scope.organization.Order.OrderNumber ? 'EXT. ID ' + $scope.organization.Order.OrderNumber : 'ID ' + $scope.organization.Order.id) +\r\n ' ' + ($scope.organization.Order.Customer && $scope.organization.Order.Customer.LastName ? $scope.organization.Order.Customer.LastName : '');\r\n };\r\n\r\n /**\r\n * Gets the default catalogs name\r\n * @param {any} productCatalogs\r\n */\r\n function getDefaultProductCatalogsName(productCatalogs) {\r\n //TODO: use a simpler toString()\r\n var nameToReturn = '';\r\n\r\n for (var i = 0; i < productCatalogs.length; i++) {\r\n if (productCatalogs[i].IsDefault)\r\n nameToReturn += productCatalogs[i].Name + ', ';\r\n }\r\n\r\n nameToReturn = nameToReturn.slice(0, -2);\r\n return nameToReturn;\r\n };\r\n\r\n /**\r\n * Gets the users for a given organization id\r\n * @param {any} organizationId\r\n */\r\n function getUsers(organizationId) {\r\n return UserFactory.getUsersForOrganizationPage(organizationId).$promise;\r\n };\r\n\r\n /**\r\n * Load the details for the given organization id\r\n * @param {any} organizationId\r\n */\r\n function loadOrganization(organizationId) {\r\n if (organizationId) {\r\n OrganizationFactory.getOrganization(organizationId)\r\n .$promise\r\n .then(function (result) {\r\n $scope.organization = result;\r\n\r\n // convert to int the unhandled number of days to be displayed into the input\r\n $scope.organization.DeviationUnhandledNumberOfDays = _.parseInt($scope.organization.DeviationUnhandledNumberOfDays);\r\n\r\n return OrganizationFactory.getOrganizationAccess(organizationId);\r\n }).then(function (result) {\r\n $scope.organizationsAccess = result;\r\n\r\n angular.forEach($scope.organizationsAccess, function (access) {\r\n access.HadAccess = access.HasAccess;\r\n });\r\n\r\n\r\n if ($scope.organization.FrontPageReportId) {\r\n reports.forEach(function (report) {\r\n if (report.id === $scope.organization.FrontPageReportId)\r\n $scope.organization.FrontPageReportId = report;\r\n });\r\n }\r\n\r\n $scope.getIntegrationTypes();\r\n\r\n if ($scope.organization.IntegrationType.ProgId == \"CORDEL\") {\r\n $scope.hideIntegrationInputFields = false;\r\n $scope.showVismaError = false;\r\n $scope.showJobOfficeError = false;\r\n } else if ($scope.organization.IntegrationType.ProgId == \"INTEGRATION_VISMA\") {\r\n $scope.showVismaError = true;\r\n $scope.showJobOfficeError = false;\r\n } else if ($scope.organization.IntegrationType.ProgId == \"INTEGRATION_JOBOFFICE\") {\r\n $scope.showVismaError = false;\r\n $scope.showJobOfficeError = true;\r\n }\r\n\r\n if ($scope.organization.Order && $scope.organization.Order.id) {\r\n $scope.organization.Order.Name = getOrderName();\r\n }\r\n\r\n if (!$scope.organization.EmailTemplate) $scope.organization.EmailTemplate = { Header: '', Footer: '' };\r\n\r\n if ($scope.organization.ProductCatalogs && $scope.organization.ProductCatalogs.length > 0)\r\n $scope.organization.Catalog = {\r\n Name: getDefaultProductCatalogsName($scope.organization.ProductCatalogs)\r\n };\r\n\r\n return OrganizationFactory.getOrganizationTypes(organizationId);\r\n }).then(function (result) {\r\n $scope.organization.BusinessRoleList = result;\r\n\r\n var promises = [];\r\n\r\n if ($scope.organization.GeneratingEndData)\r\n promises.push(getEndDataStatus());\r\n\r\n promises.push(postInit());\r\n return $q.all(promises);\r\n }).then(function () {\r\n\r\n initTabs();\r\n // save the reference to the promise\r\n // for sending it into component\r\n $scope.usersPromise = getUsers($scope.organization.id);\r\n\r\n return $scope.usersPromise;\r\n\r\n }).then(function (result) {\r\n if (!result || result.length == 0) {\r\n $scope.pageReady = true;\r\n return;\r\n }\r\n\r\n $scope.users = result;\r\n\r\n angular.forEach($scope.users, function (user) {\r\n user.FullName = (user.FirstName ? user.FirstName.trim() : '') + ' ' + (user.LastName ? user.LastName.trim() : '');\r\n });\r\n\r\n $scope.organization.Owner = {\r\n Name: \"\"\r\n };\r\n\r\n $scope.organization.Owner.Name = loadOwnerName($scope.organization.Owners);\r\n\r\n organizationOriginal = angular.copy($scope.organization);\r\n organizationsAccessOriginal = angular.copy($scope.organizationsAccess);\r\n $scope.pageReady = true;\r\n\r\n $rootScope.$broadcast('chart:organization-edited', { id: $scope.organization.id });\r\n });\r\n } else {\r\n $scope.organization = OrganizationFactory.getOrganizationToSave();\r\n $scope.organization.Active = true;\r\n $scope.organization.Owner = {\r\n Name: \"\"\r\n };\r\n\r\n //set order to avoid angular errors\r\n $scope.organization.Order = { IsOpen: false };\r\n\r\n $scope.getIntegrationTypes();\r\n\r\n if (!$scope.organization.EmailTemplate)\r\n $scope.organization.EmailTemplate = { Header: '', Footer: '' };\r\n\r\n postInit()\r\n .then(function () {\r\n initTabs();\r\n $scope.pageReady = true;\r\n });\r\n\r\n titleService.changeTitle($filter('translate')('txtNewOrganization'));\r\n }\r\n };\r\n\r\n function loadOwnerName(owners) {\r\n\r\n if (!owners || owners.length === 0)\r\n return '';\r\n\r\n return _.map(owners, function (currentOwner) {\r\n return currentOwner.FirstName + ' ' + currentOwner.LastName;\r\n }).toString();\r\n }\r\n\r\n /**\r\n * Checks if there exists an active tab stored in session storage\r\n */\r\n function checkForCachedTab() {\r\n\r\n var tab = getActiveTabFromCache();\r\n\r\n if (!tab || !tab.tabData) {\r\n return;\r\n }\r\n\r\n if (tab.isDynamicGenerated) {\r\n\r\n if (!$scope.dataDetailsTypes || $scope.dataDetailsTypes.length === 0) {\r\n return;\r\n }\r\n\r\n // search for the correct data details tab and activate it\r\n\r\n for (var index = 0; index < $scope.dataDetailsTypes.length; index++) {\r\n\r\n var currentDataDetailType = $scope.dataDetailsTypes[index];\r\n\r\n if (currentDataDetailType.id !== tab.id) {\r\n continue;\r\n }\r\n\r\n currentDataDetailType.tabActive = true;\r\n break;\r\n }\r\n\r\n\r\n } else {\r\n $scope[tab.tabName] = tab.tabData;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Get the front page reports for the company\r\n */\r\n function loadReports() {\r\n var promise = OrganizationFactory.getReports();\r\n promise.$promise.then(function (data) {\r\n reports = data;\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether there are any changes done \r\n */\r\n function isDirty() {//todo rename the function properly\r\n if (angular.toJson($scope.organization) !== angular.toJson(organizationOriginal) || angular.toJson($scope.organizationsAccess) !== angular.toJson(organizationsAccessOriginal)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n function postInit() {\r\n return $q.all([initalizeDataDetailsTabs(), getProcessListsByDataAbout(), getExecutions()]);\r\n };\r\n\r\n /**\r\n * Gets the processlist data types \r\n */\r\n var getProcessListDataTypes = function () {\r\n var processListDataTypesPromise = ProcessListFactory.getProcessListDataTypes('BOT_PROCESSLIST_MANAGEMENT');\r\n return processListDataTypesPromise.$promise.then(function (result) {\r\n allDataTypes = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the working hour categories\r\n */\r\n function getOrganizationWorkingHourCategories() {\r\n if (organizationId) {\r\n var organizationCategoriesPromise = OrganizationFactory.getOrganizationWorkingHourCategories($scope.organization.id, $scope.includeDeactivated.value);\r\n organizationCategoriesPromise.$promise.then(function (result) {\r\n $scope.organization.WorkingHourCategories = result;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Sets up the data details tabs \r\n */\r\n function initalizeDataDetailsTabs() {\r\n\r\n return getProcessListDataTypes().then(function () {\r\n var userDataType, i;\r\n\r\n // first we need to find the dataAboutType 'User'\r\n for (i = 0; i < allDataTypes.length; i++) {\r\n if (allDataTypes[i].ProgId == 'GOT_ORGANIZATION') {\r\n userDataType = allDataTypes[i];\r\n break;\r\n }\r\n }\r\n\r\n if (userDataType) {\r\n // add all the dataDetails for the dataAboutType 'User' in the tab list\r\n for (i = 0; i < allDataTypes.length; i++) {\r\n if (!!allDataTypes[i].Parent && allDataTypes[i].Parent.id == userDataType.id) {\r\n var dataDetailsType = allDataTypes[i];\r\n dataDetailsType.tabName = dataDetailsType.Name;\r\n dataDetailsType.tabActive = false;\r\n dataDetailsType.SortNumber = parseInt(dataDetailsType.SortNumber);\r\n $scope.dataDetailsTypes.push(dataDetailsType);\r\n }\r\n }\r\n }\r\n\r\n checkForCachedTab();\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Changes the sort for categories based on the given predicate\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n $scope.changeWorkingHourCategoryOrder = function (orderBy) {\r\n if (orderBy != $scope.workingHourCategoryPredicate) {\r\n $scope.workingHourCategoryPredicate = orderBy;\r\n } else {\r\n $scope.workingHourCategoryReverse = !$scope.workingHourCategoryReverse;\r\n }\r\n };\r\n\r\n /**\r\n * Gets a list of process lists based on the organization data about\r\n */\r\n function getProcessListsByDataAbout() {\r\n var deferred = $q.defer();\r\n ProcessListFactory.getProcessListByData('GOT_ORGANIZATION', null, false, $scope.organization.id)\r\n .$promise\r\n .then(function (result) {\r\n processListsByDataAbout = $filter('orderBy')(result, \"Name\", false);\r\n deferred.resolve();\r\n });\r\n\r\n processListsByDataAboutPromise = deferred.promise;\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the process lists based on the given data details\r\n * @param {} dataDetails \r\n * @returns {} \r\n */\r\n $scope.getProcessListsByDataDetails = function (dataDetails) {\r\n var deferred = $q.defer();\r\n\r\n processListsByDataAboutPromise.then(function () {\r\n var processListsByDataDetails = [];\r\n\r\n for (var i = 0; i < processListsByDataAbout.length; i++) {\r\n if (processListsByDataAbout[i].DataDetails.ProgId == dataDetails.ProgId) {\r\n processListsByDataDetails.push(processListsByDataAbout[i]);\r\n }\r\n }\r\n\r\n deferred.resolve(processListsByDataDetails);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the process lists that have set \"Available on organization\"\r\n * @returns {} \r\n */\r\n $scope.getProcessListsByAvailability = function () {\r\n var deferred = $q.defer();\r\n\r\n ProcessListFactory.getProcessListByAvailability(false, $scope.organization.id, 'GOT_ORGANIZATION').$promise.then(function (result) {\r\n processListsByAvailability = $filter('orderBy')(result, \"Name\", false);\r\n deferred.resolve(processListsByAvailability);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Get the executions for the current organization\r\n */\r\n function getExecutions() {\r\n return ExecutionFactory.getExecutions(organizationId, 'GOT_ORGANIZATION').$promise.then(function (result) {\r\n executions = $filter('orderBy')(result, \"InitiatedProcessList.Name\", false);\r\n });\r\n }\r\n\r\n /**\r\n * Get the orders to be set as internal order\r\n * @param {} freeText \r\n * @returns {} \r\n */\r\n $scope.getOrders = function (freeText) {\r\n OrganizationFactory.getOrders(organizationId, freeText).then(function (orders) {\r\n $scope.orders = orders;\r\n $scope.intellisense.isOrderOpen = true;\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Sets the internal order for the company\r\n * @param {} order \r\n * @returns {} \r\n */\r\n $scope.setInternalOrder = function (order) {\r\n $scope.organization.Order = order;\r\n $scope.organization.Order.Name = getOrderName();\r\n $scope.intellisense.isOrderOpen = false;\r\n };\r\n\r\n /**\r\n * Get the executions based on the data details\r\n * @param {} dataDetails\r\n * @param {} includeDeactivatedItems\r\n * @returns {} \r\n */\r\n $scope.getExecutionsByDataDetails = function (dataDetails, includeDeactivatedItems) {\r\n var deferred = $q.defer();\r\n\r\n getExecutions(includeDeactivatedItems).then(function () {\r\n var executionsByDataDetails = [];\r\n for (var i = 0; i < executions.length; i++) {\r\n if (executions[i].InitiatedProcessList.DataDetails.ProgId == dataDetails.ProgId) {\r\n executionsByDataDetails.push(executions[i]);\r\n }\r\n }\r\n\r\n deferred.resolve(executionsByDataDetails);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the executions based on the \"Available on organization\" setting\r\n * @param {} includeDeactivatedItems\r\n * @returns {} \r\n */\r\n $scope.getExecutionsByAvailability = function (includeDeactivatedItems) {\r\n var deferred = $q.defer();\r\n ExecutionFactory.getExecutions(organizationId, 'GOT_ORGANIZATION', 'GOT_ORGANIZATION', includeDeactivatedItems).$promise.then(function (result) {\r\n executionsAvailability = $filter('orderBy')(result, \"InitiatedProcessList.Name\", false);\r\n deferred.resolve(executionsAvailability);\r\n });\r\n\r\n executionsAvailabilityPromise = deferred.promise;\r\n\r\n return deferred.promise;\r\n }\r\n\r\n $scope.canShowDataDetailsTabs = function () {\r\n return organizationId > 0\r\n && $scope.loggedUser && (_.some(['ADMIN', 'ADMIN_ALL', 'MANAGER'], function (r) { return r === $scope.loggedUser.Group.ProgId }))\r\n && ($scope.loggedUser.Organization.Central || $scope.loggedUser.Organization.id == organizationId);\r\n };\r\n\r\n /**\r\n * Gets active tab from cache\r\n * @returns - a object which holds active tab name and its data\r\n */\r\n function getActiveTabFromCache() {\r\n\r\n return $localStorage.activeTab;\r\n\r\n }\r\n\r\n /**\r\n * Saves the current company\r\n * @returns {} \r\n */\r\n $scope.saveOrganization = function () {\r\n if (!$scope.disableSaveOrganization()) {\r\n if (!$scope.organization.IntegrationType)\r\n $scope.organization.IntegrationType = { id: null };\r\n\r\n $scope.organization.OrganizationsAccess = OrganizationFactory.getValidOrganizationsAccessToSave($scope.organizationsAccess);\r\n\r\n var organizationToSave = OrganizationFactory.saveOrganization($scope.organization);\r\n organizationToSave.then(function () {\r\n $route.reload();\r\n });\r\n } else {\r\n checkMenuAccessAndNavigate();\r\n }\r\n };\r\n\r\n /**\r\n * Closes the organization window\r\n * @param {} newUrl \r\n * @returns {} \r\n */\r\n $scope.closeOrganization = function (newUrl) {\r\n if (isDirty()) {\r\n dialogService.showConfirmDialog('txtCloseOrganizationTitle', 'txtCloseOrganizationMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n checkMenuAccessAndNavigate(newUrl);\r\n }\r\n });\r\n\r\n } else {\r\n checkMenuAccessAndNavigate(newUrl);\r\n }\r\n };\r\n\r\n /**\r\n * Checks whether the user has access to company list window\r\n * @param {any} url\r\n */\r\n function checkMenuAccessAndNavigate(url) {\r\n if (url)\r\n $scope.go(url);\r\n else if (menuService.checkMenuAccess('/organizations')) {\r\n $scope.go('/organizations');\r\n menuService.setSelectedMenu(menuService.getParentMenuByHref('/organizations'));\r\n } else {\r\n $scope.go('/home');\r\n menuService.setSelectedMenu(menuService.getMenuByHref('/home'));\r\n }\r\n };\r\n\r\n /**\r\n * Checks whether the save button should be disabled\r\n * @returns {} \r\n */\r\n $scope.disableSaveOrganization = function () {\r\n if ($scope.organization != null) {\r\n if ($scope.organization.Email == null) {\r\n return true;\r\n }\r\n }\r\n if ($scope.organization) {\r\n if ($scope.organization.StartProcessList && $scope.organization.StartProcessList.id &&\r\n (!$scope.organization.EndProcessList || !$scope.organization.EndProcessList.id))\r\n return true;\r\n if ($scope.organization.EndProcessList && $scope.organization.EndProcessList.id &&\r\n (!$scope.organization.StartProcessList || !$scope.organization.StartProcessList.id))\r\n return true;\r\n }\r\n\r\n if ($scope.organization && $scope.organization.id == undefined) {\r\n if ($scope.organization != undefined\r\n && $scope.organization.Name != undefined\r\n && $scope.organization.OrganizationNr != undefined\r\n && $scope.organization.Email != undefined\r\n && $scope.invalidOrganizationNr($scope.organization.OrganizationNr) == false)\r\n return false;\r\n\r\n return true;\r\n }\r\n else {\r\n var tempOrg = angular.copy($scope.organization);\r\n var tempOriginalOrg = angular.copy(organizationOriginal);\r\n if (tempOrg && tempOrg.BusinessRoleList)\r\n for (var index = 0; index < tempOrg.BusinessRoleList.length; index++) {\r\n tempOrg.BusinessRoleList[index].Functions = undefined;\r\n if (tempOriginalOrg.BusinessRoleList && tempOriginalOrg.BusinessRoleList[index])\r\n tempOriginalOrg.BusinessRoleList[index].Functions = undefined;\r\n }\r\n if (angular.toJson(tempOrg) != angular.toJson(tempOriginalOrg) || angular.toJson($scope.organizationsAccess) !== angular.toJson(organizationsAccessOriginal))\r\n return false;\r\n return true;\r\n }\r\n };\r\n\r\n /**\r\n * Gets the correct organization number\r\n * @param {any} nr\r\n */\r\n var getModulus11 = function (nr) {\r\n var i = nr.length;\r\n var dProduct = 0;\r\n var lDigit = 2;\r\n var modsiffer, resultfmod;\r\n\r\n while (i >= 1) {\r\n var oneDigit = nr.substring(i - 1, i);\r\n if (oneDigit)\r\n oneDigit = parseInt(oneDigit);\r\n else\r\n oneDigit = 0;\r\n dProduct = dProduct + oneDigit * lDigit;\r\n lDigit++;\r\n if (lDigit == 8)\r\n lDigit = 2;\r\n i--;\r\n }\r\n\r\n if (dProduct % 11 == 1) {\r\n modsiffer = '-';\r\n return modsiffer;\r\n } else {\r\n resultfmod = dProduct % 11;\r\n if (resultfmod == 0) {\r\n modsiffer = '0';\r\n } else {\r\n modsiffer = (11 - resultfmod).toString();\r\n }\r\n return modsiffer;\r\n }\r\n };\r\n\r\n /**\r\n * Checks whether the organization number provided is valid or not\r\n * @param {} orgNr \r\n * @returns {} \r\n */\r\n $scope.invalidOrganizationNr = function (orgNr) {\r\n if (orgNr == undefined || orgNr.length != 9)\r\n return true;\r\n\r\n var root = orgNr.slice(0, 8);\r\n //modulus11\r\n var answer = getModulus11(root);\r\n if (answer == orgNr.slice(8, 9))\r\n return false;\r\n else\r\n return true;\r\n };\r\n\r\n /**\r\n * Gets the available integrations\r\n * @returns {} \r\n */\r\n $scope.getIntegrationTypes = function () {\r\n return OrganizationFactory.getIntegrationTypes()\r\n .$promise\r\n .then(function (result) {\r\n $scope.integrationTypes = result;\r\n $scope.selectedIntegrationn = $scope.organization.IntegrationType;\r\n });\r\n };\r\n\r\n /**\r\n * Sets the current integration\r\n * @param {} item \r\n * @returns {} \r\n */\r\n $scope.changeIntegration = function (item) {\r\n $scope.showVismaError = false;\r\n $scope.showJobOfficeError = false;\r\n $scope.organization.IntegrationType = item;\r\n if (item == null) {\r\n $scope.hideIntegrationInputFields = true;\r\n }\r\n else if (item.ProgId == \"CORDEL\") {\r\n $scope.hideIntegrationInputFields = false;\r\n }\r\n else if (item.ProgId == \"INTEGRATION_VISMA\") {\r\n $scope.showVismaError = true;\r\n $scope.hideIntegrationInputFields = true;\r\n }\r\n else if (item.ProgId == \"INTEGRATION_JOBOFFICE\") {\r\n $scope.showJobOfficeError = true;\r\n $scope.hideIntegrationInputFields = true;\r\n }\r\n };\r\n\r\n //TODO: move into a separate file\r\n /************ WORKING HOUR CATEGORIES TAB *************/\r\n /**\r\n * Opens the category modal with the form\r\n * @param {} category \r\n * @returns {} \r\n */\r\n $scope.openWokingHourCategoryModal = function (category) {\r\n $scope.workingHourCategory = category;\r\n\r\n workingHourCategoryModal = $uibModal.open({\r\n templateUrl: 'Scripts/organization/modalWorkingHourCategoryPartial.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n };\r\n\r\n $scope.closeWorkingHourCategoryModal = function () {\r\n workingHourCategoryModal.dismiss('cancel');\r\n };\r\n\r\n /**\r\n * Saves the given category\r\n * @param {} category \r\n * @returns {} \r\n */\r\n $scope.saveWorkingHourCategory = function (category) {\r\n var categorySaved = OrganizationFactory.saveOrganizationWorkingHourCategory(category, organizationId);\r\n categorySaved.then(function () {\r\n getOrganizationWorkingHourCategories(organizationId);\r\n $scope.closeWorkingHourCategoryModal();\r\n });\r\n };\r\n\r\n /************ SETTINGS TAB *************/\r\n $scope.saveOrganizationTypes = function () {\r\n var saveTypes = OrganizationFactory.saveOrganizationTypes($scope.organization.BusinessRoleList, organizationId);\r\n saveTypes.then(function () {\r\n var defaultsPromise = OrganizationFactory.getOrganizationTypes(organizationId);\r\n defaultsPromise.$promise.then(function (result) {\r\n $scope.organization.BusinessRoleList = result;\r\n });\r\n });\r\n };\r\n\r\n //don't think is used anymore\r\n $scope.changeActive = function (businessRole) {\r\n var currentList = $scope.organization.BusinessRoleList;\r\n var activeTypes = 0;\r\n for (var index = 0; index < currentList.length; index++) {\r\n if (currentList[index].Active)\r\n activeTypes++;\r\n }\r\n if (activeTypes > 1 || businessRole.Active == false)\r\n businessRole.Active = !businessRole.Active;\r\n else\r\n errorService.changeError($filter('translate')(\"txtRrequiredActive\"));\r\n };\r\n\r\n //don't think is used anymore\r\n $scope.newBusinessRole = function () {\r\n var type = {};\r\n type.Active = true;\r\n type.exists = true;\r\n if (!$scope.organization.BusinessRoleList)\r\n $scope.organization.BusinessRoleList = [];\r\n $scope.organization.BusinessRoleList.splice(0, 0, type);\r\n };\r\n\r\n //don't think is used anymore\r\n $scope.disabledBusinessRoles = function () {\r\n var returned = false;\r\n if ($scope.organization && $scope.organization.BusinessRoleList)\r\n for (var index = 0; index < $scope.organization.BusinessRoleList.length; index++) {\r\n if ($scope.organization.BusinessRoleList[index].Name == \"\" || $scope.organization.BusinessRoleList[index].Name == undefined) {\r\n returned = true;\r\n break;\r\n }\r\n }\r\n return returned;\r\n };\r\n\r\n //don't think is used anymore\r\n $scope.checkExisting = function (type, typeIndex) {\r\n var index;\r\n\r\n for (index = 0; index < $scope.organization.BusinessRoleList.length; index++) {\r\n if (index != typeIndex && (type.Name == undefined || type.Name.length == 0 || $scope.organization.BusinessRoleList[index].Name == type.Name)) {\r\n errorService.changeError($filter('translate')('txtDuplicate'));\r\n type.exists = true;\r\n return;\r\n }\r\n }\r\n type.exists = false;\r\n return;\r\n };\r\n\r\n\r\n\r\n /**\r\n * Get the list of processlists based on the search criteria\r\n * @param {} freeText \r\n * @param {} isContract \r\n * @param {} isAdditional \r\n * @param {} isStart \r\n * @param {} isEnd \r\n * @returns {} \r\n */\r\n $scope.getProcessLists = function (freeText, isContract, isAdditional, isStart, isEnd) {//use only one freaking function to get all the processlists\r\n ProcessListFactory.getProcessListOrder(freeText, organizationId).$promise.then(function (result) {\r\n var allProcesslists = result;\r\n for (var index = 0; index < allProcesslists.length; index++) {\r\n allProcesslists[index].id = parseInt(allProcesslists[index].id);\r\n }\r\n allProcesslists = $filter('orderBy')(allProcesslists, \"id\", true);\r\n $scope.processLists = allProcesslists;\r\n\r\n $scope.intellisense.isContractOpen = isContract;\r\n $scope.intellisense.isAdditionalOpen = isAdditional;\r\n $scope.intellisense.isStartOpen = isStart;\r\n $scope.intellisense.isEndOpen = isEnd;\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Sets the start processlist\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n $scope.setStartProcessList = function (processList) {\r\n $scope.organization.StartProcessList = processList;\r\n $scope.organization.StartProcessList.startProcessListFocus = false;\r\n $scope.intellisense.isStartOpen = false;\r\n };\r\n\r\n /**\r\n * Sets the end processlist\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n $scope.setEndProcessList = function (processList) {\r\n $scope.organization.EndProcessList = processList;\r\n $scope.organization.EndProcessList.endProcessListFocus = false;\r\n $scope.intellisense.isEndOpen = false;\r\n };\r\n\r\n /**\r\n * Sets the additional processlist\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n $scope.setCurrentAdditionalProcessList = function (processList) {\r\n $scope.organization.AdditionalProcessList = processList;\r\n $scope.organization.AdditionalProcessList.focus = false;\r\n $scope.intellisense.isAdditionalOpen = false;\r\n };\r\n\r\n /**\r\n * Sets the contract processlist\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n $scope.setCurrentContractProcessList = function (processList) {\r\n $scope.organization.ContractProcessList = processList;\r\n $scope.intellisense.isContractOpen = false;\r\n };\r\n\r\n /**\r\n * Sets the given product catalog as default\r\n * @param {} productCatalog \r\n * @returns {} \r\n */\r\n $scope.setProductCatalogDefault = function (productCatalog) {\r\n productCatalog.IsDefault = !productCatalog.IsDefault;\r\n $scope.organization.Catalog = {\r\n Name: getDefaultProductCatalogsName($scope.organization.ProductCatalogs)\r\n };\r\n };\r\n\r\n $scope.extractData = function () {\r\n dialogService.showConfirmDialog('txtConfirm', 'txtExtractOrganizationData').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n }\r\n });\r\n };\r\n\r\n //possible that is not used anymore TODO\r\n $scope.getEndData = function () {\r\n var endData = OrganizationFactory.getEndData($scope.organization.id);\r\n endData.$promise.then(function (result) {\r\n $scope.organization.GeneratingEndData = true;\r\n getEndDataStatus();\r\n });\r\n };\r\n\r\n var endDataStatusPromise;\r\n\r\n /**\r\n * Gets the end status every 10s to check whether the data has been generated\r\n */\r\n var getEndDataStatus = function () {\r\n\r\n endDataStatusPromise = $interval(function () {\r\n\r\n if (loadingService.requestCount == 0)\r\n loadingService.noLoader = true;\r\n\r\n var endDataStatus = OrganizationFactory.getEndDataStatus($scope.organization.id);\r\n endDataStatus.$promise.then(function (result) {\r\n\r\n $scope.organization.GeneratingEndData = result.GeneratingEndData;\r\n $scope.organization.EndDataUrl = result.EndDataUrl;\r\n\r\n if (!$scope.organization.GeneratingEndData) {\r\n $interval.cancel(endDataStatusPromise);\r\n }\r\n\r\n loadingService.noLoader = false;\r\n }, function () {\r\n loadingService.noLoader = false;\r\n });\r\n }, 10000);\r\n };\r\n\r\n $scope.showPrintDialog = false;\r\n\r\n /**\r\n * Prints the organization chart\r\n */\r\n function printOrganizationChart() {\r\n var node = document.getElementById('orgChartReport');\r\n\r\n //set new values for printing\r\n node.style.width = node.offsetWidth + 'px';\r\n node.style.height = node.offsetHeight + 'px';\r\n\r\n\r\n html2canvas(node, { backgroundColor: null })\r\n .then(function (canvas) {\r\n var dataUrl = canvas.toDataURL();\r\n var img = new Image();\r\n img.src = dataUrl;\r\n //img.style.width = '100%';\r\n\r\n //add chart in iframe\r\n var printWindow = window.frames[\"printFrame\"];\r\n\r\n printWindow.document.open();\r\n printWindow.document.write(img.outerHTML);\r\n printWindow.document.close();\r\n\r\n $timeout(function () {\r\n //print after page load\r\n printWindow.print();\r\n\r\n //reset iframe\r\n printWindow.document.open();\r\n printWindow.document.write(\"\");\r\n printWindow.document.close();\r\n }, 0, true);\r\n })\r\n .catch(function (error) {\r\n console.error('oops, something went wrong!', error);\r\n });\r\n };\r\n\r\n $scope.printOrganizationChart = printOrganizationChart;\r\n\r\n /*\r\n * Saves a tab in session storage\r\n */\r\n $scope.activateTab = function (tabName, tabObject, isDynamicGenerated) {\r\n\r\n if (!tabObject || !tabName) {\r\n return;\r\n }\r\n\r\n tabObject.tabActive = true;\r\n\r\n $localStorage.activeTab = {\r\n id: tabObject.id,\r\n tabName: tabName,\r\n tabData: tabObject,\r\n isDynamicGenerated: isDynamicGenerated\r\n };\r\n\r\n };\r\n\r\n $scope.$on(\"$routeChangeStart\", function (event, next, current) {\r\n\r\n if (next.$$route.originalPath !== '/organization/:organizationId?') {\r\n delete $localStorage.activeTab;\r\n }\r\n\r\n });\r\n\r\n $scope.$on('$destroy', function (event) {\r\n if (endDataStatusPromise) {\r\n $interval.cancel(endDataStatusPromise);\r\n }\r\n\r\n });\r\n\r\n $scope.selectTab = function (tabName) {\r\n TabUtilService.setCurrentTab(TabUtilService.pages.ORGANIZATION_DETAIL, tabName);\r\n };\r\n\r\n function initTabs() {\r\n var currentTab = TabUtilService.getCurrentTab(TabUtilService.pages.ORGANIZATION_DETAIL);\r\n\r\n if (_.isNil(currentTab)) {\r\n $scope.activeTab = 'IDENTIFICATION';\r\n return;\r\n }\r\n\r\n if (currentTab === 'ORGANIZATION_CHART')\r\n currentTab = 'IDENTIFICATION';\r\n\r\n $scope.activeTab = currentTab;\r\n };\r\n\r\n function hasLoggedUserFullAccess() {\r\n return sessionInformationService.hasLoggedUserFullAccess();\r\n }\r\n\r\n $timeout(function () {\r\n loadReports();\r\n loadOrganization(organizationId);\r\n });\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('organization').factory('OrganizationFactory', OrganizationFactory);\r\n\r\n function OrganizationFactory(\r\n $resource,\r\n baseUrlService,\r\n $filter\r\n ) {\r\n var organizationFactory = {};\r\n\r\n var OrganizationsDropdown = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationsDropdown');\r\n var Organizations = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/Organizations');\r\n\r\n var OrganizationUserAccess = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationUserAccess/:userId/:page', { userId: '@userId' });\r\n var OrganizationAccess = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationAccess/:organizationId', { organizationId: '@organizationId' });\r\n var OrganizationEndData = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationEndData');\r\n var OrganizationEndDataStatus = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationEndDataStatus');\r\n var Organization = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/Organization/:organizationId', { organizationId: '@id' }, { update: { method: 'PUT' } });\r\n var OrganizationTypes = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationTypes');\r\n var Reports = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/Public');\r\n var IntegrationTypes = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/IntegrationTypes');\r\n var Orders = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationOrders');\r\n var WorkingHourCategories = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationWorkingHourCategories');\r\n var ProcessListOrganization = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/ProcessListOrganization');\r\n var CategorySettings = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/CategorySettings');\r\n var Departments = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/Departments');\r\n var PrintOrganizationChart = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/PrintOrganizationChart');\r\n var UnmappedPackingSlips = $resource(baseUrlService.getBaseUrl() + 'REST/PackingSlip.svc/UnmappedPackingSlips');\r\n var PackingSlipSuppliers = $resource(baseUrlService.getBaseUrl() + 'REST/PackingSlip.svc/PackingSlipSuppliers');\r\n var DefaultDeviationUnhandledNrOfDays = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/DeviationDefaultUnhandledNrOfDays/:organizationId');\r\n var OrganizationDelete = $resource(baseUrlService.getBaseUrl() + 'REST/OrganizationModify.svc/PermanentDelete');\r\n var OrganizationViewDataRequest = $resource(baseUrlService.getBaseUrl() + 'REST/OrganizationGdprAccess.svc/OrganizationDataViewRequest');\r\n var OrganizationChartBase64 = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/SaveOrganizationChartBase64');\r\n var UnmappedDidacUsers = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/UnmappedDidacUsers');\r\n var MapDidacUser = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/MapDidacUser');\r\n var OrganizationsWithAccessToCourse = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/OrganizationsWithAccessToCourse');\r\n\r\n /**\r\n * Gets the generated end data\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.getEndData = function (organizationId) {\r\n return OrganizationEndData.get({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the current status of the generation of the end data\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.getEndDataStatus = function (organizationId) {\r\n return OrganizationEndDataStatus.get({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the list of companies\r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizationsDropdown = function () {\r\n return OrganizationsDropdown.query();\r\n };\r\n\r\n /**\r\n * Gets the list of companies for the grid\r\n * @param {} freeText \r\n * @param {} includeDeactivated \r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizations = function (freeText, includeDeactivated) {\r\n if (includeDeactivated === undefined || includeDeactivated === null) includeDeactivated = true;\r\n return Organizations.query({ freeText: freeText, includeDeactivated: includeDeactivated });\r\n };\r\n\r\n /**\r\n * Gets the list of integrations\r\n * @returns {} \r\n */\r\n organizationFactory.getIntegrationTypes = function () {\r\n return IntegrationTypes.query();\r\n }\r\n\r\n /**\r\n * Gets the organization\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.getOrganization = function (organizationId) {\r\n organizationFactory.organizationId = organizationId;\r\n return Organization.get({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the multi organization access that the user has\r\n * @param {} userId\r\n * @param {} page - The page from where this function is called\r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizationUserAccess = function (userId, page) {\r\n return OrganizationUserAccess.query({\r\n userId: userId,\r\n page: page\r\n });\r\n };\r\n\r\n /**\r\n * Get the multi organization access for the current organization\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizationAccess = function (organizationId) {\r\n return OrganizationAccess.query({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets a new object for later to be saved\r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizationToSave = function () {\r\n return new Organization();\r\n };\r\n\r\n //organizationFactory.getOrganizationTypes = function (organizationId) {\r\n // return OrganizationTypes.get({ organizationId: organizationId });\r\n //};\r\n\r\n /**\r\n * Saves any given organization types\r\n * @param {} businessRoles \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.saveOrganizationTypes = function (businessRoles, organizationId) {\r\n var saveTypes = new OrganizationTypes();\r\n saveTypes.businessRoles = businessRoles;\r\n return saveTypes.$save({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Get the categories for the given organization\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizationWorkingHourCategories = function (organizationId, includeDeactivated) {\r\n return WorkingHourCategories.query({ organizationId: organizationId, includeDeactivated: includeDeactivated });\r\n };\r\n\r\n /**\r\n * Saves the categories for the given organization\r\n * @param {} category \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.saveOrganizationWorkingHourCategory = function (category, organizationId) {\r\n var saveCategory = new WorkingHourCategories();\r\n saveCategory.category = category;\r\n return saveCategory.$save({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Saves the organization\r\n * @param {} organization \r\n * @returns {} \r\n */\r\n organizationFactory.saveOrganization = function (organization) {\r\n\r\n if (organization.FrontPageReportId && organization.FrontPageReportId.id) {\r\n organization.FrontPageReportId = organization.FrontPageReportId.id;\r\n }\r\n\r\n if (organization.LaunchDate)\r\n organization.LaunchDate = moment(organization.LaunchDate).valueOf();\r\n\r\n if (organization.Settings) {\r\n\r\n if (organization.Settings.SalaryPeriodFrom)\r\n organization.Settings.SalaryPeriodFrom = moment(organization.Settings.SalaryPeriodFrom).valueOf();\r\n\r\n if (organization.Settings.SalaryPeriodTo)\r\n organization.Settings.SalaryPeriodTo = moment(organization.Settings.SalaryPeriodTo).valueOf();\r\n\r\n }\r\n\r\n if (organization.id) {\r\n return organization.$update();\r\n } else {\r\n return organization.$save();\r\n }\r\n };\r\n\r\n /**\r\n * Gets the types for the given organization\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.getOrganizationTypes = function (organizationId) {\r\n return OrganizationTypes.query({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Get the list of reports\r\n * @returns {} \r\n */\r\n organizationFactory.getReports = function () {\r\n return Reports.query();\r\n };\r\n\r\n /**\r\n * Get the list of orders\r\n * @param {} organizationId \r\n * @param {} freeText \r\n * @returns {} \r\n */\r\n organizationFactory.getOrders = function (organizationId, freeText) {\r\n return Orders.query({ organizationId: organizationId, freeText: freeText }).$promise;\r\n };\r\n\r\n /**\r\n * Get the process lists\r\n * @param {} processListId \r\n * @returns {} \r\n */\r\n organizationFactory.getProcessListOrganizations = function (processListId) {\r\n return ProcessListOrganization.query({ processListId: processListId });\r\n };\r\n\r\n /**\r\n * Gets those companies that the current company has access\r\n * @param {} orgsAccess \r\n * @returns {} \r\n */\r\n organizationFactory.getValidOrganizationsAccessToSave = function (orgsAccess) {\r\n return $filter('filter')(orgsAccess,\r\n function (orgAccess) {\r\n if (orgAccess.HadAccess != orgAccess.HasAccess)\r\n return orgAccess;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the category settings\r\n * @returns {} \r\n */\r\n organizationFactory.getCategorySettings = function () {\r\n return CategorySettings.query().$promise;\r\n };\r\n\r\n /**\r\n * Gets the departments for the current organization\r\n * @param {} organizationId \r\n * @param {} includeDeactivatedItems\r\n * @returns {} \r\n */\r\n organizationFactory.getDepartments = function (organizationId, includeDeactivated) {\r\n return Departments.query({ organizationId: organizationId, includeDeactivated: includeDeactivated });\r\n };\r\n\r\n /**\r\n * Saves the category settings \r\n * @param {} categorySettings \r\n * @returns {} \r\n */\r\n organizationFactory.saveCategorySettings = function (categorySettings) {\r\n var categoryRequest = new CategorySettings();\r\n categoryRequest.categorySettings = categorySettings;\r\n\r\n return categoryRequest.$save();\r\n };\r\n\r\n /**\r\n * saves the department\r\n * @param {} department \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.saveDepartment = function (department, organizationId) {\r\n var saveDepartment = new Departments();\r\n saveDepartment.department = department;\r\n return saveDepartment.$save({ organizationId: organizationId });\r\n };\r\n\r\n //TODO: move packing slips requests to different file\r\n /**\r\n * Get unmapped packing slips\r\n * @param {} supplierId \r\n * @param {} freeText \r\n * @param {} receivedDate \r\n * @returns {} \r\n */\r\n organizationFactory.getUnmappedPackingSlips = function (supplierId, freeText, receivedDate) {\r\n var formattedDate = receivedDate ? receivedDate.getTime() : null;\r\n return UnmappedPackingSlips.query({ supplierId: supplierId, freeText: freeText, receivedDate: formattedDate }).$promise;\r\n };\r\n\r\n /**\r\n * Get packing slips suppliers\r\n * @returns {} \r\n */\r\n organizationFactory.getPackingSlipSuppliers = function () {\r\n return PackingSlipSuppliers.query().$promise;\r\n };\r\n\r\n /**\r\n * Save mapped packing slips\r\n * @param {} supplierId \r\n * @param {} customerNumber \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n organizationFactory.savePackingSlipMapping = function (supplierId, customerNumber, organizationId) {\r\n var packingSlipMap = new UnmappedPackingSlips();\r\n\r\n packingSlipMap.supplierId = supplierId;\r\n packingSlipMap.customerNumber = customerNumber;\r\n packingSlipMap.organizationId = organizationId;\r\n\r\n return packingSlipMap.$save();\r\n };\r\n\r\n /**\r\n * Performs POST request that deletes the given organization\r\n * Password is provided for confirmation\r\n * @param {} organizationId \r\n * @param {} password \r\n * @returns {} \r\n */\r\n organizationFactory.deleteOrganization = function (organizationId, password) {\r\n var deleteOrganizationApiObject = new OrganizationDelete();\r\n\r\n deleteOrganizationApiObject.organizationId = organizationId;\r\n deleteOrganizationApiObject.confirmPassword = btoa(password);\r\n\r\n return deleteOrganizationApiObject.$save();\r\n };\r\n\r\n /**\r\n * Gets the default deviation unhandled number of days\r\n *\r\n * @param {} organizationId\r\n */\r\n organizationFactory.getDeviationDefaultUnhandledNrOfDays = function (organizationId) {\r\n return DefaultDeviationUnhandledNrOfDays.get({\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Performs a POST request that sends an email for requesting access for viewing the company data\r\n * @param {any} organizationId\r\n */\r\n organizationFactory.requestOrganizationViewDataAccess = function (organizationId) {\r\n var requestViewDataApiObject = new OrganizationViewDataRequest();\r\n\r\n requestViewDataApiObject.organizationIdToRequest = organizationId;\r\n\r\n return requestViewDataApiObject.$save();\r\n };\r\n\r\n organizationFactory.saveOrganizationChartBase64 = function (organizationId, base64) {\r\n var dto = new OrganizationChartBase64();\r\n dto.OrganizationId = organizationId;\r\n dto.ChartBase64 = base64;\r\n\r\n return dto.$save();\r\n };\r\n\r\n organizationFactory.getOrganizationsWithAccessToCourse = function(courseId) {\r\n return OrganizationsWithAccessToCourse.query({\r\n courseId: courseId\r\n }).$promise;\r\n };\r\n\r\n organizationFactory.getUnmappedDidacUsers = function () {\r\n return UnmappedDidacUsers.query().$promise;\r\n };\r\n\r\n organizationFactory.mapDidacUser = function (didacUser) {\r\n var didacUserApiObject = _.merge(new MapDidacUser(), {\r\n id: didacUser.id,\r\n User: didacUser.User\r\n });\r\n\r\n return didacUserApiObject.$save();\r\n }\r\n\r\n organizationFactory.reverseOrganizations = true;\r\n organizationFactory.predicateOrganizations = \"id\";\r\n organizationFactory.currentPageOrganizations = 1;\r\n organizationFactory.organizationId = 0;\r\n\r\n return organizationFactory;\r\n };\r\n\r\n})();","(function () {\r\n\r\n HorizontalProcesslistElementController.$inject = [\r\n '$scope',\r\n '$controller',\r\n '$routeParams',\r\n '$route',\r\n 'ProcessListFactory'\r\n ];\r\n\r\n angular.module('horizontalProcesslist').controller('HorizontalProcesslistElementController', HorizontalProcesslistElementController);\r\n\r\n function HorizontalProcesslistElementController(\r\n $scope,\r\n $controller,\r\n $routeParams,\r\n $route,\r\n ProcessListFactory\r\n ) {\r\n\r\n /**\r\n * Sets the default column when a new item is added or removed\r\n * @returns {} \r\n */\r\n $scope.setDefaultColumn = function () {\r\n $scope.colspan = {};\r\n $scope.colspan.Total = 1;\r\n $scope.colspan.Header = {};\r\n $scope.colspan.Header.Items = [];\r\n if ($scope.processListElement.HeaderFields)\r\n for (var index = 0; index < $scope.processListElement.HeaderFields.length; index++) {\r\n var item = $scope.processListElement.HeaderFields[index];\r\n if (item.length > $scope.colspan.Total)\r\n $scope.colspan.Total = item.length;\r\n var tempItem = {};\r\n tempItem.Total = item.length;\r\n $scope.colspan.Header.Items.push(angular.copy(tempItem));\r\n }\r\n if ($scope.processListElement.TableFields && $scope.processListElement.TableFields.length > $scope.colspan.Total)\r\n $scope.colspan.Total = $scope.processListElement.TableFields.length;\r\n $scope.colspan.BodyPerItem = ($scope.processListElement.TableFields) ? Math.floor($scope.colspan.Total / $scope.processListElement.TableFields.length) : $scope.colspan.Total + 1;\r\n $scope.colspan.BodyRest = ($scope.processListElement.TableFields) ? ($scope.colspan.Total % $scope.processListElement.TableFields.length) + 1 : $scope.colspan.Total + 1;\r\n $scope.colspan.Header.Items.forEach(function (item) {\r\n item.PerItem = Math.floor($scope.colspan.Total / item.Total);\r\n item.RestItem = (item.PerItem * item.Total) + 1;\r\n item.PerItem = 1;\r\n });\r\n }\r\n\r\n /**\r\n * Removes the table field item at the given index\r\n * @param {} itemIndex \r\n * @returns {} \r\n */\r\n $scope.removeItem = function (itemIndex) {\r\n if (itemIndex != undefined) {\r\n $scope.processListElement.TableFields.splice(itemIndex, 1);\r\n }\r\n disableAddInput = false;\r\n }\r\n\r\n $scope.showInput = function (item) {\r\n item.ChangeName = true;\r\n };\r\n\r\n /**\r\n * Removes the header field item at the given position\r\n * @param {} rowIndex \r\n * @param {} colIndex \r\n * @returns {} \r\n */\r\n $scope.remove = function (rowIndex, colIndex) {\r\n if (rowIndex != undefined && colIndex != undefined) {\r\n $scope.processListElement.HeaderFields[rowIndex].splice(colIndex, 1);\r\n if ($scope.processListElement.HeaderFields[rowIndex].length == 0) {\r\n $scope.removeRow(rowIndex);\r\n }\r\n\r\n }\r\n disableAddInput = false;\r\n };\r\n var disableAddInput = false;\r\n $scope.disableAddInput = function () {\r\n return disableAddInput;\r\n }\r\n\r\n /**\r\n * Removes the row at the given row index\r\n * @param {} rowIndex \r\n * @returns {} \r\n */\r\n $scope.removeRow = function (rowIndex) {\r\n if (rowIndex != undefined) {\r\n $scope.processListElement.HeaderFields.splice(rowIndex, 1);\r\n }\r\n disableAddInput = false;\r\n $scope.setChangesMadeValue(true);\r\n };\r\n\r\n $scope.hideInput = function (item, event, rowIndex, colIndex) {\r\n if (item.Label != null && item.Label != '') {\r\n event;\r\n item.ChangeName = undefined;\r\n }\r\n else {\r\n\r\n if (rowIndex != null) {\r\n $scope.remove(rowIndex, colIndex);\r\n }\r\n else {\r\n $scope.removeItem(colIndex);\r\n }\r\n\r\n }\r\n\r\n disableAddInput = false;\r\n };\r\n\r\n $scope.onHeaderInputChange = function (label) {\r\n var shouldBeDisabled = false;\r\n if (!label)\r\n shouldBeDisabled = true;\r\n\r\n if (!!label && label.length > 0)\r\n shouldBeDisabled = false;\r\n\r\n disableAddInput = shouldBeDisabled;\r\n\r\n }\r\n\r\n /**\r\n * Sets up a new columns for header field\r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.addNewColHeader = function (index) {\r\n var tempItem = {};\r\n tempItem.Label = \"\";\r\n tempItem.ChangeName = true;\r\n tempItem.Type = {};\r\n\r\n tempItem.Type.ProgId = \"HZ_HEADER\";\r\n tempItem.Order = \"0\";\r\n if ($scope.processListElement.HeaderFields[index] == undefined)\r\n $scope.processListElement.HeaderFields[index] = [];\r\n $scope.processListElement.HeaderFields[index].push(tempItem);\r\n $scope.setDefaultColumn();\r\n\r\n disableAddInput = true;\r\n $scope.setChangesMadeValue(true);\r\n }\r\n\r\n /**\r\n * Sets up a new row for header field\r\n * @returns {} \r\n */\r\n $scope.addNewHeaderRow = function () {\r\n var tempItem = {};\r\n tempItem.Label = \"\";\r\n tempItem.ChangeName = true;\r\n tempItem.Type = {};\r\n\r\n tempItem.Type.ProgId = \"HZ_HEADER\";\r\n tempItem.Order = \"0\";\r\n if ($scope.processListElement.HeaderFields == undefined)\r\n $scope.processListElement.HeaderFields = [];\r\n $scope.processListElement.HeaderFields.push([tempItem]);\r\n $scope.setDefaultColumn();\r\n\r\n disableAddInput = true;\r\n\r\n $scope.setChangesMadeValue(true);\r\n }\r\n\r\n /**\r\n * Sets up new row for table field\r\n * @returns {} \r\n */\r\n $scope.addNewBodyHeader = function () {\r\n var tempItem = {};\r\n tempItem.Label = \"\";\r\n tempItem.ChangeName = true;\r\n tempItem.Type = {};\r\n\r\n tempItem.Type.ProgId = \"HZ_ITEM\";\r\n tempItem.Order = \"0\";\r\n if ($scope.processListElement.TableFields == undefined)\r\n $scope.processListElement.TableFields = [];\r\n $scope.processListElement.TableFields.push(tempItem);\r\n $scope.setDefaultColumn();\r\n\r\n disableAddInput = true;\r\n $scope.setChangesMadeValue(true);\r\n }\r\n\r\n $scope.showErrDateTo = function () {\r\n if ($scope.processListElement != undefined) {\r\n var validFrom = new Date($scope.processListElement.ValidFrom).getTime();\r\n var validTo = new Date($scope.processListElement.ValidTo).getTime();\r\n\r\n if (validFrom <= validTo)\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n /**\r\n * Removes the given attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n $scope.deleteAttachment = function (attachment) {\r\n if (!attachment || !attachment.id) {\r\n $scope.processListElement.Attachments.splice($scope.processListElement.Attachments.indexOf(attachment), 1);\r\n $scope.attachments.splice($scope.processListElement.Attachments.indexOf(attachment), 1);\r\n } else {\r\n var a = ProcessListFactory.deleteAttachment(attachment);\r\n\r\n a.then(function () {\r\n $scope.processListElement.Attachments.splice($scope.processListElement.Attachments.indexOf(attachment), 1);\r\n $scope.attachments.splice($scope.processListElement.Attachments.indexOf(attachment), 1);\r\n });\r\n }\r\n };\r\n\r\n $scope.openAttachment = function (attachName) {\r\n downloadFile(attachName);\r\n return;\r\n };\r\n //TODO: use download service\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n\r\n $scope.$on('setDefaultColumns', function () {\r\n $scope.setDefaultColumn();\r\n });\r\n\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n processListDetailsService.$inject = [\r\n '_'\r\n ];\r\n\r\n function processListDetailsService(\r\n _\r\n ) {\r\n\r\n function convertSigningFrequencyToIntForProcessList(processList) {\r\n\r\n if (_.isNil(processList) ||\r\n _.isNil(processList.SigningFrequency) ||\r\n _.isNil(processList.SigningFrequency.Frequency)) {\r\n return;\r\n }\r\n\r\n processList.SigningFrequency.Frequency = parseInt(processList.SigningFrequency.Frequency);\r\n }\r\n\r\n return {\r\n convertSigningFrequencyToIntForProcessList: convertSigningFrequencyToIntForProcessList\r\n };\r\n }\r\n\r\n angular\r\n .module('processList')\r\n .service('ProcessListDetailsService', processListDetailsService);\r\n})();","(function () {\r\n //TODO BIG ONE -> split the heck out of this controller (goes into a corner and starts crying because flipping burgers was much more easier)\r\n ProcessListElementController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$uibModal',\r\n '$route',\r\n '$document',\r\n '$filter',\r\n 'titleService',\r\n 'dialogService',\r\n 'infoService',\r\n 'errorService',\r\n 'fileReader',\r\n 'OrganizationFactory',\r\n 'ProcessListFactory',\r\n '$q',\r\n 'UserFactory',\r\n 'menuService',\r\n 'formChangeDetector',\r\n 'formChanges',\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n 'ProcessListDetailsService',\r\n '$location',\r\n 'OptionItemService',\r\n 'TableResources',\r\n 'applicationChange'\r\n ];\r\n\r\n angular\r\n .module('processList')\r\n .controller('ProcessListElementController', ProcessListElementController);\r\n\r\n function ProcessListElementController(\r\n $scope,\r\n $routeParams,\r\n $uibModal,\r\n $route,\r\n $document,\r\n $filter,\r\n titleService,\r\n dialogService,\r\n infoService,\r\n errorService,\r\n fileReader,\r\n OrganizationFactory,\r\n ProcessListFactory,\r\n $q,\r\n UserFactory,\r\n menuService,\r\n formChangeDetector,\r\n formChanges,\r\n $timeout,\r\n QualityHandbookFactory,\r\n ProcessListDetailsService,\r\n $location,\r\n OptionItemService,\r\n TableResources,\r\n applicationChange\r\n ) {\r\n $scope.reverse = false;\r\n $scope.predicate = \"id\";\r\n $scope.processList = [];\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 10;\r\n $scope.numPages = 1;\r\n $scope.selectedOptionItemIndex = 0;\r\n $scope.optionItemDetailsHeight = '0px';\r\n $scope.newItemIndex = null;\r\n $scope.attachments = [];\r\n $scope.status = {};\r\n $scope.processListExternalFilter = { Name: '' };\r\n $scope.rorhandbokaItem = { id: 0 };\r\n $scope.rorhandbokaBookmarks = [];\r\n $scope.showModalClose = false;\r\n $scope.showMoreCategories = false;\r\n $scope.editor = { initialized: false };\r\n $scope.categories = [[], [], []];\r\n $scope.access = { allSelected: false };\r\n $scope.exportList = [];\r\n\r\n $scope.isNavigatingToProcessListOverviewFromButton = false;\r\n $scope.isNavigatingFromCloseProcessList = false;\r\n\r\n var changesMade = false;\r\n var isRouteReloading = false;\r\n var queryParams = { location: null, foreignKey: null };\r\n\r\n $scope.ProcessListType = ProcessListFactory.ProcessListType;\r\n\r\n\r\n $scope.signingFrequencies = [\r\n 'DAYS',\r\n 'WEEKS',\r\n 'MONTHS',\r\n 'YEARS'\r\n ];\r\n var qualityHandbookCategorySetting = [];\r\n\r\n var processListElementOriginal = {};\r\n $scope.processListElementId;\r\n //var itemToScroll = 0;\r\n var allDataTypes = [];\r\n var categoryModal;\r\n\r\n\r\n function arrayObjectIndexOf(myArray, searchTerm, property) {\r\n for (var i = 0, len = myArray.length; i < len; i++) {\r\n if (myArray[i][property] === searchTerm) return i;\r\n }\r\n return -1;\r\n };\r\n\r\n\r\n if (ProcessListFactory.displaySaveMessage) {\r\n $timeout(function () {\r\n infoService.changeInfo($filter('translate')('msgProcessListSaved'));\r\n ProcessListFactory.displaySaveMessage = false;\r\n },\r\n 100);\r\n }\r\n\r\n $scope.displayWarningSaveMessage = function () {\r\n errorService.changeError($filter('translate')(\"txtSaveProcessListFirst\"));\r\n };\r\n\r\n /************************************\r\n * *\r\n * *\r\n * IDENTIFICATION TAB *\r\n * *\r\n * *\r\n *************************************/\r\n /**\r\n * Gets the list of companies when the tab is clicked\r\n * @returns {} \r\n */\r\n $scope.getOrganizationTab = function () {\r\n if (!$scope.organizations || $scope.organizations.length == 0)\r\n $scope.getOrganizations();\r\n };\r\n\r\n /**\r\n * Checks whether the company exists in company list\r\n * @param {any} organization\r\n * @param {any} organizations\r\n */\r\n function organizationExists(organization, organizations) {\r\n for (var i = 0; i < organizations.length; i++)\r\n if (organization.id == organizations[i].id)\r\n return organization;\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Gets the list of companies for access\r\n * @returns {} \r\n */\r\n $scope.getOrganizations = function () {\r\n var deferred = $q.defer(), organizations = [];\r\n\r\n OrganizationFactory.getProcessListOrganizations($scope.processListElementId).$promise.then(function (result) {\r\n organizations = result;\r\n\r\n // if creating a new processlist, make it public by default if user is from central\r\n if (!$scope.processListElement.id) {\r\n for (var i = 0; i < organizations.length; i++) {\r\n if (organizations[i].id == $scope.loggedUser.Organization.id)\r\n organizations[i].checked = true;\r\n }\r\n $scope.processListElement.IsPublic = $scope.loggedUser.Organization.Central;\r\n } else {\r\n // mark coresponding checkboxes for organizations that have been \r\n // granted access, regardless if the process list is public or not \r\n var selectedOrgsIds = $scope.processListElement.Organizations.map(function (org) { return { id: org.id } });\r\n\r\n for (var i = 0; i < organizations.length; i++) {\r\n if (organizationExists(organizations[i], selectedOrgsIds))\r\n organizations[i].checked = true;\r\n }\r\n }\r\n\r\n for (var i = 0; i < organizations.length; i++)\r\n organizations[i].id = parseInt(organizations[i].id);\r\n\r\n $scope.organizations = organizations;\r\n deferred.resolve();\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Set up the given option item\r\n * @param {} optionItem \r\n * @returns {} \r\n */\r\n $scope.initiateOptionItem = function (optionItem) {\r\n if (!optionItem || !optionItem.ProcessListAction)\r\n return;\r\n\r\n if (optionItem.ProcessListAction.ProgId == 'ANOTHER_PROCESSLIST' && optionItem.ProcessListAction.ProcessList) {\r\n optionItem.DataAbout = $scope.getDataTypeById(optionItem.ProcessListAction.ProcessList.DataAbout.id);\r\n\r\n if (!optionItem.ProcessListAction.ProcessList.DataDetails) {\r\n optionItem.DataDetails = null;\r\n } else {\r\n optionItem.DataDetails = $scope\r\n .getDataTypeById(optionItem.ProcessListAction.ProcessList.DataDetails.id);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Filter the external lists\r\n * @param {} filterData \r\n * @returns {} \r\n */\r\n $scope.externalProcessListFiltered = function (filterData) {\r\n if (!filterData)\r\n return [];\r\n\r\n var filterDataAboutId = filterData.DataAbout\r\n ? filterData.DataAbout.id\r\n : null;\r\n\r\n var filterDataDetailsId = filterData.DataDetails\r\n ? filterData.DataDetails.id\r\n : null;\r\n\r\n var list = $filter('filter')($scope.processListExternal,\r\n function (externalProcessList) {\r\n\r\n if (\r\n (!filterData.Name ||\r\n ((externalProcessList.Name && externalProcessList.Name.toUpperCase().indexOf(filterData.Name.toUpperCase()) >= 0) || externalProcessList.id.indexOf(filterData.Name) >= 0)) &&\r\n (!filterDataAboutId || externalProcessList.DataAbout.id == filterDataAboutId) &&\r\n (!filterDataDetailsId || externalProcessList.DataDetails.id == filterDataDetailsId)\r\n ) {\r\n return externalProcessList;\r\n }\r\n });\r\n\r\n return list;\r\n }\r\n\r\n /**\r\n * Removes the deactivated status is the list is not deactivated\r\n * If the list is deactivated the status is shown\r\n * @param {any} currentProcessListStatus\r\n */\r\n function removeDeactivatedBasedOnProgId(currentProcessListStatus) {\r\n var idx;\r\n if (currentProcessListStatus && currentProcessListStatus.ProgId != 'DEACTIVATED' && $scope.statusList) {\r\n //remove DEACTIVATED if its not the actuall status\r\n idx = arrayObjectIndexOf($scope.statusList, 'DEACTIVATED', 'ProgId');\r\n if (idx != -1)\r\n $scope.statusList.splice(idx, 1);\r\n }\r\n if (currentProcessListStatus == null) {\r\n idx = arrayObjectIndexOf($scope.statusList, 'DEACTIVATED', 'ProgId');\r\n if (idx != -1)\r\n $scope.statusList.splice(idx, 1);\r\n }\r\n };\r\n\r\n //get process list using \"DATA ABOUT\"\r\n $scope.getProcessListExternal = function (dataAboutId) {\r\n if (!$scope.processListExternal || dataAboutId != ProcessListFactory.dataAboutId) {\r\n ProcessListFactory.dataAboutId = dataAboutId;\r\n var processList = ProcessListFactory.getExternalProcessList(dataAboutId, $scope.processListElement.id);\r\n processList.$promise.then(function (result) {\r\n //$scope.processListExternal = result;\r\n $scope.processListExternal = $filter('orderBy')(result, 'Name', false);\r\n\r\n $scope.currentExternalListItem = undefined;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Gets the quality handbook category settings\r\n */\r\n function getQualityHandbookSetting() {\r\n return QualityHandbookFactory.getQualityHanbookCategorySetting().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n qualityHandbookCategorySetting = result;\r\n });\r\n }\r\n\r\n function postProcessListElementInit() {\r\n $scope.getStatusList();\r\n //$scope.getProcessListCategories();\r\n $scope.getProcessListDataTypes();\r\n //if ($scope.loggedUser.Organization.Central)\r\n // $scope.getOrganizations();\r\n };\r\n\r\n function initQueryFilters() {\r\n var queryFilters = $location.search();\r\n for (var filter in queryParams) {\r\n if (filter in queryFilters)\r\n queryParams[filter] = queryFilters[filter];\r\n }\r\n }\r\n\r\n /**\r\n * Set up the process list properties\r\n */\r\n function initializeProcessListElement() {\r\n $scope.processListElementId = $routeParams.processListElementId;\r\n\r\n initQueryFilters();\r\n\r\n if ($scope.processListElementId) {\r\n\r\n $scope.getExportList();\r\n\r\n getSelectedProcessListType($scope.processListElementId)\r\n .then(function (response) {\r\n\r\n if (response) {\r\n\r\n $scope.ProcessListType = response.ProgId;\r\n ProcessListFactory.ProcessListType = response.ProgId;\r\n\r\n }\r\n\r\n var processListElementPromise;\r\n\r\n if (ProcessListFactory.ProcessListType == 'HORIZONTAL') {\r\n processListElementPromise = ProcessListFactory.getHPlE($scope.processListElementId);\r\n } else {\r\n processListElementPromise = ProcessListFactory.getProcessListElement($scope.processListElementId);\r\n }\r\n\r\n processListElementPromise.$promise.then(function (result) {\r\n\r\n $scope.processListElement = result;\r\n $scope.processListElement.ProcessListType = { ProgId: ProcessListFactory.ProcessListType };\r\n\r\n ProcessListDetailsService.convertSigningFrequencyToIntForProcessList($scope.processListElement);\r\n\r\n $scope.processListElement.showExternalList = undefined;\r\n $scope.attachments = $scope.processListElement.Attachments;\r\n\r\n if (ProcessListFactory.activeTab == 'itemsTabActive')\r\n $scope.$broadcast('drawLines');\r\n\r\n // needed so the default text-angular value doesn't overwrite descriptionHtml property,\r\n // on load when it's undefined, through the 2 way binding of ng-model\r\n $scope.editor.initialized = true;\r\n\r\n if ($scope.processListElement.Categories && $scope.processListElement.Categories.length > 0) {\r\n for (var i = 0; i < $scope.processListElement.Categories.length; i++) {\r\n for (var j = 0; j < $scope.processListElement.Categories[i].length; j++)\r\n $scope.processListElement.Categories[i][j].SortNumber = parseInt($scope.processListElement.Categories[i][j].SortNumber);\r\n }\r\n }\r\n\r\n // check if this processlist was created by our organization\r\n if ($scope.processListElement.CreatedBy.Organization.id == $scope.loggedUser.Organization.id) {\r\n getUsersFromOrganization($scope.loggedUser.Organization.id);\r\n } else {\r\n getUsersFromOrganization($scope.processListElement.CreatedBy.Organization.id);\r\n $scope.disableResponsibleUserDropdown = true;\r\n }\r\n\r\n\r\n postProcessListElementInit();\r\n processListElementOriginal = angular.copy($scope.processListElement);\r\n\r\n if ($scope.processListElement.ProcessListType.ProgId == 'HORIZONTAL')\r\n $scope.$broadcast('setDefaultColumns');\r\n\r\n //get quality category setting and check if this existing process list is going to be used in the quality handbook\r\n if ($scope.processListElement.Categories && $scope.processListElement.Categories.length > 0)\r\n getQualityHandbookSetting().then(function () {\r\n for (var i = 0; i < qualityHandbookCategorySetting.length; i++) {\r\n var qualityCategory = qualityHandbookCategorySetting[i];\r\n if ($filter('filter')($scope.processListElement.Categories[0], function (c) { return c.id == qualityCategory.id }).length > 0) {\r\n $scope.showQualitySigningFrequency = true;\r\n\r\n if (!$scope.processListElement.SigningFrequency) {\r\n $scope.processListElement.SigningFrequency = {\r\n FrequencyType: $scope.signingFrequencies[2],\r\n Frequency: 1\r\n };\r\n }\r\n break;\r\n }\r\n }\r\n });\r\n\r\n });\r\n $scope.showMoreCategories = false;\r\n\r\n });\r\n\r\n\r\n } else {\r\n\r\n getUsersFromOrganization($scope.loggedUser.Organization.id);\r\n\r\n $scope.processListElement = ProcessListFactory.ProcessListElement();\r\n\r\n\r\n if ($scope.processListElement.ProcessListType == undefined) {\r\n $scope.processListElement.ProcessListType = {};\r\n $scope.processListElement.ProcessListType.ProgId = ProcessListFactory.ProcessListType;\r\n }\r\n\r\n $scope.processListElement.ProcessListItems = [];\r\n\r\n var date = new Date();\r\n $scope.processListElement.ValidFrom = date.getTime();\r\n date.setDate(date.getDate() + 366);\r\n $scope.processListElement.ValidTo = date.getTime();\r\n\r\n $scope.processListElement.showExternalList = undefined;\r\n\r\n titleService.changeTitle($filter('translate')('txtNewProcessList'));\r\n\r\n postProcessListElementInit();\r\n\r\n // needed so the default text-angular value doesn't overwrite \r\n //descriptionHtml property through the 2 way binding of ng-model\r\n $scope.editor.initialized = true;\r\n $scope.showMoreCategories = true;\r\n\r\n processListElementOriginal = angular.copy($scope.processListElement);\r\n\r\n if ($scope.processListElement.ProcessListType.ProgId == 'HORIZONTAL')\r\n $scope.$broadcast('setDefaultColumns');\r\n }\r\n };\r\n\r\n /**\r\n * Gets the process list type for the given id\r\n * @param {any} processListElementId\r\n */\r\n function getSelectedProcessListType(processListElementId) {\r\n return ProcessListFactory.getSelectedProcessListType(processListElementId);\r\n };\r\n\r\n /**\r\n * Gets users to be set as responsible\r\n * @param {any} organizationId\r\n */\r\n function getUsersFromOrganization(organizationId) {\r\n\r\n var onUsersComplete = function (response) {\r\n\r\n $scope.organizationUsers = response;\r\n\r\n // set default selected user as logged user when creating a processlist\r\n if (!$scope.processListElement.id) {\r\n $scope.processListElement.ResponsibleUser = $scope.loggedUser;\r\n }\r\n\r\n };\r\n UserFactory.getUsers(null, false, organizationId).$promise.then(onUsersComplete);\r\n }\r\n\r\n\r\n //get statuses\r\n $scope.getStatusList = function () {\r\n $scope.statusList = ProcessListFactory.getStatusList();\r\n $scope.statusList.$promise.then(function (result) {\r\n $scope.statusList = angular.copy(result);\r\n if (!$scope.processListElementId)\r\n removeDeactivatedBasedOnProgId();\r\n else\r\n removeDeactivatedBasedOnProgId($scope.processListElement.Status);\r\n });\r\n };\r\n\r\n /**\r\n * Gets the process list data types\r\n * @returns {} \r\n */\r\n $scope.getProcessListDataTypes = function () {\r\n var table = ProcessListFactory.ProcessListType == 'MANAGEMENT' ? 'BOT_PROCESSLIST_MANAGEMENT' : 'BOT_PROCESSLIST_NORMAL';\r\n var processListDataTypesPromise = ProcessListFactory.getProcessListDataTypes(table);\r\n processListDataTypesPromise.$promise.then(function (result) {\r\n allDataTypes = result;\r\n\r\n fillDataAboutList();\r\n fillDataDetailsList();\r\n\r\n getSecondaryProcessListDataTypes();\r\n });\r\n }\r\n\r\n var secondaryAllDataTypes = [];\r\n\r\n /**\r\n * Gets the second level of process list data types\r\n */\r\n var getSecondaryProcessListDataTypes = function () {\r\n var table = ProcessListFactory.ProcessListType == 'MANAGEMENT' ? 'BOT_PROCESSLIST_NORMAL' : 'BOT_PROCESSLIST_MANAGEMENT';\r\n\r\n secondaryAllDataTypes = secondaryAllDataTypes.concat(allDataTypes);\r\n\r\n var processListDataTypesPromise = ProcessListFactory.getProcessListDataTypes(table);\r\n processListDataTypesPromise.$promise.then(function (result) {\r\n secondaryAllDataTypes = secondaryAllDataTypes.concat(result);\r\n\r\n $scope.allProcessListDataAboutTypes = getDataAboutList(secondaryAllDataTypes);\r\n });\r\n }\r\n\r\n /**\r\n * Get the datatype by the given id\r\n * @param {} id \r\n * @returns {} \r\n */\r\n $scope.getDataTypeById = function (id) {\r\n var dataAbout = $filter('filter')(secondaryAllDataTypes,\r\n function (dataType) {\r\n if (dataType.id == id) return dataType;\r\n });\r\n return dataAbout[0];\r\n }\r\n\r\n /**\r\n * Get the data about list\r\n * These do not have parents, are first level\r\n * @param {any} dataTypes\r\n */\r\n var getDataAboutList = function (dataTypes) {\r\n var dataAbout = [];\r\n for (var i = 0; i < dataTypes.length; i++) {\r\n // if is first level category \r\n if (!dataTypes[i].Parent) {\r\n dataAbout.push(dataTypes[i]);\r\n }\r\n }\r\n\r\n return dataAbout;\r\n };\r\n\r\n /**\r\n * Get data details list\r\n * These have parent\r\n * @param {any} datatypes\r\n * @param {any} dataAbout\r\n */\r\n var getDataDetailsList = function (datatypes, dataAbout) {\r\n var dataDetails = [];\r\n for (var i = 0; i < datatypes.length; i++) {\r\n // if is child of selected data type\r\n if (!!datatypes[i].Parent && !!dataAbout && datatypes[i].Parent.id == dataAbout.id) {\r\n dataDetails.push(datatypes[i]);\r\n }\r\n }\r\n\r\n return dataDetails;\r\n };\r\n\r\n /**\r\n * Fill the data about list and set if the list is new the default dataabout\r\n */\r\n var fillDataAboutList = function () {\r\n $scope.processListDataAboutTypes = [];\r\n for (var i = 0; i < allDataTypes.length; i++) {\r\n // if is first level category \r\n if (!allDataTypes[i].Parent) {\r\n $scope.processListDataAboutTypes.push(allDataTypes[i]);\r\n }\r\n }\r\n if (!$scope.processListElementId) {\r\n $scope.processListElement.DataAbout = $scope.processListDataAboutTypes[0];\r\n }\r\n };\r\n\r\n /**\r\n * Fill the data details list and if the list is management set the datadetails\r\n */\r\n var fillDataDetailsList = function () {\r\n $scope.processListDataDetailsTypes = [];\r\n for (var i = 0; i < allDataTypes.length; i++) {\r\n // if is child of selected data type\r\n if (!!allDataTypes[i].Parent && !!$scope.processListElement.DataAbout && allDataTypes[i].Parent.id == $scope.processListElement.DataAbout.id) {\r\n $scope.processListDataDetailsTypes.push(allDataTypes[i]);\r\n }\r\n }\r\n\r\n if ($scope.processListElement && $scope.processListElement.id && $scope.processListElement.ProcessListType.ProgId == 'MANAGEMENT' && $scope.processListElement.DataDetails) {\r\n\r\n var processListDataDetails = $filter('filter')($scope.processListDataDetailsTypes,\r\n function (dataDetail) {\r\n if (dataDetail.id == $scope.processListElement.DataDetails.id)\r\n return dataDetail;\r\n return null;\r\n });\r\n\r\n if (!processListDataDetails || processListDataDetails.length == 0) {\r\n $scope.processListElement.DataDetails.Active = false;\r\n $scope.processListDataDetailsTypes.push($scope.processListElement.DataDetails);\r\n } else if (processListDataDetails[0].Parent.id == $scope.processListElement.DataAbout.id) {\r\n //default processlist returns data detail as inactive\r\n $scope.processListElement.DataDetails.Active = true;\r\n }\r\n }\r\n\r\n };\r\n\r\n $scope.onProcessListDataAboutChanged = function (dataAbout) {\r\n $scope.processListElement.DataDetails = null;\r\n fillDataDetailsList();\r\n\r\n };\r\n\r\n $scope.onAllProcessListDataAboutChanged = function (optionItem) {\r\n\r\n if (optionItem.DataAbout && optionItem.DataAbout.Table !== TableResources.ProcessListManagement) {\r\n optionItem.DataDetails = null;\r\n }\r\n\r\n $scope.allProcessListDataDetailsTypes = getDataDetailsList(secondaryAllDataTypes, optionItem.DataAbout);\r\n };\r\n\r\n $scope.showErrDateTo = function () {\r\n if ($scope.processListElement != undefined) {\r\n var validFrom = new Date($scope.processListElement.ValidFrom).getTime();\r\n var validTo = new Date($scope.processListElement.ValidTo).getTime();\r\n\r\n if (validFrom <= validTo)\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n $scope.onValidFromChanged = function () {\r\n if (!!$scope.processListElement) {\r\n var date = new Date($scope.processListElement.ValidFrom);\r\n date.setDate(date.getDate() + 366);\r\n $scope.processListElement.ValidTo = date.getTime();\r\n }\r\n };\r\n\r\n $scope.showErrDateToPastToday = function () {\r\n if ($scope.processListElement != undefined) {\r\n var validFrom = new Date($scope.processListElement.ValidFrom).getTime();\r\n var validTo = new Date($scope.processListElement.ValidTo).getTime();\r\n\r\n if (validTo > new Date().getTime())\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n\r\n /************************************\r\n * *\r\n * *\r\n * CATEGORIES TAB *\r\n * *\r\n * *\r\n *************************************/\r\n //why do we need this?\r\n $scope.getCategories = function () {\r\n if ($scope.categories[0].length == 0)\r\n $scope.getProcessListCategories();\r\n }\r\n /**\r\n * Gets the process list categories on tab click\r\n * @returns {} \r\n */\r\n $scope.getProcessListCategories = function () {\r\n var processListCategoriesPromise = ProcessListFactory.getProcessListCategories($scope.processListElementId, false);\r\n processListCategoriesPromise.$promise.then(function (result) {\r\n $scope.categories = result.GetProcessListCategoriesResult;\r\n for (var i = 0; i < $scope.categories.length; i++) {\r\n for (var j = 0; j < $scope.categories[i].length; j++) {\r\n $scope.categories[i][j].SortNumber = parseInt($scope.categories[i][j].SortNumber);\r\n }\r\n }\r\n\r\n\r\n });\r\n };\r\n\r\n function getIndexOfCategory(categoryList, idOfCategory) {\r\n for (var i = 0; i < categoryList.length; i++) {\r\n if (categoryList[i].id == idOfCategory)\r\n return i;\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Adds a new category to the current list\r\n * @param {} category \r\n * @returns {} \r\n */\r\n $scope.addCategory = function (category) {\r\n if (!category.Active) {\r\n errorService.changeError($filter('translate')(\"errAddInactiveCategory\"));\r\n return;\r\n }\r\n if (!$scope.processListElement.Categories)\r\n $scope.processListElement.Categories = [[], [], []];\r\n\r\n var index;\r\n switch (category.Table) {\r\n case \"BOT_PROCESSLIST_CATEGORY\":\r\n $scope.processListElement.Categories[0].push(category);\r\n index = getIndexOfCategory($scope.categories[0], category.id);\r\n\r\n if (index >= 0)\r\n $scope.categories[0].splice(index, 1);\r\n if ($filter('filter')(qualityHandbookCategorySetting, function (setting) { return setting.id == category.id }).length > 0) {\r\n $scope.showQualitySigningFrequency = true;\r\n if (!$scope.processListElement.SigningFrequency)\r\n $scope.processListElement.SigningFrequency = {};\r\n $scope.processListElement.SigningFrequency.FrequencyType = $scope.signingFrequencies[2];\r\n } else\r\n $scope.showQualitySigningFrequency = false;\r\n\r\n break;\r\n case \"BOT_PROCESSLIST_CATEGORY2\":\r\n if ($scope.processListElement.Categories[0].length == 0) {\r\n errorService.changeError($filter('translate')(\"errSubcategorySelected\"));\r\n return;\r\n }\r\n $scope.processListElement.Categories[1].push(category);\r\n index = getIndexOfCategory($scope.categories[1], category.id);\r\n if (index >= 0)\r\n $scope.categories[1].splice(index, 1);\r\n break;\r\n case \"BOT_PROCESSLIST_CATEGORY3\":\r\n if ($scope.processListElement.Categories[1].length == 0) {\r\n errorService.changeError($filter('translate')(\"errSubcategorySelected\"));\r\n return;\r\n }\r\n $scope.processListElement.Categories[2].push(category);\r\n index = getIndexOfCategory($scope.categories[2], category.id);\r\n if (index >= 0)\r\n $scope.categories[2].splice(index, 1);\r\n break;\r\n }\r\n\r\n manageCategoryChange(category.Name, false);\r\n };\r\n\r\n /**\r\n * Removes the given category from the list\r\n * @param {} category \r\n * @returns {} \r\n */\r\n $scope.removeCategory = function (category) {\r\n var index;\r\n switch (category.Table) {\r\n case \"BOT_PROCESSLIST_CATEGORY\":\r\n if ($scope.processListElement.Categories[0].length == 1 && $scope.processListElement.Categories[1].length > 0) {\r\n errorService.changeError($filter('translate')(\"errSubcategorySelected\"));\r\n return;\r\n }\r\n $scope.categories[0].push(category);\r\n index = getIndexOfCategory($scope.processListElement.Categories[0], category.id);\r\n if (index >= 0)\r\n $scope.processListElement.Categories[0].splice(index, 1);\r\n break;\r\n case \"BOT_PROCESSLIST_CATEGORY2\":\r\n if ($scope.processListElement.Categories[1].length == 1 && $scope.processListElement.Categories[2].length > 0) {\r\n errorService.changeError($filter('translate')(\"errSubcategorySelected\"));\r\n return;\r\n }\r\n $scope.categories[1].push(category);\r\n index = getIndexOfCategory($scope.processListElement.Categories[1], category.id);\r\n if (index >= 0)\r\n $scope.processListElement.Categories[1].splice(index, 1);\r\n break;\r\n case \"BOT_PROCESSLIST_CATEGORY3\":\r\n $scope.categories[2].push(category);\r\n index = getIndexOfCategory($scope.processListElement.Categories[2], category.id);\r\n if (index >= 0)\r\n $scope.processListElement.Categories[2].splice(index, 1);\r\n break;\r\n }\r\n\r\n manageCategoryChange(category.Name, true);\r\n\r\n };\r\n\r\n function manageCategoryChange(categoryName, isRemove) {\r\n formChangeDetector.onFocusControl(categoryName, null, \"processListCategory\", (isRemove) ? \"added\" : \"not added\");\r\n formChangeDetector.onValueChanged((isRemove) ? \"not added\" : \"added\");\r\n }\r\n\r\n /**\r\n * Open a modal with category info\r\n * @param {} category \r\n * @param {} table \r\n * @returns {} \r\n */\r\n $scope.openCategory = function (category, table) {\r\n if (!category) {\r\n category = {\r\n Active: true,\r\n Name: '',\r\n Table: table,\r\n ProgId: 'PROG_CATEGORY'\r\n };\r\n }\r\n $scope.category = category;\r\n\r\n categoryModal = $uibModal.open({\r\n templateUrl: 'Scripts/processList/modalCategoryPartial.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n };\r\n\r\n /**\r\n * Saves the newly added category\r\n * @param {} category \r\n * @returns {} \r\n */\r\n $scope.saveCategory = function (category) {\r\n ProcessListFactory.saveProcessListCategory(category).$promise.then(function (result) {\r\n if (!category.id) {\r\n switch (result.Table) {\r\n case \"BOT_PROCESSLIST_CATEGORY\":\r\n if (($filter('filter')($scope.categories[0], { id: result.id })).length == 0)\r\n $scope.categories[0].push(result);\r\n else\r\n errorService.changeError($filter('translate')(\"errCategoryExists\"));\r\n break;\r\n case \"BOT_PROCESSLIST_CATEGORY2\":\r\n if (($filter('filter')($scope.categories[1], { id: result.id })).length == 0)\r\n $scope.categories[1].push(result);\r\n else\r\n errorService.changeError($filter('translate')(\"errCategoryExists\"));\r\n break;\r\n case \"BOT_PROCESSLIST_CATEGORY3\":\r\n if (($filter('filter')($scope.categories[2], { id: result.id })).length == 0)\r\n $scope.categories[2].push(result);\r\n else\r\n errorService.changeError($filter('translate')(\"errCategoryExists\"));\r\n break;\r\n }\r\n }\r\n });\r\n };\r\n\r\n $scope.closeCategoryModal = function () {\r\n categoryModal.dismiss('cancel');\r\n };\r\n\r\n /************************************\r\n * *\r\n * *\r\n * EDITOR TAB *\r\n * *\r\n * *\r\n *************************************/\r\n\r\n /**\r\n * Fix any html that is being pated into the editor\r\n * @param {} html \r\n * @returns {} \r\n */\r\n $scope.fixHtmlPaste = function (html) {\r\n var replacedHtml;\r\n\r\n var containsParagraphs = html.indexOf(\"

\") > -1;\r\n\r\n if (containsParagraphs) {\r\n replacedHtml = html.replace(new RegExp('
', 'g'), '');\r\n } else {\r\n replacedHtml = html;\r\n }\r\n\r\n return replacedHtml;\r\n }\r\n\r\n\r\n // MOVED TO SEPARATE CONTROLLERS: VERTICAL AND HORIZONTAL -> GOOD BOY\r\n\r\n\r\n /************************************\r\n * *\r\n * *\r\n * ACCESS TAB *\r\n * *\r\n * *\r\n *************************************/\r\n\r\n /**\r\n * Toggles between all companies having access and none having access\r\n * @returns {} \r\n */\r\n $scope.toggleSelectAllOrganizations = function () {\r\n // deselect all only if they're all selected already\r\n if ($scope.organizations.every(function (org) { return org.checked })) {\r\n $scope.access.allSelected = false;\r\n $scope.organizations.map(function (org) { org.checked = $scope.access.allSelected });\r\n $scope.processListElement.Organizations = [];\r\n } else {\r\n $scope.access.allSelected = true;\r\n $scope.organizations.map(function (org) { org.checked = $scope.access.allSelected });\r\n $scope.processListElement.Organizations = angular.copy($scope.organizations);\r\n }\r\n };\r\n\r\n /**\r\n * Remove the access for the given company\r\n * @param {any} organization\r\n */\r\n function removeOrganizationAccess(organization) {\r\n for (var i = 0; i < $scope.processListElement.Organizations.length; i++) {\r\n if ($scope.processListElement.Organizations[i].id == organization.id) {\r\n $scope.processListElement.Organizations.splice(i, 1);\r\n organization.checked = false;\r\n break;\r\n }\r\n }\r\n };\r\n\r\n function manageOrganizationAccessChange(organization, giveAccess) {\r\n if (organization) {\r\n formChangeDetector.onFocusControl(organization.OrganizationName, null, \"organization\", (giveAccess) ? \"hasNotAccess\" : \"hasAccess\");\r\n formChangeDetector.onValueChanged((giveAccess) ? \"hasAccess\" : \"hasNotAccess\");\r\n }\r\n }\r\n\r\n /**\r\n * Gives or removes access to the given organization\r\n * @param {} organization \r\n * @returns {} \r\n */\r\n $scope.toggleSelectOrganization = function (organization) {\r\n if ($scope.processListElement.IsPublic)\r\n return;\r\n\r\n if (organization.IsOwner && organization.checked) {\r\n if ($scope.loggedUser.Organization.Central) {\r\n dialogService.showConfirmDialog('txtWarning', 'txtProcessListCreatedByMessage').then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n removeOrganizationAccess(organization);\r\n manageOrganizationAccessChange(organization, false);\r\n });\r\n } else\r\n errorService.changeError($filter('translate')(\"errCannotRemoveAccessOwner\"));\r\n return;\r\n }\r\n\r\n if (organization.checked && organization.id == $scope.loggedUser.Organization.id)\r\n return;\r\n\r\n if (!$scope.processListElement.Organizations)\r\n $scope.processListElement.Organizations = [];\r\n\r\n if (!organization.checked) {\r\n organization.checked = true;\r\n manageOrganizationAccessChange(organization, true);\r\n $scope.processListElement.Organizations.push(organization);\r\n } else {\r\n if (organization.HasUsedProcessList)\r\n dialogService.showConfirmDialog('txtWarning', 'txtProcessListUsedMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n\r\n removeOrganizationAccess(organization);\r\n manageOrganizationAccessChange(organization, false);\r\n\r\n } else {\r\n\r\n organization.checked = true;\r\n manageOrganizationAccessChange(organization, true);\r\n\r\n }\r\n\r\n });\r\n else {\r\n removeOrganizationAccess(organization);\r\n manageOrganizationAccessChange(organization, false);\r\n }\r\n\r\n }\r\n\r\n $scope.access.allSelected = $scope.organizations.every(function (org) { return org.checked });\r\n };\r\n\r\n /**\r\n * Checks whether the check input is disabled or not\r\n * @param {} organization \r\n * @returns {} \r\n */\r\n $scope.isAccessCheckDisabled = function (organization) {\r\n if ($scope.processListElement.IsPublic)\r\n return true;\r\n if (organization.id == $scope.loggedUser.Organization.id && organization.checked)\r\n return true;\r\n if (organization.IsOwner)\r\n return true;\r\n if (!$scope.processListElement.id && organization.id == $scope.loggedUser.Organization.id)\r\n return true;\r\n return false;\r\n };\r\n\r\n /************************************\r\n * *\r\n * *\r\n * ATTACHMENTS TAB *\r\n * *\r\n * *\r\n *************************************/\r\n\r\n $scope.loadRorhanboka = function () {\r\n loadRorhandbokaSubChapter();\r\n }\r\n\r\n /**\r\n * Gets the rorhandboka attachment list\r\n */\r\n function loadRorhandbokaSubChapter() {\r\n var promise = ProcessListFactory.GetBookmarks();\r\n promise.then(function (bookmarks) {\r\n $scope.rorhandbokaBookmarks = bookmarks;\r\n });\r\n };\r\n\r\n /**\r\n * Adds or remove the given attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n $scope.toggleListItemRelation = function (attachment) {\r\n if ($scope.currentProcessListItem && $scope.currentProcessListItem.Attachments) {\r\n if ($scope.currentProcessListItem.Attachments.some(function (existing) {\r\n return existing.id === attachment.id;\r\n })) {\r\n $scope.currentProcessListItem.Attachments.splice($scope.currentProcessListItem.Attachments.indexOf(attachment), 1);\r\n } else {\r\n $scope.currentProcessListItem.Attachments.push(attachment);\r\n }\r\n }\r\n };\r\n\r\n $scope.attachmentNamePattern = function (name) {\r\n if (name) {\r\n //allow characters, digits, norwegian characters, '-', '_', '.' and space \r\n var regexp = /^[\\w\\d\\u00C5\\u00E5\\u00C6\\u00E6\\u00D8\\u00F8\\-\\_\\.\\ ]{1,250}$/;\r\n if (regexp.test(name))\r\n return true;\r\n else {\r\n return false;\r\n }\r\n } else\r\n return true;\r\n };\r\n\r\n /**\r\n * Adds the given attachment to the processlist item\r\n * @param {} myFile \r\n * @param {} fileName \r\n * @param {} videoUrl \r\n * @param {} videoUrlName \r\n * @param {} rorahandbokaItem \r\n * @returns {} \r\n */\r\n $scope.addAttachment = function (myFile, fileName, videoUrl, videoUrlName, rorahandbokaItem) {\r\n\r\n var newAttachment = new ProcessListFactory.Attachment();\r\n if (myFile) {\r\n newAttachment.AttachmentName = fileName;\r\n newAttachment.ForeignKey = $scope.processListElementId;\r\n\r\n var response = fileReader.readAsDataUrl(myFile, $scope);\r\n response.then(function (result) {\r\n newAttachment.AttachmentBytes = result;\r\n var savedAttachmentFile = ProcessListFactory.saveAttachment(newAttachment, 'BOT_PROCESSLIST');\r\n savedAttachmentFile.then(function (attachment) {\r\n attachment.IsExternalURL = false;\r\n $scope.processListElement.Attachments.push(attachment);\r\n $scope.toggleListItemRelation(attachment);\r\n $scope.processListElement.Change = applicationChange.edit;\r\n });\r\n });\r\n\r\n myFile.clear();\r\n\r\n } else if (videoUrl) {\r\n\r\n newAttachment.AttachmentName = videoUrlName;\r\n newAttachment.URL = videoUrl;\r\n newAttachment.ForeignKey = $scope.processListElementId;\r\n\r\n var savedAttachmentUrl = ProcessListFactory.saveAttachment(newAttachment, 'BOT_PROCESSLIST');\r\n savedAttachmentUrl.then(function (attachment) {\r\n attachment.IsExternalURL = true;\r\n $scope.processListElement.Attachments.push(attachment);\r\n $scope.toggleListItemRelation(attachment);\r\n $scope.processListElement.Change = applicationChange.edit;\r\n });\r\n this.videoUrl = '';\r\n this.videoUrlName = '';\r\n } else if (rorahandbokaItem) {\r\n newAttachment.AttachmentName = rorahandbokaItem.UrlKey;\r\n var connectPromise = ProcessListFactory.ConnectRorhandbokaBookmarkProcessList($scope.processListElementId, rorahandbokaItem.id);\r\n connectPromise.then(function (connectId) {\r\n newAttachment.ForeignKey = connectId;\r\n var promise = ProcessListFactory.saveAttachment(newAttachment, 'BOT_CONNECT_RORHANDBOKA_SUBCHAPTER_PROCESSLIST');\r\n promise.then(function (attachment) {\r\n $scope.processListElement.Attachments.push(attachment);\r\n $scope.toggleListItemRelation(attachment);\r\n $scope.resetAttachment();\r\n $scope.processListElement.Change = applicationChange.edit;\r\n });\r\n });\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Clears and resets the attachment input\r\n * @param {} myFile \r\n * @param {} videoUrl \r\n * @param {} videoUrlName \r\n * @returns {} \r\n */\r\n $scope.resetAttachment = function (myFile, videoUrl, videoUrlName) {\r\n if (myFile != null) {\r\n myFile.clear();\r\n }\r\n if (videoUrl != null) {\r\n this.videoUrl = '';\r\n }\r\n if (videoUrlName != null) {\r\n this.videoUrlName = '';\r\n }\r\n\r\n $scope.rorhandbokaItem = {\r\n id: 0\r\n };\r\n };\r\n\r\n /**\r\n * Deletes the given attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n $scope.deleteAttachment = function (attachment) {\r\n if (!attachment || !attachment.id) {\r\n if ($scope.processListElement.Attachments.indexOf(attachment) != -1) {\r\n $scope.processListElement.Attachments.splice($scope.processListElement.Attachments.indexOf(attachment), 1);\r\n }\r\n } else {\r\n var a = ProcessListFactory.deleteAttachment(attachment);\r\n\r\n a.then(function () {\r\n if ($scope.processListElement.Attachments.indexOf(attachment) != -1) {\r\n $scope.processListElement.Attachments.splice($scope.processListElement.Attachments.indexOf(attachment), 1);\r\n }\r\n\r\n $scope.processListElement.Change = applicationChange.edit;\r\n });\r\n }\r\n };\r\n\r\n $scope.openAttachment = function (attach) {\r\n if (attach.IsExternalURL == false) downloadFile(attach.URL);\r\n else {\r\n var win = window.open(attach.URL, '_blank');\r\n //win.focus();\r\n }\r\n return;\r\n };\r\n\r\n //TODO: use Download service\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n\r\n /**\r\n * Check whether the list has inactive categories \r\n * @returns {} \r\n */\r\n $scope.hasInactiveCategories = function () {\r\n if ($scope.processListElement && $scope.processListElement.Categories) {\r\n var i;\r\n for (i = 0; i < $scope.processListElement.Categories[0].length; i++) {\r\n if (!$scope.processListElement.Categories[0][i].Active)\r\n return true;\r\n }\r\n for (i = 0; i < $scope.processListElement.Categories[1].length; i++) {\r\n if (!$scope.processListElement.Categories[1][i].Active)\r\n return true;\r\n }\r\n for (i = 0; i < $scope.processListElement.Categories[2].length; i++) {\r\n if (!$scope.processListElement.Categories[2][i].Active)\r\n return true;\r\n }\r\n return false;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the list has jumpt to step actions\r\n */\r\n function hasJumpToStepAction() {\r\n if (!$scope.processListElement)\r\n return false;\r\n if (!$scope.processListElement.ProcessListItems || $scope.processListElement.ProcessListItems.length == 0)\r\n return false;\r\n\r\n var processListItem = null, item = null;\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n processListItem = $scope.processListElement.ProcessListItems[i];\r\n\r\n if (!processListItem.Option)\r\n continue;\r\n if (!processListItem.Option.Items || processListItem.Option.Items.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < processListItem.Option.Items.length; j++) {\r\n item = processListItem.Option.Items[j];\r\n\r\n if (!item.ProcessListAction)\r\n continue;\r\n\r\n if (!item.ProcessListAction.Type)\r\n continue;\r\n\r\n if (item.ProcessListAction.Type.ProgId == 'JUMP_TO_STEP')\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the save button is disabled for process list\r\n * @returns {} \r\n */\r\n $scope.disableSaveProcessListElement = function () {\r\n if (!$scope.processListElement ||\r\n !$scope.processListElement.DataAbout ||\r\n ($scope.processListDataDetailsTypes && $scope.processListDataDetailsTypes.length > 0 && !$scope.processListElement.DataDetails) ||\r\n ($scope.processListElement.DataDetails && $scope.processListElement.DataDetails.id && !$scope.processListElement.DataDetails.Active) ||\r\n !$scope.processListElement.Name ||\r\n !$scope.processListElement.Status) {\r\n errorService.changeError($filter('translate')(\"errFillRequired\"));\r\n $scope.identificationTabError = 'has-error';\r\n return true;\r\n }\r\n $scope.identificationTabError = '';\r\n\r\n if ($scope.showErrDateTo()) {\r\n errorService.changeError($filter('translate')(\"errProcessListDate\"));\r\n $scope.identificationTabError = 'has-error';\r\n return true;\r\n }\r\n $scope.identificationTabError = '';\r\n\r\n if ($scope.hasInactiveCategories()) {\r\n errorService.changeError($filter('translate')(\"errAddInactiveCategory\"));\r\n $scope.categoriesTabError = 'has-error';\r\n return true;\r\n }\r\n $scope.categoriesTabError = '';\r\n\r\n if (!$scope.processListElement.Categories || !$scope.processListElement.Categories[0] || $scope.processListElement.Categories[0].length == 0) {\r\n errorService.changeError($filter('translate')(\"errSelectCategory\"));\r\n $scope.categoriesTabError = 'has-error';\r\n return true;\r\n }\r\n $scope.categoriesTabError = '';\r\n\r\n switch (ProcessListFactory.ProcessListType) {\r\n case 'HORIZONTAL':\r\n if (!$scope.processListElement.HeaderFields || !$scope.processListElement.TableFields) {\r\n errorService.changeError($filter('translate')(\"errAddOneListField\"));\r\n $scope.itemsTabError = 'has-error';\r\n return true;\r\n }\r\n for (var i = 0; i < $scope.processListElement.HeaderFields.length; i++) {\r\n for (var j = 0; j < $scope.processListElement.HeaderFields[i].length; j++) {\r\n if (!$scope.processListElement.HeaderFields[i][j].Label) {\r\n errorService.changeError($filter('translate')(\"errAddOneListField\"));\r\n $scope.itemsTabError = 'has-error';\r\n return true;\r\n }\r\n }\r\n }\r\n for (var i = 0; i < $scope.processListElement.TableFields.length; i++) {\r\n if (!$scope.processListElement.TableFields[i].Label) {\r\n errorService.changeError($filter('translate')(\"errAddOneListField\"));\r\n $scope.itemsTabError = 'has-error';\r\n return true;\r\n }\r\n }\r\n $scope.itemsTabError = '';\r\n break;\r\n case 'VERTICAL':\r\n case 'MANAGEMENT':\r\n if (!$scope.processListElement.ProcessListItems || $scope.processListElement.ProcessListItems.length == 0) {\r\n errorService.changeError($filter('translate')(\"errAddOneItem\"));\r\n $scope.itemsTabError = 'has-error';\r\n return true;\r\n }\r\n $scope.itemsTabError = '';\r\n break;\r\n\r\n }\r\n\r\n if ($scope.processListElement.FlexibleExecution && hasJumpToStepAction()) {\r\n console.dir($scope.processListElement);\r\n errorService.changeError($filter('translate')(\"errRemoveJumpToStep\"));\r\n $scope.itemsTabError = 'has-error';\r\n return true;\r\n }\r\n\r\n if (processListElementOriginal.Organizations && processListElementOriginal.Organizations.length != $scope.processListElement.Organizations.length)\r\n return false;\r\n\r\n if (formChanges.hasBeenMadeFormChanges() || changesMade)\r\n return false;\r\n\r\n return false;\r\n };\r\n\r\n /********** CLOSE process list element ***********/\r\n\r\n function navigate(url) {\r\n if (url)\r\n $scope.go(url);\r\n else {\r\n $scope.go('/processListElement/' + $scope.processListElement.id);\r\n }\r\n };\r\n\r\n function closeProcessList(newUrl) {\r\n if (formChanges.hasBeenMadeFormChanges() || changesMade) {\r\n dialogService.showConfirmDialog('txtCloseProcessListTitle', 'txtCloseProcessListMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n $scope.isNavigatingFromCloseProcessList = true;\r\n navigate(newUrl);\r\n } else {\r\n $scope.isNavigatingToProcessListOverviewFromButton = false;\r\n\r\n var processListMenu = menuService.getMenuByHref(\"/processList\");\r\n menuService.setSelectedMenu(processListMenu, false);\r\n }\r\n });\r\n } else {\r\n navigate(newUrl);\r\n }\r\n };\r\n\r\n /**\r\n * Duplicates the given attachment\r\n * @param {any} attachment\r\n * @param {any} processlistId\r\n */\r\n function duplicateAttachment(attachment, processlistId) {\r\n var deferred = $q.defer(); //<-- do we really need defer everywhere?\r\n\r\n ProcessListFactory.duplicateAttachment(attachment.oldId, processlistId)\r\n .then(\r\n function (result) {\r\n //search all process list items that have included this attachment\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var attach = $filter('filter')($scope.processListElement.ProcessListItems[i].Attachments, { id: attachment.id }, true);\r\n if (attach && attach[0]) {\r\n attach[0].id = angular.copy(result.id);\r\n }\r\n }\r\n\r\n deferred.resolve();\r\n },\r\n function (error) {\r\n deferred.reject(error);\r\n }\r\n );\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Saves the external attachments copied to the current list\r\n */\r\n function saveExternalAttachments() {\r\n var promises = [];\r\n\r\n $scope.processListElement.Attachments.forEach(function (attachment) {\r\n if (attachment.id.indexOf(\"new\") > -1) {\r\n promises.push(duplicateAttachment(angular.copy(attachment), $scope.processListElement.id));\r\n } else\r\n promises.push();\r\n });\r\n\r\n\r\n $q.all(promises).then(function () {\r\n saveProcesslistToServer();\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Saves the list -> WOW, SUCH DESCRIPTION, MUCH INFO\r\n */\r\n function saveProcesslistToServer() {\r\n var savedProcessList = ProcessListFactory.savedProcessListElement($scope.processListElement);\r\n savedProcessList.then(function (resultedProcesslist) {\r\n ProcessListFactory.displaySaveMessage = true;\r\n $scope.processListElement.id = resultedProcesslist.id;\r\n\r\n if ($scope.processListElementId) {\r\n $route.reload();\r\n isRouteReloading = true;\r\n $scope.onTabSelect('Identification');\r\n } else {\r\n isRouteReloading = true;\r\n navigate(getUrlBasedOnQueryParams());\r\n $scope.onTabSelect('Identification');\r\n }\r\n });\r\n };\r\n\r\n $scope.closeProcessList = function () {\r\n $scope.isNavigatingToProcessListOverviewFromButton = true;\r\n\r\n var url = getUrlBasedOnQueryParams();\r\n\r\n closeProcessList(url);\r\n }\r\n\r\n function getUrlBasedOnQueryParams() {\r\n var url = '/processList';\r\n\r\n if (!!queryParams.foreignKey && !!queryParams.location) {\r\n if (queryParams.location === 'GOT_USER')\r\n url = '/user/' + queryParams.foreignKey;\r\n else if (queryParams.location === 'GOT_ORGANIZATION')\r\n url = '/organization/' + queryParams.foreignKey;\r\n }\r\n\r\n return url;\r\n }\r\n\r\n $scope.setChangesMadeValue = function (value) {\r\n changesMade = value;\r\n }\r\n\r\n $scope.$on(\"$routeChangeStart\",\r\n function (event, next, current) {\r\n\r\n if (isRouteReloading) {\r\n isRouteReloading = false;\r\n } else {\r\n if (next.$$route) {\r\n var nextRoute = next.$$route.originalPath;\r\n\r\n if (nextRoute === \"/login\") {\r\n return;\r\n } else {\r\n if (nextRoute === \"/processList\" && $scope.isNavigatingToProcessListOverviewFromButton) {\r\n return;\r\n } else if ((changesMade || formChanges.hasBeenMadeFormChanges()) && !$scope.isNavigatingFromCloseProcessList) {\r\n event.preventDefault();\r\n closeProcessList(nextRoute);\r\n }\r\n }\r\n\r\n\r\n }\r\n }\r\n\r\n });\r\n\r\n $scope.$on(\"$destroy\",\r\n function () {\r\n formChanges.resetChanges();\r\n $location.search('location', null);\r\n $location.search('foreignKey', null);\r\n });\r\n\r\n /**\r\n * Saves the list\r\n * If any new attachments, save those before and then the list\r\n */\r\n var saveProcessListElement = function () {\r\n $scope.processListElement.ValidFrom = new Date($scope.processListElement.ValidFrom).getTime();\r\n $scope.processListElement.ValidTo = new Date($scope.processListElement.ValidTo).getTime();\r\n\r\n if ($scope.processListElement.ProcessListType == undefined) {\r\n $scope.processListElement.ProcessListType = {\r\n };\r\n $scope.processListElement.ProcessListType.ProgId = ProcessListFactory.ProcessListType;\r\n }\r\n\r\n //save first attachments from external\r\n if ($scope.processListElement.id > 0 &&\r\n $scope.processListElement.Attachments &&\r\n $scope.processListElement.Attachments.length > 0) {\r\n\r\n saveExternalAttachments();\r\n } else\r\n saveProcesslistToServer();\r\n formChanges.resetChanges();\r\n };\r\n\r\n function setOrganizationsToProcessList() {\r\n $scope.processListElement.Organizations = [];\r\n $scope.organizations.forEach(function (organization) {\r\n if (organization && organization.checked)\r\n $scope.processListElement.Organizations.push(angular.copy(organization));\r\n });\r\n };\r\n\r\n /********** SAVE process list element ***********/\r\n $scope.saveProcessListElement = function () {\r\n if ($scope.disableSaveProcessListElement())\r\n return;\r\n\r\n if (!$scope.organizations || $scope.organizations.length == 0) {\r\n $scope.getOrganizations().then(function () {\r\n setOrganizationsToProcessList();\r\n saveProcessListElement();\r\n });\r\n } else {\r\n setOrganizationsToProcessList();\r\n saveProcessListElement();\r\n }\r\n };\r\n\r\n /**\r\n * Displays a modal that informs the user if he's sure he wants to disable the list\r\n * @param {} id \r\n * @param {} redirect \r\n * @returns {} \r\n */\r\n $scope.disableProcessListElement = function (id, redirect) {\r\n if (id) {\r\n var coupledProcessLists = ProcessListFactory.getCoupledProcessLists(id);\r\n coupledProcessLists.$promise.then(function (coupled) {\r\n $scope.items = coupled;\r\n $uibModal.open({\r\n templateUrl: 'Scripts/processList/disableProcessListElementPartial.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n });\r\n $scope.ok = function () {\r\n ProcessListFactory.disableProcessListElement(id).then(function () {\r\n infoService.changeInfo($filter('translate')(\"msgProcessListDisabled\"));\r\n\r\n if (redirect)\r\n $scope.go('/processList');\r\n });\r\n };\r\n }\r\n };\r\n\r\n /**\r\n * Enables the list\r\n * @param {} id \r\n * @returns {} \r\n */\r\n $scope.enableProcessListElement = function (id) {\r\n if (id) {\r\n infoService.changeInfo($filter('translate')(\"msgProcessListEnabled\"));\r\n var enableProcessList = ProcessListFactory.enableProcessListElement(id);\r\n enableProcessList.then(function () {\r\n isRouteReloading = true;\r\n $route.reload();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Starts the simulation for the current list\r\n * @returns {} \r\n */\r\n $scope.startSimulation = function () {\r\n var plE = angular.copy($scope.processListElement);\r\n\r\n if (ProcessListFactory.ProcessListType == 'HORIZONTAL')\r\n $scope.nextPage = '/horizontalSimulation/' + plE.id;\r\n else\r\n $scope.nextPage = '/verticalSimulation/' + plE.id;\r\n\r\n\r\n if (plE.ProcessListItems && plE.ProcessListItems.length > 0) {\r\n for (var i = 0; i < plE.ProcessListItems.length; i++) {\r\n plE.ProcessListItems[i].NrOfLinesLeft = undefined;\r\n plE.ProcessListItems[i].NrOfLinesRight = undefined;\r\n plE.ProcessListItems[i].IsExternal = undefined;\r\n }\r\n }\r\n if (angular.toJson(plE) != angular.toJson(processListElementOriginal)) {\r\n dialogService.showCustomDialog('txtCloseProcessListTitle', 'txtMsgProcessList', ['txtYes', 'txtNo', 'txtSave&Exit']).then(function (dialogResult) {\r\n if (dialogResult == 0) { // Yes\r\n $scope.go($scope.nextPage);\r\n } else if (dialogResult == 2) { // Save and exit\r\n $scope.saveProcessListElement();\r\n $scope.go($scope.nextPage);\r\n }\r\n });\r\n } else {\r\n $scope.go($scope.nextPage);\r\n }\r\n };\r\n\r\n $scope.openPublicExceptionModal = function () {\r\n $scope.publicExceptionsModalInstance = $uibModal.open({\r\n template: '',\r\n backdrop: 'static',\r\n scope: $scope\r\n });\r\n\r\n $scope.publicExceptionsModalInstance.result\r\n .then(function (result) {\r\n $scope.processListElement.Exceptions = result;\r\n })\r\n .catch(function (err) { });\r\n };\r\n\r\n $scope.getExportList = function () {\r\n if(!$scope.loggedUser.Organization.Central) return;\r\n \r\n ProcessListFactory.getExportList($scope.processListElementId)\r\n .then(function (result) {\r\n $scope.exportList = result;\r\n });\r\n }\r\n\r\n $scope.exportTo = function (targetConnection) {\r\n if (!!targetConnection.AlreadyExported)\r\n return dialogService.showConfirmDialog('txtWarning', 'txtAlreadyExportConfirm').then(function (dialogResult) {\r\n if (dialogResult !== dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n ProcessListFactory.reExport(targetConnection.ExportId)\r\n .then(function () {\r\n infoService.changeInfo($filter('translate')('txtProcessListExportStartSoon'));\r\n $scope.getExportList();\r\n });\r\n });\r\n\r\n return dialogService.showConfirmDialog('txtWarning', 'txtExportProcessListConfirm').then(function (dialogResult) {\r\n if (dialogResult !== dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n ProcessListFactory.exportTo(targetConnection.id, $scope.processListElementId)\r\n .then(function () {\r\n infoService.changeInfo($filter('translate')('txtProcessListExportStartSoon'));\r\n $scope.getExportList();\r\n });\r\n });\r\n }\r\n\r\n $scope.$on('onOptionItemSelected', function (event, args) {\r\n\r\n var optionItem = args;\r\n\r\n if (OptionItemService.doesOptionItemGeneratesAnotherProcessList(optionItem)) {\r\n\r\n // update Data details dropdown \r\n $scope.onAllProcessListDataAboutChanged(optionItem);\r\n }\r\n\r\n event.stopPropagation();\r\n });\r\n\r\n /************************************\r\n * *\r\n * *\r\n * TABS *\r\n * *\r\n * *\r\n *************************************/\r\n $scope.tabs = {\r\n };\r\n $scope.tabs[ProcessListFactory.activeTab] = true;\r\n\r\n $scope.onTabSelect = function (tabName) {\r\n ProcessListFactory.activeTab = tabName;\r\n };\r\n\r\n $scope.setSigningFrequencyType = function (value) {\r\n if (!$scope.processListElement.SigningFrequency)\r\n $scope.processListElement.SigningFrequency = {};\r\n\r\n $scope.processListElement.SigningFrequency.FrequencyType = value;\r\n };\r\n\r\n initializeProcessListElement();\r\n\r\n };\r\n\r\n})();","(function () {\r\n\r\n angular.module('processList').directive('vbListitem', function () {\r\n return {\r\n restrict: \"E\",\r\n require: \"^ngController\",\r\n link: function (scope, element, atr, parentController) {\r\n\r\n //atr.external USED in angular-drag-and-drop file for copying item from external\r\n\r\n scope.openModal = function (index, item, external) {\r\n if (!scope.dragged) {\r\n parentController.openModal(index, item, external);\r\n }\r\n };\r\n\r\n scope.removeProcessListItem = function (listItem, index) {\r\n parentController.removeProcessListItem(listItem, index);\r\n };\r\n\r\n scope.duplicateItem = function (indexOfSource) {\r\n parentController.duplicateItem(indexOfSource);\r\n };\r\n\r\n scope.getBackgroundColor = function () {\r\n if (atr.parenttype)\r\n return parentController.getBackgroundColor(atr.parenttype);\r\n else\r\n return null;\r\n };\r\n\r\n scope.getBorderColor = function () {\r\n if (atr.parenttype)\r\n return parentController.getBorderColor(atr.parenttype);\r\n else\r\n return null;\r\n };\r\n\r\n scope.getArrowColor = function () {\r\n if (atr.parenttype)\r\n return parentController.getArrowColor(atr.parenttype);\r\n else\r\n return null;\r\n };\r\n\r\n scope.getBackgroundColor = function () {\r\n if (atr.parenttype)\r\n return parentController.getBackgroundColor(atr.parenttype);\r\n else\r\n return null;\r\n };\r\n\r\n },\r\n scope: {\r\n processListItem: '=item',\r\n external: '=external',\r\n index: '=index',\r\n parentType: '=parentType'\r\n },\r\n templateUrl: 'Scripts/processList/vb-listitem.html'\r\n };\r\n });\r\n\r\n})();\r\n","(function () {\r\n\r\n ProcessListFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '$q',\r\n '$http',\r\n '$rootScope',\r\n '$cookies',\r\n 'DateUtilService'\r\n ];\r\n\r\n angular.module('processList').factory('ProcessListFactory', ProcessListFactory);\r\n\r\n function ProcessListFactory(\r\n $resource,\r\n baseUrlService,\r\n $q,\r\n $http,\r\n $rootScope,\r\n $cookies,\r\n DateUtilService\r\n ) {\r\n var processListFactory = {};\r\n\r\n var statuses = [];\r\n var processListDataTypes = [];\r\n var optionTypes = [];\r\n var actionTypes = [];\r\n var questionTypes = [];\r\n var rorhandbokaBookmarks = [];\r\n\r\n /**\r\n * Setup the $resource api\r\n */\r\n var ProcessList = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListSimple');\r\n var GetProcessListByData = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/GetProcessListByData');\r\n var GetProcessListByAvailability = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/GetProcessListByAvailability');\r\n var StatusList = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListStatuses');\r\n var ProcessListDataTypes = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListTypes');\r\n var ProcessListCategories = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListCategories');\r\n var ProcessListCategoryHierarchy = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListCategoryHierarchy');\r\n var OptionTypes = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListOptionTypes');\r\n var ActionTypes = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListActionTypes');\r\n var QuestionType = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListQuestionType');\r\n var ProcessListToSave = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessList/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var ProcessListToEnable = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListStatus/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var ProcessListSimulation = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListSimulation/:id', { id: '@id' });\r\n var Coupled = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/Coupled');\r\n var Attachment = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/Attachment/:id', { id: '@id' });\r\n var DuplicateAttachment = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/DuplicateAttachment');\r\n var HPlE = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/HorizontalProcessList/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var ProcessListOrder = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListOrder', { freeText: '@freeText' });\r\n var Rorhandboka = $resource(baseUrlService.getBaseUrl() + 'REST/Rorhandboka.svc/Bookmarks', { processlistId: '@processlistId', rorhandbokaChapterId: '@rorhandbokaChapterId' });\r\n var ExternalProcessLists = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ExternalProcessList');\r\n var FirstLevelCategories = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/FirstLevelCategories');\r\n var DataDetail = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListDataDetail');\r\n var DeviationVariables = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListDeviationVariables');\r\n var ManagementRiskAnalysis = $resource(baseUrlService.getBaseUrl() + 'REST/RiskAnalysis.svc/RiskAnalysisList');\r\n var IntellisenseRiskAnalysis = $resource(baseUrlService.getBaseUrl() + 'REST/RiskAnalysis.svc/RiskAnalysisIntellisense');\r\n var RiskAnalysis = $resource(baseUrlService.getBaseUrl() + 'REST/RiskAnalysis.svc/RiskAnalysis');\r\n var RiskRowStatusList = $resource(baseUrlService.getBaseUrl() + 'REST/RiskAnalysis.svc/RiskRowStatusList');\r\n var ProcessListsForRiskAnalysis = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/GetProcessListsForRiskAnalysis');\r\n var ProcessListType = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListType/:processListElementId');\r\n var CheckIfProcessListCanBeEdited = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/CheckIfProcessListCanBeEdited/:processListId');\r\n var ProcessListCircularityCheck = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListCircularityCheck');\r\n\r\n var ProcessListExportList = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListExportList/:processListId');\r\n var ProcessListExport = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListExport');\r\n var ProcessListReExport = $resource(baseUrlService.getBaseUrl() + 'REST/ProcessList.svc/ProcessListReExport');\r\n\r\n /**\r\n * Gets the lists for risk analysis\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n processListFactory.GetProcessListsForRiskAnalysis = function (organizationId) {\r\n return ProcessListsForRiskAnalysis.query({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets new object for risk analysis save\r\n * @returns {} \r\n */\r\n processListFactory.getRiskAnalysis = function () {\r\n return new RiskAnalysis();\r\n };\r\n\r\n /**\r\n * Gets data for 'intellisense' dropdown\r\n * @param {} table \r\n * @param {} organizationId \r\n * @param {} freetext \r\n * @returns {} \r\n */\r\n processListFactory.getRiskAnalysisIntellisense = function (table, organizationId, freetext) {\r\n return IntellisenseRiskAnalysis.query({ table: table, organizationId: organizationId, freetext: freetext });\r\n };\r\n\r\n /**\r\n * Gets risk analysis by given id\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.getRiskAnalysis = function (id) {\r\n return RiskAnalysis.get({ id: id });\r\n }\r\n\r\n /**\r\n * Saves the given risk head\r\n * @param {} riskHead \r\n * @returns {} \r\n */\r\n processListFactory.saveRiskAnalysis = function (riskHead) {\r\n return riskHead.$save();\r\n }\r\n\r\n /**\r\n * Gets the status list\r\n * @returns {} \r\n */\r\n processListFactory.getRiskRowStatusList = function () {\r\n return RiskRowStatusList.query();\r\n }\r\n\r\n /**\r\n * Gets the list of process lists based on the search criteria\r\n * @param {} freeText \r\n * @param {} selectedProcessListItem \r\n * @param {} includeDeactivated \r\n * @param {} includeManagement \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n processListFactory.getProcessList = function (freeText, selectedProcessListItem, includeDeactivated, includeManagement, organizationId) {\r\n if (includeManagement === undefined || includeManagement === null)\r\n includeManagement = true;\r\n\r\n if (selectedProcessListItem) {\r\n if (selectedProcessListItem.id)\r\n return ProcessList.query({\r\n freeText: freeText,\r\n selectedProcessListId: selectedProcessListItem.id,\r\n dataAboutTypeId: selectedProcessListItem.DataAbout.id,\r\n includeDeactivated: includeDeactivated,\r\n processListTypeProgId: processListFactory.ProcessListType,\r\n includeManagement: includeManagement,\r\n organizationId: organizationId\r\n });\r\n else\r\n return ProcessList.query({\r\n freeText: freeText,\r\n selectedProcessListId: null,\r\n dataAboutTypeId: selectedProcessListItem.DataAbout.id,\r\n includeDeactivated: includeDeactivated,\r\n processListTypeProgId: processListFactory.ProcessListType,\r\n includeManagement: includeManagement,\r\n organizationId: organizationId\r\n });\r\n } else {\r\n processListFactory.activeTab = 'identificationTabActive';\r\n return ProcessList.query({\r\n freeText: freeText,\r\n selectedProcessListId: null,\r\n dataAboutTypeId: null,\r\n includeDeactivated: includeDeactivated,\r\n processListTypeProgId: null,\r\n includeManagement: includeManagement,\r\n organizationId: organizationId\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Gets the external lists\r\n * @param {} dataAboutId \r\n * @param {} currentProcessListId \r\n * @returns {} \r\n */\r\n processListFactory.getExternalProcessList = function (dataAboutId, currentProcessListId) {\r\n return ExternalProcessLists.query({ dataAboutId: dataAboutId, currentProcessListId: currentProcessListId });\r\n };\r\n\r\n /**\r\n * Gets the lists by data about and other serach criteria\r\n * @param {} dataAbout \r\n * @param {} dataDetails \r\n * @param {} includeDeactivated \r\n * @param {} organizationId \r\n * @param {} availableOnTable \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListByData = function (dataAbout, dataDetails, includeDeactivated, organizationId, availableOnTable) {\r\n return GetProcessListByData.query({ dataAbout: dataAbout, dataDetails: dataDetails, includeDeactivated: includeDeactivated, organizationId: organizationId, availableOnTable: availableOnTable });\r\n };\r\n\r\n /**\r\n * Gets the lists based on the available setting (on user or company)\r\n * @param {} includeDeactivated \r\n * @param {} organizationId \r\n * @param {} availableOnTable \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListByAvailability = function (includeDeactivated, organizationId, availableOnTable) {\r\n return GetProcessListByAvailability.query({ includeDeactivated: includeDeactivated, organizationId: organizationId, availableOnTable: availableOnTable });\r\n };\r\n\r\n /**\r\n * Gets the rorhandboka attachments\r\n * @returns {} \r\n */\r\n processListFactory.GetBookmarks = function () {\r\n var deferred = $q.defer();\r\n\r\n if (rorhandbokaBookmarks && rorhandbokaBookmarks.length > 0)\r\n deferred.resolve(rorhandbokaBookmarks);\r\n else {\r\n var promise = Rorhandboka.query();\r\n promise.$promise.then(function (bookmarks) {\r\n rorhandbokaBookmarks = bookmarks;\r\n deferred.resolve(rorhandbokaBookmarks);\r\n });\r\n }\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Creates a relation between rorhandboka attachment and list\r\n * @param {} processlistId \r\n * @param {} rorhandbokaChapterId \r\n * @returns {} \r\n */\r\n processListFactory.ConnectRorhandbokaBookmarkProcessList = function (processlistId, rorhandbokaChapterId) {\r\n var defer = $q.defer();\r\n var req = {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/json; charset=utf-8' },\r\n url: baseUrlService.getBaseUrl() + 'REST/Rorhandboka.svc/Bookmarks?processlistId=' + processlistId + '&rorhandbokaChapterId=' + rorhandbokaChapterId,\r\n data: JSON.stringify({ processlistId: processlistId, rorhandbokaChapterId: rorhandbokaChapterId })\r\n }\r\n\r\n //why are we using http here???\r\n $http(req).then(function (id) {\r\n defer.resolve(id.data);\r\n }, function (error) {\r\n defer.reject(error);\r\n });\r\n\r\n return defer.promise;\r\n };\r\n\r\n /**\r\n * Gets the status list\r\n * @returns {} \r\n */\r\n processListFactory.getStatusList = function () {\r\n if (statuses.length == 0)\r\n statuses = StatusList.query();\r\n return statuses;\r\n };\r\n\r\n /**\r\n * Gets the list by data type\r\n * @param {} table \r\n * @param {} onlyActive \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListDataTypes = function (table, onlyActive) {\r\n //set default true\r\n onlyActive = (typeof onlyActive !== 'undefined') ? onlyActive : true;\r\n\r\n return ProcessListDataTypes.query({ table: table, onlyActive: onlyActive });\r\n };\r\n\r\n /**\r\n * Save the given data detail type\r\n * @param {} type \r\n * @returns {} \r\n */\r\n processListFactory.saveDataDetail = function (type) {\r\n var saveDataDetail = new DataDetail();\r\n saveDataDetail.type = type;\r\n\r\n return saveDataDetail.$save();\r\n }\r\n\r\n /**\r\n * Gets the process list category\r\n * @param {} processlistId \r\n * @param {} onlyActive \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListCategories = function (processlistId, onlyActive) {\r\n return ProcessListCategories.get({ processlistId: processlistId, onlyActive: onlyActive });\r\n };\r\n\r\n /**\r\n * Saves the process list category\r\n * @param {} category \r\n * @returns {} \r\n */\r\n processListFactory.saveProcessListCategory = function (category) {\r\n return ProcessListCategories.save(category);\r\n };\r\n\r\n /**\r\n * Gets the processlist category hierarchy\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListCategoryHierarchy = function (organizationId) {\r\n return ProcessListCategoryHierarchy.query({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the list of risk analysis based on the search criteria\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @param {} includeDeactivated \r\n * @returns {} \r\n */\r\n processListFactory.getManagementRiskAnalysis = function (freeText, organizationId, includeDeactivated) {\r\n return ManagementRiskAnalysis.query({ organizationId: organizationId, freeText: freeText, includeDeactivated: includeDeactivated });\r\n };\r\n\r\n /**\r\n * Gets new object for the attachment to be saved later\r\n * @returns {} \r\n */\r\n processListFactory.Attachment = function () {\r\n return new Attachment();\r\n };\r\n\r\n /**\r\n * Gets the list of options\r\n * @returns {} \r\n */\r\n processListFactory.getOptionTypes = function () {\r\n if (optionTypes.length == 0)\r\n optionTypes = OptionTypes.query();\r\n return optionTypes;\r\n };\r\n\r\n /**\r\n * Gets the list of actions\r\n * @returns {} \r\n */\r\n processListFactory.getActionTypes = function () {\r\n return ActionTypes.query();\r\n };\r\n\r\n /**\r\n * Gets the list of questions that are already available\r\n * @param {} freeText \r\n * @returns {} \r\n */\r\n processListFactory.getQuestionTypes = function (freeText) {\r\n questionTypes = QuestionType.query({ freeText: freeText });\r\n return questionTypes;\r\n };\r\n\r\n /**\r\n * Saves the question type\r\n * @param {} question \r\n * @returns {} \r\n */\r\n processListFactory.saveQuestionType = function (question) {\r\n var questionType = new QuestionType();\r\n questionType.Table = question.Table;\r\n questionType.ProgId = question.ProgId;\r\n questionType.id = question.id;\r\n questionType.Name = question.Name;\r\n questionType.Active = question.Active;\r\n\r\n return questionType.$save();\r\n };\r\n\r\n /**\r\n * Gets the new object for the list to be later saved\r\n * The object is returned based on the list type\r\n * @returns {} \r\n */\r\n processListFactory.ProcessListElement = function () {\r\n\r\n if (processListFactory.ProcessListType === \"HORIZONTAL\") {\r\n return new HPlE();\r\n } else {\r\n return new ProcessListToSave();\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Gets the process list\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListElement = function (id) {\r\n processListFactory.processListId = id;\r\n return ProcessListToSave.get({ id: id });\r\n };\r\n\r\n /**\r\n * Gets the simulation for the given list id\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.ProcessListSimulation = function (id) {\r\n return ProcessListSimulation.get({ id: id });\r\n };\r\n\r\n /**\r\n * Saves the given process list\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n processListFactory.savedProcessListElement = function (processList) {\r\n //process ValidTo and ValidFrom dates\r\n if (processList.ValidTo) {\r\n var validToDate = new Date(processList.ValidTo);\r\n validToDate.setHours(0);\r\n validToDate.setMinutes(0);\r\n validToDate.setSeconds(0);\r\n processList.ValidTo = DateUtilService.getLongWithOffset(validToDate);\r\n }\r\n if (processList.ValidFrom) {\r\n var validFromDate = new Date(processList.ValidFrom);\r\n validFromDate.setHours(0);\r\n validFromDate.setMinutes(0);\r\n validFromDate.setSeconds(0);\r\n processList.ValidFrom = DateUtilService.getLongWithOffset(validFromDate);\r\n }\r\n\r\n if (processList.SigningFrequency && processList.SigningFrequency.StartDate) {\r\n var startDate = new Date(processList.SigningFrequency.StartDate);\r\n startDate.setHours(0, 0, 0);\r\n processList.SigningFrequency.StartDate = DateUtilService.getLongWithOffset(startDate);\r\n }\r\n\r\n if (processList.id != undefined)\r\n return processList.$update();\r\n else\r\n return processList.$save();\r\n };\r\n\r\n /**\r\n * Get another lists (formely know as coupled)\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.getCoupledProcessLists = function (id) {\r\n return Coupled.query({ id: id });\r\n };\r\n\r\n /**\r\n * Disables the given process list id\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.disableProcessListElement = function (id) {\r\n var disablePl = new ProcessListToSave();\r\n disablePl.id = id;\r\n return disablePl.$delete();\r\n };\r\n\r\n /**\r\n * Enables the given process list id\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.enableProcessListElement = function (id) {\r\n var enablePl = new ProcessListToEnable();\r\n return enablePl.$update({ id: id });\r\n };\r\n\r\n /**\r\n * Deletes the given process list\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n processListFactory.deleteAttachment = function (attachment) {\r\n var a = new Attachment();\r\n a.id = attachment.id;\r\n return a.$delete();\r\n };\r\n\r\n /**\r\n * Saves the given attachment\r\n * @param {} attachment \r\n * @param {} tableName \r\n * @returns {} \r\n */\r\n processListFactory.saveAttachment = function (attachment, tableName) {\r\n attachment.Table = tableName; //'BOT_PROCESSLIST';\r\n return attachment.$save();\r\n };\r\n\r\n /**\r\n * Duplicates the given attachment for the process list\r\n * @param {} attachmentId \r\n * @param {} processlistId \r\n * @returns {} \r\n */\r\n processListFactory.duplicateAttachment = function (attachmentId, processlistId) {\r\n var duplicateAttachment = new DuplicateAttachment();\r\n return duplicateAttachment.$save({ attachmentId: attachmentId, processlistId: processlistId });\r\n };\r\n\r\n /**\r\n * Gets a new object to be saved if no id is provider\r\n * Gets the list if id is provided\r\n * @param {} id \r\n * @returns {} \r\n */\r\n processListFactory.getHPlE = function (id) {\r\n if (id == undefined)\r\n return new HPlE();\r\n else\r\n return HPlE.get({ id: id });\r\n };\r\n\r\n /**\r\n * Gets the lists that are to be used on order as start/end/contract/tillegg\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n processListFactory.getProcessListOrder = function (freeText, organizationId) {\r\n return ProcessListOrder.query({ freeText: freeText, organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the first level of list categories\r\n * @returns {} \r\n */\r\n processListFactory.getFirstLevelCategories = function () {\r\n return FirstLevelCategories.query().$promise;\r\n };\r\n\r\n /**\r\n * Get the type of processlist\r\n * @param {} processListElementId \r\n * @returns {} \r\n */\r\n processListFactory.getSelectedProcessListType = function (processListElementId) {\r\n return ProcessListType.get({ processListElementId: processListElementId }).$promise;\r\n };\r\n\r\n /**\r\n * Checks if a process list can be edited by the current logged user\r\n * @param {any} processListId\r\n */\r\n processListFactory.checkIfProcessListCanBeEdited = function (processListId) {\r\n return CheckIfProcessListCanBeEdited.get({ processListId: processListId }).$promise;\r\n };\r\n\r\n processListFactory.checkForProcessListCircularity = function (processListId, anotherProcessListId) {\r\n return ProcessListCircularityCheck.save({\r\n processListId: processListId,\r\n anotherProcessListId: anotherProcessListId\r\n }, {}).$promise;\r\n };\r\n\r\n processListFactory.getExportList = function (processListId) {\r\n return ProcessListExportList.query({ processListId: processListId }).$promise;\r\n };\r\n\r\n processListFactory.exportTo = function (connectionTargetId, processListId) {\r\n var processListExportApiObject = new ProcessListExport();\r\n\r\n processListExportApiObject.processListId = processListId;\r\n processListExportApiObject.connectionTargetId = connectionTargetId;\r\n\r\n return processListExportApiObject.$save();\r\n };\r\n\r\n processListFactory.reExport = function (exportId) {\r\n var processListReExportApiObject = new ProcessListReExport();\r\n\r\n processListReExportApiObject.exportId = exportId;\r\n\r\n return processListReExportApiObject.$save();\r\n };\r\n\r\n processListFactory.ProcessListType = $cookies.processListType;\r\n processListFactory.reverseProcessList = true;\r\n processListFactory.predicateProcessList = \"id\";\r\n processListFactory.currentPageProcessList = 1;\r\n processListFactory.processListId = 0;\r\n processListFactory.includeDeactivatedItems = false;\r\n processListFactory.activeTab = 'identificationTabActive';\r\n processListFactory.dataAboutId = 0;\r\n processListFactory.navigationMode = true;\r\n\r\n // save process list type in a cookie, so that the /processListElement/ page can be refreshed\r\n $rootScope.$watch(function () { return processListFactory.ProcessListType }, function () {\r\n $cookies.processListType = processListFactory.ProcessListType;\r\n });\r\n\r\n return processListFactory;\r\n };\r\n\r\n})();","//TODO: this has to be split -> oh boy :-(\r\n(function () {\r\n\r\n VerticalProcesslistElementController.$inject = [\r\n '$location',\r\n '$scope',\r\n '$controller',\r\n '$sce',\r\n '$routeParams',\r\n '$filter',\r\n '$route',\r\n '$uibModal',\r\n 'dialogService',\r\n 'ProcessListFactory',\r\n 'formChangeDetector',\r\n 'CentralApprovalItemService',\r\n '$q',\r\n '$window'\r\n ];\r\n\r\n angular\r\n .module('processList')\r\n .controller('VerticalProcesslistElementController', VerticalProcesslistElementController);\r\n\r\n function VerticalProcesslistElementController(\r\n $location,\r\n $scope,\r\n $controller,\r\n $sce,\r\n $routeParams,\r\n $filter,\r\n $route,\r\n $uibModal,\r\n dialogService,\r\n ProcessListFactory,\r\n formChangeDetector,\r\n CentralApprovalItemService,\r\n $q,\r\n $window\r\n ) {\r\n\r\n var processListItemModal;\r\n var lineIterations = 0;\r\n var lineIterationsRight = 0;\r\n var flatColors = [];\r\n var optionItemHeight = 42;\r\n var duration = 1000; //milliseconds\r\n var offset = 130; //pixels; adjust for floating menu, context etc (padding)\r\n var newIndexForItem = 0;\r\n var currentDraggedProcessListItem = null;\r\n //object used for comunication betwen this controller and central approval directive\r\n $scope.centralApprovalSharedObject = {};\r\n $scope.onOptionItemTextChange = onOptionItemTextChange;\r\n $scope.onMouseMoveAboveItemsSection = onMouseMoveAboveItemsSection;\r\n\r\n $scope.getJumpToTargetIndex = function (id) {\r\n\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n if ($scope.processListElement.ProcessListItems[i].id == id) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks whether drag and drop is enabled\r\n * If the next item has jump to step action, drag and drop is disabled \r\n * @param {} item \r\n * @param {} index \r\n * @param {} destIndex \r\n * @returns {} \r\n */\r\n $scope.dragEnabled = function (item, index, destIndex) {\r\n var returnValue = true;\r\n\r\n angular.forEach(item.Option.Items, function (optionItem) {\r\n if (optionItem.ProcessListAction != null && optionItem.ProcessListAction.Type.ProgId == 'JUMP_TO_STEP') {\r\n var targetIndex = $scope.getJumpToTargetIndex(optionItem.ProcessListAction.ProcessListItem.id) - 1;\r\n if (targetIndex <= destIndex) {\r\n returnValue = false;\r\n }\r\n }\r\n });\r\n\r\n if (returnValue == false) {\r\n item.jumpToWarning = true;\r\n return false;\r\n }\r\n\r\n var targetedByJumpToIndex = 1;\r\n angular.forEach($scope.processListElement.ProcessListItems, function (itemObj) {\r\n angular.forEach(itemObj.Option.Items, function (optionItem) {\r\n if (optionItem.ProcessListAction != null\r\n && optionItem.ProcessListAction.ProcessListItem != null\r\n && optionItem.ProcessListAction.ProcessListItem.id != null\r\n && optionItem.ProcessListAction.ProcessListItem.id == item.id) {\r\n\r\n if (targetedByJumpToIndex >= destIndex) {\r\n returnValue = false;\r\n }\r\n }\r\n });\r\n targetedByJumpToIndex++;\r\n });\r\n\r\n if (returnValue == false) {\r\n item.jumpToWarning = true;\r\n return false;\r\n }\r\n\r\n var anteriorItem;\r\n if (index > 0) {\r\n anteriorItem = $scope.processListElement.ProcessListItems[index - 1];\r\n var anteriorItemHasJump = false;\r\n angular.forEach(anteriorItem.Option.Items, function (optionItem) {\r\n if (optionItem.ProcessListAction != null &&\r\n optionItem.ProcessListAction.Type &&\r\n optionItem.ProcessListAction.Type.ProgId == 'JUMP_TO_STEP') {\r\n anteriorItemHasJump = true;\r\n }\r\n });\r\n }\r\n\r\n if (anteriorItemHasJump == false) {\r\n item.jumpToWarning = false;\r\n return true;\r\n }\r\n if (anteriorItem == null) {\r\n item.jumpToWarning = false;\r\n return true;\r\n }\r\n\r\n var nextItem;\r\n if (index + 1 < $scope.processListElement.ProcessListItems.length) {\r\n nextItem = $scope.processListElement.ProcessListItems[index + 1];\r\n\r\n var nextItemHasJump = false;\r\n angular.forEach(anteriorItem.Option.Items, function (optionItem) {\r\n if (optionItem.ProcessListAction != null && optionItem.ProcessListAction.ProcessListItem.id == nextItem.id) {\r\n nextItemHasJump = true;\r\n }\r\n });\r\n }\r\n if (nextItemHasJump) {\r\n returnValue = false;\r\n }\r\n if (returnValue) {\r\n item.jumpToWarning = false;\r\n }\r\n else {\r\n item.jumpToWarning = true;\r\n }\r\n\r\n return returnValue;\r\n };\r\n\r\n //settings for drag and drop ui tree for process list items\r\n $scope.optionsItems = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n if ($scope.processListElement.ProcessListItems[sourceNodeScope.$index] == null) {\r\n return true;\r\n }\r\n return $scope.dragEnabled($scope.processListElement.ProcessListItems[sourceNodeScope.$index], sourceNodeScope.$index, destIndex);\r\n },\r\n dragStart: function (event) {\r\n $scope.removeAnimations();\r\n\r\n // get a reference to the HTML element that is dragging\r\n currentDraggedProcessListItem = event.source.nodeScope.$element[0];\r\n },\r\n dragStop: function() {\r\n currentDraggedProcessListItem = null;\r\n },\r\n dropped: function (event) {\r\n\r\n $scope.addAnimations();\r\n\r\n event.source.nodeScope.item.jumpToWarning = false;\r\n\r\n //$scope.itemToScroll = event.dest.index;\r\n if (typeof $scope.drawLines != \"undefined\")\r\n $scope.drawLines();\r\n }\r\n };\r\n\r\n var externalProcessListOriginal;\r\n //drag and drop settings for exeternal items\r\n $scope.optionsExternal = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n return false;\r\n },\r\n dragStart: function (event) {\r\n event.elements.dragging[0].classList.remove('dropdown-menu');\r\n event.elements.dragging[0].classList.remove('intellisense-dropdown');\r\n event.elements.placeholder.replaceWith(event.elements.dragging.clone().find('li'));\r\n\r\n // get a reference to the HTML element that is dragged\r\n currentDraggedProcessListItem = event.source.nodeScope.$element[0];\r\n },\r\n dragStop: function (event) {\r\n $scope.currentExternalListItem.ProcessListItems = angular.copy(externalProcessListOriginal.ProcessListItems);\r\n currentDraggedProcessListItem = null;\r\n },\r\n dropped: function (event) {\r\n event.source.nodeScope.item.id = \"id\" + newIndexForItem;\r\n newIndexForItem++;\r\n event.source.nodeScope.item.ParentId = undefined;\r\n event.source.nodeScope.item.ProcessListId = undefined;\r\n event.source.nodeScope.item.Option.id = undefined;\r\n\r\n //save the attachments on processlist level first\r\n if (event.source.nodeScope.item.Attachments && event.source.nodeScope.item.Attachments.length > 0) {\r\n event.source.nodeScope.item.Attachments.forEach(function (processListAttachment) {\r\n\r\n //if the external attachment is already here, use it to connect it to the process list item\r\n var existingAttachment = $filter('filter')($scope.processListElement.Attachments, { 'oldId': processListAttachment.id }, true)[0];\r\n if (existingAttachment) {\r\n processListAttachment.id = angular.copy(existingAttachment.id);\r\n processListAttachment.oldId = angular.copy(existingAttachment.oldId);\r\n } else {\r\n processListAttachment.oldId = angular.copy(processListAttachment.id);\r\n processListAttachment.id = \"new\" + processListAttachment.oldId;\r\n $scope.processListElement.Attachments.push(processListAttachment);\r\n }\r\n\r\n\r\n });\r\n }\r\n\r\n if (event.source.nodeScope.item.Option.Items && event.source.nodeScope.item.Option.Items.length > 0) {\r\n event.source.nodeScope.item.Option.Items.forEach(function (optionItem) {\r\n optionItem.id = undefined;\r\n if (optionItem.ProcessListAction) {\r\n\r\n switch (optionItem.ProcessListAction.Type.ProgId) {\r\n case 'JUMP_TO_STEP':\r\n optionItem.ProcessListAction = undefined;\r\n case 'RISK_ANALYSIS':\r\n if ($scope.processListElement.ProcessListType.ProgId == 'VERTICAL') {\r\n optionItem.ProcessListAction = undefined;\r\n }\r\n break;\r\n case 'SIGNATURE':\r\n if ($scope.processListElement.ProcessListType.ProgId == 'MANAGEMENT') {\r\n optionItem.ProcessListAction = undefined;\r\n }\r\n break;\r\n default:\r\n optionItem.ProcessListAction.id = undefined;\r\n }\r\n }\r\n if (optionItem.ProcessListAction &&\r\n optionItem.ProcessListAction.DefaultAnswers &&\r\n optionItem.ProcessListAction.DefaultAnswers.length > 0) {\r\n optionItem.ProcessListAction.DefaultAnswers.forEach(function (defaultAnswer) {\r\n defaultAnswer.id = undefined;\r\n });\r\n }\r\n\r\n if (optionItem.ProcessListAction && optionItem.ProcessListAction.DeviationTemplate)\r\n optionItem.ProcessListAction.DeviationTemplate.id = null;\r\n\r\n });\r\n }\r\n if (typeof $scope.drawLines != \"undefined\")\r\n $scope.drawLines();\r\n }\r\n };\r\n\r\n /******** modal for process list item ********/\r\n\r\n //helper functions for item animations\r\n $scope.removeAnimations = function () {\r\n if ($scope.processListElement.ProcessListItems) {\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var idToFind = 'listItem' + i;\r\n var itemToAnimate = document.getElementById(idToFind);\r\n itemToAnimate.classList.remove('fadeIn');\r\n }\r\n }\r\n };\r\n\r\n $scope.addAnimations = function () {\r\n if ($scope.processListElement.ProcessListItems) {\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var idToFind = 'listItem' + i;\r\n var itemToAnimate = document.getElementById(idToFind);\r\n itemToAnimate.classList.add('fadeIn');\r\n }\r\n }\r\n };\r\n\r\n\r\n\r\n var removeClassAnimation = function (itemToAnimate, className) {\r\n setTimeout(function () {\r\n itemToAnimate.classList.remove(className);\r\n }, 500);\r\n }\r\n\r\n var createAnimation = function (indexOfSource, className) {\r\n var idToFind = 'listItem' + (indexOfSource);\r\n var itemToAnimate = document.getElementById(idToFind);\r\n\r\n if (itemToAnimate.classList.contains(className))\r\n itemToAnimate.classList.remove(className);\r\n\r\n itemToAnimate.className += ' ' + className;\r\n removeClassAnimation(itemToAnimate, className);\r\n };\r\n\r\n /**\r\n * Checks if the question has another list action and fetches the data about\r\n * Opens the modal with the item details\r\n * @param {} index \r\n * @param {} item \r\n * @param {} external \r\n * @returns {} \r\n */\r\n this.openModal = function (index, item, external) {\r\n var listToAdd = [];\r\n\r\n if (item.Option && item.Option.Items) {\r\n for (var i = 0; i < item.Option.Items.length; i++) {\r\n var optionItem = item.Option.Items[i];\r\n\r\n if (optionItem &&\r\n optionItem.ProcessListAction &&\r\n optionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST' &&\r\n optionItem.ProcessListAction.ProcessList) {\r\n\r\n optionItem.Name = optionItem.ProcessListAction.ProcessList.Name;\r\n optionItem.DataAbout = $scope.getDataTypeById(optionItem.ProcessListAction.ProcessList.DataAbout.id);\r\n $scope.onAllProcessListDataAboutChanged(optionItem);\r\n if (optionItem.ProcessListAction.ProcessList.DataDetails && optionItem.ProcessListAction.ProcessList.DataDetails.id) {\r\n optionItem.DataDetails = $scope.getDataTypeById(optionItem.ProcessListAction.ProcessList.DataDetails.id);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $scope.openModal(index, item, external);\r\n };\r\n\r\n var indexOfProcessListItem;\r\n\r\n /**\r\n * Sets the option type or actions active/inactive\r\n * @param {any} processListItem\r\n */\r\n function processCentralApprovalVariables(processListItem) {\r\n if (!processListItem.ReportingCode)\r\n return;\r\n\r\n switch (processListItem.ReportingCode) {\r\n case '##UsernameAndPassword##':\r\n case '##CompanyInfo##':\r\n //$scope.currentProcessListItem.Option.disabledAddAnswer = true;\r\n $scope.currentProcessListItem.Option.disabledActions = true;\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n break;\r\n case '##CompanyPrimaryContact##':\r\n case '##ControlSystem##':\r\n case '##OrganizationChart##':\r\n case '##UsersInfo##':\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n case '##DesiredApprovalAreas##':\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n /**\r\n * Opens a modal with the process list item question and actions\r\n * Prepares the data before opening modal\r\n * @param {} currentIndex \r\n * @param {} processListItem \r\n * @param {} external \r\n * @returns {} \r\n */\r\n $scope.openModal = function (currentIndex, processListItem, external) {\r\n $scope.disabledAddLine = false;\r\n\r\n //populate another processlist\r\n $scope.getProcessListExternal($scope.processListElement.DataAbout.id);\r\n\r\n var processListItemOld;\r\n\r\n if (processListItem) {\r\n $scope.currentProcessListItem = angular.copy(processListItem);\r\n indexOfProcessListItem = $scope.processListElement.ProcessListItems.indexOf(processListItem);\r\n $scope.currentProcessListItem.isNew = false;\r\n $scope.currentProcessListItem.index = currentIndex + 1;\r\n //$scope.itemToScroll = currentIndex - 1;\r\n processListItemOld = angular.copy(processListItem);\r\n $scope.getQuestionTypes(processListItem.Question.Name);\r\n\r\n if ($scope.processListElement.UseForCentralApproval)\r\n processCentralApprovalVariables($scope.currentProcessListItem);\r\n } else {\r\n $scope.optionItem = undefined;\r\n $scope.currentProcessListItem = {};\r\n $scope.currentProcessListItem.Option = {};\r\n $scope.currentProcessListItem.Option.Items = [];\r\n $scope.currentProcessListItem.isNew = true;\r\n $scope.newItemIndex = currentIndex;\r\n $scope.currentProcessListItem.index = currentIndex || currentIndex == 0 ? (currentIndex + 2) : 1;\r\n\r\n //$scope.itemToScroll = currentIndex;\r\n processListItemOld = {};\r\n }\r\n\r\n\r\n $scope.getOptionTypes();\r\n $scope.getActionTypes();\r\n\r\n $scope.availableProcessListItems = [];\r\n $scope.editable = true;\r\n\r\n\r\n if (external) {\r\n //populate \"Jump to\" dropdown with all items below the current item + 1\r\n for (var i = currentIndex + 2; i < $scope.currentExternalListItem.ProcessListItems.length; i++) {\r\n $scope.currentExternalListItem.ProcessListItems[i].index = i + 1;\r\n $scope.availableProcessListItems.push($scope.currentExternalListItem.ProcessListItems[i]);\r\n }\r\n } else {\r\n //populate \"Jump to\" dropdown with all items below the current item + 1\r\n for (var j = currentIndex + 2; j < $scope.processListElement.ProcessListItems.length; j++) {\r\n $scope.processListElement.ProcessListItems[j].index = j + 1;\r\n $scope.availableProcessListItems.push($scope.processListElement.ProcessListItems[j]);\r\n }\r\n }\r\n\r\n if ($scope.currentProcessListItem.Option && $scope.currentProcessListItem.Option.Items && $scope.currentProcessListItem.Option.Items.length > 0) {\r\n $scope.optionItemDetailsHeight = $scope.currentProcessListItem.Option.Items.length * optionItemHeight + 'px';\r\n $scope.setOptionItem($scope.currentProcessListItem.Option.Items.length > 0 ? $scope.currentProcessListItem.Option.Items[0] : null);\r\n }\r\n $scope.selectedOptionItemIndex = 0;\r\n\r\n $scope.$watch(function () {\r\n if ($scope.currentProcessListItem && $scope.currentProcessListItem.Option && $scope.currentProcessListItem.Option.Items && $scope.currentProcessListItem.Option.Items.length > 0)\r\n return $scope.currentProcessListItem.Option.Items.indexOf($scope.optionItem);\r\n return true;\r\n }, function () {\r\n if ($scope.optionItem) {\r\n for (var index = 0; index < $scope.currentProcessListItem.Option.Items.length; index++)\r\n if ($scope.currentProcessListItem.Option.Items[index].Text == $scope.optionItem.Text) {\r\n $scope.selectedOptionItemIndex = index;\r\n if (($scope.optionItem.ProcessListAction && $scope.optionItem.ProcessListAction.Type && $scope.optionItem.ProcessListAction.Type.ProgId == 'TEXT_FIELD' ||\r\n $scope.optionItem.ProcessListAction && $scope.optionItem.ProcessListAction.Type && $scope.optionItem.ProcessListAction.Type.ProgId == 'SMS' ||\r\n $scope.optionItem.ProcessListAction && $scope.optionItem.ProcessListAction.Type && $scope.optionItem.ProcessListAction.Type.ProgId == 'EMAIL')\r\n && $scope.optionItem.ProcessListAction.DefaultAnswers && $scope.optionItem.ProcessListAction.DefaultAnswers.length > 0) {\r\n $scope.optionItem.ProcessListAction.DefaultAnswers.forEach(function (answer) {\r\n if (answer.Name && answer.Name.toLowerCase() == 'annet') {\r\n answer.disabled = true;\r\n }\r\n });\r\n }\r\n break;\r\n }\r\n }\r\n });\r\n\r\n if (($scope.processListElement.IsPublic || external) && $scope.loggedUser.Organization.Central != true) {\r\n $scope.editable = false;\r\n processListItemModal = $uibModal.open({\r\n templateUrl: 'Scripts/processList/modalProcessListItemReadonlyPartial.html',\r\n size: 'x-lg',\r\n scope: $scope\r\n });\r\n }\r\n else {\r\n $scope.loadRorhanboka();\r\n processListItemModal = $uibModal.open({\r\n templateUrl: 'Scripts/processList/modalProcessListItemPartial.html',\r\n size: 'x-lg',\r\n scope: $scope\r\n });\r\n }\r\n processListItemModal.result.finally(function () {\r\n $scope.resetEditQuestion();\r\n //$scope.itemToScroll = null;\r\n $scope.setOptionItem(null);\r\n $scope.currentProcessListItem = null;\r\n $scope.reportingCodeAlreadyExists = false;\r\n });\r\n\r\n };\r\n\r\n this.duplicateItem = function (indexOfSource) {\r\n return $scope.duplicateItem(indexOfSource);\r\n };\r\n\r\n /**\r\n * Duplicated the item at the given index\r\n * Ids are removed\r\n * @param {} indexOfSource \r\n * @returns {} \r\n */\r\n $scope.duplicateItem = function (indexOfSource) {\r\n setTimeout(function () {\r\n createAnimation(indexOfSource + 1, 'fadeIn');\r\n\r\n }, 1000);\r\n\r\n var duplicateProcessListItem = angular.copy($scope.processListElement.ProcessListItems[indexOfSource]);\r\n if (duplicateProcessListItem.$$hashKey)\r\n duplicateProcessListItem.$$hashKey = undefined;\r\n duplicateProcessListItem.id = undefined;\r\n duplicateProcessListItem.ParentId = $scope.processListElement.ProcessListItems[indexOfSource].id;\r\n duplicateProcessListItem.Option.id = undefined;\r\n\r\n angular.forEach(duplicateProcessListItem.Option.Items, function (optionItem) {\r\n optionItem.$$hashKey = undefined;\r\n optionItem.id = undefined;\r\n optionItem.OptionId = undefined;\r\n if (optionItem.ProcessListAction) {\r\n optionItem.ProcessListAction.id = undefined;\r\n if (optionItem.ProcessListAction.DefaultAnswers) {\r\n optionItem.ProcessListAction.DefaultAnswers.forEach(function (answer) {\r\n answer.id = undefined;\r\n });\r\n }\r\n //clear deviation template\r\n if (optionItem.ProcessListAction.DeviationTemplate)\r\n optionItem.ProcessListAction.DeviationTemplate.id = null;\r\n }\r\n\r\n });\r\n duplicateProcessListItem.id = \"id\" + newIndexForItem;\r\n newIndexForItem++;\r\n $scope.processListElement.ProcessListItems.splice(indexOfSource + 1, 0, duplicateProcessListItem);\r\n $scope.newItemIndex = undefined;\r\n\r\n //set process list item to scroll\r\n //$scope.itemToScroll = indexOfSource;\r\n //count nr of points\r\n $scope.countNrOfPoints();\r\n //Redraw lines\r\n $scope.drawLines();\r\n\r\n $scope.setChangesMadeValue(true);\r\n };\r\n\r\n /**\r\n * Adds a new option item to the current process list item\r\n * @returns {} \r\n */\r\n $scope.addNewOptionItem = function () {\r\n if (!$scope.currentProcessListItem.Option)\r\n $scope.currentProcessListItem.Option = {};\r\n if (!$scope.currentProcessListItem.Option.Items)\r\n $scope.currentProcessListItem.Option.Items = [];\r\n $scope.currentProcessListItem.Option.Items.push({ Text: '' });\r\n $scope.selectedOptionItemIndex = $scope.currentProcessListItem.Option.Items.length - 1;\r\n $scope.setOptionItem($scope.currentProcessListItem.Option.Items[$scope.currentProcessListItem.Option.Items.length - 1]);\r\n $scope.optionItemDetailsHeight = $scope.currentProcessListItem.Option.Items.length * optionItemHeight + 'px';\r\n $scope.disabledAddLine = true;\r\n };\r\n\r\n $scope.checkActionForEmpty = function (optionItem) {\r\n if (optionItem) {\r\n if (optionItem.ProcessListAction.Type == \"\" || optionItem.ProcessListAction.Type == null) {\r\n delete optionItem.ProcessListAction;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Clear the default answers\r\n * @param {} processListAction \r\n * @returns {} \r\n */\r\n $scope.resetAction = function (processListAction) {\r\n processListAction.DefaultAnswers = [];\r\n };\r\n\r\n /**\r\n * Disables the add answer button\r\n * @param {} optionItem \r\n * @returns {} \r\n */\r\n $scope.setDisableAddLine = function (optionItem) {//name of the function isn't that great\r\n $scope.disabledAddLine = true;\r\n if (optionItem.Text != \"\" && optionItem.Text != undefined) {\r\n var tempNrAppartions = 0;\r\n for (var index = 0; index < $scope.currentProcessListItem.Option.Items.length; index++) {\r\n if ($scope.currentProcessListItem.Option.Items[index].Text.toLowerCase() == optionItem.Text.toLowerCase()) {\r\n tempNrAppartions++;\r\n if (tempNrAppartions == 2) {\r\n optionItem.error = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (index == $scope.currentProcessListItem.Option.Items.length)\r\n optionItem.error = undefined;\r\n else\r\n return;\r\n if (optionItem.ProcessListAction && optionItem.ProcessListAction.Type) {\r\n if (optionItem.ProcessListAction.Type) {\r\n if (optionItem.ProcessListAction.Type.ProgId != \"JUMP_TO_STEP\") {\r\n optionItem.ProcessListAction.ProcessListItem = undefined;\r\n }\r\n if (optionItem.ProcessListAction.Type.ProgId != \"ANOTHER_PROCESSLIST\") {\r\n optionItem.ProcessListAction.ProcessList = undefined;\r\n }\r\n } else {\r\n optionItem.ProcessListAction = undefined;\r\n }\r\n if (optionItem.ProcessListAction.Type.ProgId == \"JUMP_TO_STEP\")\r\n if (optionItem.ProcessListAction.ProcessListItem && (optionItem.ProcessListAction.ProcessListItem.id != undefined && optionItem.ProcessListAction.ProcessListItem.id != \"\"))\r\n $scope.disabledAddLine = false;\r\n if (optionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST')\r\n if (optionItem.ProcessListAction.ProcessList\r\n && (optionItem.ProcessListAction.ProcessList.id != undefined && optionItem.ProcessListAction.ProcessList.id != \"\")\r\n && (!optionItem.DataAbout || optionItem.ProcessListAction.ProcessList.DataAbout.id == optionItem.DataAbout.id)\r\n && (!optionItem.DataDetails || optionItem.ProcessListAction.ProcessList.DataDetails.id == optionItem.DataDetails.id)\r\n ) {\r\n $scope.disabledAddLine = false;\r\n }\r\n if (optionItem.ProcessListAction.Type.ProgId != \"JUMP_TO_STEP\" && optionItem.ProcessListAction.Type.ProgId != \"ANOTHER_PROCESSLIST\")\r\n $scope.disabledAddLine = false;\r\n }\r\n else\r\n $scope.disabledAddLine = false;\r\n\r\n }\r\n };\r\n\r\n /**\r\n * Remove the option item at the given index\r\n * @param {} index \r\n * @returns {} \r\n */\r\n $scope.removeOptionItem = function (index) {\r\n $scope.currentProcessListItem.Option.Items.splice(index, 1);\r\n\r\n for (var i = 0; i < $scope.currentProcessListItem.Option.Items.length; i++)\r\n $scope.setDisableAddLine($scope.currentProcessListItem.Option.Items[i]);\r\n if ($scope.currentProcessListItem.Option && $scope.currentProcessListItem.Option.Items && $scope.currentProcessListItem.Option.Items.length > 0) {\r\n $scope.optionItemDetailsHeight = $scope.currentProcessListItem.Option.Items.length * optionItemHeight + 'px';\r\n }\r\n //when removing the selected option item\r\n if (index == $scope.selectedOptionItemIndex) {\r\n $scope.selectedOptionItemIndex = 0;\r\n $scope.setOptionItem($scope.currentProcessListItem.Option.Items.length > 0 ? $scope.currentProcessListItem.Option.Items[0] : null);\r\n }\r\n if ($scope.currentProcessListItem.Option.Items.length <= 0)\r\n $scope.disabledAddLine = false;\r\n };\r\n\r\n /**\r\n * Checks if there are more than one jump to step actions\r\n * @returns {} \r\n */\r\n $scope.moreThanOneJumpToStep = function () {\r\n var nrOfJumpsToStepActions = 0;\r\n\r\n if ($scope.currentProcessListItem\r\n && $scope.currentProcessListItem.Option\r\n && $scope.currentProcessListItem.Option.Type\r\n && $scope.currentProcessListItem.Option.Type.ProgId == 'MULTIPLE_CHOICE'\r\n && $scope.currentProcessListItem.Option.Items) {\r\n for (var i = 0; i < $scope.currentProcessListItem.Option.Items.length; i++) {\r\n var item = $scope.currentProcessListItem.Option.Items[i];\r\n if (item.ProcessListAction && item.ProcessListAction.Type.ProgId == 'JUMP_TO_STEP') {\r\n nrOfJumpsToStepActions++;\r\n }\r\n }\r\n }\r\n\r\n return nrOfJumpsToStepActions > 1;\r\n };\r\n\r\n /**\r\n * Checks if the current list has jump to step and it's flexible\r\n * @returns {} \r\n */\r\n $scope.isFlexibleWithJumpToStep = function () {\r\n if (!$scope.currentProcessListItem || !$scope.currentProcessListItem.Option)\r\n return false;\r\n\r\n if (!$scope.currentProcessListItem.Option.Items || $scope.currentProcessListItem.Option.Items.length == 0)\r\n return false;\r\n for (var i = 0; i < $scope.currentProcessListItem.Option.Items.length; i++) {\r\n var item = $scope.currentProcessListItem.Option.Items[i];\r\n if (!item.ProcessListAction)\r\n continue;\r\n if (item.ProcessListAction.Type.ProgId != 'JUMP_TO_STEP')\r\n continue;\r\n if ($scope.processListElement.FlexibleExecution && item.ProcessListAction.Type.ProgId == 'JUMP_TO_STEP')\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks if the action has default answers\r\n * @param {} processListAction \r\n * @returns {} \r\n */\r\n $scope.checkOpenDefaultAnswers = function (processListAction) {\r\n if (processListAction)\r\n if (processListAction.DefaultAnswers && processListAction.DefaultAnswers.length != 0)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Prepares the answers when the option type changes\r\n * @returns {} \r\n */\r\n $scope.onOptionTypeChange = function () {\r\n // initiate default answers for each item that can have any\r\n if ($scope.currentProcessListItem.Option && $scope.currentProcessListItem.Option.Items && $scope.currentProcessListItem.Option.Type.ProgId != 'STANDARD_TEXT') {\r\n for (var i = 0; i < $scope.currentProcessListItem.Option.Items.length; i++) {\r\n $scope.defaultAnswersInitiate($scope.currentProcessListItem.Option.Items[i].ProcessListAction);\r\n }\r\n }\r\n\r\n if ($scope.currentProcessListItem.Option.Type.ProgId == 'STANDARD_TEXT')\r\n //init standard answers\r\n $scope.currentProcessListItem.Option.Items = [{ Text: '' }];\r\n };\r\n\r\n /**\r\n * Prepares the default answers\r\n * @param {} processListAction \r\n * @returns {} \r\n */\r\n $scope.defaultAnswersInitiate = function (processListAction) {\r\n // sms and email actions need to have default answers\r\n // text field action needs to have default answers only in multiple choice items \r\n if (processListAction\r\n && (processListAction.Type.ProgId == 'SMS'\r\n || processListAction.Type.ProgId == 'EMAIL'\r\n || (processListAction.Type.ProgId == 'TEXT_FIELD' && $scope.currentProcessListItem.Option.Type.ProgId == 'MULTIPLE_CHOICE'))) {\r\n if (!processListAction.DefaultAnswers || processListAction.DefaultAnswers.length == 0) {\r\n processListAction.DefaultAnswers = [{ Name: 'Annet', disabled: true }];\r\n }\r\n }\r\n\r\n };\r\n\r\n $scope.setOpenDefaultAnswers = function (processListAction) {\r\n if (!processListAction.DefaultAnswers || processListAction.DefaultAnswers.length == 0)\r\n processListAction.DefaultAnswers = [{ Name: 'Annet', disabled: true }];\r\n else\r\n processListAction.DefaultAnswers = undefined;\r\n\r\n };\r\n\r\n $scope.addNewPredefinedAnswer = function (processListAction) {\r\n var temp = {};\r\n temp.showErr = true;\r\n if (processListAction.Type.ProgId == 'TEXT_FIELD' ||\r\n processListAction.Type.ProgId == 'SMS' ||\r\n processListAction.Type.ProgId == 'EMAIL') {\r\n processListAction.DefaultAnswers.splice(processListAction.DefaultAnswers.length - 1, 0, angular.copy(temp));\r\n }\r\n };\r\n\r\n /**\r\n * Checks if the answer appears multiple times\r\n * @param {} processListAction \r\n * @returns {} \r\n */\r\n $scope.checkAnswer = function (processListAction) {\r\n if (processListAction.DefaultAnswers && processListAction.DefaultAnswers.length > 0) {\r\n processListAction.DefaultAnswers.forEach(function (answer) {\r\n var tempNrAppartions = 0;\r\n for (var index = 0; index < processListAction.DefaultAnswers.length; index++) {\r\n if (answer.Name.toLowerCase() == processListAction.DefaultAnswers[index].Name.toLowerCase()) {\r\n tempNrAppartions++;\r\n if (tempNrAppartions == 2)\r\n break;\r\n }\r\n }\r\n if (!answer.Name || answer.length == 0)\r\n answer.showErr = true;\r\n if (tempNrAppartions >= 2)\r\n answer.showErr = true;\r\n else if (!answer.Name || answer.length == 0)\r\n answer.showErr = true;\r\n else\r\n answer.showErr = false;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Checks if there are error regarding default answers\r\n * @param {} processListAction \r\n * @returns {} \r\n */\r\n $scope.checkListDefaultAnswers = function (processListAction) {\r\n if (processListAction && processListAction.Type\r\n && (processListAction.Type.ProgId == 'TEXT_FIELD'\r\n || processListAction.Type.ProgId == 'SMS'\r\n || processListAction.Type.ProgId == 'EMAIL'))\r\n if (processListAction.DefaultAnswers && processListAction.DefaultAnswers.length > 0) {\r\n for (var index = 0; index < processListAction.DefaultAnswers.length; index++) {\r\n if (processListAction.DefaultAnswers[index].showErr == true || !processListAction.DefaultAnswers[index].Name || processListAction.DefaultAnswers[index].Name.length == 0) {\r\n $scope.errDefaultAnswers = true;\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n $scope.errDefaultAnswers = false;\r\n return false;\r\n };\r\n\r\n\r\n //process list item - answers\r\n $scope.setSelectedOptionItemIndex = function (index) {\r\n $scope.selectedOptionItemIndex = index;\r\n };\r\n\r\n $scope.resetOptionItemProcessList = function () {\r\n if ($scope.currentProcessListItem &&\r\n $scope.currentProcessListItem.Option &&\r\n $scope.currentProcessListItem.Option.Items)\r\n $scope.currentProcessListItem.Option.Items[$scope.selectedOptionItemIndex].ProcessListAction\r\n .ProcessList = null;\r\n };\r\n\r\n $scope.setOptionItem = function (opt) {\r\n $scope.optionItem = opt;\r\n $scope.$emit('onOptionItemSelected', opt);\r\n };\r\n\r\n $scope.anyItemOpen = function () {\r\n return $scope.optionItem !== undefined;\r\n };\r\n\r\n /**\r\n * Checks if any standard answer is not filled\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n $scope.areStandardAnswersNotCompleted = function (processListItem) {\r\n if (!processListItem.Option)\r\n return false;\r\n\r\n if (processListItem.Option.Type.ProgId != 'STANDARD_TEXT')\r\n return false;\r\n\r\n if (!processListItem.Option.Items || processListItem.Option.Items.length == 0)\r\n return true;\r\n\r\n for (var i = 0; i < processListItem.Option.Items.length; i++)\r\n if (!processListItem.Option.Items[i].Text)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the save button for process list item is disabled\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n $scope.disableSaveProcessListItem = function (processListItem) {\r\n if (!processListItem || !processListItem.Question || !processListItem.Question.Name)\r\n return true;\r\n\r\n if (!processListItem.Option || !processListItem.Option.Type)\r\n return true;\r\n\r\n if ($scope.errDefaultAnswers)\r\n return true;\r\n\r\n if ($scope.reportingCodeAlreadyExists)\r\n return true;\r\n\r\n if (processListItem.Option.Type.ProgId == 'DROPDOWN' ||\r\n processListItem.Option.Type.ProgId == 'RADIO_BUTTON' ||\r\n processListItem.Option.Type.ProgId == 'MULTIPLE_CHOICE' ||\r\n processListItem.Option.Type.ProgId == 'STANDARD_TEXT') {\r\n if (!processListItem.Option.Items || processListItem.Option.Items.length == 0)\r\n return true;\r\n if ($scope.disabledAddLine || $scope.moreThanOneJumpToStep() || $scope.isFlexibleWithJumpToStep() || $scope.areStandardAnswersNotCompleted(processListItem))\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Saves the process list item and closes the modal if provided\r\n * @param {} processListItem \r\n * @param {} saveQuestionType \r\n * @param {} doNotCloseModal \r\n * @returns {} \r\n */\r\n $scope.saveProcessListItem = function (processListItem, saveQuestionType, doNotCloseModal) {\r\n if (!processListItem.id) {\r\n processListItem.id = \"id\" + newIndexForItem;\r\n newIndexForItem++;\r\n }\r\n\r\n //if the list is used for central approval\r\n //we must set the variable correctly\r\n if (processListItem.ReportingCode && $scope.processListElement.UseForCentralApproval) {\r\n processListItem.ReportingCode = processListItem.ReportingCode.Name;\r\n }\r\n\r\n //var selectedQuestion = _.find($scope.questionTypes, { 'Name': $scope.currentProcessListItem.Question.Name });\r\n var selectedQuestion = $filter('filter')($scope.questionTypes, { 'Name': $scope.currentProcessListItem.Question.Name }, true)[0];\r\n if (!saveQuestionType) {\r\n if (selectedQuestion == null) {\r\n $scope.currentProcessListItem.Question.id = null;\r\n }\r\n else {\r\n $scope.currentProcessListItem.Question = selectedQuestion;\r\n }\r\n }\r\n else {\r\n if (selectedQuestion != null) {\r\n $scope.currentProcessListItem.Question = selectedQuestion;\r\n }\r\n }\r\n\r\n if (processListItem.Option.Type.ProgId == 'NUMERIC' || processListItem.Option.Type.ProgId == 'STRING')\r\n processListItem.Option.Items = undefined;\r\n if (processListItem.isNew) {\r\n if ($scope.processListElement.ProcessListItems == undefined) {\r\n $scope.processListElement.ProcessListItems = [];\r\n }\r\n if ($scope.newItemIndex != undefined) {\r\n $scope.processListElement.ProcessListItems.splice($scope.newItemIndex + 1, 0, processListItem);\r\n if (!doNotCloseModal)\r\n $scope.newItemIndex = undefined;\r\n } else {\r\n $scope.processListElement.ProcessListItems.push(processListItem);\r\n }\r\n } else {\r\n if (indexOfProcessListItem != undefined) {\r\n $scope.processListElement.ProcessListItems[indexOfProcessListItem] = processListItem;\r\n if (!doNotCloseModal)\r\n indexOfProcessListItem = undefined;\r\n }\r\n }\r\n\r\n $scope.resetEditQuestion();\r\n //count nr of points\r\n $scope.countNrOfPoints();\r\n //Redraw lines\r\n $scope.drawLines();\r\n\r\n $scope.setChangesMadeValue(true);\r\n if (!doNotCloseModal)\r\n //close modal\r\n $scope.cancel();\r\n\r\n };\r\n\r\n $scope.cancel = function () {\r\n processListItemModal.dismiss('cancel');\r\n };\r\n\r\n /**\r\n * Checks if the attachment is in the current item\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n $scope.containedInListItem = function (attachment) {\r\n if ($scope.currentProcessListItem && $scope.currentProcessListItem.Attachments) {\r\n var contained = false;\r\n $scope.currentProcessListItem.Attachments.some(function (link) {\r\n if (link.id === attachment.id) {\r\n contained = true;\r\n }\r\n });\r\n return contained;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n //TODO: this function is already in the parent controller\r\n $scope.toggleListItemRelation = function (attachment) {\r\n\r\n if ($scope.currentProcessListItem && $scope.currentProcessListItem.Attachments) {\r\n var indexToDelete = -1;\r\n angular.forEach($scope.currentProcessListItem.Attachments, function (attach, index) {\r\n if (attach.id == attachment.id)\r\n indexToDelete = index;\r\n });\r\n if (indexToDelete >= 0) {\r\n $scope.currentProcessListItem.Attachments.splice(indexToDelete, 1);\r\n } else {\r\n $scope.currentProcessListItem.Attachments.push(attachment);\r\n }\r\n }\r\n };\r\n\r\n /******** END of modal for process list item ********/\r\n\r\n var disableItemWarningModal;\r\n var currentListItem;\r\n /**\r\n * Removes the given item from the process list items\r\n * @param {} listItem \r\n * @param {} indexOfSource \r\n * @returns {} \r\n */\r\n this.removeProcessListItem = function (listItem, indexOfSource) {\r\n\r\n var idToFind = 'listItem' + (indexOfSource);\r\n var itemToAnimate = document.getElementById(idToFind);\r\n\r\n if (itemToAnimate.classList.contains('fadeIn'))\r\n itemToAnimate.classList.remove('fadeIn');\r\n\r\n\r\n var index = $scope.processListElement.ProcessListItems.indexOf(listItem);\r\n\r\n var returnValue = false;\r\n\r\n if (index > 0 && index < $scope.processListElement.ProcessListItems.length - 1) {\r\n\r\n var anteriorItem = $scope.processListElement.ProcessListItems[index - 1];\r\n var anteriorItemHasJump = false;\r\n if (anteriorItem.Option.Items)\r\n for (var i = 0; i < anteriorItem.Option.Items.length; i++) {\r\n if (anteriorItem.Option.Items[i].ProcessListAction != null && anteriorItem.Option.Items[i].ProcessListAction.Type.ProgId == 'JUMP_TO_STEP') {\r\n anteriorItemHasJump = true;\r\n break;\r\n }\r\n }\r\n\r\n if (anteriorItemHasJump == true) {\r\n\r\n var nextItem = $scope.processListElement.ProcessListItems[index + 1];\r\n var nextItemHasJump = false;\r\n\r\n for (var i = 0; i < anteriorItem.Option.Items.length; i++) {\r\n if (anteriorItem.Option.Items[i].ProcessListAction != null && anteriorItem.Option.Items[i].ProcessListAction.ProcessListItem.id == nextItem.id) {\r\n nextItemHasJump = true;\r\n break;\r\n }\r\n }\r\n\r\n if (nextItemHasJump) {\r\n returnValue = true;\r\n }\r\n }\r\n }\r\n\r\n if (returnValue) {\r\n currentListItem = listItem;\r\n dialogService.showConfirmDialog('txtDeleteProcessListItemTitle', 'txtDeleteProcessListItemMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n $scope.removeCurrentListItem();\r\n }\r\n });\r\n }\r\n else {\r\n createAnimation(indexOfSource, 'fadeOut');\r\n setTimeout(function () {\r\n $scope.removeProcessListItem(listItem);\r\n }, 500);\r\n }\r\n };\r\n\r\n /**\r\n * Removes the current process list item\r\n * @returns {} \r\n */\r\n $scope.removeCurrentListItem = function () {\r\n var index = $scope.processListElement.ProcessListItems.indexOf(currentListItem);\r\n\r\n var anteriorItem = $scope.processListElement.ProcessListItems[index - 1];\r\n\r\n for (var i = 0; i < anteriorItem.Option.Items.length; i++) {\r\n if (anteriorItem.Option.Items[i].ProcessListAction != null && anteriorItem.Option.Items[i].ProcessListAction.Type.ProgId == 'JUMP_TO_STEP') {\r\n anteriorItem.Option.Items[i].ProcessListAction = null;\r\n break;\r\n }\r\n }\r\n\r\n $scope.removeProcessListItem(currentListItem);\r\n }\r\n\r\n /**\r\n * Removes the given list item\r\n * @param {} listItem \r\n * @returns {} \r\n */\r\n $scope.removeProcessListItem = function (listItem) {\r\n var index = $scope.processListElement.ProcessListItems.indexOf(listItem);\r\n $scope.processListElement.ProcessListItems.splice(index, 1);\r\n $scope.$apply();\r\n //$scope.itemToScroll = null;\r\n\r\n\r\n\r\n //remove all actions that have \"JUMP TO\" removed item\r\n $scope.processListElement.ProcessListItems.forEach(function (processListItem) {\r\n if (processListItem.Option.Items)\r\n processListItem.Option.Items.forEach(function (optionItem) {\r\n if (optionItem.ProcessListAction != undefined && optionItem.ProcessListAction.ProcessListItem &&\r\n optionItem.ProcessListAction.ProcessListItem.id == listItem.id) {\r\n optionItem.ProcessListAction = undefined;\r\n }\r\n });\r\n });\r\n\r\n //count nr of points\r\n $scope.countNrOfPoints();\r\n //Redraw lines\r\n $scope.drawLines();\r\n\r\n $scope.setChangesMadeValue(true);\r\n };\r\n\r\n /*********** DRAW LINES ***********/\r\n /**\r\n * Counts the number of points the list has to be indented\r\n * Applies to jump to step action and another lists\r\n * @returns {} \r\n */\r\n $scope.countNrOfPoints = function () {\r\n $scope.processListElement.ProcessListItems.forEach(function (item) {\r\n item.NrOfPointsLeft = 0;\r\n item.NrOfPointsRight = 0;\r\n });\r\n\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var pli = $scope.processListElement.ProcessListItems[i];\r\n if (pli.Option.Items != undefined) {\r\n pli.Option.Items.forEach(function (optionItem) {\r\n if (optionItem.ProcessListAction != undefined\r\n && optionItem.ProcessListAction.Type != undefined\r\n && optionItem.ProcessListAction.Type.ProgId == \"JUMP_TO_STEP\") {\r\n pli.NrOfPointsLeft++;\r\n }\r\n\r\n if (optionItem.ProcessListAction != undefined && optionItem.ProcessListAction.ProcessListItem != undefined\r\n && optionItem.ProcessListAction.ProcessListItem.id) {\r\n\r\n var result = $filter('filter')($scope.processListElement.ProcessListItems, { id: optionItem.ProcessListAction.ProcessListItem.id });\r\n if (result)\r\n result[0].NrOfPointsLeft++;\r\n\r\n }\r\n\r\n if (optionItem.ProcessListAction != undefined && optionItem.ProcessListAction.Type != undefined && optionItem.ProcessListAction.Type.ProgId == \"ANOTHER_PROCESSLIST\") {\r\n pli.NrOfPointsRight++;\r\n }\r\n });\r\n };\r\n\r\n $scope.processListElement.ProcessListItems[i] = pli;\r\n }\r\n };\r\n\r\n\r\n //delete lines\r\n var deleteLines = function () {\r\n var elementsLeft = document.getElementsByClassName(\"connectProcessListItems\");\r\n var elementsRight = document.getElementsByClassName(\"connectProcessListItemWithProcessList\");\r\n while (elementsLeft.length > 0) {\r\n elementsLeft[0].parentNode.removeChild(elementsLeft[0]);\r\n }\r\n while (elementsRight.length > 0) {\r\n elementsRight[0].parentNode.removeChild(elementsRight[0]);\r\n }\r\n };\r\n\r\n\r\n //draw lines (left and right side of list)\r\n var drawLines = function (index, sourceItem) {\r\n if (sourceItem.Option.Items != undefined) {\r\n sourceItem.Option.Items.forEach(function (optionItem) {\r\n\r\n var heightOfItem = 80, elementSource, elementDestination, destinationId = 0, bullet, rectElemSource, arrow;\r\n\r\n if (optionItem.ProcessListAction != undefined && optionItem.ProcessListAction.Type != undefined && optionItem.ProcessListAction.Type.ProgId == \"JUMP_TO_STEP\") {\r\n\r\n lineIterations++;\r\n destinationId = optionItem.ProcessListAction.ProcessListItem.id;\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n if ($scope.processListElement.ProcessListItems[i].id == destinationId) {\r\n\r\n var destinationItem = $scope.processListElement.ProcessListItems[i];\r\n\r\n var widthOfLine = 10;\r\n\r\n elementSource = document.getElementById(index);\r\n rectElemSource = {\r\n 'top': elementSource ? elementSource.offsetTop : 0,\r\n 'left': elementSource ? elementSource.offsetLeft : 0,\r\n 'height': elementSource ? elementSource.offsetHeight : 0,\r\n 'width': elementSource ? elementSource.offsetWidth : 0\r\n };\r\n\r\n elementDestination = document.getElementById(i);\r\n var rectElemDestination = {\r\n 'top': elementDestination ? elementDestination.offsetTop : 0,\r\n 'left': elementDestination ? elementDestination.offsetLeft : 0,\r\n 'height': elementDestination ? elementDestination.offsetHeight : 0,\r\n 'width': elementDestination ? elementDestination.offsetWidth : 0\r\n };\r\n\r\n var isReversed = false;\r\n // declaring the arrow classes\r\n bullet = document.createElement(\"div\");\r\n if (index < i) {\r\n bullet.className = \"down-bullet\";\r\n } else {\r\n bullet.className = \"up-bullet\";\r\n }\r\n\r\n arrow = document.createElement(\"div\");\r\n if (index < i) {\r\n arrow.className = \"down-arrow\";\r\n } else {\r\n isReversed = true;\r\n arrow.className = \"up-arrow\";\r\n }\r\n\r\n var arrowLine = document.createElement(\"div\");\r\n arrowLine.className = \"connectProcessListItems\";\r\n arrowLine.style.width = widthOfLine * lineIterations + widthOfLine + \"px\";\r\n arrowLine.style.borderColor = flatColors[lineIterations - 1];\r\n var sourceDeparturePoint = heightOfItem / (sourceItem.NrOfPointsLeft + 1) * sourceItem.NrOfLinesLeft;\r\n var destinationDeparturePoint = heightOfItem / (destinationItem.NrOfPointsLeft + 1) * destinationItem.NrOfLinesLeft;\r\n if (!isReversed) {\r\n arrowLine.style.top = rectElemSource.top + ((heightOfItem / (sourceItem.NrOfPointsLeft + 1)) * sourceItem.NrOfLinesLeft) + \"px\";\r\n arrowLine.style.height = rectElemDestination.top - rectElemSource.top - sourceDeparturePoint + destinationDeparturePoint + \"px\";\r\n }\r\n else {\r\n arrowLine.style.top = rectElemDestination.top + ((heightOfItem / (destinationItem.NrOfPointsLeft + 1)) * destinationItem.NrOfLinesLeft) + \"px\";\r\n arrowLine.style.height = rectElemSource.top - rectElemDestination.top - destinationDeparturePoint + sourceDeparturePoint + \"px\";\r\n }\r\n arrowLine.style.left = rectElemDestination.left - (widthOfLine * lineIterations) - 9 + \"px\";\r\n var currentView = elementSource.parentNode;\r\n currentView.parentNode.style.marginLeft = lineIterations * widthOfLine + \"px\";\r\n currentView.appendChild(arrowLine);\r\n\r\n bullet.style.color = arrowLine.style.borderColor;\r\n arrow.style.color = arrowLine.style.borderColor;\r\n arrowLine.appendChild(bullet);\r\n arrowLine.appendChild(arrow);\r\n\r\n destinationItem.NrOfLinesLeft++;\r\n sourceItem.NrOfLinesLeft++;\r\n\r\n }\r\n }\r\n }\r\n if (optionItem.ProcessListAction != undefined && optionItem.ProcessListAction.Type != undefined && optionItem.ProcessListAction.Type.ProgId == \"ANOTHER_PROCESSLIST\" && optionItem.ProcessListAction.ProcessList != undefined) {\r\n\r\n lineIterationsRight++;\r\n\r\n // find the index of the action for composing it\r\n var indexOf = sourceItem.Option.Items.indexOf(optionItem);\r\n // compose the index and find the source and the destination;\r\n var composedId = index + '-' + indexOf;\r\n elementDestination = document.getElementById(composedId);\r\n elementSource = document.getElementById('listItem' + index);\r\n\r\n // since the source is the only reliable... source of points, we only need it's coordinates\r\n rectElemSource = {\r\n 'top': elementSource.offsetTop,\r\n 'left': elementSource.offsetLeft,\r\n 'height': elementSource.offsetHeight,\r\n 'width': elementSource.offsetParent ? elementSource.offsetParent.offsetWidth : 0,\r\n 'right': elementSource.offsetParent ? elementSource.offsetParent.offsetWidth : 0,\r\n 'bottom': elementSource.offsetTop + elementSource.offsetHeight\r\n };\r\n\r\n // first, set the some variables that are hardcoded\r\n var heightOfLineRight = 20;\r\n var initialWidthOfLine = 10;\r\n var widthOfBoxRight = 241;\r\n\r\n // it's time to start applying some coordinates to the 'external' box \r\n elementDestination.style.top = elementSource.offsetTop + heightOfLineRight + heightOfItem - ((heightOfItem / (sourceItem.NrOfPointsRight + 1)) * sourceItem.NrOfLinesRight) + \"px\";\r\n elementDestination.style.left = rectElemSource.right + ((initialWidthOfLine + 1) * sourceItem.NrOfLinesRight) + ((sourceItem.NrOfLinesRight - 1) * widthOfBoxRight) + \"px\";\r\n\r\n // since we're done with setting the box coordinates, let's start linking the line stuff with it\r\n var arrowLineRight = document.createElement(\"div\");\r\n\r\n var borderColorClass = $scope.getBorderColor(optionItem.ProcessListAction.ProcessList.DataAbout.ProgId);\r\n elementDestination.className += \" \" + borderColorClass;\r\n\r\n arrowLineRight.className = \"connectProcessListItemWithProcessList \" + borderColorClass;\r\n arrowLineRight.style.width = ((initialWidthOfLine + 1) * sourceItem.NrOfLinesRight) + (widthOfBoxRight / 2) + ((sourceItem.NrOfLinesRight - 1) * widthOfBoxRight) + \"px\";\r\n arrowLineRight.style.height = heightOfLineRight + \"px\";\r\n arrowLineRight.style.left = rectElemSource.right + \"px\";\r\n arrowLineRight.style.top = elementSource.offsetTop + heightOfItem - ((heightOfItem / (sourceItem.NrOfPointsRight + 1)) * sourceItem.NrOfLinesRight) + \"px\";\r\n\r\n // and let's assign the line to the view and the bullet\r\n elementSource.appendChild(arrowLineRight);\r\n\r\n arrow = document.createElement(\"div\");\r\n arrow.className = \"right-line-arrow \" + $scope.getArrowColor(optionItem.ProcessListAction.ProcessList.DataAbout.ProgId);\r\n arrowLineRight.appendChild(arrow);\r\n\r\n bullet = document.createElement(\"div\");\r\n bullet.className = \"right-bullet \" + $scope.getArrowColor(optionItem.ProcessListAction.ProcessList.DataAbout.ProgId);\r\n arrowLineRight.appendChild(bullet);\r\n\r\n //destinationItem.NrOfLinesLeft++;\r\n sourceItem.NrOfLinesRight++;\r\n\r\n\r\n }\r\n });\r\n };\r\n };\r\n // broadcasted by processListController after updating and reloading processListElement\r\n $scope.$on('drawLines', function () {\r\n $scope.drawLines();\r\n });\r\n\r\n $scope.drawLines = function () {\r\n //first, remove all arrow divs !!\r\n deleteLines();\r\n\r\n if ($scope.processListElement) {\r\n $scope.processListElement.ProcessListItems.forEach(function (item) {\r\n item.NrOfLinesLeft = 1;\r\n item.NrOfLinesRight = 1;\r\n });\r\n //draw lines\r\n flatColors = ['#e74c3c', '#f1c40f', '#3c9cdd', '#1abc9c', '#a164ba', '#34495e', '#e67e22', '#2ecc71', '#1abc9c', '#f1c40f', '#3c9cdd', '#e74c3c', '#a164ba', '#34495e', '#e67e22', '#2ecc71'];\r\n setTimeout(function () {\r\n var index = 0;\r\n lineIterations = 0;\r\n lineIterationsRight = 0;\r\n if ($scope.processListElement.ProcessListItems) {\r\n $scope.processListElement.ProcessListItems.forEach(function (item) {\r\n drawLines(index, item);\r\n index++;\r\n });\r\n\r\n //$scope.itemToScroll = null;\r\n }\r\n\r\n }, 500);\r\n\r\n }\r\n };\r\n\r\n\r\n $scope.showQuestionList = false;\r\n $scope.saveQuestionCheck = true;\r\n\r\n /*********** External and Action: move to another process list **************/\r\n $scope.getProcesslistItemIndex = function (item) {\r\n return $scope.processListElement.ProcessListItems.indexOf(item);\r\n };\r\n\r\n //external process list items\r\n $scope.showExternalProcessListItems = function (processListId) {\r\n var list = ProcessListFactory.getProcessListElement(processListId);\r\n list.$promise.then(function (data) {\r\n $scope.currentExternalListItem = data;\r\n externalProcessListOriginal = angular.copy(data);\r\n $scope.processListExternalFilter.Name = externalProcessListOriginal.Name;\r\n setTimeout(function () {\r\n var divExternalProcessList = document.getElementsByClassName(\"processlist-external-element-expanded\");\r\n if (divExternalProcessList.length > 0) {\r\n var divCurrentProcessList = document.getElementById(\"divCurrentProcessList\");\r\n if (divCurrentProcessList)\r\n divCurrentProcessList.style.minHeight = divExternalProcessList[0].offsetHeight + \"px\";\r\n }\r\n }, 100);\r\n });\r\n };\r\n\r\n\r\n\r\n $scope.setQuestion = function (question) {\r\n $scope.currentProcessListItem.Question = angular.copy(question);\r\n };\r\n\r\n $scope.checkQuestion = function (int) {\r\n $scope.currentProcessListItem.Question.Active = true;\r\n var questionTemp = $filter('filter')($scope.questionTypes, { 'Name': $scope.currentProcessListItem.Question.Name });\r\n return questionTemp != null && questionTemp.length > 0 ? true : false;\r\n };\r\n\r\n /**\r\n * Filters the questions based on the current question that the user wrote\r\n * @returns {} \r\n */\r\n $scope.questionFilter = function () {\r\n if (!($scope.currentProcessListItem &&\r\n $scope.currentProcessListItem.Question)) {\r\n return $scope.questionTypes;\r\n }\r\n var questionFilter = $filter('filter')($scope.questionTypes, { 'Name': $scope.currentProcessListItem.Question.Name }, false);\r\n if (!questionFilter || questionFilter.length == 0) {\r\n $scope.showQuestionList = false;\r\n }\r\n else {\r\n $scope.showQuestionList = true;\r\n }\r\n return questionFilter;\r\n };\r\n\r\n //get action types\r\n $scope.getActionTypes = function () {\r\n if (!$scope.actionTypes)\r\n ProcessListFactory.getActionTypes().$promise.then(function (result) {\r\n $scope.actionTypes = result;\r\n\r\n // remove signature action type for management process lists\r\n if (ProcessListFactory.ProcessListType == 'MANAGEMENT') {\r\n var index;\r\n for (index = 0; index < $scope.actionTypes.length; index++) {\r\n if ($scope.actionTypes[index].ProgId == 'SIGNATURE') break;\r\n }\r\n $scope.actionTypes.splice(index, 1);\r\n }\r\n\r\n // remove risk analysis and put in calendar actions for vertical process lists\r\n if (ProcessListFactory.ProcessListType != 'MANAGEMENT') {\r\n\r\n $scope.actionTypes = $filter(\"filter\")($scope.actionTypes, function (item) {\r\n\r\n if (item.ProgId != 'RISK_ANALYSIS' &&\r\n item.ProgId != 'PUT_IN_CALENDAR') {\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n $scope.getQuestionTypes = function (question) {\r\n ProcessListFactory.getQuestionTypes(question).$promise.then(function (questions) {\r\n $scope.questionTypes = questions;\r\n });\r\n };\r\n\r\n $scope.getOptionTypes = function () {\r\n $scope.optionTypes = ProcessListFactory.getOptionTypes();\r\n };\r\n\r\n $scope.resetQuestion = function () {\r\n $scope.currentProcessListItem.Question = null;\r\n };\r\n\r\n $scope.questionExists = function (question) {\r\n if (!question) {\r\n return false;\r\n }\r\n\r\n var questionTemp = $filter('filter')($scope.questionTypes, { 'Name': question.Name });\r\n return questionTemp != null && questionTemp.length > 0 ? true : false;\r\n };\r\n\r\n $scope.editQuestion = function () {\r\n $scope.saveQuestionCheck = false;\r\n var questionTemp = $filter('filter')($scope.questionTypes, { 'Name': $scope.currentProcessListItem.Question.Name })[0];\r\n\r\n $scope.tempQuestionType = angular.copy(questionTemp);\r\n $scope.currentProcessListItem.Question = angular.copy(questionTemp);\r\n };\r\n\r\n $scope.saveQuestion = function () {\r\n $scope.saveQuestionCheck = true;\r\n $scope.currentProcessListItem.Question.Name = $scope.tempQuestionType.Name;\r\n $scope.saveProcessListItem($scope.currentProcessListItem, true);\r\n $scope.saveProcessListElement();\r\n $scope.resetEditQuestion();\r\n };\r\n\r\n $scope.resetEditQuestion = function () {\r\n $scope.saveQuestionCheck = true;\r\n $scope.tempQuestionType = null;\r\n };\r\n\r\n $scope.resetExternalSelection = function (filter) {\r\n $scope.currentExternalListItem = null;\r\n filter.Name = null;\r\n filter.DataAbout = null;\r\n filter.DataDetails = null;\r\n };\r\n\r\n this.getBorderColor = function (dataAboutProgId) {\r\n return $scope.getBorderColor(dataAboutProgId);\r\n };\r\n\r\n /**\r\n * Return the class name based on the data about the process list has\r\n * @param {} dataAboutProgId \r\n * @returns {} \r\n */\r\n $scope.getBorderColor = function (dataAboutProgId) {\r\n switch (dataAboutProgId) {\r\n case 'BOT_ORDER':\r\n return 'border-color-order';\r\n case 'BOT_PROJECT':\r\n return 'border-color-project';\r\n case 'BOT_DEVIATION':\r\n return 'border-color-deviation';\r\n case 'GOT_ORGANIZATION':\r\n return 'border-color-organization';\r\n case 'GOT_USER':\r\n return 'border-color-user';\r\n default:\r\n return 'border-color-order';\r\n }\r\n };\r\n\r\n /**\r\n * Return the class name based on the data about the process list has\r\n * @param {} dataAboutProgId \r\n * @returns {} \r\n */\r\n $scope.getPentagonColor = function (dataAboutProgId) {\r\n switch (dataAboutProgId) {\r\n case 'BOT_ORDER':\r\n return 'pentagon-color-order';\r\n case 'BOT_PROJECT':\r\n return 'pentagon-color-project';\r\n case 'BOT_DEVIATION':\r\n return 'pentagon-color-deviation';\r\n case 'GOT_ORGANIZATION':\r\n return 'pentagon-color-organization';\r\n case 'GOT_USER':\r\n return 'pentagon-color-user';\r\n default:\r\n return 'pentagon-color-order';\r\n }\r\n };\r\n\r\n this.getArrowColor = function (dataAboutProgId) {\r\n return $scope.getArrowColor(dataAboutProgId);\r\n };\r\n\r\n /**\r\n * Return the class name based on the data about the process list has\r\n * @param {} dataAboutProgId \r\n * @returns {} \r\n */\r\n $scope.getArrowColor = function (dataAboutProgId) {\r\n switch (dataAboutProgId) {\r\n case 'BOT_ORDER':\r\n return 'arrow-color-order';\r\n case 'BOT_PROJECT':\r\n return 'arrow-color-project';\r\n case 'BOT_DEVIATION':\r\n return 'arrow-color-deviation';\r\n case 'GOT_ORGANIZATION':\r\n return 'arrow-color-organization';\r\n case 'GOT_USER':\r\n return 'arrow-color-user';\r\n default:\r\n return 'arrow-color-order';\r\n }\r\n };\r\n\r\n this.getBackgroundColor = function (dataAboutProgId) {\r\n return $scope.getBackgroundColor(dataAboutProgId);\r\n };\r\n\r\n\r\n /**\r\n * Return the class name based on the data about the process list has\r\n * @param {} dataAboutProgId \r\n * @returns {} \r\n */\r\n $scope.getBackgroundColor = function (dataAboutProgId) {\r\n switch (dataAboutProgId) {\r\n case 'BOT_ORDER':\r\n return 'processListItem-color-order';\r\n case 'BOT_PROJECT':\r\n return 'processListItem-color-project';\r\n case 'BOT_DEVIATION':\r\n return 'processListItem-color-deviation';\r\n case 'GOT_ORGANIZATION':\r\n return 'processListItem-color-organization';\r\n case 'GOT_USER':\r\n return 'processListItem-color-user';\r\n default:\r\n return 'processListItem-color-order';\r\n }\r\n };\r\n\r\n $scope.setVisibilityOfExternal = function (value) {\r\n if (!value) {\r\n setTimeout(function () {\r\n $scope.processListElement.showExternalList = undefined;\r\n }, 200);\r\n }\r\n else\r\n $scope.processListElement.showExternalList = value;\r\n };\r\n\r\n $scope.addStandardAnswer = function (option) {\r\n if (!option.Items)\r\n return;\r\n option.Items.push({ Name: '' });\r\n };\r\n /**\r\n * When the user presses the enter key add a new standard answer\r\n * @param {} event \r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n $scope.onKeyPressStandardAnswer = function (event, processListItem) {\r\n if (event.which == 13 && !$scope.areStandardAnswersNotCompleted(processListItem))\r\n $scope.addStandardAnswer(processListItem.Option);\r\n };\r\n\r\n var originalProcessListExternal = null;\r\n\r\n //options for drag and drop of external lists\r\n $scope.copyProcessListOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n return false;\r\n },\r\n dragStart: function (event) {\r\n originalProcessListExternal = angular.copy($scope.processListExternal);\r\n event.elements.dragging[0].classList.remove('dropdown-menu');\r\n event.elements.placeholder.replaceWith(event.elements.dragging.clone().find('li'));\r\n },\r\n dragStop: function (event) {\r\n $scope.processListExternal = angular.copy(originalProcessListExternal);\r\n },\r\n dropped: function (event) {\r\n ProcessListFactory.getProcessListElement(event.source.nodeScope.externalProcessList.id).$promise.then(function (newProcessList) {\r\n //remove the processlist that was added by ui tree\r\n for (var i = $scope.processListElement.ProcessListItems.length - 1; i >= 0; i--) {\r\n if ($scope.processListElement.ProcessListItems[i].ProcessListItems) {\r\n $scope.processListElement.ProcessListItems.splice(i, 1);\r\n break;\r\n }\r\n }\r\n var droppedIndex = event.dest.index, processListItem, item;\r\n for (var i = 0; i < newProcessList.ProcessListItems.length; i++) {\r\n processListItem = newProcessList.ProcessListItems[i];\r\n processListItem.$$hashKey = null;\r\n processListItem.oldId = processListItem.id;\r\n processListItem.id = null;\r\n processListItem.ParentId = null;\r\n processListItem.Option.id = null;\r\n\r\n //save the attachments on processlist level first\r\n if (processListItem.Attachments && processListItem.Attachments.length > 0) {\r\n processListItem.Attachments.forEach(function (processListAttachment) {\r\n\r\n //if the external attachment is already here, use it to connect it to the process list item\r\n var existingAttachment = $filter('filter')($scope.processListElement.Attachments, { 'oldId': processListAttachment.id }, true)[0];\r\n if (existingAttachment) {\r\n processListAttachment.id = angular.copy(existingAttachment.id);\r\n processListAttachment.oldId = angular.copy(existingAttachment.oldId);\r\n } else {\r\n processListAttachment.oldId = angular.copy(processListAttachment.id);\r\n processListAttachment.id = \"new\" + processListAttachment.oldId;\r\n $scope.processListElement.Attachments.push(processListAttachment);\r\n }\r\n\r\n\r\n });\r\n }\r\n\r\n\r\n for (var j = 0; j < processListItem.Option.Items.length; j++) {\r\n item = processListItem.Option.Items[j];\r\n item.$$hashKey = null;\r\n item.id = null;\r\n item.OptionId = null;\r\n\r\n if (!item.ProcessListAction)\r\n continue;\r\n\r\n item.ProcessListAction.id = null;\r\n\r\n if (item.ProcessListAction.DeviationTemplate)\r\n item.ProcessListAction.DeviationTemplate.id = null;\r\n\r\n if (!item.ProcessListAction.DefaultAnswers || item.ProcessListAction.DefaultAnswers.length == 0)\r\n continue;\r\n for (var k = 0; k < item.ProcessListAction.DefaultAnswers.length; k++)\r\n item.ProcessListAction.DefaultAnswers[k].id = null;\r\n }\r\n processListItem.id = 'id' + newIndexForItem++;\r\n $scope.processListElement.ProcessListItems.splice(droppedIndex++, 0, processListItem);\r\n }\r\n\r\n //treat jump to step cases\r\n for (var i = 0; i < newProcessList.ProcessListItems.length; i++) {\r\n processListItem = newProcessList.ProcessListItems[i];\r\n for (var j = 0; j < processListItem.Option.Items.length; j++) {\r\n item = processListItem.Option.Items[j];\r\n\r\n if (!item.ProcessListAction)\r\n continue;\r\n\r\n if (item.ProcessListAction) {\r\n\r\n switch (item.ProcessListAction.Type.ProgId) {\r\n case 'JUMP_TO_STEP':\r\n item.ProcessListAction.ProcessListItem.id = $filter('filter')(newProcessList.ProcessListItems, { oldId: item.ProcessListAction.ProcessListItem.id })[0].id;\r\n case 'RISK_ANALYSIS':\r\n if (ProcessListFactory.ProcessListType == 'VERTICAL') {\r\n item.ProcessListAction = undefined;\r\n }\r\n break;\r\n case 'SIGNATURE':\r\n if (ProcessListFactory.ProcessListType == 'MANAGEMENT') {\r\n item.ProcessListAction = undefined;\r\n }\r\n break;\r\n default:\r\n item.ProcessListAction.id = undefined;\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n //count nr of points\r\n $scope.countNrOfPoints();\r\n //Redraw lines\r\n $scope.drawLines();\r\n\r\n }, function (err) {\r\n\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Opens the modal where the user can define the template for deviation action\r\n * @param {} action \r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n $scope.openDeviationTemplateModal = function (action, processListItem) {\r\n //first save the processlist item to have all the necessary info for deviation template\r\n $scope.saveProcessListItem(processListItem, false, true);\r\n processListItem.isNew = false;\r\n //open modal with the deviation template and the whole processlist \r\n\r\n $uibModal.open({\r\n templateUrl: 'Scripts/processList/deviationTemplate/deviationTemplatePartial.html',\r\n controller: 'DeviationTemplateController as deviationTemplateCtrl',\r\n scope: $scope,\r\n size: 'x-lg',\r\n resolve: {\r\n deviation: function () {\r\n if (!action.DeviationTemplate)\r\n return {};\r\n return action.DeviationTemplate;\r\n },\r\n processListElement: function () {\r\n return $scope.processListElement;\r\n },\r\n currentProcessListItemIndex: function () {\r\n return indexOfProcessListItem != null && indexOfProcessListItem != undefined ? indexOfProcessListItem : $scope.newItemIndex + 1;\r\n }\r\n }\r\n }).result.then(function (result) {\r\n action.DeviationTemplate = result;\r\n });\r\n };\r\n\r\n $scope.reportingCodeAlreadyExists = false;//TODO: remove this\r\n\r\n\r\n $scope.selectProcessList = function (processlist, optionItem) {\r\n if (!optionItem.ProcessListAction)\r\n return;\r\n\r\n checkForProcessListCircularity(processlist)\r\n .then(function() {\r\n optionItem.ProcessListAction.ProcessList = processlist;\r\n optionItem.Name = processlist.Name;\r\n\r\n $scope.setDisableAddLine(optionItem);\r\n });\r\n };\r\n\r\n function checkForProcessListCircularity(processList) {\r\n\r\n if (!$scope.processListElement || !$scope.processListElement.id) {\r\n return $q.when();\r\n }\r\n\r\n return ProcessListFactory.checkForProcessListCircularity($scope.processListElement.id, processList.id);\r\n }\r\n\r\n /**\r\n * When the user selects a central approval variable set the answers accordingly\r\n * @param {} variable \r\n * @returns {} \r\n */\r\n $scope.centralApprovalSharedObject.onVariableSelect = function (variable) {\r\n switch (variable.Name) {\r\n case '##UsernameAndPassword##':\r\n case '##CompanyInfo##':\r\n //set the type to multiple choice\r\n $scope.currentProcessListItem.Option.Type = $filter('filter')($scope.optionTypes, function (t) { return t.ProgId == 'MULTIPLE_CHOICE' })[0];\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n\r\n if (!$scope.currentProcessListItem.Option.Items || $scope.currentProcessListItem.Option.Items.length == 0) {\r\n $scope.currentProcessListItem.Option.disabledActions = true;\r\n $scope.currentProcessListItem.Option.Items = [{ Active: true, Order: 0, Text: '' }];\r\n\r\n if (variable.Name == '##UsernameAndPassword##')\r\n $scope.currentProcessListItem.Option.Items[0].Text = 'Alternativt kan vi opprette dette hvis det er greit for deg, krys her';\r\n else if (variable.Name == '##CompanyInfo##')\r\n $scope.currentProcessListItem.Option.Items[0].Text = 'Leier firma inn underentreprenør/rÃ¥dgiver pÃ¥ sin ansvarsrett';\r\n\r\n $scope.setSelectedOptionItemIndex(0);\r\n $scope.setOptionItem($scope.currentProcessListItem.Option.Items[0]);\r\n }\r\n break;\r\n case '##CompanyPrimaryContact##':\r\n case '##ControlSystem##':\r\n case '##OrganizationChart##':\r\n case '##UsersInfo##':\r\n //set the type to text\r\n $scope.currentProcessListItem.Option.Type = $filter('filter')($scope.optionTypes, function (t) { return t.ProgId == 'STRING' })[0];\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n break;\r\n case '##CompanyInfoDetailed##':\r\n //set the type to multiple choice\r\n $scope.currentProcessListItem.Option.Type = $filter('filter')($scope.optionTypes, function (t) { return t.ProgId == 'MULTIPLE_CHOICE' })[0];\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n\r\n if ($scope.currentProcessListItem.Option.Items && $scope.currentProcessListItem.Option.Items.length > 0)\r\n break;\r\n\r\n Array.prototype.push.apply(\r\n $scope.currentProcessListItem.Option.Items,\r\n CentralApprovalItemService.getLayoutForCompanyInfoDetailed($scope.actionTypes)\r\n );\r\n\r\n $scope.setSelectedOptionItemIndex(0);\r\n $scope.setOptionItem($scope.currentProcessListItem.Option.Items[0]);\r\n break;\r\n case '##DesiredApprovalAreas##':\r\n //type to multiple choice\r\n $scope.currentProcessListItem.Option.Type = $filter('filter')($scope.optionTypes, function (t) { return t.ProgId == 'MULTIPLE_CHOICE' })[0];\r\n $scope.currentProcessListItem.Option.disabledTypeDropdown = true;\r\n\r\n if ($scope.currentProcessListItem.Option.Items && $scope.currentProcessListItem.Option.Items.length > 0)\r\n break;\r\n\r\n //add items\r\n //oh boy :(\r\n $scope.currentProcessListItem.Option.Items = [];\r\n\r\n Array.prototype.push.apply(\r\n $scope.currentProcessListItem.Option.Items,\r\n CentralApprovalItemService.getLayoutForDesiredApprovalAreas($scope.actionTypes)\r\n );\r\n\r\n $scope.setSelectedOptionItemIndex(0);\r\n $scope.setOptionItem($scope.currentProcessListItem.Option.Items[0]);\r\n\r\n break;\r\n }\r\n };\r\n\r\n function onOptionItemTextChange(optionItem) {\r\n\r\n if (!optionItem) {\r\n return;\r\n }\r\n\r\n $scope.setDisableAddLine(optionItem);\r\n\r\n // below is a fix for modalProcessListItemPartial when\r\n // the binding to optionItem.Text does not update the\r\n // selected answer's text from the list located in the\r\n // bottom left of the modal\r\n\r\n // get the selected answer/option item from the list\r\n var selectedOptionItem = $scope.currentProcessListItem.Option.Items[$scope.selectedOptionItemIndex];\r\n\r\n // manually update its 'Text' property\r\n selectedOptionItem.Text = optionItem.Text;\r\n }\r\n\r\n function checkIfAutoScrollingIsNecessary() {\r\n\r\n if (!currentDraggedProcessListItem) {\r\n return;\r\n }\r\n\r\n var elementBoundingClientRect = currentDraggedProcessListItem.getBoundingClientRect();\r\n\r\n // if the user has less than 100px until it reaches the bottom edge of the viewport then scroll down\r\n if (($window.innerHeight - elementBoundingClientRect.bottom) < 100) {\r\n // scroll down by 30px\r\n $window.scrollBy({ top: 30, left: 0 });\r\n\r\n } // if the user has less than 200px until it reaches the top edge of the viewport then scroll up\r\n else if (elementBoundingClientRect.top < 200) {\r\n // scroll up by -30px (negative value means the scroll will go upwards)\r\n $window.scrollBy({ top: -30, left: 0 });\r\n }\r\n }\r\n\r\n function onMouseMoveAboveItemsSection() {\r\n\r\n checkIfAutoScrollingIsNecessary();\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProductsController.$inject = [\r\n '$scope',\r\n '$sce',\r\n '$filter',\r\n '$timeout',\r\n 'titleService',\r\n 'searchService',\r\n 'ProductFactory',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular.module('product').controller('ProductsController', ProductsController);\r\n\r\n function ProductsController(\r\n $scope,\r\n $sce,\r\n $filter,\r\n $timeout,\r\n titleService,\r\n searchService,\r\n ProductFactory,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n sessionInformationService\r\n ) {\r\n\r\n titleService.changeTitle($filter('translate')('Products'));\r\n $scope.limitNotification = false;\r\n $scope.catalogs = [];\r\n $scope.predicate = ProductFactory.predicate;\r\n $scope.reverse = ProductFactory.reverse;\r\n\r\n var allCatalogs = [];\r\n var allProducts = [];\r\n var nrOfRowsToLoadAtStart = 100;\r\n var nrOfRowsToLoad = 10;\r\n var listOfPillsHTML = null;\r\n var inputElement = null;\r\n\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 30;\r\n $scope.numPages = 1;\r\n $scope.products = [];\r\n $scope.intellisense = { isProductsSearchOpen: false };\r\n $scope.reachedEndOfList = false;\r\n $scope.search = searchService.getProductSearch();\r\n\r\n /**\r\n * Gets the most used products based on the search criteria\r\n * @param {*} freeText \r\n * @param {*} NRF \r\n */\r\n $scope.getMostUsedProducts = function (freeText, NRF) {\r\n if (freeText !== undefined && freeText !== null)\r\n freeText = freeText.replaceAll(\"'\", \"\");\r\n $scope.mostUsedProducts = [];\r\n ProductFactory.getMostUsedProducts($scope.search.organization.id, freeText, NRF)\r\n .then(function (result) {\r\n $scope.mostUsedProducts = $filter('filter')(result, function (product) { return product.IsMostUsed });\r\n $scope.usedProducts = $filter('filter')(result, function (product) { return !product.IsMostUsed });\r\n if (freeText || NRF)\r\n $scope.intellisense.isProductsSearchOpen = true;\r\n });\r\n };\r\n\r\n /**\r\n * Gets a list of products based on the search criteria\r\n * @param {*} freeText \r\n * @param {*} organizationId \r\n */\r\n $scope.getProducts = function (freeText, organizationId) {\r\n if (freeText) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n setPaddingOfInput();\r\n\r\n var keywords = $scope.search.keywords && $scope.search.keywords.length > 0 ? $scope.search.keywords.join('|') : null;\r\n\r\n ProductFactory.searchProducts(\r\n freeText ? freeText.replace(/['\"]+/g, '\\'\\'') : null,\r\n organizationId,\r\n keywords,\r\n $scope.search.ProductCatalog.id == -1 ? null : $scope.search.ProductCatalog.id,\r\n $scope.search.Provider.id,\r\n $scope.search.NRF\r\n ).$promise.then(function (result) {\r\n\r\n $scope.products = [];\r\n allProducts = [];\r\n allCatalogs = result;\r\n\r\n // make the id an int for both catalogs and products\r\n for (var index = 0; index < allCatalogs.length; index++) {\r\n allCatalogs[index].id = parseInt(allCatalogs[index].id);\r\n for (var productIndex = 0; productIndex < allCatalogs[index].ProductsList.length; productIndex++) {\r\n allCatalogs[index].ProductsList[productIndex].id = parseInt(allCatalogs[index].ProductsList[productIndex].id);\r\n }\r\n }\r\n\r\n // set the catalog name for each product (needed for the grid)\r\n angular.forEach(allCatalogs, function (catalog) {\r\n angular.forEach(catalog.ProductsList, function (product) {\r\n product.DescriptionSplit = product.Description.split(/[\\s\\n]+/);\r\n product.CatalogName = catalog.Name;\r\n allProducts.push(product);\r\n $scope.products.push(product);\r\n });\r\n });\r\n\r\n $scope.products = $scope.products.slice(0, nrOfRowsToLoadAtStart);\r\n });\r\n };\r\n\r\n /**\r\n * Called when the user has reached the end of the list\r\n */\r\n $scope.loadMore = function () {\r\n if ($scope.products && $scope.products.length < allProducts.length) {\r\n var last = $scope.products.length > 0 ? $scope.products.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allProducts.length ? allProducts.length : last + nrOfRowsToLoad;\r\n\r\n $scope.products = allProducts.slice(0, indexToLoad);\r\n }\r\n else {\r\n if ($scope.products == undefined)\r\n return;\r\n if (allProducts.length == $scope.products.length) {\r\n $scope.reachedEndOfList = true;\r\n return;\r\n }\r\n if (allProducts.length > nrOfRowsToLoadAtStart) {\r\n $scope.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Changes the sort order based on the given predicate\r\n * @param {*} orderBy \r\n */\r\n $scope.changeOrder = function (orderBy) {\r\n $scope.products = [];\r\n if (orderBy != $scope.predicate) {\r\n $scope.predicate = orderBy;\r\n ProductFactory.predicate = orderBy;\r\n } else {\r\n $scope.reverse = !$scope.reverse;\r\n ProductFactory.reverse = $scope.reverse;\r\n }\r\n allProducts = $filter('orderBy')(allProducts, ProductFactory.predicate, ProductFactory.reverse);\r\n $scope.products = allProducts.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Sets the padding between pills that are added when the user searches by specific keyworkds\r\n */\r\n function setPaddingOfInput() {\r\n $timeout(function () {\r\n if (!listOfPillsHTML)\r\n listOfPillsHTML = document.getElementsByClassName('pill-product-list')[0];\r\n\r\n var children = listOfPillsHTML.children;\r\n var width = 0;\r\n for (var i = 0; i < children.length; i++) {\r\n width += children[i].offsetWidth;\r\n if (i > 1)\r\n width += 5;\r\n }\r\n\r\n if (!inputElement)\r\n inputElement = document.getElementsByClassName('searchInput')[0];\r\n inputElement.style.paddingLeft = width + (children.length == 0 ? 12 : 15) + 'px';\r\n });\r\n };\r\n\r\n /**\r\n * Adds the given text to the search \r\n * @param {*} description \r\n */\r\n $scope.addDescriptionToSearch = function (description) {\r\n if ($scope.search.keywords.indexOf(description) > -1)\r\n return;\r\n $scope.search.keywords.push(description.replace(/['\"]+/g, '\\'\\''));\r\n $scope.getProducts($scope.search.text, $scope.search.organization.id);\r\n };\r\n\r\n /**\r\n * Remove the specific keyword at the given index\r\n * @param {*} index \r\n */\r\n $scope.removeKeywork = function (index) {\r\n $scope.search.keywords.splice(index, 1);\r\n $scope.getProducts($scope.search.text, $scope.search.organization.id);\r\n };\r\n\r\n /**\r\n * Gets the product catalogs\r\n */\r\n function getProductCatalogs() {\r\n return ProductFactory.getCatalogs($scope.search.organization.id).$promise\r\n .then(function (result) {\r\n $scope.productCatalogs = result;\r\n\r\n var all = { id: -1, Name: \"Alle\" };\r\n $scope.productCatalogs.unshift(all);\r\n //Set 'Alle' as default\r\n $scope.search.ProductCatalog = result[0];\r\n });\r\n };\r\n\r\n /**\r\n * Gets the providers\r\n */\r\n function getProviders() {\r\n return ProductFactory.getProviders($scope.search.organization.id, $scope.search.ProductCatalog.id).$promise\r\n .then(function (result) {\r\n $scope.providers = result;\r\n });\r\n };\r\n\r\n $scope.onProviderChange = function () {\r\n $scope.getProducts($scope.search.text, $scope.search.organization.id);\r\n };\r\n\r\n $scope.onProductCatalogChange = function () {\r\n if ($scope.search.ProductCatalog.id == -1)\r\n $scope.search.Provider = {};\r\n else {\r\n getProviders();\r\n }\r\n $scope.getProducts($scope.search.text, $scope.search.organization.id);\r\n };\r\n\r\n function getAll() {\r\n getProductCatalogs().then(function () {\r\n if ($scope.search.ProductCatalog.id != -1)\r\n getProviders();\r\n\r\n $scope.getProducts($scope.search.text, $scope.search.organization.id);\r\n $scope.getMostUsedProducts($scope.search.text, $scope.search.NRF);\r\n });\r\n };\r\n\r\n $scope.onOrganizationChange = function () {\r\n $scope.search.ProductCatalog = {};\r\n $scope.search.Provider = {};\r\n getAll();\r\n };\r\n\r\n $scope.clearSearch = function () {\r\n $scope.search.text = null;\r\n $scope.search.NRF = null;\r\n $scope.search.keywords = [];\r\n\r\n searchService.setProductSearch($scope.search);\r\n\r\n $scope.getProducts($scope.search.text, $scope.search.organization.id);\r\n $scope.getMostUsedProducts($scope.search.text, $scope.search.NRF);\r\n };\r\n\r\n /**\r\n * Highlights the text in the search result so the user can identify the products easily\r\n * @param {*} text \r\n */\r\n $scope.highlight = function (text) {\r\n if (!$scope.search.text && $scope.search.keywords.length == 0)\r\n return $sce.trustAsHtml(text + ' ');\r\n else {\r\n var searchText = angular.copy($scope.search.text);\r\n for (var i = 0; i < $scope.search.keywords.length; i++)\r\n searchText += ' ' + $scope.search.keywords[i];\r\n\r\n if (searchText.split(' ').length == 1)\r\n return $sce.trustAsHtml(text.replace(new RegExp(searchText, 'gi'),\r\n '$&') + ' ');\r\n else {\r\n var splitText = searchText.split(' '), span = '';\r\n for (var i = 0; i < splitText.length; i++) {\r\n var stringReplaced = text.replace(new RegExp('(' + splitText[i] + ')', 'gi'), '$&' + ' ');\r\n if (stringReplaced.indexOf(' -1)\r\n return $sce.trustAsHtml(stringReplaced + ' ');\r\n }\r\n return $sce.trustAsHtml(text + ' ');\r\n }\r\n }\r\n };\r\n\r\n $scope.onOrganizationChange = function (organization, firstTime) {\r\n $scope.search.organization = organization;\r\n getAll();\r\n };\r\n\r\n $scope.$on('$destroy', function () {\r\n searchService.setProductSearch($scope.search);\r\n OrganizationUtilService.setOrganizationId($scope.search.organization.id);\r\n });\r\n\r\n $scope.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n };\r\n\r\n})();\r\n//TODO: move this to another file\r\n(function () {\r\n ProductController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$filter',\r\n '$timeout',\r\n 'titleService',\r\n 'ProductFactory',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular.module('product').controller('ProductController', ProductController);\r\n\r\n function ProductController(\r\n $scope,\r\n $routeParams,\r\n $filter,\r\n $timeout,\r\n titleService,\r\n ProductFactory,\r\n sessionInformationService\r\n ) {\r\n\r\n titleService.changeTitle($filter('translate')('Product'));\r\n\r\n var productId = $routeParams.productId;\r\n //get the product details\r\n var product = ProductFactory.getProductDetails(productId);\r\n product.$promise.then(function (result) {\r\n $scope.product = result;\r\n });\r\n\r\n $scope.showPrices = function () {\r\n return sessionInformationService.hasAccess('VIEW_PRODUCT_PRICE');\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProductFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('product').factory('ProductFactory', ProductFactory);\r\n\r\n function ProductFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n\r\n var productFactory = {};\r\n\r\n var Product = $resource(baseUrlService.getBaseUrl() + 'REST/Product.svc/SearchProducts');\r\n var ProductDetails = $resource(baseUrlService.getBaseUrl() + 'REST/Product.svc/ProductDetails');\r\n var MostUsedProducts = $resource(baseUrlService.getBaseUrl() + 'REST/Product.svc/MostUsedProducts');\r\n var Catalogs = $resource(baseUrlService.getBaseUrl() + 'REST/Product.svc/Catalogs');\r\n var Providers = $resource(baseUrlService.getBaseUrl() + 'REST/Product.svc/Providers');\r\n\r\n /**\r\n * Gets the products based on the search criteria\r\n * @param {*} freeText \r\n * @param {*} organizationId \r\n * @param {*} keywords \r\n * @param {*} productCatalogId \r\n * @param {*} providerId \r\n * @param {*} NRF \r\n */\r\n productFactory.searchProducts = function (freeText, organizationId, keywords, productCatalogId, providerId, NRF, selectedProductColumnTypeId) {\r\n return Product.query({\r\n freeText: freeText,\r\n organizationId: organizationId,\r\n keywords: keywords,\r\n productCatalogId: productCatalogId,\r\n providerId: providerId,\r\n NRF: NRF,\r\n selectedProductColumnTypeId: selectedProductColumnTypeId\r\n });\r\n };\r\n\r\n /**\r\n * Gets the product by the given id\r\n * @param {*} productId \r\n */\r\n productFactory.getProductDetails = function (productId) {\r\n return ProductDetails.get({ productId: productId });\r\n };\r\n\r\n /**\r\n * Gets the product catalogs for the given organization\r\n * @param {*} organizationId \r\n */\r\n productFactory.getCatalogs = function (organizationId) {\r\n return Catalogs.query({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the most used products\r\n * @param {*} organizationId \r\n * @param {*} freeText \r\n * @param {*} NRF\r\n * @param {*} productCatalogId\r\n */\r\n productFactory.getMostUsedProducts = function (organizationId, freeText, NRF, productCatalogId) {\r\n return MostUsedProducts.query({\r\n organizationId: organizationId,\r\n freeText: freeText,\r\n NRF: NRF,\r\n productCatalogId: productCatalogId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the providers\r\n * @param {*} organizationId \r\n * @param {*} productCatalogId \r\n */\r\n productFactory.getProviders = function (organizationId, productCatalogId) {\r\n return Providers.query({ organizationId: organizationId, productCatalogId: productCatalogId });\r\n };\r\n\r\n productFactory.predicate = 'id';\r\n productFactory.reverse = true;\r\n\r\n return productFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n projectService.$inject = [\r\n '_',\r\n 'ParticipantDatesService',\r\n 'OrderDetailsService'\r\n ];\r\n\r\n function projectService(\r\n _,\r\n ParticipantDatesService,\r\n OrderDetailsService\r\n ) {\r\n\r\n var promiseLeftMenuCategories = null;\r\n\r\n /**\r\n * Converts the date fields from a project into milliseconds\r\n * @param {any} project\r\n */\r\n function convertProjectDateFieldsToMilliseconds(project) {\r\n\r\n if (_.isNil(project)) {\r\n return;\r\n }\r\n\r\n if (!_.isNil(project.Order)) {\r\n\r\n if (!_.isNil(project.Order.Participants)) {\r\n // convert the participant's dates list to milliseconds for\r\n // the participants of the order associated with the project\r\n project.Order.Participants.forEach(function (participant) {\r\n\r\n ParticipantDatesService.convertParticipantDatesListToMilliseconds(participant.Dates);\r\n });\r\n }\r\n }\r\n }\r\n\r\n return {\r\n convertProjectDateFieldsToMilliseconds: convertProjectDateFieldsToMilliseconds\r\n };\r\n }\r\n\r\n angular\r\n .module('project')\r\n .service('ProjectService', projectService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectController.$inject = [\r\n '$scope',\r\n 'ProjectFactory',\r\n 'menuService',\r\n '$routeParams',\r\n 'infoService',\r\n '$route',\r\n '$timeout',\r\n '$filter',\r\n 'titleService',\r\n 'TabUtilService',\r\n '$q',\r\n '$rootScope',\r\n 'OrderFactory',\r\n 'ProjectService',\r\n 'ExecutionService'\r\n ];\r\n\r\n angular.module('project').controller('ProjectController', ProjectController);\r\n\r\n function ProjectController(\r\n $scope,\r\n ProjectFactory,\r\n menuService,\r\n $routeParams,\r\n infoService,\r\n $route,\r\n $timeout,\r\n $filter,\r\n titleService,\r\n TabUtilService,\r\n $q,\r\n $rootScope,\r\n OrderFactory,\r\n ProjectService,\r\n ExecutionService\r\n ) {\r\n var projectCtrl = this;\r\n var isControllerDestroyingAfterSave = false;\r\n projectCtrl.showRealReportButton = false;\r\n projectCtrl.chartLoadedFromReportButtonClick = false;\r\n projectCtrl.pageReady = false;\r\n projectCtrl.showRenderChart = true;\r\n projectCtrl.canOrderProgressBarBeDisplayed = canOrderProgressBarBeDisplayed;\r\n\r\n titleService.changeTitle($filter('translate')('Projects'));\r\n\r\n /**\r\n * Property used to explicitly tell that we are on a project\r\n */\r\n $scope.isProjectPage = true;\r\n\r\n /**\r\n * Object used to share data and functions between directives\r\n */\r\n $scope.projectObject = {};\r\n $scope.projectObject.projectReportBuilder = {};\r\n\r\n /**\r\n * Property used whether to disable/enable the Order Execution tab\r\n * Is false when Order is selected\r\n */\r\n $scope.projectObject.isOrderExecutionDisabled = true;\r\n\r\n\r\n\r\n if ($routeParams.projectId)\r\n $scope.projectObject.projectId = projectCtrl.projectId = $routeParams.projectId;\r\n\r\n $scope.projectObject.toggleRenderChart = function () {\r\n projectCtrl.showRenderChart = true;\r\n }\r\n\r\n\r\n var projectsMenu = menuService.getMenuByHref('/projects');\r\n if (projectsMenu)\r\n menuService.setSelectedMenu(projectsMenu);\r\n\r\n if (ProjectFactory.displaySaveMessage) {\r\n $timeout(function () {\r\n infoService.changeInfo($filter('translate')('msgProjectUpdated'));\r\n ProjectFactory.displaySaveMessage = false;\r\n }, 100);\r\n }\r\n\r\n function navigate(url) {\r\n if (url)\r\n $scope.go(url);\r\n else\r\n $scope.go('/project/' + $scope.projectObject.projectId);\r\n };\r\n\r\n projectCtrl.closeProject = function () {\r\n navigate('/projects');\r\n };\r\n\r\n /**\r\n * Saves the current project\r\n * @returns {} \r\n */\r\n projectCtrl.saveProject = function (dontReload) {\r\n if (!$scope.projectObject.canSaveOrders() || !$scope.projectObject.canSaveProject())\r\n return $q.when();\r\n\r\n var projectToSave = $scope.projectObject.getProject(true);\r\n //save any open executions\r\n return $scope.projectObject.saveAnyOpenExecution().then(function () {\r\n\r\n ProjectService.convertProjectDateFieldsToMilliseconds(projectToSave);\r\n\r\n return ProjectFactory.saveProject(projectToSave);\r\n }).then(function (result) {\r\n\r\n ProjectFactory.displaySaveMessage = true;\r\n\r\n if (!$scope.projectObject.projectId) {\r\n $scope.projectObject.projectId = result.id;\r\n navigate('/project/' + $scope.projectObject.projectId);\r\n } else {\r\n if (!dontReload) {\r\n isControllerDestroyingAfterSave = true;\r\n $route.reload();\r\n }\r\n }\r\n });\r\n };\r\n\r\n projectCtrl.onProjectManagementSelect = function () {\r\n ProjectFactory.selectTab(false, true, true, false, false, false, false);\r\n };\r\n\r\n projectCtrl.showLawsAndRegulationsTab = function () {\r\n return ProjectFactory.lawsMenuSelected;\r\n };\r\n\r\n projectCtrl.showDeviationTab = function () {\r\n return ProjectFactory.deviationMenuSelected && $scope.projectObject.projectId;\r\n };\r\n\r\n /**\r\n * The order description must be in sync with project description\r\n * @param {} order \r\n * @returns {} \r\n */\r\n projectCtrl.syncOrderDescriptionWithProject = function (order) {\r\n if ($scope.projectObject.syncOrderDescriptionWithProject)\r\n $scope.projectObject.syncOrderDescriptionWithProject(order);\r\n };\r\n\r\n /**\r\n * Function that retrieves the project tabs\r\n * Putting the tabs in scope didn't kept the reference, so when a tab was changed, nothing happened\r\n * @returns {} \r\n */\r\n projectCtrl.getProjectTabs = function () {\r\n return ProjectFactory.tabs;\r\n };\r\n\r\n projectCtrl.currentTab = function () {\r\n return ProjectFactory.currentTab;\r\n }\r\n\r\n projectCtrl.onProjectRetrieve = function () {\r\n initTabs();\r\n }\r\n\r\n function onProjectOrderExecutionTabSelected() {\r\n\r\n $rootScope.$broadcast('onOrderTabSelectedFromProjectDetailsPage');\r\n\r\n var projectOrder = $scope.projectObject.getProject().Order;\r\n\r\n // prepare the order for left menu hierarchy\r\n OrderFactory.mainOrder = projectOrder;\r\n }\r\n\r\n function checkForOrderExecutionTab(previousTab, selectedTab) {\r\n\r\n if (selectedTab === 'PROJECT_EXECUTION') {\r\n\r\n onProjectOrderExecutionTabSelected();\r\n } else if (previousTab === 'PROJECT_EXECUTION' && selectedTab !== 'PROJECT_EXECUTION') {\r\n\r\n $rootScope.$broadcast('onOrderTabDeselectedFromProjectDetailsPage');\r\n\r\n OrderFactory.mainOrder = null;\r\n }\r\n }\r\n\r\n function initTabs() {\r\n var currentTab = TabUtilService.getCurrentTab(TabUtilService.pages.PROJECT_DETAIL);\r\n\r\n if (_.isNil(currentTab)) {\r\n ProjectFactory.setCurrentTab('PROJECT_IDENTIFICATION');\r\n\r\n return;\r\n }\r\n\r\n if (currentTab === 'PROJECT_DEVIATIONS' && !projectCtrl.showDeviationTab()) {\r\n ProjectFactory.setCurrentTab('PROJECT_IDENTIFICATION');\r\n } else if (currentTab === 'PROJECT_LAWS_AND_REGULATIONS' && !projectCtrl.showLawsAndRegulationsTab()) {\r\n ProjectFactory.setCurrentTab('PROJECT_IDENTIFICATION');\r\n } else if (currentTab === 'PROJECT_EXECUTION') {\r\n ProjectFactory.setCurrentTab('PROJECT_EXECUTION');\r\n onProjectOrderExecutionTabSelected();\r\n } else {\r\n ProjectFactory.setCurrentTab(currentTab);\r\n }\r\n }\r\n\r\n function init() {\r\n $scope.projectObject.saveProject = projectCtrl.saveProject;\r\n $scope.projectObject.reload = function () {\r\n $route.reload();\r\n }\r\n Object.defineProperty(projectCtrl, 'activeTab',\r\n {\r\n get: function () {\r\n return ProjectFactory.currentTab;\r\n },\r\n set: function (value) {\r\n\r\n var previousTab = ProjectFactory.currentTab;\r\n\r\n ProjectFactory.setCurrentTab(value);\r\n\r\n checkForOrderExecutionTab(previousTab, value);\r\n\r\n // if the selected tab is project chart, show the real end report button\r\n if (ProjectFactory.currentTab === 'PROJECT_CHART') {\r\n projectCtrl.showRealReportButton = true;\r\n }\r\n }\r\n });\r\n\r\n $timeout(function () {\r\n projectCtrl.pageReady = true;\r\n });\r\n }\r\n\r\n /**\r\n * Called when fake 'Generate Final Report' is clicked. Activates 'Project chart' tab\r\n * in order for the chart to be drawn.\r\n */\r\n projectCtrl.generateFinalReport = function () {\r\n ProjectFactory.setCurrentTab('PROJECT_CHART');\r\n // display the real 'Generate Final Report' button to be able to get him from the DOM\r\n projectCtrl.showRealReportButton = true;\r\n // indicate that the chart was loaded/drawn after the click on the fake 'Generate Final Report'\r\n projectCtrl.chartLoadedFromReportButtonClick = true;\r\n };\r\n\r\n\r\n\r\n $rootScope.$on('onChartLoaded', function (event) {\r\n projectCtrl.showRenderChart = false;\r\n $scope.$apply();\r\n\r\n });\r\n\r\n $scope.$on('onReportModalClosed', function (event) {\r\n // hide here the real button because if we will hide it above\r\n // in 'onChartLoaded' listener the report will not be visible\r\n projectCtrl.showRealReportButton = false;\r\n event.stopPropagation();\r\n });\r\n\r\n $scope.$on('$destroy', function handleDestroy() {\r\n $scope.isProjectPage = false;\r\n ProjectFactory.projectId = null;\r\n ProjectFactory.lawsMenuSelected = false;\r\n ProjectFactory.deviationMenuSelected = false;\r\n\r\n // if the user is on order execution tab when leaving, clear the order related data\r\n if (ProjectFactory.currentTab === 'PROJECT_EXECUTION') {\r\n $rootScope.$broadcast('onOrderTabDeselectedFromProjectDetailsPage');\r\n OrderFactory.mainOrder = null;\r\n }\r\n\r\n if (!isControllerDestroyingAfterSave) {\r\n ProjectFactory.setCurrentTab('PROJECT_IDENTIFICATION');\r\n } else {\r\n isControllerDestroyingAfterSave = false;\r\n }\r\n\r\n ProjectFactory.resetManagementProcessLists();\r\n ExecutionService.setIdOfExecutionToOpenFromProjectPage(null);\r\n });\r\n\r\n $scope.$on('project:loaded',\r\n function () {\r\n $timeout(handleSelectedTab, 250);\r\n });\r\n\r\n function handleSelectedTab() {\r\n switch (projectCtrl.currentTab()) {\r\n case 'PROJECT_EXECUTION':\r\n $scope.projectObject.setUpHeaderHeight();\r\n break;\r\n case 'PROJECT_REPORT_BUILDER':\r\n $scope.projectObject.projectReportBuilder.init();\r\n break;\r\n case 'PROJECT_CHART':\r\n $scope.projectObject.refresh();\r\n $scope.projectObject.snapshotChart();\r\n break;\r\n }\r\n }\r\n\r\n function canOrderProgressBarBeDisplayed() {\r\n return $scope.projectObject.project &&\r\n $scope.projectObject.project.id;\r\n }\r\n\r\n $timeout(init);\r\n };\r\n\r\n})(); \r\n","(function () {\r\n 'use strict';\r\n\r\n ProjectFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '$q',\r\n '$filter',\r\n 'TabUtilService'\r\n ];\r\n\r\n angular.module('project').factory('ProjectFactory', ProjectFactory);\r\n\r\n function ProjectFactory(\r\n $resource,\r\n baseUrlService,\r\n $q,\r\n $filter,\r\n TabUtilService\r\n ) {\r\n var projectFactory = {};\r\n //set up the $resource apis\r\n var Projects = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/Projects');\r\n var Project = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/Project/:projectId', { projectId: '@id' }, { update: { method: 'PUT' } });\r\n var Statuses = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectStatuses');\r\n var ProjectLeftMenu = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectLeftMenu');\r\n var ProjectOrder = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectOrder/:orderId', { orderId: '@orderId' });\r\n var ProjectManagement = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectManagement/:connectId', { connectId: '@id' });\r\n var CreateProjectExecution = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectManagementExecute');\r\n var ProjectCategoryAttachments = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectCategoryAttachments', {},\r\n { save: { method: 'POST', isArray: true, params: { projectId: '@projectId', categoryId: '@categoryId' } } });\r\n var ProjectCategoryDeleteAttachments = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectCategoryAttachments/:projectId/:categoryId/:attachmentId/:table',\r\n { projectId: '@projectId', categoryId: '@categoryId', attachmentId: '@attachmentId', table: '@table' });\r\n var ProjectManagementSorting = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectManagementSorting');\r\n var ProjectCameraImages = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectCameraImages');\r\n var ProjectManagementIncludeReport = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectManagementIncludeReport');\r\n var AttachmentIncludeReport = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/AttachmentIncludeReport');\r\n var ProjectAttachmentUrl = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/ProjectAttachmentsUrl');\r\n var RiskAnalysisVisibilityState = $resource(baseUrlService.getBaseUrl() + 'REST/Project.svc/project/risk-analysis/toggle-visibility');\r\n\r\n /**\r\n * Downloads the attachments for the given attachments\r\n * @param {} projectId \r\n * @returns {} \r\n */\r\n projectFactory.getProjectAttachmentUrl = function (projectId) {\r\n return ProjectAttachmentUrl.get({ projectId: projectId });\r\n };\r\n\r\n /**\r\n * Gets the projects based on the search criteria\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @param {} includeDeactivated \r\n * @param {} statusId \r\n * @returns {} \r\n */\r\n projectFactory.getProjects = function (freeText, organizationId, includeDeactivated, statusId) {\r\n return Projects.query({ freeText: freeText, organizationId: organizationId, includeDeactivated: includeDeactivated, statusId: statusId });\r\n };\r\n\r\n /**\r\n * Get the project by id\r\n * @param {} projectId \r\n * @returns {} \r\n */\r\n projectFactory.getProject = function (projectId) {\r\n projectFactory.projectId = projectId;\r\n return Project.get({ projectId: projectId });\r\n };\r\n\r\n /**\r\n * Gets a new object for later to be saved\r\n * @returns {} \r\n */\r\n projectFactory.getProjectToSave = function () {\r\n return new Project();\r\n };\r\n\r\n /**\r\n * Saves any given project\r\n * @param {} project \r\n * @returns {} \r\n */\r\n projectFactory.saveProject = function (project) {\r\n if (project.id) {\r\n return project.$update();\r\n } else {\r\n return project.$save();\r\n }\r\n };\r\n\r\n /**\r\n * Gets the project statuses\r\n * @returns {} \r\n */\r\n projectFactory.getProjectStatuses = function () {\r\n return Statuses.get().$promise;\r\n };\r\n\r\n /**\r\n * Gets the project left menu categories\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n projectFactory.getLeftMenuCategories = function (organizationId) {\r\n return ProjectLeftMenu.query({ organizationId: organizationId }).$promise.then(function (result) {\r\n projectFactory.leftMenuCategoriesDeffer.resolve();\r\n return result;\r\n }).catch(function (err) {\r\n projectFactory.leftMenuCategoriesDeffer.reject(err);\r\n });\r\n };\r\n\r\n /**\r\n * Gets the project order details that is associated with the current project\r\n * @param {} orderId \r\n * @returns {} \r\n */\r\n projectFactory.getProjectOrderDetails = function (orderId) {\r\n return ProjectOrder.get({ orderId: orderId });\r\n };\r\n\r\n /**\r\n * Adds the given processlist\r\n * If the list is new, it is saved first then it's added to the list\r\n * @param {} category \r\n * @param {} noRequest \r\n * @returns {} \r\n */\r\n projectFactory.addManagementProcessList = function (category, noRequest) {\r\n var promise = $q.when();\r\n if (!noRequest) {\r\n var projectRequest = new ProjectManagement();\r\n projectRequest.projectId = projectFactory.projectId;\r\n projectRequest.processListId = category.ProcessList.id;\r\n projectRequest.categoryId = category.id;\r\n promise = projectRequest.$save();\r\n }\r\n\r\n return promise.then(function (result) {\r\n var execution = {\r\n id: !noRequest ? result.id : category.ProjectManagement.id,\r\n SortNumber: !noRequest ? category.SortNumber : category.ProjectManagement.SortNumber,\r\n IncludeInReport: !noRequest ? true : category.ProjectManagement.IncludeInReport,\r\n reportCollapse: true\r\n };\r\n if (!noRequest)\r\n execution.Execution = {\r\n InitiatedProcessList: category.ProcessList\r\n };\r\n else\r\n execution.Execution = category.ProjectManagement.Execution;\r\n\r\n if (!projectFactory.projectManagementCategories)\r\n projectFactory.projectManagementCategories = [];\r\n\r\n for (var i = 0; i < projectFactory.projectManagementCategories.length; i++) {\r\n var managementCategory = projectFactory.projectManagementCategories[i];\r\n if (managementCategory.id == category.id) {\r\n managementCategory.ExecutionList.push(execution);\r\n return;\r\n }\r\n }\r\n\r\n //if we got here, it means that there is no category\r\n //so we'll add one here\r\n projectFactory.projectManagementCategories.push({\r\n id: parseInt(category.id),\r\n Name: category.Name,\r\n ExecutionList: [execution],\r\n SortNumber: category.SortNumber\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Updates the details of the given list\r\n * @param {} projectManagement \r\n * @returns {} \r\n */\r\n projectFactory.updateManagementProcessList = function (projectManagement) {\r\n if (!projectFactory.projectManagementCategories || projectFactory.projectManagementCategories.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < projectFactory.projectManagementCategories.length; i++) {\r\n var managementCategory = projectFactory.projectManagementCategories[i];\r\n if (managementCategory.ExecutionList && managementCategory.ExecutionList.length > 0)\r\n for (var j = 0; j < managementCategory.ExecutionList.length; j++) {\r\n if (managementCategory.ExecutionList[j].id == projectManagement.id) {\r\n managementCategory.ExecutionList[j] = projectManagement;\r\n managementCategory.ExecutionList[j].reportCollapse = true;\r\n return;\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Removes the list at the given index\r\n * @param {} processListIndex \r\n * @param {} categoryId \r\n * @param {} connectId \r\n * @returns {} \r\n */\r\n projectFactory.removeManagementProcessList = function (processListIndex, categoryId, connectId) {\r\n var projectRequest = new ProjectManagement();\r\n projectRequest.id = connectId;\r\n //make delete request and delete it from connect\r\n return projectRequest.$delete().then(function () {\r\n for (var i = 0; i < projectFactory.projectManagementCategories.length; i++) {\r\n //delete the execution process list\r\n if (projectFactory.projectManagementCategories[i].id == categoryId) {\r\n projectFactory.projectManagementCategories[i].ExecutionList.splice(processListIndex, 1);\r\n //if there is no any process list left\r\n //delete the category as well\r\n if (projectFactory.projectManagementCategories[i].ExecutionList.length == 0)\r\n projectFactory.projectManagementCategories.splice(i, 1);\r\n }\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Sets up the management categories and associates them with the current executions\r\n * @param {} currentExecutions \r\n * @returns {} \r\n */\r\n projectFactory.initProjectManagementCategories = function (currentExecutions) {\r\n //if for some reason we don't have left menu categories, return\r\n if (!projectFactory.leftMenuCategories || projectFactory.leftMenuCategories.length == 0)\r\n return;\r\n\r\n if (!projectFactory.projectManagementCategories)\r\n projectFactory.projectManagementCategories = [];\r\n\r\n var promises = [];\r\n for (var i = 0; i < projectFactory.leftMenuCategories.length; i++) {\r\n var category = projectFactory.leftMenuCategories[i];\r\n\r\n if (!category.ProcessLists || category.ProcessLists.length == 0)\r\n continue;\r\n\r\n //go through each execution process list and add it to it's coresponding category\r\n for (var j = 0; j < currentExecutions.length; j++) {\r\n var projectManagement = currentExecutions[j];\r\n\r\n if (category.id == projectManagement.ProjectCategory.id)\r\n //removed this because some executions were missing\r\n //$filter('filter')(category.ProcessLists, function (p) { return p.id == projectManagement.Execution.InitiatedProcessList.id }).length > 0\r\n promises.push(projectFactory.addManagementProcessList({ id: category.id, Name: category.Name, ProjectManagement: projectManagement, SortNumber: category.SortNumber }, true));\r\n }\r\n }\r\n\r\n $q.all(promises).then(function () {\r\n angular.forEach(projectFactory.projectManagementCategories, function (category) {\r\n if (category.ExecutionList && category.ExecutionList.length > 0)\r\n category.ExecutionList = $filter('orderBy')(category.ExecutionList, 'SortNumber');\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Creates a new execution for the given list\r\n * @param {} processListId \r\n * @param {} connectId \r\n * @param {} execution \r\n * @returns {} \r\n */\r\n projectFactory.createProjectExecution = function (processListId, connectId, execution) {\r\n var createManagementExecution = new CreateProjectExecution();\r\n createManagementExecution.processListId = processListId;\r\n createManagementExecution.connectId = connectId;\r\n createManagementExecution.execution = execution;\r\n\r\n return createManagementExecution.$save();\r\n };\r\n\r\n /**\r\n * Gets the current lists for the given project\r\n * @param {} connectId \r\n * @param {} projectId \r\n * @returns {} \r\n */\r\n projectFactory.getManagementProcessLists = function (connectId, projectId) {\r\n return ProjectManagement.query({\r\n projectConnectId: connectId, projectId: projectId\r\n }).$promise;\r\n };\r\n\r\n projectFactory.saveCategoryAttachments = function (attachments, categoryId, projectId) {\r\n return ProjectCategoryAttachments.save({ projectId: projectId, categoryId: categoryId }, attachments).$promise;\r\n };\r\n\r\n projectFactory.deleteCategoryAttachment = function (attachmentId, categoryId, projectId, table) {\r\n var projectCategoryAttachment = new ProjectCategoryDeleteAttachments();\r\n projectCategoryAttachment.attachmentId = attachmentId;\r\n projectCategoryAttachment.categoryId = categoryId;\r\n projectCategoryAttachment.projectId = projectId;\r\n projectCategoryAttachment.table = table;\r\n\r\n return projectCategoryAttachment.$delete();\r\n };\r\n\r\n /**\r\n * Helper function for tab handling\r\n * @param {} tab\r\n * @returns {} \r\n */\r\n projectFactory.setCurrentTab = function (tab) {\r\n projectFactory.currentTab = tab;\r\n\r\n TabUtilService.setCurrentTab(TabUtilService.pages.PROJECT_DETAIL, tab);\r\n }\r\n\r\n /**\r\n * Sets up the left menu category attachments\r\n * @param {} attachments \r\n * @returns {} \r\n */\r\n projectFactory.initProjectCategoriesAttachments = function (attachments) {\r\n\r\n angular.forEach(projectFactory.leftMenuCategories, function (category) {\r\n if (!category.Attachments)\r\n category.Attachments = [];\r\n\r\n Array.prototype.push.apply(category.Attachments, $filter('filter')(attachments, function (a) { return a.ForeignKey == category.id && (a.Table == 'BOT_CATEGORY_PROJECT' || a.Table == 'BOT_CATEGORY') }));\r\n });\r\n };\r\n\r\n /**\r\n * Sets up the project attachments\r\n * @param {} project \r\n * @returns {} \r\n */\r\n projectFactory.initProjectAttachments = function (project) {\r\n if (!project.Attachments || project.Attachments.length == 0)\r\n return;\r\n\r\n project.Attachments = $filter('filter')(project.Attachments, function (a) {\r\n return a.Table == 'BOT_PROJECT' && a.ForeignKey == project.id;\r\n });\r\n };\r\n\r\n projectFactory.resetLeftMenuCategoriesDefer = function () {\r\n projectFactory.leftMenuCategoriesDeffer = $q.defer();\r\n };\r\n\r\n projectFactory.resetManagementProcessLists = function () {\r\n projectFactory.projectManagementCategories = [];\r\n };\r\n\r\n projectFactory.resetLeftMenuCategories = function () {\r\n projectFactory.leftMenuCategories = [];\r\n };\r\n\r\n /**\r\n * Saves the sort order of the given executions\r\n * @param {} executions \r\n * @returns {} \r\n */\r\n projectFactory.saveManagementProcessListsSorting = function (executions) {\r\n var managementSorting = new ProjectManagementSorting();\r\n managementSorting.executions = executions;\r\n\r\n return managementSorting.$save();\r\n };\r\n\r\n projectFactory.getProjectCameraImages = function (initiatedId) {\r\n return ProjectCameraImages.get({ initiatedId: initiatedId });\r\n };\r\n\r\n /**\r\n * Saves the status of the include in end report for the given execution\r\n * @param {} execution \r\n * @returns {} \r\n */\r\n projectFactory.saveManagementProcessListIncludeReport = function (execution) {\r\n var managementIncludeReport = new ProjectManagementIncludeReport();\r\n managementIncludeReport.projectManagement = execution;\r\n\r\n return managementIncludeReport.$save();\r\n };\r\n\r\n /**\r\n * Saves the status of the include in end report for the given attachment\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n projectFactory.saveAttachmentIncludeReport = function (attachment) {\r\n var attachmentIncludeReport = new AttachmentIncludeReport();\r\n attachmentIncludeReport.attachmentId = attachment.id;\r\n attachmentIncludeReport.includeInReport = attachment.IncludeInReport;\r\n\r\n return attachmentIncludeReport.$save();\r\n };\r\n\r\n projectFactory.toggleRiskAnalysisVisibilityInReport = function (project) {\r\n return RiskAnalysisVisibilityState.save(project).$promise;\r\n };\r\n\r\n projectFactory.mainProjectOrder = null;\r\n projectFactory.reverseProjects = true;\r\n projectFactory.predicateProjects = \"id\";\r\n projectFactory.currentPageProjects = 1;\r\n projectFactory.projectId = 0;\r\n projectFactory.includeDeactivatedItems = false;\r\n projectFactory.displaySaveMessage = false;\r\n\r\n projectFactory.projectManagementCategories = [];\r\n projectFactory.leftMenuCategories = [];\r\n projectFactory.leftMenuCategoriesDeffer = $q.defer();\r\n\r\n projectFactory.lawsMenuSelected = false;\r\n projectFactory.deviationMenuSelected = false;\r\n\r\n projectFactory.selectedDeviationStatus = null;\r\n projectFactory.currentTab = 'PROJECT_IDENTIFICATION';\r\n\r\n return projectFactory;\r\n };\r\n\r\n})(); ","(function () {\r\n 'use strict';\r\n\r\n QualityHandbookController.$inject = [\r\n '$scope',\r\n 'QualityHandbookFactory',\r\n '$filter',\r\n '$route',\r\n '$q',\r\n 'sessionInformationService',\r\n 'titleService',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'dialogService',\r\n 'QualityHandbookTypes',\r\n 'ExecutionService'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('QualityHandbookController', QualityHandbookController);\r\n\r\n function QualityHandbookController(\r\n $scope,\r\n QualityHandbookFactory,\r\n $filter,\r\n $route,\r\n $q,\r\n sessionInformationService,\r\n titleService,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n dialogService,\r\n QualityHandbookTypes,\r\n ExecutionService\r\n ) {\r\n var qualityController = this;\r\n var initPromise = null;\r\n var activeQualityHandbookTypeProgId = QualityHandbookTypes.qualityHandbook;\r\n var _onDestroySubscription = null;\r\n\r\n qualityController.processListFilter = '';\r\n qualityController.types = [];\r\n qualityController.statuses = [];\r\n qualityController.qualityCategories = [];\r\n qualityController.qualityHandbook = {};\r\n qualityController.selectedType = QualityHandbookFactory.selectedQualityHandbookTab;\r\n qualityController.selectedStatus = null;\r\n qualityController.archivedQualityHandbooks = [];\r\n qualityController.selectedOrganization = null;\r\n\r\n qualityController.centralApprovalLists = [];\r\n qualityController.centralApprovalList = null;\r\n\r\n qualityController.sharedChapterObject = {};\r\n\r\n qualityController.onOrganizationChange = onOrganizationChange;\r\n qualityController.getActiveQualityHandbookTypeProgId = getActiveQualityHandbookTypeProgId;\r\n qualityController.setActiveQualityHandbookTypeProgId = setActiveQualityHandbookTypeProgId;\r\n qualityController.onChapterUpdate = onChapterUpdate;\r\n qualityController.onCentralApprovalChapterUpdate = onCentralApprovalChapterUpdate;\r\n\r\n qualityController.revisionFrequencies = [\r\n //'DAYS',\r\n 'WEEKS',\r\n 'MONTHS',\r\n 'YEARS'\r\n ];\r\n\r\n function getFullName(object) {\r\n return (object.FirstName ? object.FirstName + ' ' : '') + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Gets the quality handbook types\r\n * Types are displayed as tabs here\r\n */\r\n function getQualityHandbookTypes() {\r\n return QualityHandbookFactory.getQualityHandbookTypes().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n qualityController.types = _.filter(result, function (t) { return t.ProgId !== 'CENTRAL_APPROVAL' || t.ProgId === 'CENTRAL_APPROVAL' && sessionInformationService.hasLoggedUserFullAccess() });\r\n\r\n qualityController.types = $filter('orderBy')(qualityController.types, 'SortNumber');\r\n qualityController.types[0].active = true;\r\n qualityController.selectedType = QualityHandbookFactory.selectedQualityHandbookTab ? QualityHandbookFactory.selectedQualityHandbookTab : qualityController.types[0];\r\n\r\n qualityController.selectedType\r\n = QualityHandbookFactory.selectedQualityHandbookTab\r\n ? QualityHandbookFactory.selectedQualityHandbookTab : qualityController.types[0];\r\n\r\n //set the active tab\r\n setActiveQualityHandbookTypeProgId(qualityController.selectedType.ProgId);\r\n });\r\n };\r\n\r\n /**\r\n * Gets quality handbook statuses\r\n */\r\n function getQualityHandbookStatuses() {\r\n return QualityHandbookFactory.getQualityHandbookStatuses().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n qualityController.statuses = result;\r\n qualityController.statuses[0].active = true;\r\n qualityController.selectedStatus = qualityController.statuses[0];\r\n });\r\n };\r\n\r\n /**\r\n * Gets the quality handbook\r\n * If there is no quality handbook set up data for a new one\r\n * If it's active set up the lists\r\n * If it's archived get all archived ones\r\n * @param {any} selectedOrganizationId\r\n */\r\n function getQualityHandbook(selectedOrganizationId) {\r\n var archived = qualityController.selectedStatus.ProgId === 'ARCHIVED';\r\n return QualityHandbookFactory.getQualityHandbook(selectedOrganizationId, archived, qualityController.selectedType.id).then(function (result) {\r\n if (!result || result.length == 0) {\r\n\r\n qualityController.qualityHandbook = QualityHandbookFactory.getQualityHandbookForSave();\r\n\r\n //qualityController.qualityHandbook.RevisionFrequency = { FrequencyType: qualityController.revisionFrequencies[2] };\r\n QualityHandbookFactory.getSigningFrequencyForQualityHandbook().then(function (result) {\r\n qualityController.qualityHandbook.RevisionFrequency = result;\r\n if (!!qualityController.qualityHandbook.RevisionFrequency.Frequency)\r\n qualityController.qualityHandbook.RevisionFrequency.Frequency = parseInt(qualityController.qualityHandbook.RevisionFrequency.Frequency);\r\n });\r\n\r\n QualityHandbookFactory.setCategories([]);\r\n\r\n qualityController.archivedQualityHandbooks = [];\r\n\r\n qualityController.qualityHandbook.CentralApprovalLists = [];\r\n QualityHandbookFactory.qualityHandbookId = null;\r\n\r\n\r\n } else if (qualityController.selectedStatus.ProgId == 'ACTIVE') {\r\n qualityController.qualityHandbook = result[0];\r\n //set chapters if any\r\n if (qualityController.qualityHandbook.Categories && qualityController.qualityHandbook.Categories.length > 0) {\r\n angular.forEach(qualityController.qualityHandbook.Categories, function (category) {\r\n if (category.Executions && category.Executions.length > 0)\r\n category.Executions = $filter('orderBy')(category.Executions, 'SortNumber');\r\n });\r\n QualityHandbookFactory.setCategories(qualityController.qualityHandbook.Categories);\r\n } else\r\n QualityHandbookFactory.setCategories([]);\r\n\r\n QualityHandbookFactory.qualityHandbookId = qualityController.qualityHandbook.id;\r\n\r\n if (!qualityController.qualityHandbook.RevisionFrequency || !qualityController.qualityHandbook.RevisionFrequency.id)\r\n qualityController.qualityHandbook.RevisionFrequency = { FrequencyType: qualityController.revisionFrequencies[2] }\r\n else\r\n qualityController.qualityHandbook.RevisionFrequency.Frequency = parseInt(qualityController.qualityHandbook.RevisionFrequency.Frequency);\r\n\r\n qualityController.qualityHandbook.Type = $filter('filter')(qualityController.types, function (t) { return t.id == qualityController.qualityHandbook.Type.id })[0];\r\n\r\n // set type in factory\r\n QualityHandbookFactory.type = qualityController.qualityHandbook.Type;\r\n\r\n QualityHandbookFactory.qualityHandbookTable = qualityController.qualityHandbook.Type.ProgId == 'CENTRAL_APPROVAL' ? 'CENTRAL_APPROVAL' : qualityController.qualityHandbook.Type.Table;\r\n\r\n } else if (qualityController.selectedStatus.ProgId == 'ARCHIVED') {\r\n qualityController.archivedQualityHandbooks = result;\r\n\r\n QualityHandbookFactory.type = qualityController.selectedType;\r\n\r\n angular.forEach(qualityController.archivedQualityHandbooks, function (archived) {\r\n if (archived.CreatedBy && archived.CreatedBy.id)\r\n archived.CreatedBy.FullName = getFullName(archived.CreatedBy);\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the lists for central approval\r\n * @param {any} organizationId\r\n */\r\n function getCentralApprovalLists(organizationId) {\r\n return QualityHandbookFactory.getCentralApprovalLists(organizationId).then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n qualityController.centralApprovalLists = result;\r\n });\r\n };\r\n\r\n function getActiveQualityHandbookTypeProgId() {\r\n return activeQualityHandbookTypeProgId;\r\n }\r\n\r\n function setActiveQualityHandbookTypeProgId(typeProgId) {\r\n activeQualityHandbookTypeProgId = typeProgId;\r\n }\r\n\r\n function init() {\r\n initPromise = $q.all([getQualityHandbookTypes(), getQualityHandbookStatuses()]);\r\n\r\n titleService.changeTitle('Quality handbook');\r\n //Set the info text\r\n if (QualityHandbookFactory.selectedQualityHandbookTab && QualityHandbookFactory.selectedQualityHandbookTab.ProgId === 'QUALITY_HANDBOOK')\r\n titleService.changeInfoText('INFO_TEXT.QUALITY_HANDBOOK');\r\n };\r\n\r\n /**\r\n * When the tab changes and if the handbook is central -> get the lists again\r\n * @param {} type \r\n * @returns {} \r\n */\r\n qualityController.onTabTypeSelect = function (type) {\r\n qualityController.selectedType = QualityHandbookFactory.selectedQualityHandbookTab = type;\r\n\r\n if (type.ProgId == 'CENTRAL_APPROVAL')\r\n getCentralApprovalLists(qualityController.getUser().Organization.id);\r\n\r\n //Show info text for Quality Handbook\r\n if (type.ProgId === 'QUALITY_HANDBOOK')\r\n titleService.changeInfoText('INFO_TEXT.QUALITY_HANDBOOK');\r\n else\r\n titleService.changeInfoText('');\r\n };\r\n\r\n qualityController.onTabStatusSelect = function (status) {\r\n qualityController.selectedStatus = status;\r\n };\r\n\r\n /**\r\n * When the company changes fetch the handbook again\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityController.onOrganizationChanged = function (organizationId) {\r\n\r\n OrganizationUtilService.setOrganizationId(organizationId);\r\n getQualityHandbook(organizationId);\r\n\r\n };\r\n\r\n qualityController.getQualityHandbook = getQualityHandbook;\r\n\r\n /**\r\n * Checks whether the save button is disabled or not\r\n * @returns {} \r\n */\r\n qualityController.isSaveDisabled = function () {\r\n if (!qualityController.qualityHandbook)\r\n return true;\r\n\r\n if (_.some(['ADMIN', 'ADMIN_ALL', 'MANAGER'], function (r) { return r === qualityController.getUser().Group.ProgId }) && qualityController.getUser().Organization.Central) {\r\n if (!qualityController.qualityHandbook.RevisionFrequency)\r\n return true;\r\n\r\n if (!qualityController.qualityHandbook.RevisionFrequency.Frequency || !qualityController.qualityHandbook.RevisionFrequency.FrequencyType)\r\n return true;\r\n\r\n return false;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Saves the current quality handbook\r\n * @returns {} \r\n */\r\n qualityController.save = function () {\r\n //set the categories if new\r\n if (!qualityController.qualityHandbook.id)\r\n qualityController.qualityHandbook.Categories = QualityHandbookFactory.chapters;\r\n\r\n //set type if we don't have one\r\n if (!qualityController.qualityHandbook.Type || !qualityController.qualityHandbook.Type.id)\r\n qualityController.qualityHandbook.Type = qualityController.selectedType;\r\n\r\n //set status if we don't have one\r\n if (!qualityController.qualityHandbook.Status || !qualityController.qualityHandbook.Status.id)\r\n qualityController.qualityHandbook.Status = qualityController.selectedStatus;\r\n\r\n QualityHandbookFactory.saveQualityHandbook(qualityController.qualityHandbook, qualityController.selectedOrganization.id).then(function (result) {\r\n $route.reload();\r\n });\r\n };\r\n\r\n /**\r\n * Sets the current quality handbook as archived\r\n * @returns {} \r\n */\r\n qualityController.archive = function () {\r\n\r\n var modalTitle = $filter('translate')('txtWarning');\r\n var modalMessage = $filter('translate')('QUALITY_HANDBOOK.WARNING_MODAL.MESSAGE');\r\n var buttons = [$filter('translate')('COMMON.NO'), $filter('translate')('COMMON.YES')];\r\n var size = 'md';\r\n\r\n var warningModalInstance = dialogService.showCustomDialog(modalTitle, modalMessage, buttons, size);\r\n\r\n warningModalInstance.then(function (selectedButtonId) {\r\n\r\n // if the user clicks NO (0 -> the position of the NO button from above array)\r\n if (!selectedButtonId || selectedButtonId === 0) {\r\n return;\r\n }\r\n\r\n //qualityController.qualityHandbook.Status = $filter('filter')(qualityController.statuses, function (s) { return s.ProgId == 'ARCHIVED' })[0];\r\n\r\n //QualityHandbookFactory.saveQualityHandbook(qualityController.qualityHandbook, qualityController.selectedOrganization.id).then(function (result) {\r\n // $route.reload();\r\n //});\r\n\r\n QualityHandbookFactory.archiveQualityHandbook(qualityController.qualityHandbook.id)\r\n .then(function () {\r\n $route.reload();\r\n });\r\n\r\n });\r\n\r\n\r\n };\r\n\r\n qualityController.editTemplate = function () {\r\n $scope.go('qualityHandbookTemplate/' + qualityController.selectedType.ProgId);\r\n };\r\n\r\n /**\r\n * Deletes the given list form quality handbook\r\n * @param {} execution \r\n * @param {} firstLevelCategory \r\n * @returns {} \r\n */\r\n qualityController.deleteChapter = function (execution, firstLevelCategory) {\r\n qualityController.qualityHandbook.Approved = false;\r\n QualityHandbookFactory.deleteChapter(execution, firstLevelCategory);\r\n };\r\n\r\n qualityController.sharedChapterObject.deleteChapter = qualityController.deleteChapter;\r\n\r\n qualityController.getQualityChapters = function () {\r\n return QualityHandbookFactory.chapters;\r\n };\r\n\r\n qualityController.setSigningFrequencyType = function (frequency) {\r\n if (!qualityController.qualityHandbook.RevisionFrequency)\r\n qualityController.qualityHandbook.RevisionFrequency = {};\r\n\r\n qualityController.qualityHandbook.RevisionFrequency.FrequencyType = frequency;\r\n };\r\n\r\n /**\r\n * Initiates the given list and the list expands for execution\r\n * @param {} execution \r\n * @returns {} \r\n */\r\n qualityController.startExecution = function (execution) {\r\n execution.ForeignKey = qualityController.qualityHandbook.id;\r\n execution.Table = 'BOT_QUALITY_HANDBOOK';\r\n\r\n return QualityHandbookFactory.saveChapterExecution(execution.InitiatedProcessList.id, execution.ConnectId, execution).then(function (result) {\r\n return result.InitiateChapterExecutionResult;\r\n });\r\n };\r\n\r\n qualityController.viewQualityHandbook = function () {\r\n // var type = sessionInformationService.getUser().Group.ProgId === 'USER_ALL' ? _.find(qualityController.types, function (t) { return t.ProgId === 'PERSONAL_HANDBOOK' }) : qualityController.selectedType;\r\n // $scope.go('qualityHandbookView/' + type.id);\r\n $scope.go('/qualityHandbookView');\r\n };\r\n\r\n /**\r\n * Approve the quality handbook\r\n * If the quality handbook contains lists that have Available in app, Personal handbook will be generated as well\r\n * @returns {} \r\n */\r\n qualityController.approve = function () {\r\n var signingFrequencyTable = qualityController.qualityHandbook.Type.ProgId == 'CENTRAL_APPROVAL' ? 'CENTRAL_APPROVAL' : qualityController.qualityHandbook.Type.Table;\r\n QualityHandbookFactory.approveQualityHandbook(qualityController.qualityHandbook.id, signingFrequencyTable, qualityController.selectedOrganization.id).then(function () {\r\n qualityController.qualityHandbook.Approved = true;\r\n });\r\n };\r\n\r\n qualityController.viewArchivedHandbook = function (archivedQualityHandbook) {\r\n $scope.go('qualityHandbookArchive/' + archivedQualityHandbook.id);\r\n };\r\n\r\n QualityHandbookFactory.onChapterAdd = function () {\r\n qualityController.qualityHandbook.Approved = false;\r\n };\r\n\r\n //options for listdrag and drop\r\n qualityController.chapterTreeOptions = {\r\n accept: function (sourceNodeScope, destNodeScope) {\r\n //accept only from the same category\r\n if (sourceNodeScope.$treeScope.$parent.category.id != destNodeScope.$treeScope.$parent.category.id)\r\n return false;\r\n\r\n return true;\r\n },\r\n dropped: function (event) {\r\n var category = event.source.nodeScope.$treeScope.$parent.category;\r\n var executions = category.Executions;\r\n\r\n if (!executions || executions.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < executions.length; i++)\r\n executions[i].SortNumber = i;\r\n\r\n QualityHandbookFactory.saveChaptersSorting(executions.map(function (chapter) { return { ConnectId: chapter.ConnectId, SortNumber: chapter.SortNumber } }));\r\n }\r\n };\r\n\r\n qualityController.getUser = sessionInformationService.getUser;\r\n\r\n /**\r\n * Adds the given prcesslist to the list of processlists for central approval\r\n * @param {} processList \r\n * @returns {} \r\n */\r\n qualityController.setCentralApprovalList = function (processList) {\r\n var listToAdd = { InitiatedProcessList: processList, ConnectId: null, ProgId: 'CENTRAL_APPROVAL' }\r\n\r\n if (!qualityController.qualityHandbook.CentralApprovalLists)\r\n qualityController.qualityHandbook.CentralApprovalLists = [];\r\n\r\n qualityController.qualityHandbook.CentralApprovalLists.push(listToAdd);\r\n\r\n return QualityHandbookFactory.saveChapter(null, processList.id, 'CENTRAL_APPROVAL').then(function (result) {\r\n qualityController.qualityHandbook.CentralApprovalLists[qualityController.qualityHandbook.CentralApprovalLists.length - 1].ConnectId = result.ConnectId;\r\n qualityController.centralApprovalList = null;\r\n });\r\n };\r\n\r\n /**\r\n * Removes the processlist at the given index\r\n * @param {} index \r\n * @returns {} \r\n */\r\n qualityController.deleteCentralApprovalList = function (index) {\r\n if (QualityHandbookFactory.qualityHandbookId)\r\n QualityHandbookFactory.deleteCentralApprovalList(qualityController.qualityHandbook.CentralApprovalLists[index].ConnectId);\r\n\r\n qualityController.qualityHandbook.CentralApprovalLists.splice(index, 1);\r\n };\r\n\r\n function onOrganizationChange(organization, firstTime) {\r\n qualityController.selectedOrganization = organization;\r\n\r\n initPromise.then(function () {\r\n\r\n if (_.some(['ADMIN', 'ADMIN_ALL', 'MANAGER'], function (r) { return r === qualityController.getUser().Group.ProgId }))\r\n getQualityHandbook(qualityController.selectedOrganization.id);\r\n else\r\n qualityController.viewQualityHandbook();\r\n });\r\n }\r\n\r\n function onChapterUpdate(chapter, category) {\r\n\r\n if (!category.Executions) {\r\n return;\r\n }\r\n\r\n var index = category.Executions.findIndex(function (execution) {\r\n return execution.ConnectId === chapter.ConnectId;\r\n });\r\n\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n // manually update the chapter in the array because two-way biding doesn't work for some reason :)\r\n category.Executions[index] = chapter;\r\n }\r\n\r\n function onCentralApprovalChapterUpdate(chapter) {\r\n\r\n var centralApprovalLists = qualityController.qualityHandbook.CentralApprovalLists;\r\n\r\n if (!centralApprovalLists) {\r\n return;\r\n }\r\n\r\n var index = centralApprovalLists.findIndex(function (centralApprovalList) {\r\n return centralApprovalList.ConnectId === chapter.ConnectId;\r\n });\r\n\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n // manually update the chapter in the array because two-way biding doesn't work for some reason :)\r\n centralApprovalLists[index] = chapter;\r\n }\r\n\r\n _onDestroySubscription = $scope.$on('$destroy', function () {\r\n titleService.changeInfoText('');\r\n ExecutionService.setIdOfExecutionToOpenFromQualityHandbookPage(null);\r\n\r\n if (_onDestroySubscription && typeof _onDestroySubscription === 'function')\r\n _onDestroySubscription();\r\n });\r\n\r\n init();\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QualityHandbookFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '$filter',\r\n '$q',\r\n 'DateUtilService',\r\n 'ExecutionFactory',\r\n '_'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .factory('QualityHandbookFactory', QualityHandbookFactory);\r\n\r\n function QualityHandbookFactory(\r\n $resource,\r\n baseUrlService,\r\n $filter,\r\n $q,\r\n DateUtilService,\r\n ExecutionFactory,\r\n _\r\n ) {\r\n var qualityHandbookFactory = {};\r\n\r\n var QualityHandbookTemplate = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookTemplate/:qualityHandbookTemplateId', { qualityHandbookTemplateId: '@id' }, { update: { method: 'PUT' } });\r\n var QualityHandbookProcessLists = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookProcessLists');\r\n var QualityHandbookTypes = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookTypes');\r\n var QualityHandbookStatuses = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookStatuses');\r\n var QualityHandbook = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbook/:qualityHandbookId', { qualityHandbookId: '@id' }, { update: { method: 'PUT' } });\r\n var QualityHandbookChapter = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapter');\r\n var QualityHandbookChapterDelete = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapterDelete');\r\n var QualityHandbookCategorySetting = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookCategorySetting');\r\n var QualityHandbookChapterExecute = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapterInitiate');\r\n var QualityHandbookUser = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookUser');\r\n var QualityHandbookChapterView = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapterView');\r\n var QualityHandbookApprove = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookApprove');\r\n var QualityHandbookChapterSign = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapterSign');\r\n var PersonalHandbookChapterSign = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/PersonalHandbookChapterSign');\r\n var QualityHandbookChapterSignRevised = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapterSignRevised');\r\n var ArchivedQualityHandbook = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/ArchivedQualityHandbook');\r\n var ApproveArchivedQualityHandbook = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/ApproveArchivedQualityHandbook');\r\n var ArchiveQualityHandbook = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/ArchiveQualityHandbook');\r\n var QualityHandbookChapterSorting = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookChapterSorting');\r\n var QualityHandbookProcessListsOrganizationWindow = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookProcessListsOrganizationWindow');\r\n var SigningFrequencyForQualityHandbook = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/SigningFrequencyForQualityHandbook');\r\n\r\n var CentralApprovalLists = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalLists');\r\n var CentralApprovalList = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalList');\r\n var CentralApprovalOrganizationInfo = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalOrganizationInfo');\r\n var CentralApprovalPrimaryContact = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalPrimaryContact');\r\n var CentralApprovalRevisionData = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalRevisionData');\r\n var CentralApprovalListView = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalListView');\r\n var CentralApprovalUsers = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalUsers');\r\n var CentralApprovalReferences = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/CentralApprovalReferences');\r\n var QualityHandbookById = $resource(baseUrlService.getBaseUrl() + 'REST/QualityHandbook.svc/QualityHandbookById/:qualityHandbookId');\r\n /**\r\n * Gets the quality handbook template\r\n * @param {} table \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbookTemplate = function (table) {\r\n return QualityHandbookTemplate.get({ table: table });\r\n };\r\n\r\n /**\r\n * Gets a new object for later to be saved\r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbookTemplateForSave = function () {\r\n return new QualityHandbookTemplate();\r\n };\r\n\r\n /**\r\n * Saves the quality handbook template\r\n * @param {} qualityHandbookTemplate \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.saveQualityHandbookTemplate = function (qualityHandbookTemplate) {\r\n if (qualityHandbookTemplate.id)\r\n return qualityHandbookTemplate.$update();\r\n return qualityHandbookTemplate.$save();\r\n };\r\n\r\n /**\r\n * Gets the lists for the given company's quality handbook\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbookProcessLists = function (organizationId) {\r\n return QualityHandbookProcessLists.query({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the quality handbook types\r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbookTypes = function () {\r\n return QualityHandbookTypes.query().$promise;\r\n };\r\n\r\n /**\r\n * Gets the quality handbook statuses\r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbookStatuses = function () {\r\n return QualityHandbookStatuses.query().$promise;\r\n };\r\n\r\n /**\r\n * Gets a new object for later to be saved\r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbookForSave = function () {\r\n return new QualityHandbook();\r\n };\r\n\r\n /**\r\n * Gets the quality handbook by the given parameters\r\n * @param {} organizationId \r\n * @param {} statusProgId \r\n * @param {} typeId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHandbook = function (organizationId, archived, typeId) {\r\n return QualityHandbook.query({ organizationId: organizationId, archived: archived, typeId: typeId }).$promise;\r\n };\r\n\r\n /**\r\n * Saves the given quality handbook\r\n * @param {} qualityHandbook \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.saveQualityHandbook = function (qualityHandbook, organizationId) {\r\n if (qualityHandbook.RevisionFrequency && qualityHandbook.RevisionFrequency.StartDate) {\r\n var startDate = new Date(qualityHandbook.RevisionFrequency.StartDate);\r\n startDate.setHours(0, 0, 0);\r\n qualityHandbook.RevisionFrequency.StartDate = DateUtilService.getLongWithOffset(startDate);\r\n }\r\n\r\n if (qualityHandbook.id)\r\n return qualityHandbook.$update({ organizationId: organizationId });\r\n\r\n return qualityHandbook.$save({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Saves the given chapter\r\n * @param {} categoryId \r\n * @param {} processListId \r\n * @param {} progId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.saveChapter = function (categoryId, processListId, progId) {\r\n if (!qualityHandbookFactory.qualityHandbookId)\r\n return $q.when({});\r\n\r\n var chapterToSave = new QualityHandbookChapter();\r\n\r\n chapterToSave.qualityHandbookId = qualityHandbookFactory.qualityHandbookId;\r\n chapterToSave.categoryId = categoryId;\r\n chapterToSave.processListId = processListId;\r\n chapterToSave.progId = progId;\r\n\r\n return chapterToSave.$save();\r\n };\r\n\r\n /**\r\n * Gets the chapter by the id\r\n * @param {} connectId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getChapter = function (connectId) {\r\n return QualityHandbookChapter.get({ connectId: connectId });\r\n };\r\n\r\n /**\r\n * Removes the list from quality handbook\r\n * @param {} connectId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.deleteQualityHanbookChapter = function (connectId) {\r\n var chapterDelete = new QualityHandbookChapterDelete();\r\n\r\n chapterDelete.connectId = connectId;\r\n\r\n return chapterDelete.$save();\r\n };\r\n\r\n /**\r\n * Gets the processlist category settings\r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getQualityHanbookCategorySetting = function () {\r\n return QualityHandbookCategorySetting.query().$promise;\r\n };\r\n\r\n /**\r\n * Add the given chapter to the quality handbook list of process lists\r\n * @param {} firstLevelCategory \r\n * @param {} processList \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.addChapter = function (firstLevelCategory, processList) {\r\n if (_.get(qualityHandbookFactory.type, 'ProgId') === 'PERSONAL_HANDBOOK' || _.get(qualityHandbookFactory.type, 'ProgId') === 'CENTRAL_APPROVAL' )\r\n return;\r\n\r\n\r\n var categoryToInsert;\r\n var existingCategory = $filter('filter')(qualityHandbookFactory.chapters, function (qc) { return qc.id == firstLevelCategory.id })[0];\r\n if (existingCategory) {\r\n\r\n if (!existingCategory.Executions)\r\n existingCategory.Executions = [];\r\n\r\n qualityHandbookFactory.saveChapter(firstLevelCategory.id, processList.id).then(function (result) {\r\n existingCategory.Executions.push({ InitiatedProcessList: processList, ConnectId: result.ConnectId });\r\n qualityHandbookFactory.onChapterAdd();\r\n });\r\n } else {\r\n categoryToInsert = angular.copy(firstLevelCategory);\r\n categoryToInsert.Children = [];\r\n\r\n qualityHandbookFactory.saveChapter(firstLevelCategory.id, processList.id).then(function (result) {\r\n categoryToInsert.Executions = [{ InitiatedProcessList: processList, ConnectId: result.ConnectId }];\r\n qualityHandbookFactory.chapters.push(categoryToInsert);\r\n qualityHandbookFactory.onChapterAdd();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Deletes the chapter\r\n * @param {} execution \r\n * @param {} firstLevelCategory \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.deleteChapter = function (execution, firstLevelCategory) {\r\n\r\n var executionFound = _.find(firstLevelCategory.Executions,\r\n function(item) {\r\n return item.ConnectId === execution.ConnectId;\r\n });\r\n\r\n var connectId = executionFound.ConnectId;\r\n\r\n var executionId = executionFound.id;\r\n\r\n var executionIndex = _.findIndex(firstLevelCategory.Executions, function(item) {\r\n return item.ConnectId === execution.ConnectId;\r\n }); \r\n\r\n firstLevelCategory.Executions.splice(executionIndex, 1);\r\n\r\n //if there are no lists and categories, remove the category\r\n if (firstLevelCategory.Executions.length == 0 && firstLevelCategory.Children.length == 0)\r\n qualityHandbookFactory.chapters.splice(qualityHandbookFactory.chapters.indexOf(firstLevelCategory), 1);\r\n\r\n if (qualityHandbookFactory.qualityHandbookId) {\r\n qualityHandbookFactory.deleteQualityHanbookChapter(connectId);\r\n if (executionId)\r\n ExecutionFactory.deactivateExecution(executionId);\r\n }\r\n };\r\n\r\n qualityHandbookFactory.setCategories = function (categories) {\r\n qualityHandbookFactory.chapters = categories;\r\n };\r\n\r\n /**\r\n * Creates the execution for the given properties\r\n * @param {} processListId \r\n * @param {} connectId \r\n * @param {} execution \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.saveChapterExecution = function (processListId, connectId, execution) {\r\n var chapterExecution = new QualityHandbookChapterExecute();\r\n chapterExecution.processListId = processListId;\r\n chapterExecution.connectId = connectId;\r\n chapterExecution.chapter = execution;\r\n\r\n return chapterExecution.$save();\r\n };\r\n\r\n qualityHandbookFactory.getQualityHandbookForUser = function (typeId, organizationId, userId) {\r\n return QualityHandbookUser.get({ typeId: typeId, organizationId: organizationId, userId: userId });\r\n };\r\n\r\n /**\r\n * Gets \r\n * @param {} executionId \r\n * @param {} qualityHandbookId \r\n * @param {} organizationId \r\n * @param {} userId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getChapterView = function (executionId, qualityHandbookId, organizationId, userId) {\r\n return QualityHandbookChapterView.get({\r\n executionId: executionId, qualityHandbookId: qualityHandbookId, organizationId: organizationId, userId: userId\r\n });\r\n };\r\n\r\n /**\r\n * Approves the given quality handbook\r\n * @param {} qualityHandbookId \r\n * @param {} signingFrequencyTable \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.approveQualityHandbook = function (qualityHandbookId, signingFrequencyTable, organizationId) {\r\n var approveQuality = new QualityHandbookApprove();\r\n\r\n approveQuality.qualityHandbookId = qualityHandbookId;\r\n approveQuality.signingFrequencyTable = signingFrequencyTable;\r\n approveQuality.organizationId = organizationId;\r\n\r\n return approveQuality.$save();\r\n };\r\n\r\n qualityHandbookFactory.signChapter = function (qualityHandbookId, chapter) {\r\n var chapterSign = new QualityHandbookChapterSign();\r\n\r\n chapterSign.qualityHandbookId = qualityHandbookId;\r\n chapterSign.chapter = chapter;\r\n\r\n return chapterSign.$save();\r\n };\r\n\r\n qualityHandbookFactory.signPersonalHandbookChapter = function (qualityHandbookId, chapter) {\r\n var chapterSign = new PersonalHandbookChapterSign();\r\n\r\n chapterSign.qualityHandbookId = qualityHandbookId;\r\n chapterSign.chapter = chapter;\r\n\r\n return chapterSign.$save();\r\n };\r\n\r\n qualityHandbookFactory.signPreviouslyRevised = function (qualityHandbookId) {\r\n var qualityHandbookChapterSignRevisedApiObject = new QualityHandbookChapterSignRevised();\r\n\r\n qualityHandbookChapterSignRevisedApiObject.id = qualityHandbookId;\r\n\r\n return qualityHandbookChapterSignRevisedApiObject.$save();\r\n }\r\n\r\n /**\r\n * Gets the archived quality handbook bt the given id\r\n * @param {} qualityHandbookId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getArchivedQualityHandbook = function (qualityHandbookId) {\r\n return ArchivedQualityHandbook.get({ qualityHandbookId: qualityHandbookId });\r\n };\r\n\r\n /**\r\n * Approves the archived quality handbook\r\n * @param {} qualityHandbookId \r\n * @param {} copyLists \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.approveArchivedQualityHandbook = function (qualityHandbookId, copyLists) {\r\n var approveArchived = new ApproveArchivedQualityHandbook();\r\n\r\n approveArchived.qualityHandbookId = qualityHandbookId;\r\n approveArchived.copyLists = copyLists;\r\n\r\n return approveArchived.$save();\r\n };\r\n\r\n qualityHandbookFactory.archiveQualityHandbook = function (qualityHandbookId) {\r\n var archiveQualityHandbookApiObject = new ArchiveQualityHandbook();\r\n\r\n archiveQualityHandbookApiObject.id = qualityHandbookId;\r\n\r\n return archiveQualityHandbookApiObject.$save();\r\n }\r\n\r\n qualityHandbookFactory.saveChaptersSorting = function (chapters) {\r\n var sorting = new QualityHandbookChapterSorting();\r\n\r\n sorting.chapters = chapters;\r\n\r\n return sorting.$save();\r\n };\r\n\r\n /**\r\n * Gets the process list used in quality handbook for organization window\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getProcessListsForOrganizationWindow = function (organizationId) {\r\n return QualityHandbookProcessListsOrganizationWindow.query({\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the central approval lists\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalLists = function (organizationId) {\r\n return CentralApprovalLists.query({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n qualityHandbookFactory.deleteCentralApprovalList = function (connectId) {\r\n var listToDelete = new CentralApprovalList();\r\n\r\n listToDelete.connectId = connectId;\r\n\r\n return listToDelete.$save();\r\n };\r\n \r\n /**\r\n * Gets the basic company info based on company info id provided\r\n * @param {} organizationId \r\n * @param {} detailed \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalCompanyInfo = function (organizationId, detailed) {\r\n return CentralApprovalOrganizationInfo.get({ organizationId: organizationId, detailed: detailed }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the primary contact based on the organization id provided\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalPrimaryContact = function (organizationId) {\r\n return CentralApprovalPrimaryContact.get({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the info about revision of the central approval\r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalRevisionData = function () {\r\n return CentralApprovalRevisionData.get({ foreignKey: qualityHandbookFactory.qualityHandbookId, table: qualityHandbookFactory.qualityHandbookTable }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the signing frequency for quality handbook. This is set by central company only\r\n */\r\n qualityHandbookFactory.getSigningFrequencyForQualityHandbook = function() {\r\n return SigningFrequencyForQualityHandbook.get().$promise;\r\n };\r\n\r\n /**\r\n * Gets the lists to be viewed\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalListView = function (organizationId) {\r\n return CentralApprovalListView.query({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the central approval users\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalUsers = function (organizationId) {\r\n return CentralApprovalUsers.query({\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the central references\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n qualityHandbookFactory.getCentralApprovalOrderReferences = function (organizationId) {\r\n return CentralApprovalReferences.query({\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n qualityHandbookFactory.getQualityHandbookById = function(qualityHandbookId) {\r\n return QualityHandbookById.get({ qualityHandbookId: qualityHandbookId}).$promise;\r\n };\r\n\r\n qualityHandbookFactory.qualityHandbookId = null;\r\n qualityHandbookFactory.qualityHandbookTable = null;\r\n qualityHandbookFactory.type = null;\r\n qualityHandbookFactory.chapters = [];\r\n qualityHandbookFactory.selectedQualityHandbookTab = null;\r\n\r\n return qualityHandbookFactory;\r\n };\r\n\r\n})();","(function () {\r\n angular.module('f5.report').directive('f5Report', function () {\r\n return {\r\n restrict: 'E',\r\n scope: true,\r\n link: function ($scope, element, attrs) {\r\n $scope.showList = true;\r\n },\r\n controller: ['$scope', '$resource', 'baseUrlService', '$sce', '$parse', function ($scope, $resource, baseUrlService, $sce, $parse) {\r\n //TODO: these can go into factory\r\n var ReportCreator = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/ReportCreator/:reportId', { reportId: '@id' }, { update: { method: 'PUT' } });\r\n var SearchComponents = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/ReportCreatorExecutor/:id', { id: '@reportId' }, { update: { method: 'PUT' } });\r\n var Pdf = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/GeneratePDF/');\r\n this.save = function (report) {\r\n if (report.id) {\r\n return report.$update();\r\n } else {\r\n return report.$save();\r\n }\r\n };\r\n //TODO: use download service\r\n window.downloadFile = function (sUrl) {\r\n\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n }\r\n\r\n /**\r\n * Generates a pdf for the given report\r\n * @param report\r\n */\r\n this.generatePdf = function (report) {\r\n var pdf = new Pdf();\r\n\r\n pdf.HTML = report.HTML;\r\n pdf.BaseUrl = baseUrlService.getBaseUrl() + 'css/main.css';\r\n var pdfBytes = pdf.$save();\r\n pdfBytes.then(function (result) {\r\n downloadFile(result.PdfUrl);\r\n });\r\n };\r\n\r\n /**\r\n * Sets up for saving later\r\n */\r\n this.newReport = function () {\r\n $scope.report = new ReportCreator();\r\n };\r\n\r\n /**\r\n * Gets the report for the given id\r\n * @param reportId\r\n */\r\n this.getReport = function (reportId) {\r\n $scope.report = ReportCreator.get({ reportId: reportId });\r\n };\r\n\r\n this.hideList = function () {\r\n $scope.showList = false;\r\n };\r\n\r\n this.showList = function () {\r\n $scope.showList = true;\r\n };\r\n\r\n this.getShowList = function () {\r\n return $scope.showList;\r\n };\r\n\r\n /**\r\n * Gets a list of reports\r\n */\r\n this.getReports = function () {\r\n $scope.reports = ReportCreator.query();\r\n };\r\n\r\n /**\r\n * Gets the search componets for the given report id\r\n * @param reportId\r\n * @returns\r\n */\r\n this.getSearchComponents = function (reportId) {\r\n return SearchComponents.get({ id: reportId });\r\n };\r\n\r\n /**\r\n * Executes the report based on the search componets\r\n * @param searchComponents\r\n * @returns\r\n */\r\n this.executeReport = function (searchComponents) {\r\n var sc = new SearchComponents();\r\n sc = searchComponents;\r\n return sc.$save();\r\n }\r\n\r\n this.trustJs = function (js) {\r\n return $sce.trustAsJs(js);\r\n };\r\n\r\n /**\r\n * Navigates to the given path\r\n * @param goTo\r\n */\r\n this.go = function (goTo) {\r\n $scope.go(goTo);\r\n }\r\n\r\n this.parse = function (str) {\r\n var t;\r\n t = $parse(str);\r\n return t;\r\n }\r\n }]\r\n }\r\n });\r\n\r\n})();","(function () {\r\n f5ReportCreator.$inject = [\r\n '$compile',\r\n 'F5ReportFactory',\r\n '$templateCache'\r\n ];\r\n\r\n angular.module('VBSmart').directive('f5ReportCreator', f5ReportCreator)\r\n .run([\"$templateCache\", function ($templateCache) {\r\n $templateCache.put(\"template/f5-reportCreatorList.html\",\r\n \"

\" +\r\n \"\" +\r\n \"
\" +\r\n \"
\" +\r\n \"  {{info.reportsHeading ? info.reportsHeading : 'Reports'}} \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \" \" +\r\n \"
{{'F5ReportsReportId' | translate}}{{'F5ReportsReportName' | translate}}{{'F5ReportsReportProgId' | translate }}{{'F5ReportsReportIsPublic' | translate }}
{{report.id}}{{report.Name}}{{report.ProgId}}{{report.IsPublic}}
\" +\r\n \"
\"\r\n );\r\n $templateCache.put(\"template/f5-reportCreator.html\",\r\n \"
\" +\r\n \"\" +\r\n \"\" +\r\n \"
\" +\r\n \"
\\n\" +\r\n \" {{'F5ReportsCreate' | translate}}\" +\r\n\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\\n\" +\r\n \"\");\r\n }]);\r\n\r\n function f5ReportCreator(\r\n $compile,\r\n F5ReportFactory,\r\n $templateCache\r\n ) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'template/f5-reportCreatorList.html',\r\n scope: {\r\n },\r\n controller: ['$scope', function ($scope) {\r\n $scope.reports = F5ReportFactory.getReports();\r\n }]\r\n , link: function ($scope, element, attrs, mainController) {\r\n /**\r\n * Changes the template and compiles it\r\n * @param template\r\n */\r\n $scope.changeTemplate = function (template) {\r\n if (template) {\r\n element.html($templateCache.get(template));\r\n $compile(element.contents())($scope);\r\n }\r\n };\r\n\r\n /**\r\n * Saves the given report\r\n * @param report\r\n */\r\n $scope.save = function (report) {\r\n var rep = F5ReportFactory.save(report);\r\n rep.then(function (value) {\r\n $scope.changeTemplate('template/f5-reportCreatorList.html');\r\n });\r\n };\r\n\r\n /**\r\n * Closes and the users gets redirected to the creator list\r\n */\r\n $scope.close = function () {\r\n $scope.changeTemplate('template/f5-reportCreatorList.html');\r\n };\r\n\r\n /**\r\n * Creates a new report\r\n */\r\n $scope.newReport = function () {\r\n $scope.report = F5ReportFactory.newReport();\r\n $scope.changeTemplate('template/f5-reportCreator.html');\r\n };\r\n\r\n /**\r\n * Opens a given report\r\n * @param reportId\r\n */\r\n $scope.openReport = function (reportId) {\r\n $scope.report = F5ReportFactory.getReport(reportId);\r\n $scope.changeTemplate('template/f5-reportCreator.html');\r\n };\r\n\r\n }\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n F5ReportFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('f5.report').factory('F5ReportFactory', F5ReportFactory);\r\n\r\n function F5ReportFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var SearchComponents = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/ReportCreatorExecutor/:id', { id: '@reportId' }, { update: { method: 'PUT' } });\r\n var ReportCreator = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/ReportCreator/:reportId', { reportId: '@id' }, { update: { method: 'PUT' } });\r\n var Attachment = $resource(baseUrlService.getBaseUrl() + 'REST/Attachment.svc/Attachment/:id', { id: '@id' });\r\n var DeviationsReport = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/DeviationsReport');\r\n var PrintCentralApprovalDocument = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/PrintCentralApprovalDocument');\r\n var GeneratedDateForReport = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/ReportGeneratedDate');\r\n var ReportPassword = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/ReportPassword');\r\n var DiplomaForUsers = $resource(baseUrlService.getBaseUrl() + 'REST/ReportCreator.svc/DiplomaForUsers');\r\n\r\n var f5ReportFactory = {};\r\n\r\n /**\r\n * Gets a list of reports\r\n * @returns\r\n */\r\n f5ReportFactory.getReports = function () {\r\n return ReportCreator.query();\r\n };\r\n\r\n /**\r\n * Gets report by a given report id\r\n * @param reportId\r\n * @returns\r\n */\r\n f5ReportFactory.getReport = function (reportId) {\r\n return ReportCreator.get({ reportId: reportId });\r\n };\r\n\r\n /**\r\n * Gets a new object to be saved laters\r\n * @returns\r\n */\r\n f5ReportFactory.newReport = function () {\r\n return new ReportCreator();\r\n };\r\n\r\n /**\r\n * Gets the search components for the given report id\r\n * @param reportId\r\n * @returns\r\n */\r\n f5ReportFactory.getSearchComponents = function (reportId) {\r\n return SearchComponents.get({ id: reportId });\r\n };\r\n\r\n /**\r\n * Executes the report for the given search components\r\n * @param searchComponents\r\n * @returns\r\n */\r\n f5ReportFactory.executeReport = function (searchComponents) {\r\n return searchComponents.$save();\r\n };\r\n\r\n /**\r\n * Saves the given report\r\n * @param report\r\n * @returns\r\n */\r\n f5ReportFactory.save = function (report) {\r\n if (report.id) {\r\n return report.$update();\r\n } else {\r\n return report.$save();\r\n }\r\n };\r\n\r\n /**\r\n * Returns a new attachment object to be saved later\r\n * @returns\r\n */\r\n f5ReportFactory.newAttachment = function () {\r\n return new Attachment();\r\n };\r\n\r\n /**\r\n * Saves the given attachment\r\n * @param attachment\r\n * @returns\r\n */\r\n f5ReportFactory.saveAttachment = function (attachment) {\r\n attachment.Table = \"GOT_REPORTCREATOR\";\r\n return attachment.$save();\r\n };\r\n\r\n /**\r\n * Deletes the given attachment\r\n * @param attachmentId\r\n * @returns\r\n */\r\n f5ReportFactory.deleteAttachment = function (attachmentId) {\r\n var a = new Attachment();\r\n a.id = attachmentId;\r\n return a.$delete();\r\n };\r\n\r\n /**\r\n * Generates the excel deviation report\r\n * @param userId\r\n * @param organizationId\r\n */\r\n f5ReportFactory.generateDeviationsExcelReport = function (userId, organizationId) {\r\n return DeviationsReport.save({ organizationId: organizationId }, {}).$promise.then(function (path) {\r\n location.href = baseUrlService.getBaseUrl() + path.GenerateDeviationsExcelReportResult;\r\n });\r\n };\r\n\r\n /**\r\n * Exports central approval document into a pdf document\r\n * @param {string} htmlDocument\r\n */\r\n f5ReportFactory.printCentralApprovalDocument = function (htmlDocument) { \r\n\r\n PrintCentralApprovalDocument.save({\r\n html: htmlDocument\r\n }).$promise\r\n .then(function (path) {\r\n var openedTab = window.open(baseUrlService.getBaseUrl() + path.PrintCentralApprovalDocumentResult, '_blank');\r\n\r\n // if the tab couldn't be opened because of the Ad/Popup blockers\r\n // open it in the same tab\r\n if (!openedTab)\r\n location.href = baseUrlService.getBaseUrl() + path.PrintCentralApprovalDocumentResult;\r\n });\r\n };\r\n\r\n f5ReportFactory.saveGeneratedDateForReport = function(reportProgId) {\r\n return GeneratedDateForReport.save({ reportProgId: reportProgId}).$promise;\r\n };\r\n\r\n f5ReportFactory.checkForOrganizationActiveUsersReportPassword = function(password) {\r\n return ReportPassword.save({password : password}).$promise;\r\n };\r\n\r\n f5ReportFactory.generateDiplomaForUsers = function (users, courseId) {\r\n return DiplomaForUsers.save({ courseId: courseId }, users).$promise;\r\n };\r\n\r\n return f5ReportFactory;\r\n }\r\n\r\n})();","(function () {\r\n f5ReportLink.$inject = [\r\n '$uibModal',\r\n 'F5ReportFactory',\r\n 'DownloadService',\r\n 'ProjectFactory',\r\n '$timeout',\r\n '$sce'\r\n ];\r\n\r\n angular.module('VBSmart').directive('f5ReportLink', f5ReportLink)\r\n .run([\"$templateCache\", function ($templateCache) {\r\n $templateCache.put(\"template/f5-reportLink.html\",\r\n \"\"\r\n );\r\n $templateCache.put(\"template/f5-reportLinkViewer.html\",\r\n \"
\" +\r\n \"
\" +\r\n \"\" +\r\n \"{{'F5ReportsPDF' | translate}}\" +\r\n \"\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"\" +\r\n \"
\" +\r\n \"
\"\r\n );\r\n }]);\r\n\r\n function f5ReportLink(\r\n $uibModal,\r\n F5ReportFactory,\r\n DownloadService,\r\n ProjectFactory,\r\n $timeout,\r\n $sce\r\n ) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'template/f5-reportLink.html',\r\n scope: {\r\n displayName: '@',\r\n reportId: '@',\r\n attributes: '@',\r\n objectId: '@',\r\n footerProgId: '=',\r\n showFooter: '=',\r\n showPageNumber: '=',\r\n generateZipWithAttachments: '=',\r\n onSendReportThroughEmailClick: '&?',\r\n onReportGenerationFinish: '&?'\r\n },\r\n\r\n link: function ($scope, element, attrs) {\r\n var modalInstance = {};\r\n var $printSection;\r\n\r\n $scope.htmlBlob = null;\r\n $scope.canSendReportThroughEmailButtonBeDisplayed = canSendReportThroughEmailButtonBeDisplayed;\r\n $scope.onSendReportThroughEmailClicked = onSendReportThroughEmailClicked;\r\n\r\n /**\r\n * Prints the hardcoded element\r\n */\r\n $scope.print = function () {//is this even used?\r\n printElement(document.getElementById(\"ptin\"));\r\n openNewPrintWindow();\r\n };\r\n\r\n $scope.trustAsHtml = function (content) {\r\n return $sce.trustAsHtml(content);\r\n }\r\n\r\n /**\r\n * Checks whether the download zip buton show be displayed\r\n * @returns {} \r\n */\r\n $scope.showDownloadZipButton = function () {\r\n switch ($scope.reportId) {\r\n case 'ProjectEndReport':\r\n return true;\r\n case 'Report_DeviationForEmail':\r\n return !!$scope.reportResult.ZipAttachmentsUrl;\r\n default:\r\n return false;\r\n }\r\n };\r\n\r\n /**\r\n * Downloads the zip file for the current report\r\n */\r\n $scope.openZipAttachments = function () {\r\n switch ($scope.reportId) {\r\n case 'ProjectEndReport':\r\n return ProjectFactory.getProjectAttachmentUrl($scope.objectId)\r\n .$promise\r\n .then(function (result) {\r\n DownloadService.download(result.URL);\r\n });\r\n case 'Report_DeviationForEmail':\r\n DownloadService.download($scope.reportResult.ZipAttachmentsUrl);\r\n break;\r\n }\r\n }\r\n\r\n var openNewPrintWindow = function () {\r\n var baseHTML = $scope.reportSource;\r\n\r\n var x = window.open();\r\n x.document.open();\r\n x.document.write(baseHTML);\r\n x.document.close();\r\n $printSection = {};\r\n }\r\n\r\n /**\r\n * Closes the current preview modal\r\n */\r\n $scope.close = function () {\r\n $scope.reportResult = \"\";\r\n modalInstance.dismiss('cancel');\r\n };\r\n\r\n /**\r\n * Prints the givve element\r\n * @param elem\r\n * @param append\r\n * @param delimiter\r\n */\r\n var printElement = function (elem, append, delimiter) {\r\n var domClone = elem.cloneNode(true);\r\n\r\n $printSection = document.getElementById(\"printSection\");\r\n\r\n if (!$printSection) {\r\n $printSection = document.createElement(\"div\");\r\n $printSection.id = \"printSection\";\r\n document.body.appendChild($printSection);\r\n }\r\n\r\n if (append !== true) {\r\n $printSection.innerHTML = \"\";\r\n } else if (append === true) {\r\n if (typeof (delimiter) === \"string\") {\r\n $printSection.innerHTML += delimiter;\r\n } else if (typeof (delimiter) === \"object\") {\r\n $printSection.appendChlid(delimiter);\r\n }\r\n }\r\n\r\n $printSection.appendChild(domClone);\r\n };\r\n\r\n function removeBootstrapCssRefForPdf() {\r\n $timeout(function () {\r\n\r\n while (document.getElementById('bootstrapRefForPDF')) {\r\n var linkElement = document.getElementById('bootstrapRefForPDF');\r\n // remove reference to bootstrap css for pdf to not mess up the ui\r\n linkElement.parentNode.removeChild(linkElement);\r\n }\r\n });\r\n };\r\n\r\n\r\n\r\n\r\n /**\r\n * Opens the given report\r\n * @param reportId\r\n */\r\n $scope.openReport = function (reportId) {\r\n var searchComponents = F5ReportFactory.getSearchComponents(reportId);\r\n\r\n searchComponents.$promise.then(function (result) {\r\n angular.forEach(result.SearchComponents, function (searchComponent) {\r\n angular.forEach($scope.$eval($scope.attributes), function (value, key) {\r\n if (key == searchComponent.id) {\r\n searchComponent.SelectedValue = value;\r\n }\r\n });\r\n });\r\n\r\n searchComponents.ShowFooter = $scope.showFooter;\r\n searchComponents.ShowPageNumber = $scope.showPageNumber;\r\n searchComponents.FooterProgId = $scope.footerProgId;\r\n searchComponents.GenerateZipWithAttachments = $scope.generateZipWithAttachments;\r\n\r\n var reportResult = F5ReportFactory.executeReport(searchComponents);\r\n reportResult.then(function (value) {\r\n notifyParentComponentAboutReportGenerationFinish();\r\n removeBootstrapCssRefForPdf();\r\n\r\n $scope.reportResult = value;\r\n $scope.reportSource = value.HTML;\r\n\r\n if (value.ChartObjects.length > 0) {\r\n\r\n angular.forEach(value.ChartObjects, function (value) {\r\n var scopeText = \"{\\\"type\\\":\\\"\" + value.ChartType + \"\\\"\";\r\n scopeText = scopeText + \",\\\"data\\\": {\\\"cols\\\":\" + value.ChartCols + \",\\\"rows\\\":\" + value.ChartData + \"},\\\"options\\\":\" + value.ChartOption + \"}\";\r\n $scope[value.ChartId] = JSON.parse(scopeText);\r\n });\r\n\r\n }\r\n\r\n //var newWindow = window.open('', '_blank');\r\n //newWindow.document.write($scope.reportSource);\r\n\r\n\r\n\r\n modalInstance = $uibModal.open({\r\n templateUrl: \"template/f5-reportLinkViewer.html\"\r\n , scope: $scope\r\n , size: 'x-lg'\r\n , windowClass: 'app-modal-window'\r\n });\r\n\r\n setTimeout(function () {\r\n\r\n\r\n var iframe = document.getElementById('reportFrame');\r\n var body = iframe.contentDocument.body;\r\n\r\n body.innerHTML = $scope.reportSource;\r\n }, 250);\r\n\r\n modalInstance.result.then(function () {\r\n $scope.$emit('onReportModalClosed');\r\n },\r\n function () {\r\n $scope.$emit('onReportModalClosed');\r\n });\r\n\r\n });\r\n });\r\n }\r\n\r\n function canSendReportThroughEmailButtonBeDisplayed() {\r\n\r\n // show the button only if a callback was sent\r\n return $scope.onSendReportThroughEmailClick &&\r\n typeof $scope.onSendReportThroughEmailClick === 'function';\r\n }\r\n\r\n function onSendReportThroughEmailClicked() {\r\n // notify the parent that the button was clicked\r\n $scope.onSendReportThroughEmailClick({\r\n reportData: $scope.reportSource\r\n });\r\n }\r\n\r\n function notifyParentComponentAboutReportGenerationFinish() {\r\n\r\n if ($scope.onReportGenerationFinish && typeof $scope.onReportGenerationFinish === 'function') {\r\n $scope.onReportGenerationFinish();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n})();","(function () {\r\n f5ReportViewer.$inject = [\r\n '$compile',\r\n 'F5ReportFactory',\r\n '$templateCache',\r\n '$routeParams',\r\n '$timeout',\r\n '$route',\r\n 'DeviationFactory',\r\n 'sessionInformationService',\r\n 'UserFactory',\r\n 'OrganizationUtilService',\r\n '_',\r\n '$location',\r\n 'DateUtilService'\r\n ];\r\n\r\n angular.module('f5.report')\r\n .directive('f5ReportViewer', f5ReportViewer)\r\n .run([\"$templateCache\", function ($templateCache) {\r\n $templateCache.put(\"template/f5-reportViewerList.html\", \"\");//<--- yup, if you remove it the report will fail :-( TODO:\r\n $templateCache.put(\"template/f5-search.html\",\r\n \"
\" +\r\n \"
\" +\r\n \"\" +\r\n \"\" +\r\n \"
\" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \" \" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\"\r\n );\r\n\r\n $templateCache.put(\"template/f5-reportViewerResult.html\",\r\n \"
\" +\r\n \" \" +\r\n \"{{'F5ReportsPDF' | translate}}\" +\r\n \"{{'F5ReportsCSV' | translate}}\" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\" +\r\n \"
\"\r\n );\r\n\r\n }]);\r\n\r\n function f5ReportViewer(\r\n $compile,\r\n F5ReportFactory,\r\n $templateCache,\r\n $routeParams,\r\n $timeout,\r\n $route,\r\n DeviationFactory,\r\n sessionInformationService,\r\n UserFactory,\r\n OrganizationUtilService,\r\n _,\r\n $location,\r\n DateUtilService\r\n ) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'template/f5-reportViewerList.html'\r\n , scope: {\r\n info: '=',\r\n infoid: '=',\r\n reportid: '=',\r\n dates: '=',\r\n onReportReady: '&'\r\n }\r\n , controller: [\r\n '$scope',\r\n 'titleService',\r\n '$filter',\r\n 'OrganizationFactory',\r\n '$rootScope',\r\n function (\r\n $scope,\r\n titleService,\r\n $filter,\r\n OrganizationFactory,\r\n $rootScope\r\n ) {\r\n $scope.reports = [];\r\n\r\n $scope.reportProgid = $routeParams.reportProgid;\r\n $scope.loggedUserOrganization = sessionInformationService.getUser().Organization;\r\n\r\n\r\n // for ReportOrderHoursTimeSpan and Report_DeviationsReport\r\n initDefaultSelectedOrganization();\r\n\r\n if ($scope.reportProgid) {\r\n\r\n titleService.changeTitle($filter('translate')($scope.reportProgid));\r\n $timeout(function () {\r\n $scope.openReport($scope.reportProgid);\r\n });\r\n }\r\n else {\r\n if ($scope.info.showList === 'true')\r\n $scope.reports = F5ReportFactory.getReports();\r\n if ($scope.info && $scope.info.public)\r\n $scope.info.public.forEach(function (item) {\r\n $scope[item] = \"\";\r\n });\r\n }\r\n\r\n $scope.reportResult = {};\r\n\r\n /**\r\n * Set up the default organization\r\n */\r\n function initDefaultSelectedOrganization() {\r\n if ($scope.reportProgid === \"Report_DeviationsReport\") {\r\n OrganizationFactory.getOrganizationsDropdown()\r\n .$promise\r\n .then(function (result) {\r\n $scope.organizationDropdown = _.filter(result, function (o) { return o.Settings && o.Settings.IsCentralAllowedToView; });\r\n\r\n if (!$scope.selectedOrganization)\r\n $scope.selectedOrganization = _.find($scope.organizationDropdown, function (o) { return o.id == sessionInformationService.getUser().Organization.id; });\r\n });\r\n } else\r\n $scope.selectedOrganization = sessionInformationService.getUser().Organization.id;\r\n }\r\n\r\n }]\r\n\r\n , link: function ($scope, element, attrs) {\r\n\r\n \r\n\r\n $scope.changeTemplate = function (template) {\r\n if (template) {\r\n element.html($templateCache.get(template));\r\n $compile(element.contents())($scope);\r\n }\r\n };\r\n\r\n $scope.go = function(url) {\r\n $location.path(url);\r\n };\r\n\r\n\r\n $scope.close = function () {\r\n //$scope.changeTemplate('template/f5-reportViewerList.html');\r\n $route.reload();\r\n };\r\n\r\n /**\r\n * Opens the given report\r\n * @param reportId\r\n */\r\n $scope.openReport = function (reportId) {\r\n\r\n if (reportId !== \"Report_DeviationsReport\") {\r\n $scope.reportSource = \"\";\r\n\r\n $scope.showExecute = true;\r\n $scope.SearchComponents = F5ReportFactory.getSearchComponents(reportId);\r\n }\r\n\r\n $scope.changeTemplate('template/f5-search.html');\r\n\r\n };\r\n\r\n /**\r\n * Executes the current report\r\n */\r\n $scope.executeReport = function () {\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if ($scope.reportProgid !== \"Report_DeviationsReport\") {\r\n $scope.execute()\r\n .then(function () {\r\n F5ReportFactory.saveGeneratedDateForReport($scope.reportProgid);\r\n $timeout(function() {\r\n var linkElement = document.getElementById('bootstrapRefForPDF');\r\n // remove reference to bootstrap css for pdf to not mess up the ui\r\n if (linkElement)\r\n linkElement.parentNode.removeChild(linkElement);\r\n });\r\n });\r\n } else {\r\n F5ReportFactory.generateDeviationsExcelReport(loggedUser.id, $scope.selectedOrganization.id);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Re executes the report with new parameters\r\n * @param searchParameters\r\n */\r\n $scope.reExecuteWithSearchParameters = function (searchParameters) {\r\n F5ReportFactory.getSearchComponents($scope.reportProgid)\r\n .$promise.then(function (result) {\r\n $scope.SearchComponents = result;\r\n angular.forEach($scope.SearchComponents.SearchComponents, function (searchComponent) {\r\n if (searchParameters[searchComponent.id])\r\n searchComponent.SelectedValue = searchParameters[searchComponent.id];\r\n else if ($scope.dates[searchComponent.id])\r\n searchComponent.SelectedValue = $scope.dates[searchComponent.id];\r\n\r\n });\r\n $scope.executeWithSearchComponents();\r\n })\r\n }\r\n\r\n /**\r\n * Executes the current report\r\n */\r\n $scope.execute = function () {\r\n $scope.showExecute = false;\r\n\r\n angular.forEach($scope.SearchComponents.SearchComponents, function (searchComponent) {\r\n if ($scope.dates[searchComponent.id])\r\n searchComponent.SelectedValue = moment(DateUtilService.getLongWithOffset($scope.dates[searchComponent.id]))\r\n .toISOString();\r\n else\r\n searchComponent.SelectedValue = document.getElementById(searchComponent.id).value;\r\n });\r\n\r\n return $scope.executeWithSearchComponents();\r\n\r\n };\r\n\r\n $scope.executeWithSearchComponents = function () {\r\n \r\n return F5ReportFactory.executeReport($scope.SearchComponents)\r\n .then(function (value) {\r\n $scope.reportSource = value.HTML;\r\n $scope.reportResult = value;\r\n\r\n if (value.ChartObjects.length > 0) {\r\n\r\n angular.forEach(value.ChartObjects, function (value) {\r\n var scopeText = \"{\\\"type\\\":\\\"\" + value.ChartType + \"\\\"\";\r\n scopeText = scopeText + \",\\\"data\\\": {\\\"cols\\\":\" + value.ChartCols + \",\\\"rows\\\":\" + value.ChartData + \"},\\\"options\\\":\" + value.ChartOption + \"}\";\r\n $scope[value.ChartId] = JSON.parse(scopeText);\r\n });\r\n\r\n }\r\n\r\n $scope.changeTemplate('template/f5-reportViewerResult.html');\r\n });\r\n \r\n };\r\n\r\n /**\r\n * Prints the element that has id 'printDiv'\r\n */\r\n $scope.print = function printElement() {\r\n var elem = document.getElementById(\"printDiv\");\r\n\r\n var domClone = elem.cloneNode(true);\r\n var delimiter = '';\r\n var append = false;\r\n var $printSection = document.getElementById(\"printSection\");\r\n\r\n if (!$printSection) {\r\n $printSection = document.createElement(\"div\");\r\n $printSection.id = \"printSection\";\r\n document.body.appendChild($printSection);\r\n }\r\n\r\n if (append !== true) {\r\n $printSection.innerHTML = \"\";\r\n } else if (append === true) {\r\n if (typeof (delimiter) === \"string\") {\r\n $printSection.innerHTML += delimiter;\r\n } else if (typeof (delimiter) === \"object\") {\r\n $printSection.appendChlid(delimiter);\r\n }\r\n }\r\n\r\n $printSection.appendChild(domClone);\r\n\r\n window.print();\r\n };\r\n\r\n\r\n $scope.browserPrint = function () {\r\n //print the \"print-section\" div\r\n var contents = document.getElementById(\"print-section\").innerHTML;\r\n\r\n var mywindow = window.open('', 'new div', 'height=2480,width=3508');\r\n mywindow.document.write('');\r\n mywindow.document.write('');\r\n mywindow.document.write('');\r\n mywindow.document.write('');\r\n mywindow.document.write('');\r\n mywindow.document.write('');\r\n mywindow.document.write(contents);\r\n mywindow.document.write('');\r\n mywindow.document.close();\r\n mywindow.focus();\r\n setTimeout(function () { mywindow.print(); }, 1000);\r\n\r\n };\r\n\r\n function getOrganizationId() {\r\n\r\n return OrganizationUtilService.getOrganizationIdForLoggedUser(sessionInformationService.getUser());\r\n\r\n };\r\n\r\n /**\r\n * Executes only the preview of the report\r\n * @param reportId\r\n * @param id\r\n */\r\n $scope.executeViewOnly = function (reportId, id) {\r\n $scope.showExecute = false;\r\n $scope.SearchComponents = F5ReportFactory.getSearchComponents(reportId);\r\n $scope.SearchComponents.$promise.then(function (searchComponents) {\r\n\r\n angular.forEach(searchComponents.SearchComponents, function (searchComponent) {\r\n searchComponent.SelectedValue = id;\r\n });\r\n searchComponents.ExcludePDF = true;\r\n var rep = F5ReportFactory.executeReport(searchComponents);\r\n rep.then(function (value) {\r\n $scope.reportResult = value;\r\n $scope.reportSource = value.HTML;\r\n\r\n if (value.ChartObjects.length > 0) {\r\n\r\n angular.forEach(value.ChartObjects, function (value) {\r\n var scopeText = \"{\\\"type\\\":\\\"\" + value.ChartType + \"\\\"\";\r\n scopeText = scopeText + \",\\\"data\\\": {\\\"cols\\\":\" + value.ChartCols + \",\\\"rows\\\":\" + value.ChartData + \"},\\\"options\\\":\" + value.ChartOption + \"}\";\r\n $scope[value.ChartId] = JSON.parse(scopeText);\r\n });\r\n\r\n }\r\n\r\n if ($scope.reportid === 'Report_ProjectProgressPlan' && $scope.callback && typeof ($scope.callback) === \"function\") {\r\n var organizationId = getOrganizationId();\r\n $scope.callback({\r\n organizationId: organizationId,\r\n reportSource: $scope.reportSource\r\n });\r\n }\r\n\r\n $timeout(function () {\r\n $scope.onReportReady();\r\n }, 500);\r\n\r\n });\r\n $scope.changeTemplate('template/f5-reportViewerResult.html');\r\n });\r\n };\r\n\r\n //only show the result if params are present\r\n if ($scope.info && $scope.reportid && $scope.infoid) {\r\n $scope.executeViewOnly($scope.reportid, $scope.infoid);\r\n }\r\n\r\n function onUsersComplete(results) {\r\n $scope.organizationUsers = results;\r\n }\r\n\r\n $scope.onOrganizationChanged = function (selectedOrganization) {\r\n\r\n if (selectedOrganization) {\r\n if ($scope.reportProgid !== \"Report_DeviationsReport\") {\r\n UserFactory.getUsersByOrganizationId(selectedOrganization, null).$promise.then(onUsersComplete);\r\n }\r\n else {\r\n // because ng-model not works... \r\n $scope.selectedOrganization = selectedOrganization;\r\n }\r\n\r\n }\r\n\r\n };\r\n }\r\n }\r\n }\r\n\r\n})();","/**\r\n * @description Google Chart Api Directive Module for AngularJS\r\n * @version 0.0.5\r\n * @author Nicolas Bouillon \r\n * @author GitHub contributors\r\n * @license MIT\r\n * @year 2013\r\n */\r\n(function (document, window) {\r\n 'use strict';\r\n\r\n angular.module('googlechart', [])\r\n\r\n .constant('googleChartApiConfig', {\r\n version: '1',\r\n optionalSettings: {\r\n packages: ['corechart']\r\n }\r\n })\r\n\r\n .provider('googleJsapiUrl', function () {\r\n var protocol = '';\r\n var url = '//www.google.com/jsapi';\r\n\r\n this.setProtocol = function (newProtocol) {\r\n protocol = newProtocol;\r\n };\r\n\r\n this.setUrl = function (newUrl) {\r\n url = newUrl;\r\n };\r\n\r\n this.$get = function () {\r\n return (protocol ? protocol : '') + url;\r\n };\r\n })\r\n\r\n .factory('googleChartApiProxy', ['$rootScope', '$q', 'googleChartApiConfig', 'googleJsapiUrl', function ($rootScope, $q, apiConfig, googleJsapiUrl) {\r\n var apiReady = $q.defer(),\r\n onLoad = function () {\r\n // override callback function\r\n var settings = {\r\n callback: function () {\r\n var oldCb = apiConfig.optionalSettings.callback;\r\n $rootScope.$apply(function () {\r\n apiReady.resolve();\r\n });\r\n\r\n if (angular.isFunction(oldCb)) {\r\n oldCb.call(this);\r\n }\r\n }\r\n };\r\n\r\n settings = angular.extend({}, apiConfig.optionalSettings, settings);\r\n\r\n window.google.load('visualization', apiConfig.version, settings);\r\n },\r\n head = document.getElementsByTagName('head')[0],\r\n script = document.createElement('script');\r\n\r\n script.setAttribute('type', 'text/javascript');\r\n script.src = googleJsapiUrl;\r\n head.appendChild(script);\r\n\r\n script.onreadystatechange = function () {\r\n if (this.readyState == 'complete') {\r\n onLoad();\r\n }\r\n };\r\n\r\n script.onload = onLoad;\r\n\r\n return function (fn, context) {\r\n var args = Array.prototype.slice.call(arguments, 2);\r\n return function () {\r\n apiReady.promise.then(function () {\r\n fn.apply(context, args.concat(Array.prototype.slice.call(arguments)));\r\n });\r\n };\r\n };\r\n }])\r\n\r\n .directive('googleChart', ['$timeout', '$window', '$rootScope', 'googleChartApiProxy', function ($timeout, $window, $rootScope, apiProxy) {\r\n return {\r\n restrict: 'A',\r\n scope: {\r\n chart: '=chart',\r\n onReady: '&',\r\n select: '&'\r\n },\r\n link: function ($scope, $elm, $attr) {\r\n // Watches, to refresh the chart when its data, title or dimensions change\r\n $scope.$watch('chart', function () {\r\n draw();\r\n }, true); // true is for deep object equality checking\r\n\r\n // Redraw the chart if the window is resized\r\n $rootScope.$on('resizeMsg', function (e) {\r\n $timeout(function () {\r\n // Not always defined yet in IE so check\r\n if ($scope.chartWrapper) {\r\n $scope.chartWrapper.draw();\r\n }\r\n });\r\n });\r\n\r\n function applyFormat(formatType, formatClass, dataTable) {\r\n\r\n if (typeof ($scope.chart.formatters[formatType]) != 'undefined') {\r\n if ($scope.formatters[formatType] == null) {\r\n $scope.formatters[formatType] = new Array();\r\n\r\n if (formatType === 'color') {\r\n for (var cIdx = 0; cIdx < $scope.chart.formatters[formatType].length; cIdx++) {\r\n var colorFormat = new formatClass();\r\n\r\n for (var i = 0; i < $scope.chart.formatters[formatType][cIdx].formats.length; i++) {\r\n var data = $scope.chart.formatters[formatType][cIdx].formats[i];\r\n\r\n if (typeof (data.fromBgColor) != 'undefined' && typeof (data.toBgColor) != 'undefined')\r\n colorFormat.addGradientRange(data.from, data.to, data.color, data.fromBgColor, data.toBgColor);\r\n else\r\n colorFormat.addRange(data.from, data.to, data.color, data.bgcolor);\r\n }\r\n\r\n $scope.formatters[formatType].push(colorFormat)\r\n }\r\n } else {\r\n\r\n for (var i = 0; i < $scope.chart.formatters[formatType].length; i++) {\r\n $scope.formatters[formatType].push(new formatClass(\r\n $scope.chart.formatters[formatType][i])\r\n );\r\n }\r\n }\r\n }\r\n\r\n\r\n //apply formats to dataTable\r\n for (var i = 0; i < $scope.formatters[formatType].length; i++) {\r\n if ($scope.chart.formatters[formatType][i].columnNum < dataTable.getNumberOfColumns())\r\n $scope.formatters[formatType][i].format(dataTable, $scope.chart.formatters[formatType][i].columnNum);\r\n }\r\n\r\n\r\n //Many formatters require HTML tags to display special formatting\r\n if (formatType === 'arrow' || formatType === 'bar' || formatType === 'color')\r\n $scope.chart.options.allowHtml = true;\r\n }\r\n }\r\n\r\n function draw() {\r\n if (!draw.triggered && ($scope.chart != undefined)) {\r\n draw.triggered = true;\r\n $timeout(function () {\r\n draw.triggered = false;\r\n\r\n if (typeof ($scope.formatters) === 'undefined')\r\n $scope.formatters = {};\r\n\r\n var dataTable;\r\n if ($scope.chart.data instanceof google.visualization.DataTable)\r\n dataTable = $scope.chart.data;\r\n else if (Array.isArray($scope.chart.data))\r\n dataTable = google.visualization.arrayToDataTable($scope.chart.data);\r\n else\r\n dataTable = new google.visualization.DataTable($scope.chart.data, 0.5);\r\n\r\n if (typeof ($scope.chart.formatters) != 'undefined') {\r\n applyFormat(\"number\", google.visualization.NumberFormat, dataTable);\r\n applyFormat(\"arrow\", google.visualization.ArrowFormat, dataTable);\r\n applyFormat(\"date\", google.visualization.DateFormat, dataTable);\r\n applyFormat(\"bar\", google.visualization.BarFormat, dataTable);\r\n applyFormat(\"color\", google.visualization.ColorFormat, dataTable);\r\n }\r\n\r\n\r\n var chartWrapperArgs = {\r\n chartType: $scope.chart.type,\r\n dataTable: dataTable,\r\n view: $scope.chart.view,\r\n options: $scope.chart.options,\r\n containerId: $elm[0]\r\n };\r\n\r\n if ($scope.chartWrapper == null) {\r\n $scope.chartWrapper = new google.visualization.ChartWrapper(chartWrapperArgs);\r\n google.visualization.events.addListener($scope.chartWrapper, 'ready', function () {\r\n $scope.chart.displayed = true;\r\n $scope.$apply(function (scope) {\r\n scope.onReady({ chartWrapper: scope.chartWrapper });\r\n });\r\n });\r\n google.visualization.events.addListener($scope.chartWrapper, 'error', function (err) {\r\n console.log(\"Chart not displayed due to error: \" + err.message);\r\n });\r\n google.visualization.events.addListener($scope.chartWrapper, 'select', function () {\r\n var selectedItem = $scope.chartWrapper.getChart().getSelection()[0];\r\n if (selectedItem) {\r\n $scope.$apply(function () {\r\n $scope.select({ selectedItem: selectedItem });\r\n });\r\n }\r\n });\r\n }\r\n else {\r\n $scope.chartWrapper.setChartType($scope.chart.type);\r\n $scope.chartWrapper.setDataTable(dataTable);\r\n $scope.chartWrapper.setView($scope.chart.view);\r\n $scope.chartWrapper.setOptions($scope.chart.options);\r\n }\r\n\r\n\r\n $timeout(function () {\r\n $scope.chartWrapper.draw();\r\n });\r\n }, 0, true);\r\n }\r\n }\r\n\r\n draw = apiProxy(draw, this);\r\n }\r\n };\r\n }])\r\n\r\n .run(['$rootScope', '$window', function ($rootScope, $window) {\r\n angular.element($window).bind('resize', function () {\r\n $rootScope.$emit('resizeMsg');\r\n });\r\n }]);\r\n\r\n})(document, window);","(function () {\r\n usersDropdown.$inject = [\r\n '$timeout'\r\n ];\r\n\r\n angular.module(\"f5.report\")\r\n .directive(\"usersDropdown\", usersDropdown);\r\n\r\n function usersDropdown(\r\n $timeout\r\n ) {\r\n\r\n return {\r\n restrict: \"A\",\r\n scope: {\r\n users: \"=usersDropdown\"\r\n },\r\n link: function ($scope, element, attrs) {\r\n\r\n /**\r\n * Gets the user full name\r\n * @param user\r\n * @returns\r\n */\r\n function getUserFullName(user) {\r\n\r\n var userFullName = \"\";\r\n\r\n if (user) {\r\n userFullName += (user.FirstName) ? user.FirstName + \" \" : \"\";\r\n userFullName += (user.LastName) ? user.LastName : \"\";\r\n }\r\n\r\n return userFullName;\r\n\r\n }\r\n\r\n /**\r\n * Builds the option elements with the users value\r\n * @param users\r\n * @returns\r\n */\r\n function buildDropdownContent(users) {\r\n\r\n var newHTML = \"\";\r\n\r\n for (var index = 0; index < users.length; index++) {\r\n var currentUser = users[index];\r\n\r\n if (index == users.length - 1) {\r\n newHTML += \"\";\r\n } else {\r\n newHTML += \"\" + \"
\";\r\n }\r\n\r\n }\r\n\r\n return newHTML;\r\n\r\n }\r\n\r\n $scope.$watch('users', function (newValue, oldValue) {\r\n\r\n if (newValue) {\r\n\r\n var currentOptions = element.find(\"option\");\r\n angular.element(currentOptions).remove();\r\n\r\n var newHTMLForDropdown = buildDropdownContent(newValue);\r\n element.html(newHTMLForDropdown);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n reportBuilderService.$inject = [\r\n 'ProcessListItemOptionTypes',\r\n '_'\r\n ];\r\n\r\n //TODO: Find a better way to split this service based on responsabilities\r\n /**\r\n * Service which contains common functionality for order report builder and project report builder \r\n */\r\n function reportBuilderService(\r\n ProcessListItemOptionTypes,\r\n _\r\n ) {\r\n var fakeImageStartId = -1;\r\n \r\n function canOptionBeDisplayedForQuestion(question) {\r\n\r\n if (!question) {\r\n return false;\r\n }\r\n\r\n if (!question.Option || !question.Option.Type || !question.Option.SelectedValue) {\r\n return false;\r\n }\r\n\r\n if (!(question.Option.Type.ProgId === ProcessListItemOptionTypes.String ||\r\n question.Option.Type.ProgId === ProcessListItemOptionTypes.Numeric)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function generateFakeImagesForImagesIncludedInReport(imagesIncludedInReport, imagesExcludedFromReport) {\r\n\r\n // find how much images are not fake (id > 0) in imagesExcludedFromReport\r\n var nrOfExcludedImages = _.filter(imagesExcludedFromReport, function(image) {\r\n return image.id > 0;\r\n }).length;\r\n\r\n // the nr. of excluded images represents how much fake images we must add to the included images list\r\n for (var index = 0; index < nrOfExcludedImages; index++) {\r\n imagesIncludedInReport.push({ id: fakeImageStartId-- });\r\n }\r\n }\r\n\r\n function generateFakeImagesForImagesExcludedFromReport(imagesExcludedFromReport, imagesIncludedInReport) {\r\n\r\n // find how much images are not fake (id > 0) in imageIncludedInReport\r\n var nrOfIncludedImages = _.filter(imagesIncludedInReport, function(image) {\r\n return image.id > 0;\r\n }).length;\r\n\r\n // the nr. of included images represents how much fake images we must add to the excluded images list\r\n for (var index = 0; index < nrOfIncludedImages; index++) {\r\n imagesExcludedFromReport.push({ id: fakeImageStartId-- });\r\n }\r\n }\r\n\r\n function generateFakeImages(imagesIncludedInReport, imagesExcludedFromReport) {\r\n\r\n if (!imagesIncludedInReport || !imagesExcludedFromReport) {\r\n return;\r\n }\r\n\r\n if (imagesIncludedInReport.length === 0 && imagesExcludedFromReport.length === 0) {\r\n return;\r\n }\r\n\r\n generateFakeImagesForImagesIncludedInReport(imagesIncludedInReport, imagesExcludedFromReport);\r\n generateFakeImagesForImagesExcludedFromReport(imagesExcludedFromReport, imagesIncludedInReport);\r\n }\r\n\r\n function removeFakeImagesFromList(images) {\r\n\r\n if (!images) {\r\n return;\r\n }\r\n \r\n _.remove(images,\r\n function(image) {\r\n return image.id < 0;\r\n });\r\n }\r\n\r\n function removeOneFakeImageFromList(images) {\r\n\r\n if (!images) {\r\n return;\r\n }\r\n\r\n // find first fake image index\r\n var firstFakeImageIndex = _.findIndex(images,\r\n function(image) {\r\n return image.id < 0;\r\n });\r\n\r\n if (firstFakeImageIndex === -1) {\r\n return;\r\n }\r\n\r\n images.splice(firstFakeImageIndex, 1);\r\n }\r\n\r\n function getFakeImage() {\r\n return { id: fakeImageStartId-- };\r\n }\r\n\r\n function isFakeImage(image) {\r\n return image && image.id < 0;\r\n }\r\n\r\n function moveFakeImagesToTheEnd(images) {\r\n\r\n if (!images || images.length === 0) {\r\n return;\r\n }\r\n\r\n // extract fake images by removing them\r\n var removedFakeImages = _.remove(images, function(image) {\r\n return image.id < 0;\r\n });\r\n \r\n // add the fake images to the end of the list\r\n removedFakeImages.forEach(function(fakeImage) {\r\n images.push(fakeImage);\r\n });\r\n }\r\n\r\n return {\r\n canOptionBeDisplayedForQuestion: canOptionBeDisplayedForQuestion,\r\n generateFakeImages: generateFakeImages,\r\n removeFakeImagesFromList: removeFakeImagesFromList,\r\n getFakeImage: getFakeImage,\r\n removeOneFakeImageFromList: removeOneFakeImageFromList,\r\n isFakeImage: isFakeImage,\r\n generateFakeImagesForImagesIncludedInReport: generateFakeImagesForImagesIncludedInReport,\r\n generateFakeImagesForImagesExcludedFromReport: generateFakeImagesForImagesExcludedFromReport,\r\n moveFakeImagesToTheEnd: moveFakeImagesToTheEnd\r\n };\r\n }\r\n\r\n angular\r\n .module('reportBuilder')\r\n .service('ReportBuilderService', reportBuilderService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('session')\r\n .service('AuthService', AuthService);\r\n\r\n AuthService.$inject = [\r\n '$route',\r\n '$localStorage',\r\n '$q',\r\n '$http',\r\n 'sessionInformationService',\r\n 'AppRoutes',\r\n 'AllAccessFactory',\r\n 'AllAccessPage',\r\n 'SessionFactory',\r\n 'PageRouteUtilService'\r\n ];\r\n\r\n function AuthService(\r\n $route,\r\n $localStorage,\r\n $q,\r\n $http,\r\n sessionInformationService,\r\n AppRoutes,\r\n AllAccessFactory,\r\n AllAccessPage,\r\n SessionFactory,\r\n PageRouteUtilService\r\n ) {\r\n var authService = {};\r\n\r\n authService.Ok = 0;\r\n authService.Forbidden = 1;\r\n authService.Demo = 2;\r\n\r\n authService.isAuthenticated = function () {\r\n var currentRoute = _.get($route.current, '$$route.originalPath');\r\n // if the route is login -> clear stored data\r\n if (currentRoute === '/login') {\r\n delete $localStorage.Session;\r\n delete $localStorage.User;\r\n delete $localStorage.Menus;\r\n delete $localStorage.SelectedMenu;\r\n\r\n return $q.when(authService.Ok);\r\n }\r\n\r\n var session = retrieveSessionFromStorage();\r\n\r\n // in case there is no route specified\r\n if (_.isEmpty(currentRoute)) {\r\n if (_.isEmpty(session))\r\n return $q.reject(authService.Forbidden);\r\n // session was filled when we called retrieve from storage\r\n $route.reload();\r\n\r\n return $q.when(authService.Ok);\r\n }\r\n\r\n // in case we don't find a session and we have a route\r\n if (_.isEmpty(session)) {\r\n // in case the route cannot be accessed without a session\r\n if (!_.some(AppRoutes.accessibleRoutesWithoutASession, function (p) { return p == currentRoute }))\r\n return $q.reject(authService.Forbidden);\r\n\r\n return $q.when(authService.Ok);\r\n }\r\n\r\n // if the user has full access -> we allow him to continue\r\n if (sessionInformationService.hasLoggedUserFullAccess())\r\n return $q.when(authService.Ok);\r\n\r\n // if the user is neither vb company nor vbsmart customer\r\n // show only the demo content\r\n if (sessionInformationService.hasLoggedUserAccessOnlyToDemoContent())\r\n return $q.reject(authService.Demo);\r\n\r\n // if the user is only vb company\r\n // we need to check the access to this route\r\n if (sessionInformationService.isLoggedUserOrganizationAVbOrganization()) {\r\n // if the route is demo we just resolve it\r\n if (currentRoute === '/demo-content')\r\n return $q.resolve(authService.Ok);\r\n\r\n var pagesToCheck = AllAccessFactory.getRouteAllAccessPages(currentRoute);\r\n\r\n pagesToCheck = handleManagementExecutionRoute(currentRoute, pagesToCheck);\r\n pagesToCheck = handleMyProfileRoute($route, currentRoute, pagesToCheck);\r\n\r\n // in case we get a no access\r\n // redirect the user to demo\r\n if (_.some(pagesToCheck, function (p) { return p === AllAccessPage.NoAccess }))\r\n return $q.reject(authService.Demo);\r\n\r\n // in case we are given access (this applies to help/login etc)\r\n if (_.some(pagesToCheck, function (p) { return p === AllAccessPage.AllowAccess }))\r\n return $q.resolve(authService.Ok);\r\n\r\n // check with the server if the user has at least access to one of these pages\r\n return SessionFactory.hasAllAccessToRoute(pagesToCheck)\r\n .then(function (result) {\r\n if (!!result && result.HasAccess)\r\n return $q.when(authService.Ok);\r\n\r\n return $q.reject(authService.Demo);\r\n });\r\n }\r\n\r\n return $q.when(authService.Ok);\r\n }\r\n\r\n function handleMyProfileRoute($route, currentRoute, pagesToCheck) {\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (currentRoute !== '/user/:userId?') {\r\n if (loggedUser.Group.ProgId !== 'ADMIN_ALL' && _.some([\r\n '/managementExecution/:foreignKey/:initiatedProcessListId/:itemId?',\r\n '/horizontalExecution/:initiatedProcessListId/:table/:foreignKey'\r\n ], function (r) { return r === currentRoute }) && _.every(pagesToCheck, function (p) { return p === AllAccessPage.Users})) {\r\n return [AllAccessPage.MyProfile];\r\n }\r\n return pagesToCheck;\r\n }\r\n\r\n // if the user is admin he is allowed to view my profile with page USERS\r\n if (loggedUser.Group.ProgId === 'ADMIN_ALL')\r\n return pagesToCheck;\r\n\r\n var routeParams = $route.current.params.userId;\r\n\r\n if (loggedUser.id === routeParams)\r\n return [AllAccessPage.MyProfile];\r\n\r\n return [AllAccessPage.NoAccess];\r\n }\r\n\r\n function handleManagementExecutionRoute(currentRoute, pages) {\r\n if (!_.some([\r\n '/managementExecution/:foreignKey/:initiatedProcessListId/:itemId?',\r\n '/horizontalExecution/:initiatedProcessListId/:table/:foreignKey'\r\n ], function (r) { return r === currentRoute }))\r\n return pages;\r\n\r\n var previousPage = PageRouteUtilService.getCurrentPageForExecution();\r\n\r\n if (_.isEmpty(previousPage))\r\n return [AllAccessPage.NoAccess];\r\n\r\n PageRouteUtilService.setCurrentPageForExecution(null);\r\n\r\n return [previousPage];\r\n }\r\n\r\n function retrieveSessionFromStorage() {\r\n if (!_.isEmpty(sessionInformationService.getSession()))\r\n return sessionInformationService.getSession();\r\n\r\n var session = $localStorage.Session;\r\n\r\n if (_.isEmpty(session))\r\n return null;\r\n\r\n session.User = $localStorage.User;\r\n session.User.Menus = $localStorage.Menus;\r\n $http.defaults.headers.common['user_session_id'] = session.SessionId;\r\n sessionInformationService.initSession(session);\r\n\r\n return session;\r\n }\r\n\r\n return authService;\r\n }\r\n})();","(function () {\r\n\r\n SessionUtils.$inject = [\r\n '$http',\r\n 'sessionInformationService',\r\n '$interval',\r\n 'loadingService',\r\n 'SessionFactory',\r\n 'menuService',\r\n '$localStorage'\r\n ];\r\n\r\n function SessionUtils(\r\n $http,\r\n sessionInformationService,\r\n $interval,\r\n loadingService,\r\n SessionFactory,\r\n menuService,\r\n $localStorage\r\n ) {\r\n\r\n var smartAgentStatusColor = 'darkgray';\r\n\r\n /**\r\n * Initiates a given session\r\n * @param {Session} session\r\n */\r\n function initSession(session) {\r\n\r\n if (!session)\r\n return;\r\n\r\n $http.defaults.headers.common['user_session_id'] = session.SessionId;\r\n sessionInformationService.initSession(session);\r\n\r\n }\r\n\r\n /**\r\n * Stores a given session in cookies\r\n * @param {Session} session\r\n */\r\n function storeSessionInCookies(session) {\r\n\r\n if (!session)\r\n return;\r\n\r\n var storedSession = angular.copy(session);\r\n storedSession.User = null;\r\n $localStorage.Session = storedSession;\r\n }\r\n\r\n /**\r\n * Stores a session's user in cookies\r\n * @param {Session} session\r\n */\r\n function storeSessionUserInCookies(session) {\r\n\r\n if (!session || !session.User)\r\n return;\r\n\r\n var storedUser = angular.copy(session.User);\r\n\r\n //keep only needed data\r\n storedUser = {\r\n id: storedUser.id,\r\n Email: storedUser.Email,\r\n FirstName: storedUser.FirstName,\r\n LastName: storedUser.LastName,\r\n Group: storedUser.Group,\r\n Language: storedUser.Language,\r\n Gdpr: storedUser.Gdpr,\r\n Organization: {\r\n id: storedUser.Organization.id,\r\n Central: storedUser.Organization.Central,\r\n Name: storedUser.Organization.Name,\r\n FrontPageReportId: storedUser.Organization.FrontPageReportId,\r\n IntegrationType: storedUser.Organization.IntegrationType,\r\n Settings: storedUser.Organization.Settings\r\n },\r\n Rights: storedUser.Rights,\r\n UserName: storedUser.UserName,\r\n Settings: storedUser.Settings\r\n };\r\n\r\n storedUser.Menus = null;\r\n $localStorage.User = storedUser;\r\n }\r\n\r\n /**\r\n * Stores in menus and in cookies the logged user's menus\r\n * @param {any} menus\r\n */\r\n function storeUserMenus(menus) {\r\n\r\n if (!menus || menus.length === 0)\r\n return;\r\n \r\n menuService.setMenus(angular.copy(menus));\r\n menuService.setSelectedMenu(angular.copy(menus[0]));\r\n\r\n }\r\n\r\n /**\r\n * Set the smart agent color based on the response we get\r\n */\r\n function setSmartAgentColor() {\r\n\r\n if (loadingService.requestCount == 0)\r\n loadingService.noLoader = true;\r\n\r\n SessionFactory.getSmartAgentStatus()\r\n .then(function (status) {\r\n\r\n switch (status.Status) {\r\n case 'SUCCESS':\r\n smartAgentStatusColor = '#7fa145';\r\n break;\r\n case 'WARNING':\r\n smartAgentStatusColor = '#ffa93c';\r\n break;\r\n case 'ERROR':\r\n smartAgentStatusColor = '#f95c30';\r\n break;\r\n default:\r\n smartAgentStatusColor = 'darkgray';\r\n break;\r\n }\r\n\r\n loadingService.noLoader = false;\r\n }, function () {\r\n smartAgentStatusColor = 'darkgray';\r\n loadingService.noLoader = false;\r\n });\r\n };\r\n\r\n /**\r\n * Set the interval for which to check the smart agent status\r\n */\r\n function setSmartAgentInterval() {\r\n setSmartAgentColor();\r\n return $interval(setSmartAgentColor, 600000);\r\n };\r\n\r\n function getSmartAgentStatusColor() {\r\n return smartAgentStatusColor;\r\n }\r\n \r\n return {\r\n getSmartAgentStatusColor: getSmartAgentStatusColor,\r\n initSession: initSession,\r\n setSmartAgentInterval: setSmartAgentInterval,\r\n storeSessionInCookies: storeSessionInCookies,\r\n storeSessionUserInCookies: storeSessionUserInCookies,\r\n storeUserMenus: storeUserMenus \r\n };\r\n }\r\n\r\n angular\r\n .module('session')\r\n .factory('SessionUtils', SessionUtils);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n SessionController.$inject = [\r\n '$scope',\r\n '$http',\r\n '$interval',\r\n '$rootScope',\r\n '$location',\r\n '$translate',\r\n '$route',\r\n '$document',\r\n '$window',\r\n 'loadingService',\r\n 'titleService',\r\n 'menuService',\r\n 'snapService',\r\n 'errorService',\r\n 'sessionInformationService',\r\n 'SessionFactory',\r\n 'OrganizationUtilService',\r\n 'UserFactory',\r\n 'SessionUtils',\r\n 'TranslateUtils',\r\n '_',\r\n 'dialogService',\r\n '$q',\r\n '$uibModal',\r\n '$localStorage',\r\n '$timeout',\r\n '$sessionStorage',\r\n 'TabUtilService',\r\n 'userDetailsTabset',\r\n 'coursesAndCompetencesTabset'\r\n ];\r\n\r\n angular.module('session').controller('SessionController', SessionController);\r\n\r\n function SessionController(\r\n $scope,\r\n $http,\r\n $interval,\r\n $rootScope,\r\n $location,\r\n $translate,\r\n $route,\r\n $document,\r\n $window,\r\n loadingService,\r\n titleService,\r\n menuService,\r\n snapService,\r\n errorService,\r\n sessionInformationService,\r\n SessionFactory,\r\n OrganizationUtilService,\r\n UserFactory,\r\n SessionUtils,\r\n TranslateUtils,\r\n _,\r\n dialogService,\r\n $q,\r\n $uibModal,\r\n $localStorage,\r\n $timeout,\r\n $sessionStorage,\r\n TabUtilService,\r\n userDetailsTabset,\r\n coursesAndCompetencesTabset\r\n ) {\r\n\r\n $scope.smartAgentStatusColor = \"darkgray\";\r\n $scope.recaptchaCheck = false;\r\n $scope.global = { currentLanguage: \"nb_NO\" };\r\n $scope.isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n $scope.gdprModalInstance = null;\r\n $scope.goToMyCompetences = goToMyCompetences;\r\n\r\n $scope.openVBIntranet = openVBIntranet;\r\n\r\n\r\n var smartAgentPromise;\r\n\r\n /**\r\n * When we are on project/quality page the menu can be collapsed/expanded\r\n * @returns {} \r\n */\r\n $scope.expandMenu = function () {\r\n return ($sessionStorage.isProjectPage || $sessionStorage.isQualityPage || $sessionStorage.isOrderPage) && $sessionStorage.menuCollapsed;\r\n };\r\n\r\n $scope.$watch(function () {\r\n return titleService.getTitle();\r\n }, function (data) {\r\n $scope.title = data;\r\n });\r\n\r\n $scope.$watch(function () {\r\n return titleService.getInfoText();\r\n }, function (data) {\r\n $scope.infoText = data;\r\n });\r\n\r\n $scope.isSnapOpen = snapService.getSnap();\r\n\r\n $scope.setSnap = function () {\r\n snapService.setSnap();\r\n $scope.isSnapOpen = snapService.getSnap();\r\n };\r\n\r\n //if we have user stored refresh page\r\n if ($localStorage.User != undefined) {\r\n reloadPage();\r\n } else {\r\n\r\n if ($location.path() !== '/intranett-login')\r\n if (!isCurrentRouteAllowed($location.path()))\r\n $location.path(\"/login\");\r\n }\r\n\r\n if ($localStorage.SelectedOrganizationId != undefined) {\r\n OrganizationUtilService.setOrganizationId($localStorage.SelectedOrganizationId);\r\n }\r\n\r\n //var intranetSession = $localStorage.intranetSession;\r\n //var weHaveIntranetSession = !!_.get(intranetSession, 'id_token');\r\n\r\n //if (weHaveIntranetSession)\r\n // $scope.openVBIntranet();\r\n\r\n oidcIntranett.signinRedirectCallback().then(function (result) {\r\n if (!!$localStorage.isOpeningIntranett) {\r\n delete $localStorage.isOpeningIntranett;\r\n window.open('https://intranett.vb.no', '_blank');\r\n $location.hash('');\r\n } else if (!!$localStorage.isLoggingFromIntranett || !!$localStorage.isLoggingViaIntranett) {\r\n delete $localStorage.isLoggingFromIntranett;\r\n\r\n console.log('Dextro opened from intranett');\r\n console.log(result);\r\n\r\n autoLogin(result.profile)\r\n\r\n $location.hash('');\r\n }\r\n }).catch(function (err) {\r\n //console.error(err);\r\n console.log('No intranett session discovered');\r\n });\r\n\r\n function autoLogin(userProfile) {\r\n var intranettCompanyId = userProfile['RepresentingCompany'];\r\n var intranettUsername = userProfile['preferred_username'];\r\n\r\n SessionFactory.intranettLogin(intranettUsername, intranettCompanyId)\r\n .then(function (session) {\r\n handleLogin(false, session, false);\r\n })\r\n .catch(function (err) {\r\n console.log(err);\r\n $location.path('login');\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Checks if the current route is allowed to be accessed without being logged in\r\n * @param {string} currentPath\r\n */\r\n function isCurrentRouteAllowed(currentPath) {\r\n\r\n if (!currentPath)\r\n return false;\r\n\r\n var firstPathSegment = currentPath.substring(0, (currentPath.substring(1).indexOf('/') + 1));\r\n\r\n var allowedPaths = [\r\n '/deviation-external-input',\r\n '/rp-meeting-confirmation',\r\n '/gdpr-confirm',\r\n '/gdpr-delete-confirm',\r\n '/gdpr-private-customer',\r\n '/course-invitation',\r\n '/intranett-login'\r\n ];\r\n\r\n if (_.some(allowedPaths, function (p) { return p == firstPathSegment }))\r\n return true;\r\n\r\n //if (firstPathSegment === '/deviation-external-input' ||\r\n // firstPathSegment === '/rp-meeting-confirmation')\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Init the user and http requests with the necessary data\r\n */\r\n function initUser() {\r\n $http.defaults.headers.common['user_session_id'] = $localStorage.Session.SessionId;\r\n\r\n //$scope.loggedUser = $cookieStore.get('User');\r\n $scope.loggedUser = $localStorage.User;\r\n\r\n if ($scope.loggedUser.Organization.Central && $scope.loggedUser.Group.ProgId == 'ADMIN')\r\n setSmartAgentInterval();\r\n\r\n if ($scope.loggedUser.Language) {\r\n changeLanguage($scope.loggedUser.Language);\r\n } else if ($http.defaults.headers.common['culture'] == null) {\r\n $http.defaults.headers.common['culture'] = \"en_US\";\r\n }\r\n };\r\n\r\n // TO-DO : Change all the calls to this function to the function from TranslateUtils\r\n // and put this $scope.global.currentLanguage = lang; where is necessary if is necessary\r\n /**\r\n * Changes the language\r\n * @param {any} lang\r\n */\r\n function changeLanguage(lang) {\r\n $scope.global.currentLanguage = lang;\r\n $http.defaults.headers.common['culture'] = $scope.global.currentLanguage;\r\n\r\n $translate.use($scope.global.currentLanguage);\r\n };\r\n\r\n function reloadPage() {\r\n $interval.cancel(smartAgentPromise); // cancel timeout\r\n initUser();\r\n };\r\n\r\n /**\r\n * Set the smart agent color based on the response we get\r\n */\r\n function setSmartAgentColor() {\r\n if (loadingService.requestCount == 0)\r\n loadingService.noLoader = true;\r\n SessionFactory.getSmartAgentStatus().then(function (status) {\r\n switch (status.Status) {\r\n case 'SUCCESS':\r\n $scope.smartAgentStatusColor = '#7fa145';\r\n break;\r\n case 'WARNING':\r\n $scope.smartAgentStatusColor = '#ffa93c';\r\n break;\r\n case 'ERROR':\r\n $scope.smartAgentStatusColor = '#f95c30';\r\n break;\r\n default:\r\n $scope.smartAgentStatusColor = 'darkgray';\r\n break;\r\n }\r\n\r\n loadingService.noLoader = false;\r\n }, function () {\r\n $scope.smartAgentStatusColor = 'darkgray';\r\n loadingService.noLoader = false;\r\n });\r\n };\r\n\r\n // TO-DO : Change all the calls of this method to the method from SessionUtils\r\n /**\r\n * Set the interval for which to check the smart agent status\r\n */\r\n function setSmartAgentInterval() {\r\n try {\r\n setSmartAgentColor();\r\n smartAgentPromise = $interval(setSmartAgentColor, 600000);\r\n } catch (ex) {\r\n console.dir(ex);\r\n $scope.smartAgentStatusColor = 'darkgray';\r\n loadingService.noLoader = false;\r\n }\r\n };\r\n\r\n /**\r\n * Initiates the user after login\r\n */\r\n function initUserAfterLogin() {\r\n\r\n $scope.loggedUser = sessionInformationService.getUser();\r\n\r\n if ($scope.loggedUser.Organization.Central && $scope.loggedUser.Group.ProgId == 'ADMIN')\r\n smartAgentPromise = SessionUtils.setSmartAgentInterval();\r\n\r\n if ($scope.loggedUser.Language) {\r\n $scope.global.currentLanguage = $scope.loggedUser.Language;\r\n }\r\n\r\n TranslateUtils.changeLanguage($scope.loggedUser.Language);\r\n }\r\n\r\n $scope.getSmartAgentStatusColor = function () {\r\n return SessionUtils.getSmartAgentStatusColor();\r\n }\r\n\r\n /**\r\n * Checks whether the user is logged in\r\n * @returns {} \r\n */\r\n $scope.isLoggedIn = function () {\r\n if (sessionInformationService.getSession().SessionId) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * The user is logged out\r\n * Data is cleared from session storage\r\n * @param {} stopRedirect\r\n * @returns {} \r\n */\r\n $scope.logout = function (stopRedirect) {\r\n\r\n if (smartAgentPromise) {\r\n //cancel smart agent status timeout\r\n $interval.cancel(smartAgentPromise);\r\n }\r\n\r\n delete $localStorage.Session;\r\n delete $localStorage.User;\r\n delete $localStorage.Menus;\r\n delete $localStorage.SelectedMenu;\r\n delete $localStorage.SelectedOrganizationId;\r\n\r\n //reset the logged user\r\n $scope.loggedUser = undefined;\r\n\r\n if (!stopRedirect) {\r\n //redirect to login page\r\n $location.path(\"/login\");\r\n }\r\n\r\n //reset the session info\r\n sessionInformationService.resetInfo();\r\n\r\n //reset the selected organization id\r\n OrganizationUtilService.clearOrganizationId();\r\n\r\n //reset the title\r\n titleService.changeTitle('');\r\n };\r\n\r\n /**\r\n * Goes to my profile page\r\n * @returns {} \r\n */\r\n $scope.profileNavigation = function () {\r\n UserFactory.myProfilePage = true;\r\n\r\n $scope.go('/user/' + $scope.loggedUser.id);\r\n if (menuService.checkMenuAccess('/users'))\r\n menuService.setSelectedMenu(menuService.getParentMenuByHref('/users'), true);\r\n else\r\n menuService.setSelectedMenu(menuService.getMenuByHref('/home'));\r\n };\r\n\r\n $scope.goToGdprPage = function () {\r\n $location.path('/gdpr');\r\n };\r\n\r\n /**\r\n * Logs the user into the system\r\n * Saves necessary data in session storage\r\n * @param {} username \r\n * @param {} password \r\n * @param {} recaptchaResponse \r\n * @returns {} \r\n */\r\n $scope.login = function (username, password, recaptchaResponse, isShadow) {\r\n // This service's function returns a promise, but we'll deal with that shortly\r\n if (!username || !password)\r\n return $q.when();\r\n\r\n return SessionFactory.login(username, password, recaptchaResponse)\r\n .then(\r\n function (session) {\r\n handleLogin(false, session, isShadow);\r\n });\r\n };\r\n\r\n $scope.loginViaIntranett = function () {\r\n console.log('trying to get auth from intranett');\r\n $localStorage.isLoggingViaIntranett = true;\r\n\r\n oidcIntranett.signinRedirect({ state: 'state data' })\r\n .catch(function (err) {\r\n console.error(err);\r\n });\r\n }\r\n\r\n /**\r\n * Logs the user on a different company\r\n * Available only for multi organization access\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n $scope.shadowLogin = function (organizationId) {\r\n if (!organizationId)\r\n return;\r\n\r\n SessionFactory.shadowLogin(organizationId)\r\n .then(function (session) {\r\n handleLogin(true, session);\r\n $rootScope.$broadcast('onAfterShadowLogin');\r\n });\r\n };\r\n\r\n /**\r\n * Helper function for handling login\r\n * Login can be user login from login page, multi-organization login and impersonation login\r\n * @param {any} isShadowLogin\r\n * @param {any} session\r\n */\r\n function handleLogin(isShadowLogin, session, dontGoHome) {\r\n if (isShadowLogin)\r\n //log out to delete the old session\r\n $scope.logout();\r\n\r\n if (!isShadowLogin) {\r\n $scope.recaptchaCheck = false;\r\n\r\n if (!session.SessionId && session.User.RecaptchaCheck) {\r\n $scope.recaptchaCheck = true;\r\n return;\r\n }\r\n }\r\n\r\n SessionUtils.initSession(session);\r\n SessionUtils.storeSessionInCookies(session);\r\n SessionUtils.storeSessionUserInCookies(session);\r\n SessionUtils.storeUserMenus(session.User.Menus);\r\n\r\n initUserAfterLogin();\r\n\r\n if (session.User && session.User.Gdpr && !session.User.Gdpr.IsGdprAccepted && (!session.ImpersonatedByUser || !session.ImpersonatedByUser.id))\r\n showGdprModal();\r\n\r\n if (!dontGoHome) {\r\n $location.path('/home');\r\n //$timeout(function() {\r\n // $rootScope.$broadcast('onMenuItemSelected', menuService.getMenuByHref('/home'));\r\n //});\r\n }\r\n\r\n if (isShadowLogin)\r\n $route.reload();\r\n\r\n //clear errors\r\n errorService.setErrorForbidden(false);\r\n errorService.clearError();\r\n errorService.setErrorForbidden(true);\r\n };\r\n\r\n function showGdprModal() {\r\n $scope.gdprModalInstance = $uibModal.open({\r\n template: '',\r\n backdrop: 'static',\r\n size: 'lg',\r\n scope: $scope,\r\n windowClass: 'modal-ulg',\r\n keyboard: false\r\n });\r\n };\r\n\r\n $scope.closeGdprModal = function () {\r\n if (!$scope.gdprModalInstance)\r\n return;\r\n\r\n $scope.gdprModalInstance.close();\r\n }\r\n\r\n /**\r\n * Goes to the specified page\r\n * @param {} path \r\n * @returns {} \r\n */\r\n $scope.go = function (path) {\r\n $location.path(path);\r\n };\r\n\r\n //scroll to last element\r\n $scope.scrollToElement = function (id, duration, offset) {\r\n if (id > 0) {\r\n window.setTimeout(function () {\r\n var elem = angular.element(document.getElementById(id));\r\n $document.scrollToElementAnimated(elem, offset, duration);\r\n }, 250); // was 1000\r\n }\r\n };\r\n\r\n //scroll to top\r\n $scope.scrollToTop = function () {\r\n var top = 0; //pixels\r\n var duration = 1000; //milliseconds\r\n $document.scrollTop(top, duration);\r\n };\r\n\r\n //email pattern\r\n $scope.emailPattern = (function () {\r\n var regexp = /^([\\w.\\-\\_]{2,30})+@([\\w-\\_]{1,30})+([\\.]{1,1}[\\w]{1,30}|[\\.]{1,1})+([\\w]{1,10})$/;\r\n return {\r\n test: function (value) {\r\n return regexp.test(value);\r\n }\r\n };\r\n })();\r\n\r\n $scope.resetPassword = function (username, recaptchaResponse) {\r\n SessionFactory.resetPassword(username, recaptchaResponse);\r\n };\r\n\r\n $scope.resetLoggedUser = function () {\r\n $http.defaults.headers.common['user_session_id'] = \"\";\r\n $scope.loggedUser = null;\r\n };\r\n\r\n //RIGHTS\r\n $scope.hasRight = function (progId) {\r\n return sessionInformationService.hasAccess(progId);\r\n };\r\n\r\n $scope.isImpersonationActive = function () {\r\n var currentSession = sessionInformationService.getSession();\r\n\r\n return !_.isEmpty(currentSession.ImpersonatedByUser) && currentSession.ImpersonatedByUser.id;\r\n };\r\n\r\n $scope.getImpersonatedByFullName = function () {\r\n var currentSession = sessionInformationService.getSession();\r\n var impersonatedBy = currentSession.ImpersonatedByUser;\r\n\r\n if (_.isNil(impersonatedBy))\r\n return '';\r\n\r\n return impersonatedBy.FullName;\r\n };\r\n\r\n $scope.getImpersonatedByOrganizationName = function () {\r\n var currentSession = sessionInformationService.getSession();\r\n var impersonatedBy = currentSession.ImpersonatedByUser;\r\n\r\n if (_.isNil(impersonatedBy) || _.isNil(impersonatedBy.Organization))\r\n return '';\r\n\r\n return impersonatedBy.Organization.Name;\r\n };\r\n\r\n $scope.finishImpersonation = function () {\r\n return dialogService.showDialogWithInputs('COMMON.CONFIRM', 'USER_MODEL.ENTER_PASSWORD_FOR_CONFIRMATION', null, [\r\n { type: 'password', model: null, label: 'COMMON.PASSWORD', inputType: 'input', name: 'passwordInput' }\r\n ]).then(function (result) {\r\n if (!result || (result && result.result != dialogService.DIALOG_RESULT_OK))\r\n return $q.when(null);\r\n\r\n var resultedInputs = result.inputs;\r\n\r\n if (_.isNil(resultedInputs) || _.isEmpty(resultedInputs))\r\n return $q.when();\r\n\r\n var password = _.first(resultedInputs).model;\r\n\r\n var currentSession = sessionInformationService.getSession();\r\n var impersonatedBy = currentSession.ImpersonatedByUser;\r\n\r\n return $scope.login(impersonatedBy.UserName, password, null, true);\r\n })\r\n .then(function () {\r\n $route.reload();\r\n });\r\n };\r\n\r\n function onLogoutListener() {\r\n $scope.logout(false);\r\n }\r\n\r\n function goToMyCompetences() {\r\n\r\n if (menuService.checkMenuAccess('/users'))\r\n menuService.setSelectedMenu(menuService.getParentMenuByHref('/users'), true);\r\n else\r\n menuService.setSelectedMenu(menuService.getMenuByHref('/home'));\r\n\r\n TabUtilService.setCurrentTab(TabUtilService.pages.USER_DETAIL, userDetailsTabset.coursesAndCompetences);\r\n TabUtilService.setCurrentTab(TabUtilService.pages.COURSES_AND_COMPETENCES_TAB, coursesAndCompetencesTabset.competences);\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n $scope.go('/user/' + loggedUser.id);\r\n }\r\n\r\n // listen for created sessions\r\n // we need this because we must init $scope.loggedUser after the session was created\r\n var onSessionCreatedDeregistration = $scope.$on('onSessionCreatedFromRpMeetingInvitation', initUserAfterLogin);\r\n var onSessionCreatedFromCourseInvitationDeregistration = $scope.$on('onSessionCreatedFromCourseInvitation', initUserAfterLogin);\r\n var onLogOutDeregistration = $scope.$on('onLogout', onLogoutListener);\r\n\r\n var shadowLoginDeregistration = $scope.$on('onShadowLogin', function (result1, result2, result3, result4) {\r\n handleLogin(result2, result3, result4);\r\n });\r\n\r\n function openVBIntranet() {\r\n //var intranetSession = $localStorage.intranetSession;\r\n //var weHaveIntranetSession = !!_.get(intranetSession, 'id_token');\r\n\r\n //if (!!weHaveIntranetSession)\r\n // $uibModal.open({\r\n // component: 'vbIntranetPopup',\r\n // backdrop: 'static',\r\n // size: 'lg',\r\n // scope: $scope,\r\n // windowClass: 'modal-100 modal-primary',\r\n // keyboard: false\r\n // })\r\n //else {\r\n // loginIntoIntranet();\r\n //}\r\n\r\n loginIntoIntranet();\r\n }\r\n\r\n function loginIntoIntranet() {\r\n $localStorage.isOpeningIntranett = true;\r\n\r\n oidcIntranett.signinRedirect({ state: 'state data' })\r\n .catch(function (err) {\r\n console.error(err);\r\n });\r\n }\r\n\r\n\r\n $scope.$on('$destroy', function handleDestroy() {\r\n onLogOutDeregistration();\r\n onSessionCreatedDeregistration();\r\n onSessionCreatedFromCourseInvitationDeregistration();\r\n shadowLoginDeregistration();\r\n });\r\n\r\n\r\n SessionFactory.shadowLoginCallback = $scope.shadowLogin;\r\n };\r\n\r\n})();\r\n//TODO: move to different file\r\n(function () {\r\n\r\n LoginController.$inject = [\r\n '$scope'\r\n ];\r\n\r\n angular.module('session').controller('LoginController', LoginController);\r\n\r\n function LoginController(\r\n $scope\r\n ) {\r\n $scope.resetLoggedUser();\r\n\r\n var recaptchaResponse;\r\n\r\n /**\r\n * Logs the user internally\r\n * If the recaptcha validation failed or if the user hasn't completed the recaptha ignore login\r\n * @returns {} \r\n */\r\n $scope.loginIntern = function () {\r\n if ($scope.recaptchaCheck && !recaptchaResponse)\r\n return;\r\n\r\n var username = $scope.newSession.UserName;\r\n var password = $scope.newSession.Password;\r\n\r\n $scope.login(username, password, recaptchaResponse);\r\n };\r\n\r\n $scope.recaptchaModel = {\r\n key: '6Ld7muwZAAAAAC2rdbrxSCeKT_CnSN19QHC0TbRY' //---> LIVE\r\n // key: '6Le0wQwUAAAAABjJYajnI2a2OQkEcpFva9DEVQa1' // --> LOCALHOST\r\n };\r\n\r\n /**\r\n * Resets the password and redirects the user back to login page\r\n * @returns {} \r\n */\r\n $scope.resetPasswordIntern = function () {\r\n if (!$scope.newSession)\r\n return;\r\n var username = $scope.newSession.UserName;\r\n $scope.resetPassword(username, recaptchaResponse);\r\n $scope.go('/login');\r\n };\r\n\r\n $scope.setResponse = function (response) {\r\n recaptchaResponse = response;\r\n };\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n\r\n sessionInformationService.$inject = [\r\n '$filter',\r\n 'userGroups'\r\n ];\r\n\r\n\r\n angular.module('session').service('sessionInformationService', sessionInformationService);\r\n\r\n /**\r\n * Service used for session handling\r\n * @param {any} $filter\r\n * @param {any} userGroups\r\n */\r\n function sessionInformationService(\r\n $filter,\r\n userGroups\r\n ) {\r\n var loggedUser = {};\r\n var session = {};\r\n\r\n return {\r\n resetInfo: function () {\r\n loggedUser = {};\r\n session = {};\r\n },\r\n\r\n resetLoggedUser: function (user) {\r\n loggedUser = user;\r\n session.User = user;\r\n },\r\n\r\n initSession: function (theSession) {\r\n session = theSession;\r\n loggedUser = theSession.User;\r\n },\r\n\r\n getUser: function () {\r\n return loggedUser;\r\n },\r\n\r\n getSession: function () {\r\n return session;\r\n },\r\n /**\r\n * Checks whether the user has access to the required right\r\n * @param {} rightProgId \r\n * @returns {} \r\n */\r\n hasAccess: function (rightProgId) {\r\n var hasRight = false;\r\n $filter('filter')(loggedUser.Rights, function (right) {\r\n if (right.ProgId == rightProgId && right.HasAccess && right.Table == 'GOT_RIGHT_USER_WEB')\r\n hasRight = true;\r\n });\r\n\r\n return hasRight;\r\n },\r\n /**\r\n * Checks whether an impersonation is active or not\r\n * @returns {} \r\n */\r\n isImpersonationActive: function () {\r\n return session && session.ImpersonatedByUser && session.ImpersonatedByUser.id;\r\n },\r\n\r\n getImpersonatingUser: function () {\r\n if (!session.ImpersonatedByUser)\r\n return {};\r\n\r\n return session.ImpersonatedByUser;\r\n },\r\n\r\n isLoggedUserOrganization: function(organizationId) {\r\n\r\n if (!organizationId || !loggedUser.Organization) {\r\n return false;\r\n }\r\n\r\n return organizationId === loggedUser.Organization.id;\r\n },\r\n\r\n isLoggedUserFromCentral: function() {\r\n\r\n if (!loggedUser.Organization) {\r\n return false;\r\n }\r\n\r\n return loggedUser.Organization.Central;\r\n },\r\n\r\n hasLoggedUserFullAccess: function() {\r\n\r\n if (!loggedUser.Organization || !loggedUser.Organization.Settings) {\r\n return false;\r\n }\r\n\r\n // if IsVBCustomer is true means the organization has a license thus has access to everything\r\n return loggedUser.Organization.Settings.IsVBCustomer;\r\n },\r\n\r\n hasLoggedUserAccessOnlyToDemoContent: function() {\r\n\r\n if (!loggedUser.Organization || !loggedUser.Organization.Settings) {\r\n return false;\r\n }\r\n\r\n return !loggedUser.Organization.Settings.IsVBOrganization &&\r\n !loggedUser.Organization.Settings.IsVBCustomer;\r\n },\r\n\r\n isLoggedUserOrganizationAVbOrganization: function () {\r\n\r\n if (!loggedUser.Organization || !loggedUser.Organization.Settings) {\r\n return false;\r\n }\r\n\r\n return loggedUser.Organization.Settings.IsVBOrganization;\r\n },\r\n\r\n isLoggedUserAdminFromCentral: function() {\r\n\r\n if (!loggedUser) {\r\n return false;\r\n }\r\n \r\n if (!loggedUser.Group) {\r\n return false;\r\n }\r\n\r\n return this.isLoggedUserFromCentral() &&\r\n loggedUser.Group.ProgId === userGroups.admin;\r\n },\r\n\r\n isUserLoggedUser: function(user) {\r\n\r\n if (!user || !user.id) {\r\n return false;\r\n }\r\n\r\n if (!loggedUser || !loggedUser.id) {\r\n return false;\r\n }\r\n\r\n return user.id === loggedUser.id;\r\n }\r\n };\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n\r\n angular.module('session').service('baseUrlService', baseUrlService);\r\n /**\r\n * Basic service used for url handling\r\n */\r\n function baseUrlService() {\r\n var baseUrl = \"\";\r\n\r\n return {\r\n getBaseUrl: function () {\r\n return baseUrl;\r\n },\r\n\r\n setBaseUrl: function (url) {\r\n baseUrl = url;\r\n }\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n SessionFactory.$inject = [\r\n '$resource',\r\n '$http',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('session').factory('SessionFactory', SessionFactory);\r\n\r\n function SessionFactory(\r\n $resource,\r\n $http,\r\n baseUrlService\r\n ) {\r\n var sessionFactory = {};\r\n\r\n var Session = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/Session/:sessionId', { sessionId: '@id' });\r\n var IntranettSession = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/IntranettSession');\r\n var ShadowLogin = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/ShadowLogin/:organizationId', { organizationId: '@organizationId' });\r\n var ResetPassword = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/ResetPassword');\r\n var SmartAgentStatus = $resource(baseUrlService.getBaseUrl() + 'REST/SmartAgent.svc/SmartAgentStatus');\r\n var ExternalSessionCheck = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/ExternalSessionCheck/:sessionId');\r\n var CreateSessionForUser = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/CreateSession');\r\n var ImpersonateSession = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/Impersonate');\r\n var CreateSessionForExternalSession = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/CreateSessionForExternal');\r\n var AllAccessRouteApi = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/AllAccessRoute/:page');\r\n var CreateLoginSessionForUserInvitedToCourse = $resource(baseUrlService.getBaseUrl() + 'REST/Security.svc/CreateLoginSessionForUserInvitedToCourse');\r\n\r\n /**\r\n * Makes the login request\r\n * @param {} username \r\n * @param {} password \r\n * @param {} recaptchaResponse \r\n * @returns {} \r\n */\r\n sessionFactory.login = function (username, password, recaptchaResponse) {\r\n var newSession = new Session();\r\n newSession.User = {};\r\n\r\n newSession.User.UserName = username;\r\n newSession.User.Password = password;\r\n return newSession.$save({\r\n recaptchaResponse: recaptchaResponse,\r\n isFromLoginPage: true\r\n });\r\n };\r\n\r\n sessionFactory.intranettLogin = function (intranettUsername, intranettCompanyId) {\r\n var intranettRequest = new IntranettSession();\r\n intranettRequest.Username = intranettUsername;\r\n intranettRequest.CompanyId = intranettCompanyId;\r\n\r\n return intranettRequest.$save();\r\n }\r\n\r\n /**\r\n * Makes the login request for multi organization access\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n sessionFactory.shadowLogin = function (organizationId) {\r\n var newShadowLogin = new ShadowLogin();\r\n return newShadowLogin.$save({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Makes the logout request\r\n * @param {} session \r\n * @returns {} \r\n */\r\n sessionFactory.logout = function (session) {\r\n var sessionToDelete = new Session();\r\n sessionToDelete.id = session.id;\r\n sessionToDelete.$delete();\r\n };\r\n\r\n /**\r\n * Resets the password for the provided username\r\n * @param {} username \r\n * @param {} recaptchaResponse \r\n * @returns {} \r\n */\r\n sessionFactory.resetPassword = function (username, recaptchaResponse) {\r\n var resetPassword = new ResetPassword();\r\n resetPassword.$get({ username: username, recaptchaResponse: recaptchaResponse });\r\n };\r\n\r\n /**\r\n * Gets the smart agent status\r\n * @returns {} \r\n */\r\n sessionFactory.getSmartAgentStatus = function () {\r\n return SmartAgentStatus.get().$promise;\r\n };\r\n\r\n /**\r\n * Checks if an external session expired\r\n * @param {} sessionId\r\n * @returns {}\r\n */\r\n sessionFactory.checkIfExternalSessionExpired = function (sessionId) {\r\n return ExternalSessionCheck.get({ sessionId: sessionId }).$promise;\r\n };\r\n\r\n /**\r\n * Creates a session for a user\r\n * @param {string} invitationId\r\n */\r\n sessionFactory.createSessionForUserFromInvitation = function (invitationId) {\r\n return CreateSessionForUser.save({ invitationId: invitationId }, {}).$promise;\r\n };\r\n\r\n /**\r\n * Creates a session for impersonating a user\r\n * @param {string} invitationId\r\n */\r\n sessionFactory.impersonate = function (userIdToImpersonate, password, reason) {\r\n var impersonateApiOject = new ImpersonateSession();\r\n\r\n impersonateApiOject.userIdToImpersonate = userIdToImpersonate;\r\n impersonateApiOject.password = password;\r\n impersonateApiOject.reason = reason;\r\n\r\n return impersonateApiOject.$save();\r\n };\r\n\r\n sessionFactory.loginUsingExternalSession = function (externalSessionId, password) {\r\n password = btoa(password);\r\n\r\n var createSessionApiObject = new CreateSessionForExternalSession();\r\n\r\n createSessionApiObject.externalSessionId = externalSessionId;\r\n createSessionApiObject.password = password;\r\n\r\n return createSessionApiObject.$save();\r\n }\r\n\r\n sessionFactory.hasAllAccessToRoute = function (page) {\r\n return AllAccessRouteApi.get({ page: page }).$promise;\r\n }\r\n\r\n sessionFactory.createLoginSessionForUserInvitedToCourse = function(externalSessionId) {\r\n return CreateLoginSessionForUserInvitedToCourse.save({ externalSessionId: externalSessionId}).$promise;\r\n };\r\n\r\n sessionFactory.shadowLoginCallback = null;\r\n\r\n return sessionFactory;\r\n };\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerContextOptionsService.$inject = [\r\n '$translate',\r\n 'ResourcePlannerService',\r\n 'sessionInformationService',\r\n '_',\r\n 'dialogService',\r\n '$filter',\r\n 'ResourcePlannerFactory'\r\n ];\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .service('ResourcePlannerContextOptionsService', ResourcePlannerContextOptionsService);\r\n\r\n function ResourcePlannerContextOptionsService(\r\n $translate,\r\n ResourcePlannerService,\r\n sessionInformationService,\r\n _,\r\n dialogService,\r\n $filter,\r\n ResourcePlannerFactory\r\n ) {\r\n var resourcePlannerInstance = {};\r\n\r\n this.setResourcePlannerInstance = function (resourcePlanner) {\r\n resourcePlannerInstance = resourcePlanner;\r\n };\r\n\r\n this.getOptionsForCut = function () {\r\n return [\r\n function ($itemScope) {\r\n if ($itemScope.$parent.task.Table == 'BOT_ORDER')\r\n return $translate.instant('txtMoveOrderToAnotherUser');\r\n\r\n return $translate.instant('txtCut'); // + ' ' + ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id ? '' : $itemScope.$parent.task.Name.split('|')[0]);\r\n },\r\n function ($itemScope, $event) {\r\n //set the action\r\n resourcePlannerInstance.currentRightClickAction = ResourcePlannerService.rightMenuActions.CUT;\r\n //keep a reference to the task\r\n resourcePlannerInstance.taskCopied = _.cloneDeep($itemScope.$parent.task);\r\n\r\n //activate the timeline\r\n resourcePlannerInstance.createActionTimeline = true;\r\n //hack to avoid the cursor from being anything else than auto\r\n resourcePlannerInstance.resetCursor();\r\n },\r\n function ($itemScope) {\r\n if ($itemScope.$parent.task.Parent && $itemScope.$parent.task.Parent.id)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.IsPrivate)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.Table == 'GOT_USER') //if the task is meeting, don't allow CUT\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForCopy = function () {\r\n return [\r\n function ($itemScope) {\r\n return $translate.instant('txtCopy') + ' ' + ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id ? '' : $itemScope.$parent.task.Name.split('|')[0]);\r\n },\r\n function ($itemScope, $event) {\r\n //set the action\r\n resourcePlannerInstance.currentRightClickAction = ResourcePlannerService.rightMenuActions.COPY;\r\n //keep a reference to the task\r\n resourcePlannerInstance.taskCopied = _.cloneDeep($itemScope.$parent.task);\r\n\r\n //activate the timeline\r\n resourcePlannerInstance.createActionTimeline = true;\r\n //hack to avoid the cursor from being anything else than auto\r\n resourcePlannerInstance.resetCursor();\r\n },\r\n function ($itemScope) {\r\n //if ($itemScope.$parent.task.Parent && $itemScope.$parent.task.Parent.id)\r\n //return false;\r\n\r\n if ($itemScope.$parent.task.IsPrivate)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.Table == 'GOT_USER') //if the task is meeting, don't allow COPY\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForDelete = function () {\r\n return [\r\n function ($itemScope) {\r\n //if the task is of type meeting\r\n //and the user assigned is the organizer\r\n //then set the text to Cancel meeting\r\n if ($itemScope.$parent.task.Table == 'GOT_USER' && $itemScope.$parent.task.CreatedBy && $itemScope.$parent.task.User.id == $itemScope.$parent.task.CreatedBy.id)\r\n return $translate.instant('txtCancelMeeting');\r\n\r\n return $translate.instant('txtDelete'); // + ' ' + ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id ? '' : $itemScope.$parent.task.Name.split('|')[0]);\r\n },\r\n function ($itemScope) {\r\n dialogService.showConfirmDialog('txtWarning', 'txtDeleteInResourcePlanner')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n ResourcePlannerFactory.delete($itemScope.$parent.task)\r\n .then(function () {\r\n resourcePlannerInstance.getTasks();\r\n });\r\n });\r\n },\r\n function ($itemScope) {\r\n if ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id)\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForDeleteAll = function () {\r\n return [\r\n function ($itemScope) {\r\n return $translate.instant('txtRemoveAllDatesForUser');\r\n },\r\n function ($itemScope) {\r\n dialogService.showConfirmDialog('txtWarning', 'txtDeleteAllInResourcePlanner')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n ResourcePlannerFactory.deleteAll($itemScope.$parent.task)\r\n .then(function () {\r\n resourcePlannerInstance.getTasks();\r\n });\r\n });\r\n },\r\n function ($itemScope) {\r\n if ($itemScope.$parent.task.Table != 'BOT_ORDER')\r\n return false;\r\n\r\n if ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id)\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForDeleteAllAndRemoveParticipant = function () {\r\n return [\r\n function ($itemScope) {\r\n return $translate.instant('txtRemoveAllDatesAndRemoveParticipant');\r\n },\r\n function ($itemScope) {\r\n dialogService.showConfirmDialog('txtWarning', 'txtDeleteAllAndDeleteParticipantsInResourcePlanner')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n ResourcePlannerFactory.deleteAllAndRemoveParticipants($itemScope.$parent.task)\r\n .then(function () {\r\n resourcePlannerInstance.getTasks();\r\n });\r\n });\r\n },\r\n function ($itemScope) {\r\n if ($itemScope.$parent.task.Table != 'BOT_ORDER')\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForDeleteDay = function () {\r\n return [\r\n function ($itemScope, $event) {\r\n return $translate.instant('txtDelete') + ' ' + $filter('date')(resourcePlannerInstance.getDayForDelete($event), 'dd MMM yyyy');\r\n }, function ($itemScope, $event) {\r\n dialogService.showConfirmDialog('txtWarning', 'txtDeleteDay')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n resourcePlannerInstance.deleteDay($itemScope.$parent.task, resourcePlannerInstance.getDayForDelete($event));\r\n });\r\n\r\n }, function ($itemScope, $event) {\r\n if ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.Table == 'GOT_USER') //if the task is meeting, don't allow DELETE DAY\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForDeleteHour = function () {\r\n return [\r\n function ($itemScope, $event) {\r\n if (resourcePlannerInstance.navigationMode.month)\r\n return null;\r\n return $translate.instant('txtDelete') + ' ' + $filter('date')(resourcePlannerInstance.getHourForDelete($event), 'dd MMM yyyy HH:00');\r\n }, function ($itemScope, $event) {\r\n resourcePlannerInstance.deleteHour($itemScope.$parent.task, resourcePlannerInstance.getHourForDelete($event));\r\n }, function ($itemScope) {\r\n if (resourcePlannerInstance.navigationMode.month)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.Table == 'GOT_USER') //if the task is meeting, don't allow DELETE HOUR\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForSplit = function () {\r\n return [\r\n function ($itemScope, $event) {\r\n return $translate.instant('txtSplitHere');\r\n }, function ($itemScope, $event) {\r\n dialogService.showConfirmDialog('txtConfirm', 'txtSureSplit')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return;\r\n\r\n var task = $itemScope.$parent.task;\r\n resourcePlannerInstance.split(task, resourcePlannerInstance.getHourForDelete($event)).then(function () {\r\n\r\n if (task.Table == 'BOT_ORDER') {\r\n ResourcePlannerFactory.askForPeriodisering(task.ForeignKey);\r\n }\r\n });\r\n });\r\n }, function ($itemScope) {\r\n\r\n if ($itemScope.$parent.task.IsPrivate && sessionInformationService.getUser().id != $itemScope.$parent.task.User.id)\r\n return false;\r\n\r\n if ($itemScope.$parent.task.Table == 'GOT_USER') //if the task is meeting, don't allow DELETE HOUR\r\n return false;\r\n\r\n return true;\r\n }\r\n ];\r\n };\r\n\r\n this.getOptionsForUnnasign = function () {\r\n return [\r\n function ($itemScope) { //unnasign order from user\r\n return $translate.instant('txtUnassignFromUser');\r\n },\r\n function ($itemScope) {\r\n ResourcePlannerFactory.deleteAllAndRemoveParticipants($itemScope.$parent.task)\r\n .then(function () {\r\n resourcePlannerInstance.getTasks();\r\n });\r\n },\r\n function ($itemScope) {\r\n if ($itemScope.$parent.task.Table != 'BOT_ORDER')\r\n return false;\r\n\r\n return _.find(resourcePlannerInstance.getOrderList(), function (o) { return o.id == $itemScope.$parent.task.ForeignKey });\r\n }\r\n ];\r\n };\r\n\r\n };\r\n})();","(function () {\r\n\r\n 'use strict';\r\n //TODO try to split\r\n ResourcePlannerController.$inject = [\r\n '$scope',\r\n '$filter',\r\n 'ResourcePlannerFactory',\r\n 'OrganizationFactory',\r\n 'UserFactory',\r\n '$q',\r\n 'DateUtilService',\r\n 'TaskListFactory',\r\n '$timeout',\r\n 'ResourcePlannerService',\r\n '$uibModal',\r\n '$interval',\r\n 'dialogService',\r\n 'OrderFactory',\r\n 'errorService',\r\n 'titleService',\r\n 'snapService',\r\n 'sessionInformationService',\r\n '$routeParams',\r\n 'OrganizationUtilService',\r\n 'ResourcePlannerSettingsFactory',\r\n '_',\r\n '$translate',\r\n 'ResourcePlannerContextOptionsService',\r\n 'UserUtilService'\r\n //Part of 10572 task\r\n //'OrganizationSettingFactory'\r\n ];\r\n\r\n angular.module('resourcePlanner').controller('ResourcePlannerController', ResourcePlannerController);\r\n\r\n function ResourcePlannerController(\r\n $scope,\r\n $filter,\r\n ResourcePlannerFactory,\r\n OrganizationFactory,\r\n UserFactory,\r\n $q,\r\n DateUtilService,\r\n TaskListFactory,\r\n $timeout,\r\n ResourcePlannerService,\r\n $uibModal,\r\n $interval,\r\n dialogService,\r\n OrderFactory,\r\n errorService,\r\n titleService,\r\n snapService,\r\n sessionInformationService,\r\n $routeParams,\r\n OrganizationUtilService,\r\n ResourcePlannerSettingsFactory,\r\n _,\r\n $translate,\r\n ResourcePlannerContextOptionsService,\r\n UserUtilService\r\n //Part of 10572 task\r\n //OrganizationSettingFactory\r\n ) {\r\n var vm = this;\r\n vm.navigationMode = {};\r\n vm.resourcePlanner = {}\r\n vm.resourcePlanner.createActionTimeline = false;\r\n vm.resourcePlanner.startHour = 7;\r\n vm.resourcePlanner.endHour = 17;\r\n vm.resourcePlanner.showTrash = false;\r\n vm.resourcePlanner.taskDetailPanel = false;\r\n vm.resourcePlanner.inactiveTasksPanel = false;\r\n vm.resourcePlanner.userGroupId = null;\r\n vm.resourcePlanner.fullDayFormat = false;\r\n vm.resourcePlanner.Date = angular.copy(ResourcePlannerFactory.selectedDate);\r\n vm.resourcePlanner.currentRightClickAction = null;\r\n vm.userViews = [];\r\n vm.allUsers = [];\r\n vm.menuCollapsed = ResourcePlannerFactory.menuCollapsed;\r\n vm.userListCollapsed = ResourcePlannerFactory.userListCollapsed;\r\n\r\n vm.onDateChange = onDateChange;\r\n vm.onUserCheckToggle = onUserCheckToggle;\r\n\r\n var intervalPromise = null;\r\n var settingsTable = \"BOT_RESOURCE_PLANNER\", userSettings = null;\r\n\r\n titleService.changeTitle($filter('translate')('Resource Planner'));\r\n\r\n /**\r\n * Sets the date to today\r\n */\r\n vm.setToday = function () {\r\n vm.resourcePlanner.Date = new Date();\r\n };\r\n\r\n /**\r\n * Clears all the tasks\r\n */\r\n function removeTaks() {\r\n for (var i = 0; i < vm.users.length; i++)\r\n vm.users[i].Tasks = [];\r\n };\r\n\r\n /**\r\n * Sets the navigation mode\r\n * @param day\r\n * @param workingDays\r\n * @param week\r\n * @param month\r\n */\r\n vm.setNavigationMode = function (day, workingDays, week, month) {\r\n vm.navigationMode.day = day;\r\n vm.navigationMode.workingDays = workingDays;\r\n vm.navigationMode.week = week;\r\n vm.navigationMode.month = month;\r\n\r\n var selectedUsers = $filter('filter')(vm.users, { Checked: 'true' });\r\n //remove the tasks when switching overviews\r\n if (selectedUsers && selectedUsers.length != 0)\r\n removeTaks();\r\n };\r\n\r\n /**\r\n * Gets the users for the current organization id\r\n * @returns\r\n */\r\n function getUsers() {\r\n return UserFactory.getUsersByOrganizationId(OrganizationUtilService.getOrganizationId(), null)\r\n .$promise.then(function (users) {\r\n\r\n users = $filter('filter')(users, function (u) { return u.Active });\r\n users = $filter('orderBy')(users, 'FirstName');\r\n\r\n vm.users = UserUtilService.setLoggedUserFirst(users, $scope.loggedUser.id);//set the logged user first in list\r\n vm.allUsers = angular.copy(users);\r\n //set all users checked\r\n for (var i = 0; i < users.length; i++)\r\n users[i].Checked = true;\r\n\r\n vm.getTasksForSelectedUsers();\r\n $timeout(function () {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n });\r\n\r\n if (vm.resourcePlanner.fullDayFormat)\r\n setStartEndHours();\r\n\r\n $scope.$broadcast('onGetUsersFromRPControllerResolved');\r\n });\r\n };\r\n\r\n /**\r\n * Sets up the interval for overview refresh\r\n * @param value\r\n */\r\n function initInterval(value) {\r\n if (intervalPromise) {\r\n $interval.cancel(intervalPromise);\r\n intervalPromise = null;\r\n }\r\n intervalPromise = $interval(function () {\r\n vm.getTasksForSelectedUsers();\r\n }, value);\r\n };\r\n\r\n vm.onIntervalChanged = function () {\r\n initInterval(vm.interval.time);\r\n };\r\n\r\n /**\r\n * Set up the default values for the interval\r\n */\r\n function setIntervalValues() {\r\n vm.resourcePlanner.interval = [\r\n { name: '2 min', time: 120000 },\r\n { name: '5 min', time: 300000 },\r\n { name: '10 min', time: 600000 }\r\n ];\r\n\r\n //if we have user settings, use the interval selected\r\n if (userSettings && userSettings.RefreshTime && userSettings.RefreshTime.ProgId)\r\n vm.interval = ResourcePlannerFactory.intervalSync = _.find(vm.resourcePlanner.interval, function (i) { return i.time == parseInt(userSettings.RefreshTime.ProgId) * 60000 });\r\n else\r\n vm.interval = ResourcePlannerFactory.intervalSync ? ResourcePlannerFactory.intervalSync : vm.resourcePlanner.interval[1];\r\n\r\n initInterval(vm.interval.time);\r\n };\r\n\r\n /**\r\n * Sets the properties of the user in the list of the users\r\n * @param user\r\n */\r\n function setUser(user) {\r\n for (var i = 0; i < vm.users.length; i++)\r\n if (vm.users[i].id == user.id) {\r\n var collapsed = vm.users[i].Collapsed;\r\n var lines = vm.users[i].Lines;\r\n vm.users[i] = user;\r\n vm.users[i].Collapsed = collapsed;\r\n vm.users[i].Lines = lines;\r\n }\r\n };\r\n\r\n /**\r\n * Sets the start and end date for current date\r\n */\r\n function setStartAndEndHourForCurrentDate() {\r\n\r\n if (vm.startDate) {\r\n vm.resourcePlanner.startDate = DateUtilService.setDate(angular.copy(vm.startDate), vm.resourcePlanner.startHour, 0, 0);\r\n }\r\n\r\n if (vm.endDate) {\r\n vm.resourcePlanner.endDate = DateUtilService.setDate(angular.copy(vm.endDate), vm.resourcePlanner.endHour, 0, 0);\r\n }\r\n };\r\n\r\n function removeAnyExistingTasks() {\r\n for (var i = 0; i < vm.users.length; i++)\r\n vm.users[i].Tasks = [];\r\n };\r\n\r\n /**\r\n * Gets the tasks for the selected users\r\n * @returns\r\n */\r\n vm.getTasksForSelectedUsers = function () {\r\n\r\n // this if fixes two issues:\r\n // - wrong tasks are retrieved in resource planner\r\n // - sometimes no task is rendered\r\n if (_.isNil(vm.startDate) || _.isNil(vm.endDate)) {\r\n return $q.when();\r\n }\r\n\r\n var deferred = $q.defer();\r\n var selectedUsers = $filter('filter')(vm.users, { Checked: 'true' });\r\n if (!selectedUsers && selectedUsers.length == 0) {\r\n //remove all tasks if no one is checked\r\n removeTaks();\r\n deferred.resolve();\r\n } else {\r\n var userIds = [], i = 0;\r\n for (i = 0; i < selectedUsers.length; i++)\r\n userIds.push(selectedUsers[i].id);\r\n\r\n //set the start hour and end hour for the current date\r\n setStartAndEndHourForCurrentDate();\r\n\r\n removeAnyExistingTasks(selectedUsers);\r\n ResourcePlannerFactory.getTasksForUsersBetweenDates(userIds.join('|'), vm.resourcePlanner.startDate, vm.resourcePlanner.endDate).then(function (result) {\r\n for (i = 0; i < result.length; i++) {\r\n result[i].Checked = true;\r\n setUser(result[i]);\r\n }\r\n\r\n deferred.resolve();\r\n $scope.$broadcast('onGetTasksForSelectedUsersResolved');\r\n });\r\n }\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the list of companies\r\n * @returns\r\n */\r\n function getOrganizationsDropdown() {\r\n var deferred = $q.defer();\r\n OrganizationFactory.getOrganizationsDropdown().$promise.then(function (result) {\r\n vm.organizations = _.filter(result, function (o) { return o.Settings && o.Settings.IsCentralAllowedToView; });\r\n vm.selectedOrganization = { id: OrganizationUtilService.getOrganizationId() };\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n vm.onOrganizationChange = function () {\r\n OrganizationUtilService.setOrganizationId(vm.selectedOrganization.id);\r\n vm.resourcePlanner.userGroupId = null;\r\n vm.resourcePlanner.getUsersView();\r\n };\r\n\r\n /**\r\n * Updates the tasks without sending email\r\n * @param task\r\n * @returns\r\n */\r\n vm.resourcePlanner.updateTaskListWithoutEmail = function (task) {\r\n if (!task.id) {\r\n return ResourcePlannerFactory.createOrderTask(task);\r\n }\r\n return TaskListFactory.updateTaskListWithoutEmail(task);\r\n };\r\n\r\n /**\r\n * Sets the start date and end date\r\n */\r\n function setStartEndHours() {\r\n if (vm.resourcePlanner.fullDayFormat) {\r\n vm.resourcePlanner.startHour = 0;\r\n vm.resourcePlanner.endHour = 24;\r\n } else {\r\n vm.resourcePlanner.startHour = 7;\r\n vm.resourcePlanner.endHour = 17;\r\n }\r\n if (!vm.navigationMode.month && vm.resourcePlanner.resizeFullDayFormat)\r\n vm.resourcePlanner.resizeFullDayFormat();\r\n };\r\n\r\n vm.set24hFormat = function () {\r\n vm.resourcePlanner.fullDayFormat = !vm.resourcePlanner.fullDayFormat;\r\n setStartEndHours();\r\n vm.getTasksForSelectedUsers();\r\n };\r\n\r\n /**\r\n * Gets the inactive tasks\r\n * @returns\r\n */\r\n function getInactiveTasks() {\r\n var selectedUsers = $filter('filter')(vm.users, { Checked: 'true' }), deferred = $q.defer();\r\n if (!selectedUsers || selectedUsers.length == 0) {\r\n vm.resourcePlanner.inactiveTasks = [];\r\n deferred.resolve();\r\n return deferred.promise;\r\n }\r\n var userIds = selectedUsers.map(function (selectedUser) { return selectedUser.id });\r\n ResourcePlannerFactory.getInactiveTasks(userIds.join('|'), vm.resourcePlanner.onlyTodaysTasks, vm.resourcePlanner.notInResourcePlanner).then(function (result) {\r\n vm.resourcePlanner.inactiveTasks = result;\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n vm.resourcePlanner.getInactiveTasks = getInactiveTasks;\r\n\r\n vm.showCollapseButton = ResourcePlannerService.showCollapseButton;\r\n\r\n /**\r\n * Toggles the display for inactive tasks\r\n */\r\n vm.showInactiveTasks = function () {\r\n if (vm.resourcePlanner.createActionTimeline)\r\n return;\r\n\r\n vm.resourcePlanner.inactiveTasksPanel = !vm.resourcePlanner.inactiveTasksPanel;\r\n\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideInRight');\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.remove('slideInRight');\r\n }, 1000);\r\n });\r\n //getInactiveTasks();\r\n };\r\n\r\n vm.createTask = function () {\r\n if (vm.resourcePlanner.createActionTimeline)\r\n return;\r\n\r\n vm.resourcePlanner.newTaskPanel = !vm.resourcePlanner.newTaskPanel;\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideInRight');\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.remove('slideInRight');\r\n }, 1000);\r\n });\r\n };\r\n\r\n vm.resourcePlanner.removeInactiveTaskByIndex = function (index) {\r\n vm.resourcePlanner.inactiveTasks.splice(index, 1);\r\n };\r\n\r\n vm.getFullName = function (user) {\r\n return (user.FirstName ? user.FirstName.trim() + ' ' : '') + (user.LastName ? user.LastName.trim() : '');\r\n };\r\n\r\n /**\r\n * Opens the modal with the order form\r\n */\r\n vm.createOrder = function () {\r\n if (vm.resourcePlanner.createActionTimeline)\r\n return;\r\n\r\n $scope.isFromResourcePlanner = true;\r\n $uibModal.open({\r\n scope: $scope,\r\n controller: 'OrderController',\r\n templateUrl: 'Scripts/order/orderPartial.html',\r\n size: 'x-lg'\r\n }).result\r\n .then(function () {\r\n vm.getTasksForSelectedUsers();\r\n },\r\n function () {\r\n vm.getTasksForSelectedUsers();\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Disables the given task\r\n * @param task\r\n */\r\n function deleteTask(task) {\r\n\r\n task.Active = false;\r\n\r\n var promise = null;\r\n if (task.Table == 'GOT_USER')//if the task is a meeting task, then remove the current user from the meeting\r\n promise = vm.resourcePlanner.removeParticipantsFromMeeting(task, [{ id: task.User.id }]);\r\n else//else delete the task as usual\r\n promise = vm.resourcePlanner.updateTaskListWithoutEmail(task);\r\n\r\n promise.then(function () {\r\n vm.getTasksForSelectedUsers();\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Deletes the day for the given task\r\n * @param task\r\n * @param dayToDelete\r\n */\r\n function deleteDay(task, dayToDelete) {\r\n var dayStart = angular.copy(dayToDelete);\r\n dayStart = DateUtilService.setDate(dayStart, 0, 0, 0);\r\n\r\n var dayEnd = angular.copy(dayToDelete);\r\n dayEnd = DateUtilService.setDate(dayEnd, 23, 59, 59);\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n // var parentTask = task.Parent && task.Parent.id ? angular.copy(task.Parent) : angular.copy(task);\r\n task.Active = true;\r\n if (taskStartDate < dayStart && taskEndDate > dayEnd) {\r\n var newTasks = [];\r\n\r\n var firstTask = angular.copy(task);\r\n // firstTask.StartDate = task.Parent && task.Parent.id ? task.StartDate : parentTask.StartDate;\r\n firstTask.EndDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayStart, -1), 23, 59, 59));\r\n //firstTask.Parent = parentTask;\r\n firstTask.Active = true;\r\n\r\n var secondTask = angular.copy(task);\r\n secondTask.id = null;\r\n secondTask.StartDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayEnd, 1), 0, 0, 0));\r\n // secondTask.EndDate = task.Parent && task.Parent.id ? task.EndDate : parentTask.EndDate;\r\n //secondTask.Parent = parentTask;\r\n secondTask.Active = true;\r\n\r\n newTasks = [firstTask, secondTask];\r\n vm.resourcePlanner.updateTaskListWithoutEmail(newTasks[0])\r\n .then(function () {\r\n return vm.resourcePlanner.updateTaskListWithoutEmail(newTasks[1]);\r\n })\r\n .then(function () {\r\n if (firstTask.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(firstTask.ForeignKey);\r\n\r\n vm.getTasksForSelectedUsers();\r\n });\r\n } else {\r\n if (taskStartDate < dayStart && taskEndDate <= dayEnd)\r\n task.EndDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayStart, -1), 23, 59, 59));\r\n\r\n if (taskStartDate >= dayStart && taskEndDate > dayEnd)\r\n task.StartDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayEnd, 1), 0, 0, 0));\r\n\r\n if (taskStartDate >= dayStart && taskEndDate <= dayEnd) {\r\n task.Active = false;\r\n }\r\n return vm.resourcePlanner.updateTaskListWithoutEmail(task)\r\n .then(function () {\r\n if (task.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(task.ForeignKey);\r\n\r\n vm.getTasksForSelectedUsers();\r\n });\r\n }\r\n };\r\n\r\n function split(task, date) {\r\n var splitDate = DateUtilService.setDate(date, date.getHours(), date.getMinutes(), date.getSeconds());\r\n\r\n var firstTask = angular.copy(task);\r\n firstTask.EndDate = DateUtilService.getLongWithOffset(splitDate);\r\n\r\n var secondTask = angular.copy(task);\r\n secondTask.id = null;\r\n secondTask.StartDate = DateUtilService.getLongWithOffset(splitDate);\r\n\r\n return Promise.all([vm.resourcePlanner.updateTaskListWithoutEmail(firstTask), vm.resourcePlanner.updateTaskListWithoutEmail(secondTask)])\r\n .then(function () {\r\n return vm.getTasksForSelectedUsers();\r\n });\r\n }\r\n\r\n /**\r\n * Delets the hour for the given task\r\n * @param task\r\n * @param hourToDelete\r\n */\r\n function deleteHour(task, hourToDelete) {\r\n var dayStart = DateUtilService.setDate(hourToDelete, hourToDelete.getHours(), 0, 0);\r\n var dayEnd = DateUtilService.setDate(hourToDelete, hourToDelete.getHours() + 1, 0, 0);\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n // var parentTask = task.Parent && task.Parent.id ? angular.copy(task.Parent) : angular.copy(task);\r\n task.Active = true;\r\n\r\n if (taskStartDate < dayStart && taskEndDate > dayEnd) {\r\n var newTasks = [];\r\n\r\n var firstTask = angular.copy(task);\r\n // firstTask.StartDate = task.Parent && task.Parent.id ? task.StartDate : parentTask.StartDate;\r\n firstTask.EndDate = DateUtilService.getLongWithOffset(dayStart);\r\n // firstTask.Parent = parentTask;\r\n firstTask.Active = true;\r\n\r\n var secondTask = angular.copy(task);\r\n secondTask.id = null;\r\n secondTask.StartDate = DateUtilService.getLongWithOffset(dayEnd);\r\n // secondTask.EndDate = task.Parent && task.Parent.id ? task.EndDate : parentTask.EndDate;\r\n // secondTask.Parent = parentTask;\r\n secondTask.Active = true;\r\n\r\n newTasks = [firstTask, secondTask];\r\n\r\n vm.resourcePlanner.updateTaskListWithoutEmail(newTasks[0])\r\n .then(function () {\r\n return vm.resourcePlanner.updateTaskListWithoutEmail(newTasks[1]);\r\n })\r\n .then(function () {\r\n vm.getTasksForSelectedUsers();\r\n\r\n if (firstTask.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(firstTask.ForeignKey);\r\n });\r\n } else {\r\n if (taskStartDate < dayStart && taskEndDate <= dayEnd)\r\n task.EndDate = DateUtilService.getLongWithOffset(dayStart);\r\n\r\n if (taskStartDate >= dayStart && taskEndDate > dayEnd)\r\n task.StartDate = DateUtilService.getLongWithOffset(dayEnd);\r\n\r\n if (taskStartDate >= dayStart && taskEndDate <= dayEnd) {\r\n task.Active = false;\r\n }\r\n\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task)\r\n .then(function () {\r\n vm.getTasksForSelectedUsers();\r\n\r\n if (task.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(task.ForeignKey);\r\n });\r\n }\r\n };\r\n\r\n\r\n //SHARED FUNCTIONS BELOW\r\n\r\n /**\r\n * Gets the participants for the given order\r\n * @param orderId\r\n * @returns\r\n */\r\n vm.resourcePlanner.getParticipantsForOrder = function (orderId) {\r\n return ResourcePlannerFactory.getParticipantsForOrder(orderId);\r\n };\r\n\r\n /**\r\n * Gets the types for task\r\n * @returns\r\n */\r\n vm.resourcePlanner.getTypesForTask = function () {\r\n return ResourcePlannerFactory.getTypesForTask(vm.selectedOrganization.id);\r\n };\r\n\r\n /**\r\n * Gets the statuses for task\r\n * @returns\r\n */\r\n vm.resourcePlanner.getStatusesForTask = function () {\r\n return ResourcePlannerFactory.getStatusesForTask();\r\n };\r\n\r\n /**\r\n * Saves the type\r\n * @param type\r\n * @returns\r\n */\r\n vm.resourcePlanner.saveTaskType = function (type) {\r\n return ResourcePlannerFactory.saveTaskType(type);\r\n };\r\n\r\n /**\r\n * Gets the color setting\r\n * @param foreignKey\r\n * @param table\r\n * @returns\r\n */\r\n vm.resourcePlanner.getColorSetting = function (foreignKey, table) {\r\n return ResourcePlannerFactory.getColorSetting(foreignKey, table);\r\n };\r\n\r\n /**\r\n * Saves the color setting\r\n * @param color\r\n * @returns\r\n */\r\n vm.resourcePlanner.saveColorSetting = function (color) {\r\n return OrderFactory.saveColorSetting(color);\r\n };\r\n\r\n /**\r\n * Gets the views \r\n * @returns\r\n */\r\n vm.resourcePlanner.getResourcePlannerDropdownViews = function (includeDeactivatedViews) {\r\n return ResourcePlannerFactory.getResourcePlannerDropdownViews(OrganizationUtilService.getOrganizationId(), includeDeactivatedViews);\r\n };\r\n\r\n /**\r\n * Gets the users for the view\r\n * @param id\r\n * @returns\r\n */\r\n vm.resourcePlanner.getResourcePlannerViewUsers = function (id) {\r\n return ResourcePlannerFactory.getResourcePlannerViewUsers(id);\r\n };\r\n\r\n /**\r\n * Saves the given view\r\n * @param view\r\n * @returns\r\n */\r\n vm.resourcePlanner.saveResourcePlannerView = function (view) {\r\n return ResourcePlannerFactory.saveResourcePlannerView(view);\r\n };\r\n\r\n /**\r\n * Gets the selected organization id\r\n * @returns\r\n */\r\n vm.resourcePlanner.getSelectedOrganizationId = function () {\r\n return OrganizationUtilService.getOrganizationId();\r\n };\r\n\r\n /**\r\n * Gets the users\r\n * @returns\r\n */\r\n vm.resourcePlanner.getUsers = function () {\r\n return getUsers();\r\n };\r\n\r\n /**\r\n * Gets the tasks\r\n * @returns\r\n */\r\n vm.resourcePlanner.getTasks = function () {\r\n return vm.getTasksForSelectedUsers();\r\n };\r\n\r\n vm.resourcePlanner.getFullName = function (user) {\r\n return vm.getFullName(user);\r\n };\r\n\r\n /**\r\n * Gets the task by id\r\n * @param taskId\r\n * @returns\r\n */\r\n vm.resourcePlanner.getTaskById = function (taskId) {\r\n return ResourcePlannerFactory.getTaskById(taskId);\r\n };\r\n\r\n /**\r\n * Gets the child tasks for the given parent id\r\n * @param parentId\r\n * @returns\r\n */\r\n vm.resourcePlanner.getChildTasks = function (parentId) {\r\n return ResourcePlannerFactory.getChildTasks(parentId);\r\n };\r\n\r\n /**\r\n * Saves the child tasks\r\n * @param childTasks\r\n * @returns\r\n */\r\n vm.resourcePlanner.saveChildTasks = function (childTasks) {\r\n return ResourcePlannerFactory.saveChildTasks(childTasks);\r\n };\r\n\r\n /**\r\n * Checks whether the user is already assigned to the order\r\n * @param orderId\r\n * @param userId\r\n * @returns\r\n */\r\n vm.resourcePlanner.isUserAlreadyAssigned = function (orderId, userId) {\r\n return vm.resourcePlanner.getParticipantsForOrder(orderId)\r\n .then(function (result) {\r\n for (var i = 0; i < result.length; i++)\r\n if (result[i].User.id == userId && result[i].Active)\r\n return true;\r\n\r\n return false;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the customers based on the search criteria\r\n * @param freeText\r\n * @returns\r\n */\r\n vm.resourcePlanner.getResourcePlannerCustomers = function (freeText) {\r\n return ResourcePlannerFactory.getResourcePlannerCustomers(OrganizationUtilService.getOrganizationId(), freeText, false);\r\n };\r\n\r\n /**\r\n * Gets the users based on the search criteria\r\n * @param freeText\r\n * @returns\r\n */\r\n vm.resourcePlanner.getResourcePlannerUsers = function (freeText) {\r\n return UserFactory.getUsersByOrganizationId(OrganizationUtilService.getOrganizationId(), freeText).$promise;\r\n };\r\n\r\n /**\r\n * Invites the user to the meeting\r\n * @param taskToInvite\r\n * @param taskWhoSentInvite\r\n * @returns\r\n */\r\n vm.resourcePlanner.inviteUser = function (taskToInvite, taskWhoSentInvite) {\r\n return ResourcePlannerFactory.inviteUser(taskToInvite, taskWhoSentInvite);\r\n };\r\n\r\n /**\r\n * Gets the tasks for the given user\r\n * @param userId\r\n * @param startDate\r\n * @param endDate\r\n * @returns\r\n */\r\n vm.resourcePlanner.getTasksForUser = function (userId, startDate, endDate) {\r\n return ResourcePlannerFactory.getTasksForUsersBetweenDates(userId, startDate, endDate);\r\n };\r\n\r\n /**\r\n * Saves the given meeting\r\n * @param organizerTask\r\n * @param participantTasks\r\n * @returns\r\n */\r\n vm.resourcePlanner.saveMeeting = function (organizerTask, participantTasks) {\r\n return ResourcePlannerFactory.saveMeeting(organizerTask, participantTasks);\r\n };\r\n\r\n /**\r\n * Adds the given participants to the meeting\r\n * @param currentTask\r\n * @param participantTasks\r\n * @returns\r\n */\r\n vm.resourcePlanner.addParticipantsToMeeting = function (currentTask, participantTasks) {\r\n return ResourcePlannerFactory.addParticipantsToMeeting(currentTask, participantTasks);\r\n };\r\n\r\n /**\r\n * Removes the participants to the given meeting\r\n * @param currentTask\r\n * @param participants\r\n * @returns\r\n */\r\n vm.resourcePlanner.removeParticipantsFromMeeting = function (currentTask, participants) {\r\n return ResourcePlannerFactory.removeParticipantsFromMeeting(currentTask, participants);\r\n };\r\n\r\n vm.resourcePlanner.setUser = setUser;\r\n\r\n /**\r\n * Deselects all the users except the logged one\r\n */\r\n vm.resourcePlanner.deselectAllExceptLoggedUser = function () {\r\n var loggedUser = sessionInformationService.getUser();\r\n var atLeastOneUnchecked = false;\r\n for (var i = 0; i < vm.users.length; i++)\r\n if (!vm.users[i].Checked) {\r\n atLeastOneUnchecked = true;\r\n break;\r\n }\r\n for (var i = 0; i < vm.users.length; i++)\r\n if (vm.users[i].id != loggedUser.id && !atLeastOneUnchecked)\r\n vm.users[i].Checked = false;\r\n else\r\n vm.users[i].Checked = true;\r\n\r\n vm.getTasksForSelectedUsers();\r\n };\r\n\r\n /**\r\n * Collapses all the users\r\n * Tasks are now overlapping\r\n */\r\n vm.resourcePlanner.collapseAllUsers = function () {\r\n //check if at least one user is not collapsed\r\n var atLeastOneNotCollapsed = false;\r\n for (var i = 0; i < vm.users.length; i++) {\r\n if (vm.users[i].Checked && vm.users[i].Tasks && vm.users[i].Tasks.length > 0 && vm.users[i].Collapsed == false) {\r\n vm.users[i].Collapsed = true;\r\n atLeastOneNotCollapsed = true;\r\n }\r\n }\r\n for (var i = 0; i < vm.users.length; i++)\r\n if (vm.users[i].Checked && vm.users[i].Tasks && vm.users[i].Tasks.length > 0) {\r\n if (!atLeastOneNotCollapsed)\r\n vm.users[i].Collapsed = false;\r\n vm.resourcePlanner.collapseUser(vm.users[i]);\r\n }\r\n };\r\n\r\n vm.resourcePlanner.resetCursor = function () {\r\n document.getElementsByTagName('html')[0].style.cursor = '';\r\n $timeout(function () {\r\n document.getElementsByTagName('html')[0].style.cursor = '';\r\n }, 100);\r\n };\r\n\r\n /**\r\n * Checks whether the save is disabled\r\n * @returns\r\n */\r\n vm.isSaveViewDisabled = function () {\r\n if (!vm.userViewEdit)\r\n return true;\r\n if (!vm.userViewEdit.Name)\r\n return true;\r\n if (!vm.userViewEdit.Users || vm.userViewEdit.Users.length == 0)\r\n return true;\r\n return false;\r\n };\r\n\r\n vm.filterSelected = function (user) {\r\n if (!vm.userViewEdit.Users || vm.userViewEdit.Users.length == 0)\r\n return true;\r\n for (var i = 0; i < vm.userViewEdit.Users.length; i++)\r\n if (vm.userViewEdit.Users[i].id == user.id)\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Collapses the given user\r\n */\r\n vm.collpaseUser = function () {\r\n vm.userListCollapsed = !vm.userListCollapsed;\r\n $timeout(function () {\r\n vm.resourcePlanner.resizeFullDayFormat();\r\n });\r\n };\r\n\r\n vm.getSidePanelTasksForSelectedUsers = function () {\r\n\r\n if (!vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers ||\r\n typeof (vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers) !== \"function\" ||\r\n !vm.resourcePlanner.showResourcePlannerTasks)\r\n return;\r\n\r\n vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers($filter('filter')(vm.users, { Checked: 'true' }));\r\n\r\n };\r\n\r\n vm.openSettings = function () {\r\n if (vm.resourcePlanner.createActionTimeline)\r\n return;\r\n\r\n vm.settingsTable = settingsTable;\r\n vm.modalSettingsInstance = $uibModal.open({\r\n template: '',\r\n scope: $scope,\r\n size: 'lg'\r\n });\r\n\r\n vm.modalSettingsInstance.result.finally(function () {\r\n processUserSettings(true);\r\n });\r\n };\r\n\r\n $scope.$watch(function () {\r\n return snapService.getSnap();\r\n }, function (data) {\r\n if (vm.resourcePlanner && vm.resourcePlanner.resizeFullDayFormat) {\r\n $timeout(function () {\r\n vm.resourcePlanner.resizeFullDayFormat();\r\n }, 100);\r\n }\r\n });\r\n\r\n function init() {\r\n\r\n //Part of 10572 task\r\n //getSelectedOrganizationSettings();\r\n\r\n ResourcePlannerContextOptionsService.setResourcePlannerInstance(vm.resourcePlanner);\r\n //first time in controller set organization\r\n if ($scope.loggedUser.Organization.Central && $scope.loggedUser.Group.ProgId == 'ADMIN') {\r\n if (!OrganizationUtilService.getOrganizationId())\r\n OrganizationUtilService.setOrganizationId($scope.loggedUser.Organization.id);\r\n } else\r\n OrganizationUtilService.setOrganizationId($scope.loggedUser.Organization.id);\r\n\r\n getOrganizationsDropdown();\r\n\r\n //ie fix\r\n document.getElementsByTagName('body')[0].style.overflow = 'hidden';\r\n\r\n getUsers();\r\n\r\n //get the user settings\r\n processUserSettings()\r\n .then(function () {\r\n vm.resourcePlanner.deleteTask = deleteTask;\r\n vm.resourcePlanner.deleteDay = deleteDay;\r\n vm.resourcePlanner.deleteHour = deleteHour;\r\n vm.resourcePlanner.split = split;\r\n vm.resourcePlanner.navigationMode = vm.navigationMode;\r\n\r\n //right click options for tasks\r\n vm.resourcePlanner.taskContextOptions = [\r\n ResourcePlannerContextOptionsService.getOptionsForCut(),\r\n ResourcePlannerContextOptionsService.getOptionsForCopy(),\r\n null,//divider\r\n ResourcePlannerContextOptionsService.getOptionsForDelete(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteAllAndRemoveParticipant(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteAll(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteDay(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteHour(),\r\n ResourcePlannerContextOptionsService.getOptionsForSplit()\r\n ];\r\n });\r\n\r\n\r\n };\r\n\r\n /**\r\n * Processes the user setting for this planner\r\n */\r\n function processUserSettings(fromSettings) {\r\n return getUserSettings()\r\n .then(function () {\r\n setIntervalValues();\r\n setUserGroupValue();\r\n setOverviewValue();\r\n $timeout(function () { set24HFormatValue(fromSettings); });\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Sets the initial value of the overview\r\n */\r\n function setOverviewValue() {\r\n //if we have settings, use the value selected there\r\n if (userSettings && userSettings.Overview && userSettings.Overview.ProgId)\r\n vm.navigationMode = ResourcePlannerFactory.navigationMode = {\r\n day: userSettings.Overview.ProgId == 'DAY',\r\n workingDays: userSettings.Overview.ProgId == 'WORKING_DAYS',\r\n week: userSettings.Overview.ProgId == 'WEEK',\r\n month: userSettings.Overview.ProgId == 'MONTH'\r\n }\r\n else\r\n vm.navigationMode = ResourcePlannerFactory.navigationMode;\r\n };\r\n\r\n /**\r\n * Sets the initial value of the user group\r\n */\r\n function setUserGroupValue() {\r\n //if we have settings, use the value selected there\r\n if (userSettings && userSettings.GroupView && userSettings.GroupView.id)\r\n vm.resourcePlanner.userGroupId = ResourcePlannerFactory.userGroupId = userSettings.GroupView.id;\r\n else\r\n vm.resourcePlanner.userGroupId = null;\r\n\r\n vm.resourcePlanner.getUsersView();\r\n };\r\n\r\n /**\r\n * Sets the initial value of the 24H format\r\n */\r\n function set24HFormatValue(fromSettings) {\r\n //if we have settings, use the value from there\r\n if (fromSettings) {\r\n vm.resourcePlanner.fullDayFormat = ResourcePlannerFactory.fullDayFormat = userSettings.Use24H;\r\n }\r\n vm.resourcePlanner.fullDayFormat = ResourcePlannerFactory.fullDayFormat;\r\n\r\n $timeout(setStartEndHours);\r\n };\r\n\r\n /**\r\n * Gets the user settings saved on server\r\n */\r\n function getUserSettings() {\r\n return ResourcePlannerSettingsFactory.getResourcePlannerSettings(settingsTable)\r\n .then(function (result) {\r\n userSettings = result;\r\n });\r\n };\r\n\r\n function onDateChange() {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n function onUserCheckToggle(user) {\r\n\r\n user.Checked = !user.Checked;\r\n\r\n // if the user was un-checked and his row is expanded, collapse the row\r\n if (!user.Checked && !user.Collapsed) {\r\n user.Collapsed = !user.Collapsed;\r\n vm.resourcePlanner.collapseUser(user);\r\n }\r\n }\r\n\r\n $timeout(init);\r\n\r\n\r\n $scope.$on('$destroy', function () {\r\n $interval.cancel(intervalPromise);\r\n intervalPromise = null;\r\n //ie fix\r\n document.getElementsByTagName('body')[0].style.overflow = 'auto';\r\n //save settings\r\n ResourcePlannerFactory.menuCollapsed = vm.menuCollapsed;\r\n ResourcePlannerFactory.userListCollapsed = vm.userListCollapsed;\r\n ResourcePlannerFactory.userGroupId = vm.resourcePlanner.userGroupId;\r\n ResourcePlannerFactory.intervalSync = vm.interval;\r\n ResourcePlannerFactory.selectedDate = angular.copy(vm.resourcePlanner.Date);\r\n ResourcePlannerFactory.fullDayFormat = vm.resourcePlanner.fullDayFormat;\r\n ResourcePlannerFactory.navigationMode = vm.navigationMode;\r\n vm.resourcePlanner = null;\r\n });\r\n\r\n };\r\n\r\n})();\r\n\r\n","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n 'DateUtilService',\r\n '$rootScope',\r\n 'dialogService'\r\n ];\r\n\r\n angular.module('resourcePlanner').factory('ResourcePlannerFactory', ResourcePlannerFactory);\r\n\r\n function ResourcePlannerFactory(\r\n $resource,\r\n baseUrlService,\r\n DateUtilService,\r\n $rootScope,\r\n dialogService\r\n ) {\r\n var resourcePlannerFactory = {};\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var TasksForUsers = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskListsForUsers');\r\n var InactiveTasks = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskListsInactive');\r\n var TaskLists = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskListsWithoutEmail');\r\n var TaskTypes = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskTypes');\r\n var TaskStatuses = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskStatuses');\r\n var InviteUser = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/InviteUser');\r\n var Participants = $resource(baseUrlService.getBaseUrl() + 'REST/Order.svc/Participants');\r\n var ColorSettings = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ColorSettings/:foreignKey/:table');\r\n var ResourcePlannerView = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ResourcePlannerView');\r\n var ResourcePlannerViewUsers = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ResourcePlannerViewUsers');\r\n var Task = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskLists/:taskId');\r\n var ChildTasks = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ChildTasks');\r\n var ResourcePlannerCustomers = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ResourcePlannerCustomers');\r\n var AcceptInvitation = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/AcceptInvitation');\r\n var IsAssigned = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/IsUserAssigned');\r\n var UnassignUser = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/UnassignUser');\r\n var AssignUser = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/AssignUser', {}, { save: { method: 'POST', isArray: true } });\r\n var DatesExtremities = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/GetDatesExtremities', {}, { save: { method: 'POST', isArray: true } });\r\n\r\n var Meeting = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/CreateMeeting');\r\n var AddParticipantsToMeeting = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/AddParticipantsToMeeting');\r\n var RemoveParticipantsFromMeeting = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/RemoveParticipantsFromMeeting');\r\n var CopyTaskActionApi = $resource(api + 'REST/ResourcePlannerAction.svc/ResourcePlannerCopyAction');\r\n var CutTaskActionApi = $resource(api + 'REST/ResourcePlannerAction.svc/ResourcePlannerCutAction');\r\n var DeleteTaskActionApi = $resource(api + 'REST/ResourcePlannerAction.svc/ResourcePlannerDeleteAction');\r\n var DeleteAllTaskActionApi = $resource(api + 'REST/ResourcePlannerAction.svc/ResourcePlannerDeleteAllAction');\r\n var DeleteAllTaskAndRemoveParticipantActionApi = $resource(api + 'REST/ResourcePlannerAction.svc/ResourcePlannerDeleteAllAndRemoveParticipantAction');\r\n var DeclineInvitation = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/DeclineMeeting');\r\n var AskForPeriodisering = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/AskForPeriodisering');\r\n var MarkAsPeriodisering = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/MarkAsPeriodisering');\r\n\r\n /**\r\n * Gets the list of tasks for the given users in the given timeline\r\n * @param userIds\r\n * @param startDate\r\n * @param endDate\r\n * @returns\r\n */\r\n resourcePlannerFactory.getTasksForUsersBetweenDates = function (userIds, startDate, endDate) {\r\n startDate = DateUtilService.getLongWithOffset(startDate);\r\n endDate = DateUtilService.getLongWithOffset(endDate);\r\n return TasksForUsers.query({ userIds: userIds, startDate: startDate, endDate: endDate }).$promise;\r\n };\r\n\r\n /**\r\n * Gets a list of inactive tasks based on the search criteria\r\n * @param userIds\r\n * @param todayTasksOnly\r\n * @param notInResourcePlanner\r\n * @param searchText\r\n * @returns\r\n */\r\n resourcePlannerFactory.getInactiveTasks = function (userIds, todayTasksOnly, notInResourcePlanner, searchText) {\r\n return InactiveTasks.query({\r\n userIds: userIds,\r\n todayTasksOnly: todayTasksOnly,\r\n notInResourcePlanner: notInResourcePlanner,\r\n searchText: searchText\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Creates a new task\r\n * @param task\r\n * @returns\r\n */\r\n resourcePlannerFactory.createOrderTask = function (task) {\r\n var taskSave = new TaskLists();\r\n taskSave.task = task;\r\n return taskSave.$save();\r\n };\r\n\r\n /**\r\n * Gets the users assigned to the order\r\n * @param orderId\r\n * @returns\r\n */\r\n resourcePlannerFactory.getParticipantsForOrder = function (orderId) {\r\n return Participants.query({ orderId: orderId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the types for task\r\n * @param organizationId\r\n * @returns\r\n */\r\n resourcePlannerFactory.getTypesForTask = function (organizationId) {\r\n return TaskTypes.query({ orgId: organizationId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the statuses for task\r\n * @returns\r\n */\r\n resourcePlannerFactory.getStatusesForTask = function () {\r\n return TaskStatuses.query().$promise;\r\n };\r\n\r\n /**\r\n * Saves the given task type\r\n * @param type\r\n * @returns\r\n */\r\n resourcePlannerFactory.saveTaskType = function (type) {\r\n var typeToSave = new TaskTypes();\r\n typeToSave.type = type;\r\n return typeToSave.$save();\r\n };\r\n\r\n /**\r\n * Gets the color setting for the given foreign key and table\r\n * @param foreignKey\r\n * @param table\r\n * @returns\r\n */\r\n resourcePlannerFactory.getColorSetting = function (foreignKey, table) {\r\n return ColorSettings.get({ foreignKey: foreignKey, table: table }).$promise;\r\n };\r\n\r\n /**\r\n * Saves the given resource planner view\r\n * @param view\r\n * @returns\r\n */\r\n resourcePlannerFactory.saveResourcePlannerView = function (view) {\r\n var viewToSave = new ResourcePlannerView();\r\n viewToSave.view = view;\r\n return viewToSave.$save();\r\n };\r\n\r\n /**\r\n * Gets the resource planner views\r\n * @param organizationId\r\n * @param includeDeactivatedViews\r\n * @returns\r\n */\r\n resourcePlannerFactory.getResourcePlannerDropdownViews = function (organizationId, includeDeactivatedViews) {\r\n return ResourcePlannerView.query({\r\n orgId: organizationId,\r\n includeDeactivatedViews: includeDeactivatedViews\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the users for current view\r\n * @param typeId\r\n * @returns\r\n */\r\n resourcePlannerFactory.getResourcePlannerViewUsers = function (typeId) {\r\n return ResourcePlannerViewUsers.query({ typeId: typeId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the task by id\r\n * @param taskId\r\n * @returns\r\n */\r\n resourcePlannerFactory.getTaskById = function (taskId) {\r\n return Task.get({ taskId: taskId }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the child tasks for the given task\r\n * @param parentId\r\n * @returns\r\n */\r\n resourcePlannerFactory.getChildTasks = function (parentId) {\r\n return ChildTasks.query({ parentId: parentId }).$promise;\r\n };\r\n\r\n /**\r\n * Saves the given child tasks\r\n * @param childTasks\r\n * @returns\r\n */\r\n resourcePlannerFactory.saveChildTasks = function (childTasks) {\r\n var tasksToSave = new ChildTasks();\r\n tasksToSave.childTasks = childTasks;\r\n return tasksToSave.$save();\r\n };\r\n\r\n /**\r\n * \r\n * @param organizationId\r\n * @param freeText\r\n * @returns\r\n */\r\n resourcePlannerFactory.getResourcePlannerCustomers = function (organizationId, freeText, includeInactive) {\r\n return ResourcePlannerCustomers.query({ orgId: organizationId, freeText: freeText, includeInactive: includeInactive }).$promise;\r\n };\r\n\r\n /**\r\n * Creates an invitation for the selected users in the taskToInvite\r\n * @param taskToInvite\r\n * @param taskWhoSentInvite\r\n * @returns\r\n */\r\n resourcePlannerFactory.inviteUser = function (taskToInvite, taskWhoSentInvite) {\r\n var invite = new InviteUser();\r\n invite.taskToInvite = taskToInvite;\r\n invite.taskWhoSentInvite = taskWhoSentInvite;\r\n return invite.$save();\r\n };\r\n\r\n /**\r\n * Accepts the invite for the given invitation id\r\n * @param invitationId\r\n * @returns\r\n */\r\n resourcePlannerFactory.acceptInvitation = function (invitationId, sessionId) {\r\n var accept = new AcceptInvitation();\r\n accept.invitationId = invitationId;\r\n accept.sessionId = sessionId;\r\n return accept.$save();\r\n };\r\n\r\n /**\r\n * Deletes the user which declined the invitation from the respective meeting\r\n * @param {string} invitationId\r\n * @param {string} sessionId\r\n */\r\n resourcePlannerFactory.declineInvitation = function (invitationId, sessionId) {\r\n return DeclineInvitation.save({\r\n invitationId: invitationId,\r\n sessionId: sessionId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Checks if the user is assigned to the order\r\n * @param userId\r\n * @param orderId\r\n * @returns\r\n */\r\n resourcePlannerFactory.isUserAssignedToOrder = function (userId, orderId) {\r\n return IsAssigned.get({ userId: userId, orderId: orderId }).$promise;\r\n };\r\n\r\n /**\r\n * Unassings the user from the order\r\n * @param userId\r\n * @param orderId\r\n * @param unassignFromAll\r\n * @param removeParticipant\r\n * @returns\r\n */\r\n resourcePlannerFactory.unassingUser = function (userId, orderId, unassignFromAll, removeParticipant) {\r\n var unasignUser = new UnassignUser();\r\n unasignUser.userId = userId;\r\n unasignUser.orderId = orderId;\r\n unasignUser.unassignFromAll = unassignFromAll;\r\n unasignUser.removeParticipant = removeParticipant;\r\n return unasignUser.$save();\r\n };\r\n\r\n /**\r\n * Assigns the user to the given tasks\r\n * @param tasks\r\n * @returns\r\n */\r\n resourcePlannerFactory.assignUser = function (tasks) {\r\n return AssignUser.save({}, tasks).$promise;\r\n };\r\n\r\n /**\r\n * Gets the date extremities for the order\r\n * The task may be split into multiple tasks\r\n * @param orderIds\r\n * @returns\r\n */\r\n resourcePlannerFactory.getDatesExtremities = function (orderIds) {\r\n return DatesExtremities.save({}, orderIds).$promise;\r\n };\r\n\r\n /**\r\n * Saves the meeting for the given participants\r\n * @param organizerTask\r\n * @param participantTasks\r\n * @returns\r\n */\r\n resourcePlannerFactory.saveMeeting = function (organizerTask, participantTasks) {\r\n var meeting = new Meeting();\r\n meeting.organizerTask = organizerTask;\r\n meeting.participantTasks = participantTasks;\r\n return meeting.$save();\r\n };\r\n\r\n /**\r\n * Adds the given participants to the meeting\r\n * @param currentTask\r\n * @param participantTasks\r\n * @returns\r\n */\r\n resourcePlannerFactory.addParticipantsToMeeting = function (currentTask, participantTasks) {\r\n var meeting = new AddParticipantsToMeeting();\r\n meeting.currentTask = currentTask;\r\n meeting.participantTasks = participantTasks;\r\n return meeting.$save();\r\n };\r\n\r\n /**\r\n * Removes the participants from the given meeting\r\n * @param currentTask\r\n * @param participants\r\n * @returns\r\n */\r\n resourcePlannerFactory.removeParticipantsFromMeeting = function (currentTask, participants) {\r\n var meeting = new RemoveParticipantsFromMeeting();\r\n meeting.currentTask = currentTask;\r\n meeting.participants = participants;\r\n\r\n return meeting.$save();\r\n };\r\n\r\n /**\r\n * Makes a request and creates copies for the task that the user selected\r\n * @param {} tasks \r\n * @returns {} \r\n */\r\n resourcePlannerFactory.saveCopiedTasks = function (tasks) {\r\n var copyTaskApiObject = new CopyTaskActionApi();\r\n\r\n copyTaskApiObject.tasks = tasks;\r\n\r\n return copyTaskApiObject.$save();\r\n };\r\n\r\n /**\r\n * Makes a request and creates copies for the task that the user selected\r\n * @param {} tasks \r\n * @returns {} \r\n */\r\n resourcePlannerFactory.saveCutTask = function (task) {\r\n var cutTaskApiObject = new CutTaskActionApi();\r\n\r\n cutTaskApiObject.task = task;\r\n\r\n return cutTaskApiObject.$save();\r\n };\r\n\r\n resourcePlannerFactory.delete = function(task) {\r\n var deleteTaskActionApiObject = new DeleteTaskActionApi();\r\n\r\n deleteTaskActionApiObject.task = task;\r\n\r\n return deleteTaskActionApiObject.$save();\r\n };\r\n\r\n resourcePlannerFactory.deleteAll = function (task) {\r\n var deleteAllTaskActionApiObject = new DeleteAllTaskActionApi();\r\n\r\n deleteAllTaskActionApiObject.task = task;\r\n\r\n return deleteAllTaskActionApiObject.$save();\r\n };\r\n\r\n resourcePlannerFactory.deleteAllAndRemoveParticipants = function (task) {\r\n var deleteAllTaskAndRemoveParticipantActionApi = new DeleteAllTaskAndRemoveParticipantActionApi();\r\n\r\n deleteAllTaskAndRemoveParticipantActionApi.task = task;\r\n\r\n return deleteAllTaskAndRemoveParticipantActionApi.$save();\r\n };\r\n\r\n resourcePlannerFactory.markOrderAsEdit = function() {\r\n $rootScope.$broadcast('mark-order:edit');\r\n };\r\n\r\n resourcePlannerFactory.askForPeriodisering = function(orderId) {\r\n var askForPeriodiseringApiObject = new AskForPeriodisering();\r\n\r\n askForPeriodiseringApiObject.orderId = orderId;\r\n\r\n // make a request and see if we should ask for periodisering\r\n return askForPeriodiseringApiObject.$save()\r\n .then(function(result) {\r\n if (!result || !result.AskForPeriodisering)\r\n return Promise.resolve();\r\n // show a confirm dialog and ask the user if he wants to enable periodisering\r\n return dialogService.showConfirmDialog('txtConfirm', 'RESOURCE_PLANNER.ASK_FOR_PERIODISERING');\r\n })\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return Promise.resolve();\r\n\r\n var markAsPeriodiseringApiObject = new MarkAsPeriodisering();\r\n markAsPeriodiseringApiObject.orderId = orderId;\r\n\r\n // enable periodisering\r\n return markAsPeriodiseringApiObject.$save();\r\n });\r\n }\r\n\r\n resourcePlannerFactory.menuCollapsed = false;\r\n resourcePlannerFactory.userListCollapsed = false;\r\n resourcePlannerFactory.userGroupId = null;\r\n resourcePlannerFactory.intervalSync = null;\r\n resourcePlannerFactory.selectedDate = new Date();\r\n resourcePlannerFactory.fullDayFormat = false;\r\n resourcePlannerFactory.navigationMode = { day: true, workingDays: false, week: false, month: false };\r\n\r\n return resourcePlannerFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerService.$inject = [\r\n 'DateUtilService',\r\n '$timeout',\r\n '$filter',\r\n '_',\r\n '$translate',\r\n 'TableResources'\r\n ];\r\n\r\n //service for common data/functions shared between resource planner components;\r\n angular.module('resourcePlanner').service('ResourcePlannerService', ResourcePlannerService);\r\n\r\n function ResourcePlannerService(\r\n DateUtilService,\r\n $timeout,\r\n $filter,\r\n _,\r\n $translate,\r\n TableResources\r\n ) {\r\n var resourcePlannerService = {};\r\n\r\n resourcePlannerService.colors = [\r\n '#1abc9c',\r\n '#2ecc71',\r\n '#3498db',\r\n '#9b59b6',\r\n '#34495e',\r\n '#16a085',\r\n '#27ae60',\r\n '#2980b9',\r\n '#8e44ad',\r\n '#2c3e50',\r\n '#f1c40f',\r\n '#f39c12',\r\n '#e67e22',\r\n '#e74c3c',\r\n '#d35400',\r\n '#c0392b'\r\n ];\r\n\r\n resourcePlannerService.rightMenuActions = {\r\n CUT: 0,\r\n COPY: 1,\r\n PASTE: 2,\r\n DELETE: 3,\r\n CREATE_ORDER: 4\r\n };\r\n\r\n //resourcePlannerService.GRID_ELEMENT = null;\r\n resourcePlannerService.USER_HEIGHT = null;\r\n\r\n /**\r\n * Gets the user index in the list\r\n * @param userId\r\n * @param users\r\n * @returns\r\n */\r\n function getUserIndex(userId, users) {\r\n for (var i = 0; i < users.length; i++)\r\n if (users[i].id == userId)\r\n return i;\r\n return null;\r\n };\r\n\r\n /**\r\n * Gets the user assigned to the given task\r\n * @param task\r\n * @param users\r\n * @returns\r\n */\r\n resourcePlannerService.getUserByTask = function (task, users) {\r\n for (var i = 0; i < users.length; i++) {\r\n var user = users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n for (var j = 0; j < user.Tasks.length; j++)\r\n if (user.Tasks[j].id == task.id)\r\n return user;\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Gets the row index of the task in the current view\r\n * @param task\r\n * @param user\r\n * @returns\r\n */\r\n resourcePlannerService.getIndexOfTheTask = function (task, user) {\r\n if (user.Lines && user.Lines.length > 0) {\r\n for (var i = 0; i < user.Lines.length; i++)\r\n for (var j = 0; j < user.Lines[i].length; j++)\r\n if (user.Lines[i][j].id == task.id)\r\n return i;\r\n } else {\r\n for (var i = 0; i < user.Tasks.length; i++)\r\n if (user.Tasks[i].id == task.id)\r\n return i;\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Gets the task by id\r\n * @param taskId\r\n * @param users\r\n * @returns\r\n */\r\n resourcePlannerService.getTaskById = function (taskId, users) {\r\n for (var i = 0; i < users.length; i++) {\r\n var user = users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n if (user.Tasks[j].id == taskId)\r\n return user.Tasks[j];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * @deprecated \r\n * @param userId\r\n * @param users\r\n * @returns\r\n */\r\n resourcePlannerService.getColorBasedOnUser = function (userId, users) {\r\n return resourcePlannerService.colors[getUserIndex(userId, users) % resourcePlannerService.colors.length];\r\n };\r\n\r\n /**\r\n * Transforms the given pixels into hours in the given date\r\n * @param pixels\r\n * @param date\r\n * @returns\r\n */\r\n resourcePlannerService.pxToHours = function (pixels, date) {\r\n var hours = Math.floor(Math.abs(pixels));\r\n var minutes = Math.floor((Math.abs(pixels) * 60) % 60);\r\n return DateUtilService.setDate(date, hours, minutes, 0);\r\n };\r\n\r\n /**\r\n * Transforms the given date into pixels\r\n * @param date\r\n * @returns\r\n */\r\n resourcePlannerService.hoursToPx = function (date) {\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n return hours + minutes / 60;\r\n };\r\n\r\n /**\r\n * Checks whether the given date is the specified date range\r\n * @param startHour\r\n * @param startDate\r\n * @returns\r\n */\r\n resourcePlannerService.isStartDateInRange = function (startHour, startDate) {\r\n if (parseInt(startHour.getTime() / 1000) < parseInt(startDate.getTime() / 1000))\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the given date is the specified date range\r\n * @param startHour\r\n * @param startDate\r\n * @returns\r\n */\r\n resourcePlannerService.isEndDateInRange = function (endHour, endDate) {\r\n if (parseInt(endHour.getTime() / 1000) > parseInt(endDate.getTime() / 1000))\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Resests the collapsed height for the given users\r\n * @param users\r\n */\r\n resourcePlannerService.resetCollapsedUsersHeight = function (users) {\r\n var userElements = document.getElementsByClassName('participant-resource-planner-user-item');\r\n for (var i = 0; i < userElements.length; i++)\r\n userElements[i].style.height = '60px';//todo set dynamic height\r\n\r\n var userTaskElements = document.getElementsByClassName('rp-hour-task');\r\n for (var i = 0; i < userTaskElements.length; i++)\r\n userTaskElements[i].style.height = '60px';//todo set dynamic height\r\n\r\n for (var i = 0; i < users.length; i++)\r\n users[i].Collapsed = true;\r\n };\r\n\r\n /**\r\n * Get computed values for the given element\r\n * @param element\r\n * @returns\r\n */\r\n function getTransformedValues(element) {\r\n var style = window.getComputedStyle(element);\r\n\r\n return style.getPropertyValue(\"-webkit-transform\") ||\r\n style.getPropertyValue(\"-moz-transform\") ||\r\n style.getPropertyValue(\"-ms-transform\") ||\r\n style.getPropertyValue(\"-o-transform\") ||\r\n style.getPropertyValue(\"transform\");\r\n };\r\n\r\n /**\r\n * Increase the height of the user row with the given height\r\n * @param userId\r\n * @param height\r\n */\r\n resourcePlannerService.increaseUserHeight = function (userId, height) {\r\n var userItemElement = document.getElementById('userItem' + userId);\r\n var userTaskElement = document.getElementById('user' + userId);\r\n\r\n if (!userItemElement || !userTaskElement)\r\n return;\r\n\r\n userTaskElement.style.height = (height ? height : resourcePlannerService.USER_HEIGHT) + 'px';\r\n userItemElement.style.height = (height ? height : resourcePlannerService.USER_HEIGHT) + 'px';\r\n };\r\n\r\n resourcePlannerService.increaseGridHeight = function (height) {\r\n var grid = document.getElementsByClassName('rp-hour-grid')[0];\r\n grid.style.height = (grid.clientHeight + height) + 'px';\r\n };\r\n\r\n /**\r\n * Checks whether the given task overlaps other tasks\r\n * @param task\r\n * @param tasks\r\n * @returns\r\n */\r\n resourcePlannerService.areTasksOverlapping = function (task, tasks) {\r\n var startDate = DateUtilService.getDateWithoutTimezone(angular.copy(task.StartDate));\r\n var endDate = DateUtilService.getDateWithoutTimezone(angular.copy(task.EndDate));\r\n\r\n for (var i = 0; i < tasks.length; i++) {\r\n if (task.id == tasks[i].id)\r\n continue;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(tasks[i].StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(tasks[i].EndDate);\r\n\r\n if (startDate >= taskStartDate && startDate <= taskEndDate)\r\n return true;\r\n\r\n if (endDate <= taskStartDate && endDate >= taskEndDate)\r\n return true;\r\n\r\n if (startDate <= taskStartDate && endDate >= taskEndDate)\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n function compareDates(a, b) {\r\n return new Date(b.StartDate) - new Date(a.StartDate);\r\n };\r\n\r\n /**\r\n * Expands the user row to fit all overlaping tasks\r\n * @param user\r\n * @returns\r\n */\r\n resourcePlannerService.expandUserTasks = function (user) {\r\n resourcePlannerService.transitionClass('rp-day-task', false);\r\n var lines = [], taskArray = angular.copy(user.Tasks).sort(compareDates), currentLine = 0;\r\n\r\n lines.push([taskArray[taskArray.length - 1]]);\r\n taskArray.splice(taskArray.length - 1, 1);//remove last tasks\r\n\r\n while (taskArray.length >= 0) {\r\n for (var i = taskArray.length - 1; i >= 0; i--) {\r\n if (!resourcePlannerService.areTasksOverlapping(taskArray[i], angular.copy(lines[currentLine]))) {\r\n lines[currentLine].push(taskArray[i]);\r\n taskArray.splice(i, 1);\r\n }\r\n }\r\n if (taskArray.length == 0)\r\n break;\r\n\r\n lines.push([taskArray[taskArray.length - 1]]);\r\n taskArray.splice(taskArray.length - 1, 1);\r\n currentLine++;\r\n }\r\n\r\n //increase the size of the user\r\n var heightIncreased = (resourcePlannerService.USER_HEIGHT) * lines.length, y, taskElement, transformValues;\r\n resourcePlannerService.increaseUserHeight(user.id, heightIncreased);\r\n //resourcePlannerService.increaseGridHeight(heightIncreased - resourcePlannerService.USER_HEIGHT);\r\n\r\n for (var i = 0; i < lines.length; i++) {\r\n for (var j = 0; j < lines[i].length; j++) {\r\n y = (i * (resourcePlannerService.USER_HEIGHT)) + 5;\r\n taskElement = document.getElementById('task' + lines[i][j].id);\r\n transformValues = getTransformedValues(taskElement).match(/([-+]?[\\d\\.]+)/g);\r\n\r\n if (transformValues) {\r\n taskElement.style.transform = 'translate(' + transformValues[4] + 'px, ' + y + 'px)';\r\n taskElement.setAttribute('data-y', y);\r\n }\r\n\r\n }\r\n }\r\n\r\n $timeout(function () {\r\n resourcePlannerService.transitionClass('rp-day-task', true);\r\n }, 500);\r\n\r\n return lines;\r\n };\r\n\r\n /**\r\n * Collapses the given user and task are now overlapping\r\n * @param user\r\n */\r\n resourcePlannerService.collapseUserTasks = function (user) {\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n return;\r\n\r\n var task, taskElement, transformValues;\r\n\r\n resourcePlannerService.transitionClass('rp-day-task', false);\r\n resourcePlannerService.increaseUserHeight(user.id);\r\n\r\n for (var i = 0; i < user.Tasks.length; i++) {\r\n task = user.Tasks[i];\r\n taskElement = document.getElementById('task' + task.id);\r\n\r\n if (!taskElement)\r\n continue;\r\n\r\n transformValues = getTransformedValues(taskElement).match(/([-+]?[\\d\\.]+)/g);\r\n if (!transformValues)\r\n continue;\r\n\r\n taskElement.style.transform = 'translate(' + transformValues[4] + 'px, ' + 5 + 'px)';\r\n taskElement.setAttribute('data-y', 5);\r\n }\r\n\r\n $timeout(function () {\r\n resourcePlannerService.transitionClass('rp-day-task', true);\r\n }, 1000);\r\n };\r\n\r\n\r\n resourcePlannerService.recalculateCollapsedTasks = function (users) {\r\n for (var i = 0; i < users.length; i++) {\r\n if (users[i].Collapsed === false)\r\n resourcePlannerService.expandUserTasks(users[i], resourcePlannerService.USER_HEIGHT);\r\n }\r\n };\r\n\r\n /**\r\n * Adds or removes the transition class when collapsing/expanding\r\n * @param elementClass\r\n * @param remove\r\n */\r\n resourcePlannerService.transitionClass = function (elementClass, remove) {\r\n var elements = document.getElementsByClassName(elementClass);\r\n for (var i = 0; i < elements.length; i++)\r\n if (remove)\r\n elements[i].classList.remove('transition-ease-in-half-second');\r\n else\r\n elements[i].classList.add('transition-ease-in-half-second');\r\n };\r\n\r\n /**\r\n * Checks whether the collapse button should show\r\n * @param user\r\n * @returns\r\n */\r\n resourcePlannerService.showCollapseButton = function (user) {\r\n if (!user)\r\n return false;\r\n if (!user.Checked)\r\n return false;\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n return false;\r\n\r\n for (var i = 0; i < user.Tasks.length; i++) {\r\n if (resourcePlannerService.areTasksOverlapping(angular.copy(user.Tasks[i]), angular.copy(user.Tasks))) {\r\n user.showCollapseButton = true;\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Gets the html elements that contain the given class name\r\n * @param htmlElements\r\n * @param className\r\n * @returns\r\n */\r\n function getHtmlElementsContainingClassName(htmlElements, className) {\r\n var tasks = [];\r\n for (var i = 0; i < htmlElements.length; i++)\r\n if (htmlElements[i].classList.contains(className))\r\n tasks.push(htmlElements[i]);\r\n return tasks;\r\n };\r\n\r\n /**\r\n * Gets all the html elements from the given coordonates\r\n * @param x\r\n * @param y\r\n * @param className\r\n * @returns\r\n */\r\n function getHtmlElementsFromCoordinates(x, y, className) {\r\n var htmlElements = [];\r\n if (document.elementsFromPoint)\r\n htmlElements = document.elementsFromPoint(x, y);\r\n else if (document.msElementsFromPoint)\r\n htmlElements = document.msElementsFromPoint(x, y);\r\n if (typeof htmlElements.filter == 'function')\r\n return htmlElements.filter(function (htmlElement) { return htmlElement.classList.contains(className) });\r\n return getHtmlElementsContainingClassName(htmlElements, className);\r\n };\r\n\r\n resourcePlannerService.getHtmlElementsFromCoordinates = function (x, y, className) {\r\n return getHtmlElementsFromCoordinates(x, y, className);\r\n }\r\n\r\n resourcePlannerService.getUserElementsFromCoordinates = function (x, y) {\r\n return getHtmlElementsFromCoordinates(x, y, 'rp-hour-task');\r\n };\r\n\r\n /**\r\n * Gets the start date and end date of a given task\r\n * @param task\r\n * @returns\r\n */\r\n function getDateOfTask(task) {\r\n if (task.Parent && task.Parent.id) {\r\n return $filter('date')(task.Parent.StartDate, 'dd-MMM-yyyy HH:mm', 'UTC') + ' - ' + $filter('date')(task.Parent.EndDate, 'dd-MMM-yyyy HH:mm', 'UTC');\r\n } else {\r\n return $filter('date')(task.StartDate, 'dd-MMM-yyyy HH:mm', 'UTC') + ' - ' + $filter('date')(task.EndDate, 'dd-MMM-yyyy HH:mm', 'UTC');\r\n }\r\n };\r\n\r\n /**\r\n * Gets extra info about the given task\r\n * @param task\r\n * @returns\r\n */\r\n function getSplittedInfo(task) {\r\n var infos = task.Name.split('|');\r\n if (infos.length == 0)\r\n return '';\r\n var info = '';\r\n if (infos[0])\r\n info += infos[0];\r\n if (infos[1] && task.Table != 'BOT_ORDER')\r\n info += '\\n ' + $filter('translate')('txtCustomer') + ': ' + infos[1];\r\n else if (task.Table == 'BOT_ORDER') {\r\n if (task.Order.Customer)\r\n info += '\\n ' + $filter('translate')('txtCustomer') + ': ' + getFullName(task.Order.Customer);\r\n }\r\n if (infos[2])\r\n info += '\\n' + $filter('translate')('txtTag') + ': ' + infos[2];\r\n return info;\r\n };\r\n\r\n resourcePlannerService.getSplittedInfo = getSplittedInfo;\r\n\r\n /**\r\n * Gets the full name of the given participants\r\n * @param participants\r\n * @returns\r\n */\r\n function getParticipantsName(participants) {\r\n if (!participants || participants.length == 0)\r\n return '';\r\n\r\n return participants.map(function (participant, index) {\r\n return ((index + 1) % 3 == 0 && participants.length > 3 ? '\\n' : ' ') + (participant.FirstName ? participant.FirstName + ' ' : '') + (participant.LastName ? participant.LastName : '');\r\n }).toString();\r\n }\r\n\r\n /**\r\n * Gets the full name for the task\r\n * @param task\r\n * @returns\r\n */\r\n function getNameOfTask(task) {\r\n if (task.Parent && task.Parent.id) {\r\n if (task.Table == 'BOT_ORDER')\r\n return $filter('translate')('txtOrder') + ' ' + getSplittedInfo(task);\r\n if (task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM' || task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM_CALENDAR')\r\n return task.Name;\r\n if (task.Table == 'GOT_TYPE')\r\n return 'ID ' + task.Parent.id;\r\n if (task.Table == 'BOT_CUSTOMER')\r\n return 'ID ' + task.Parent.id + '\\n' + $filter('translate')('txtCustomer') + ': ' + getFullName(task.Customer);\r\n if (task.Table == 'GOT_USER')\r\n return 'ID ' + task.Parent.id + '\\n' + $filter('translate')('txtParticipants') + ': ' + getParticipantsName(task.MeetingParticipants);\r\n } else {\r\n if (task.Table == 'BOT_ORDER')\r\n return $filter('translate')('txtOrder') + ' ' + getSplittedInfo(task);\r\n if (task.Table == 'GOT_TYPE' || task.Table === TableResources.CourseTable || task.Table === TableResources.CourseDayHoursTable)\r\n return 'ID ' + task.id;\r\n if (task.Table == 'BOT_CUSTOMER')\r\n return 'ID ' + task.id + '\\n' + $filter('translate')('txtCustomer') + ':' + getFullName(task.Customer);\r\n if (task.Table == 'GOT_USER')\r\n return 'ID ' + task.id + '\\n' + $filter('translate')('txtParticipants') + ':' + getParticipantsName(task.MeetingParticipants);\r\n if (task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM' || task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM_CALENDAR')\r\n return getSplittedInfo(task);\r\n }\r\n };\r\n\r\n resourcePlannerService.getNameOfTask = getNameOfTask;\r\n\r\n /**\r\n * Gets the correct status for an order to be displayed in the resource planner\r\n * @param {Order} order\r\n */\r\n resourcePlannerService.getOrderStatus = function (order) {\r\n\r\n var status = '';\r\n\r\n // if the order is the main one\r\n // get the correct status to display\r\n if (order.id === order.MainOrderId) {\r\n\r\n if (order.FullyDone) {\r\n status = $translate.instant('DONE');\r\n }\r\n else {\r\n\r\n // if the main order is not fully done\r\n // and its status is set to 'DONE', then\r\n // the correct status will be 'IN_PROGRESS'\r\n if (order.Status.ProgId === 'DONE')\r\n status = $translate.instant('IN_PROGRESS');\r\n else\r\n status = $translate.instant(order.Status.ProgId);\r\n\r\n }\r\n\r\n } else {\r\n status = $translate.instant(order.Status.ProgId);\r\n }\r\n\r\n return status;\r\n\r\n }\r\n\r\n /**\r\n * Get the current status of the task\r\n * @param task\r\n * @returns\r\n */\r\n function getStatusOfTask(task) {\r\n var todaysDate = DateUtilService.getLongWithOffset(new Date());\r\n var statusToReturn = '';\r\n\r\n if (task.Table === 'BOT_ORDER' && task.Order && task.Order.Status && task.Order.Status.ProgId) {\r\n statusToReturn = resourcePlannerService.getOrderStatus(task.Order);\r\n } else {\r\n\r\n if (todaysDate < task.StartDate)\r\n statusToReturn = $filter('translate')('PLANNED');\r\n if (todaysDate > task.StartDate && todaysDate < task.EndDate)\r\n statusToReturn = $filter('translate')('UNDER_IMPLEMENTATION');\r\n if (todaysDate > task.EndDate || (task.Execution && task.Execution.InitiatedProcessList && task.Execution.InitiatedProcessList.Status && task.Execution.InitiatedProcessList.Status.ProgId == 'DONE'))\r\n statusToReturn = $filter('translate')('COMPLETED');\r\n\r\n }\r\n\r\n return statusToReturn;\r\n };\r\n\r\n /**\r\n * Gets the address of the task that is order related\r\n * @param task\r\n * @returns\r\n */\r\n function getAddressOfTaskOrder(task) {\r\n if (task) {\r\n var addresses = [];\r\n if (!task.Order.SiteAddress)\r\n return '';\r\n\r\n if (task.Order.SiteAddress.Street)\r\n addresses.push(task.Order.SiteAddress.Street);\r\n\r\n if (task.Order.SiteAddress.Street2)\r\n addresses.push(task.Order.SiteAddress.Street2);\r\n\r\n if (task.Order.SiteAddress.Street3)\r\n addresses.push(task.Order.SiteAddress.Street3);\r\n\r\n if (task.Order.SiteAddress.PostalPlace)\r\n addresses.push(task.Order.SiteAddress.PostalPlace);\r\n\r\n if (task.Order.SiteAddress.PostalCode)\r\n addresses.push(task.Order.SiteAddress.PostalCode);\r\n\r\n return addresses.map(function (a) { return ' ' + a }).toString();\r\n }\r\n return '';\r\n }\r\n\r\n resourcePlannerService.getAddressOfTaskOrder = getAddressOfTaskOrder;\r\n\r\n resourcePlannerService.getStatusOfTask = getStatusOfTask;\r\n\r\n /**\r\n * Gets the necessary info for the popover\r\n * @param event\r\n * @param firstTask\r\n * @param loggedUser\r\n * @returns\r\n */\r\n resourcePlannerService.getPopupInfo = function (event, firstTask, loggedUser) {\r\n var taskElements = getHtmlElementsFromCoordinates(event.pageX, event.pageY, 'rp-day-task');\r\n var overlayedTasksInfo = '';\r\n if (taskElements.length > 1) {\r\n overlayedTasksInfo = 'Det er ' + taskElements.length + ' oppgaver overlapp \\n';\r\n for (var i = 0; i < taskElements.length; i++) {\r\n var task = angular.element(taskElements[i]).scope().$parent.task;\r\n if (task.IsPrivate && task.User.id != loggedUser.id)\r\n overlayedTasksInfo += $filter('translate')('txtBusy') + '\\n';\r\n else {\r\n overlayedTasksInfo += task.Name.split('|')[0] + ' ';\r\n overlayedTasksInfo += getDateOfTask(task) + '\\n';\r\n }\r\n }\r\n } else {\r\n if (firstTask.IsPrivate && firstTask.User.id != loggedUser.id)\r\n overlayedTasksInfo += $filter('translate')('txtBusy');\r\n else {\r\n overlayedTasksInfo = getNameOfTask(firstTask) + '\\n';\r\n overlayedTasksInfo += $filter('translate')('txtStatus') + ': ' + getStatusOfTask(firstTask) + '\\n';\r\n\r\n if (firstTask.Table == 'BOT_ORDER') {\r\n overlayedTasksInfo += $filter('translate')('txtAddress') + ': ' + getAddressOfTaskOrder(firstTask) + '\\n';\r\n }\r\n overlayedTasksInfo += getDateOfTask(firstTask);\r\n\r\n if (firstTask.Table == 'GOT_USER' && firstTask.PendingResponse)\r\n overlayedTasksInfo += '\\n ' + $filter('translate')('txtMeetingNotAccepted');\r\n }\r\n }\r\n\r\n\r\n //experimental\r\n $timeout(function () {\r\n var popover = document.getElementsByClassName('popover');\r\n if (!popover || popover.length == 0) {\r\n return;\r\n }\r\n var parent = popover[0].offsetParent.getBoundingClientRect();\r\n\r\n popover[0].style.left = (event.originalEvent.pageX - parent.left) - (popover[0].clientWidth / 2) + 'px';\r\n }, 10);\r\n return overlayedTasksInfo;\r\n };\r\n\r\n /**\r\n * Gets the content for the dropdown for when the users clicks on two overlapping tasks\r\n * @param event\r\n * @param firstTask\r\n * @param users\r\n * @returns\r\n */\r\n resourcePlannerService.getOverlapDropdown = function (event, firstTask, users) {\r\n var taskElements = getHtmlElementsFromCoordinates(event.pageX, event.pageY, 'rp-day-task');\r\n if (taskElements.length > 1) {\r\n var overlappingTasks = [];\r\n for (var i = 0; i < taskElements.length; i++) {\r\n overlappingTasks.push(resourcePlannerService.getTaskById(taskElements[i].id.split('task')[1], users));\r\n }\r\n var dropdownElement = document.getElementsByClassName('rp-overlap')[0];\r\n var grid = document.getElementsByClassName('rp-overview')[0].getBoundingClientRect();\r\n\r\n dropdownElement.style.top = (event.originalEvent.pageY - grid.top) + 'px';\r\n dropdownElement.style.left = (event.originalEvent.pageX - grid.left) + 'px';\r\n return overlappingTasks;\r\n } else {\r\n return firstTask;\r\n }\r\n };\r\n\r\n function isTaskWideEnough(task, width) {\r\n var taskElement = document.getElementById('task' + task.id);\r\n return taskElement.offsetWidth > width;\r\n };\r\n\r\n function getFullName(object) {\r\n return (object.FirstName ? object.FirstName + ' ' : '') + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Gets the full description of the task\r\n * @param task\r\n * @param loggedUser\r\n * @returns\r\n */\r\n resourcePlannerService.getTaskInfo = function (task, loggedUser) {\r\n var infoToReturn = '', splittedText = '';\r\n if (task.IsPrivate && task.User.id != loggedUser.id)\r\n return $filter('translate')('txtBusy');\r\n\r\n infoToReturn = '
';\r\n if (task.Table == 'BOT_ORDER') {\r\n splittedText = task.Name.split('|');\r\n infoToReturn += $filter('translate')('txtOrder') + ' ' + splittedText[0] + ', ';\r\n\r\n if (task.Order && task.Order.Customer)\r\n infoToReturn += $filter('translate')('txtCustomer') + ' ' + task.Order.Customer.FirstName + ' ' + task.Order.Customer.LastName + ', ';\r\n\r\n var address = getAddressOfTaskOrder(task);\r\n if (address)\r\n infoToReturn += $filter('translate')('txtAddress') + ': ' + address + '
' + ' ';\r\n\r\n if (splittedText[2])\r\n infoToReturn += $filter('translate')('txtTag') + ': ' + splittedText[2] + ', ';\r\n infoToReturn += $filter('translate')('txtStatus') + ': ' + resourcePlannerService.getStatusOfTask(task) + '
';\r\n\r\n }\r\n if (task.Table == 'GOT_TYPE') {\r\n infoToReturn += task.Name + '
';\r\n infoToReturn += $filter('translate')('txtStatus') + ': ' + resourcePlannerService.getStatusOfTask(task);\r\n }\r\n if (task.Table == 'GOT_USER') {\r\n infoToReturn += (task.PendingResponse ? '' + $filter('translate')('txtMeetingNotAccepted') + ' , ' : '') + task.Name + ', ';\r\n infoToReturn += '
';\r\n infoToReturn += $filter('translate')('txtStatus') + ': ' + resourcePlannerService.getStatusOfTask(task) + ', ';\r\n infoToReturn += $filter('translate')('txtParticipants') + ':' + getParticipantsName(task.MeetingParticipants).replace('\\n', '');\r\n }\r\n if (task.Table == 'BOT_CUSTOMER') {\r\n infoToReturn += task.Name + ', ';\r\n infoToReturn += $filter('translate')('txtCustomer') + ': ' + getFullName(task.Customer) + '
';\r\n infoToReturn += $filter('translate')('txtStatus') + ': ' + resourcePlannerService.getStatusOfTask(task);\r\n }\r\n if (task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM' || task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM_CALENDAR') {\r\n infoToReturn += task.Name + '
';\r\n infoToReturn += $filter('translate')('txtStatus') + ': ' + resourcePlannerService.getStatusOfTask(task);\r\n }\r\n\r\n if (task.Table === TableResources.CourseTable || task.Table === TableResources.CourseDayHoursTable) {\r\n infoToReturn += 'ID ' + task.id + ' ';\r\n infoToReturn += $translate.instant('RESOURCE_PLANNER.COURSE') + ': ' + task.Name + '
';\r\n infoToReturn += $translate.instant('txtStatus') + ': ' + resourcePlannerService.getStatusOfTask(task);\r\n }\r\n\r\n infoToReturn += '
';\r\n\r\n return infoToReturn;\r\n };\r\n\r\n /**\r\n * Checks whether the task is private to the logged user\r\n * @param task\r\n * @param loggedUser\r\n * @returns\r\n */\r\n resourcePlannerService.isTaskPrivateToCurrentUser = function (task, loggedUser) {\r\n return task.IsPrivate && loggedUser.id != task.User.id;\r\n };\r\n\r\n /**\r\n * Gets the opacity value for the given task\r\n * @param task\r\n * @returns\r\n */\r\n resourcePlannerService.getOpacityValue = function (task) {\r\n\r\n if (task.Table == 'GOT_USER' && task.PendingResponse)\r\n return '0.2';\r\n\r\n if (task.Execution && task.Execution.InitiatedProcessList && task.Execution.InitiatedProcessList.Status && task.Execution.InitiatedProcessList.Status.ProgId == 'DONE')\r\n return '0.3';\r\n\r\n\r\n return '0.7';\r\n };\r\n\r\n /**\r\n * Sets the opacity value for the given task\r\n * @param task\r\n * @param level\r\n */\r\n resourcePlannerService.setOpacityLevel = function (task, level) {\r\n\r\n if (!task || !task.id || !level || typeof level !== \"string\")\r\n return;\r\n\r\n var element = document.getElementById(\"task\" + task.id);\r\n\r\n angular.element(element)\r\n .css(\"opacity\", level);\r\n\r\n };\r\n\r\n /**\r\n * Manages those tasks that are dragged outside the boundaries\r\n * @param task\r\n * @param computedDates\r\n * @param navigationModeStartDate\r\n * @returns\r\n */\r\n resourcePlannerService.manageNotInRangeTask = function (task, computedDates, navigationModeStartDate) {\r\n\r\n if (!task || !computedDates)\r\n return null;\r\n\r\n var datesAfterDrop = {};\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (!resourcePlannerService.isStartDateInRange(taskStartDate, navigationModeStartDate)) {\r\n\r\n datesAfterDrop.EndDate = computedDates.EndDate;\r\n // if task is dragged to the left\r\n if (computedDates.EndDate < task.EndDate) {\r\n // subtract from start date the difference between last date and new date\r\n datesAfterDrop.StartDate = task.StartDate - (task.EndDate - computedDates.EndDate);\r\n } else {\r\n // add to start date the difference between new date and last date\r\n datesAfterDrop.StartDate = task.StartDate + (computedDates.EndDate - task.EndDate);\r\n }\r\n\r\n } else {\r\n\r\n datesAfterDrop.StartDate = computedDates.StartDate;\r\n // if task is dragged to the left\r\n if (computedDates.StartDate < task.StartDate) {\r\n // subtract from task end date, the difference between last date and new date\r\n datesAfterDrop.EndDate = task.EndDate - (task.StartDate - computedDates.StartDate);\r\n } else {\r\n // add to task end date, the difference between new date and last date\r\n datesAfterDrop.EndDate = task.EndDate + (computedDates.StartDate - task.StartDate);\r\n }\r\n\r\n }\r\n\r\n return datesAfterDrop;\r\n\r\n };\r\n\r\n //Part of 10572 task\r\n ///**\r\n // * Prepares the dates that will be displayed in the resource planner based on the salary period\r\n // * @param {number} salaryPeriodFrom\r\n // * @param {Date} selectedDate\r\n // * @param {Date} nextMonthDate\r\n // */\r\n //resourcePlannerService.processSalaryPeriod = function (salaryPeriodFrom, selectedDate, nextMonthDate) {\r\n\r\n // var month = { days: [] };\r\n\r\n // // this variable will represent the start day from where \r\n // // we begin to add dates for the current selected month\r\n // var startDay;\r\n\r\n // // this variable will represent the end day where\r\n // // we will stop addding dates for the next month\r\n // var endDay;\r\n\r\n // var salaryDate = moment(salaryPeriodFrom).toObject().date;\r\n\r\n // var numberOfDaysForCurrentMonth = DateUtilService.getNumberOfDaysInMonth(selectedDate);\r\n // var numberOfDaysForNextMonth = DateUtilService.getNumberOfDaysInMonth(nextMonthDate);\r\n\r\n // // handle the case when the salary date greater than the last day in the current month\r\n // if (salaryDate > numberOfDaysForCurrentMonth)\r\n // // if so then we set aas start day the last day in the month\r\n // startDay = numberOfDaysForCurrentMonth;\r\n // else\r\n // startDay = salaryDate;\r\n\r\n // // starting with the salary date until the end of the month add the dates in a list\r\n // for (var index = startDay; index <= numberOfDaysForCurrentMonth; index++) {\r\n // month.days.push(DateUtilService.getDateInMonth(selectedDate.getFullYear(), selectedDate.getMonth(), index));\r\n // }\r\n\r\n // // handle the case when the salary date is greater than the last day in the next month\r\n // if (salaryDate > numberOfDaysForNextMonth)\r\n // // if so then we set as end day the last day in the month\r\n // endDay = numberOfDaysForNextMonth;\r\n // else\r\n // endDay = salaryDate;\r\n\r\n // // for the next month, starting from the beginning until the salary date, add the dates in the list\r\n // for (var i = 1; i <= endDay; i++) {\r\n // month.days.push(DateUtilService.getDateInMonth(nextMonthDate.getFullYear(), nextMonthDate.getMonth(), i));\r\n // }\r\n\r\n // return month;\r\n\r\n //};\r\n\r\n //property used for keeping track of the order that is dragged and dropped\r\n resourcePlannerService.resourcePlannerOrderDragged = null;\r\n //property used for keeping track of the tasks that is being dragged\r\n resourcePlannerService.resourcePlannerTaskDragged = null;\r\n\r\n return resourcePlannerService;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerTrashController.$inject = [\r\n '$timeout',\r\n 'ResourcePlannerService'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerTrashController', ResourcePlannerTrashController)\r\n .directive('resourcePlannerTrash', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ResourcePlannerTrashController as vm',\r\n template: '
' +\r\n '' +\r\n '
',\r\n bindToController: true,\r\n scope: {\r\n users: '=',\r\n resourcePlanner: '=',\r\n getTasks: '&'\r\n }\r\n }\r\n });\r\n\r\n //Controller used for the Trash component where the user can drag and drop tasks onto it to disable tasks\r\n function ResourcePlannerTrashController(\r\n $timeout,\r\n ResourcePlannerService\r\n ) {\r\n var vm = this;\r\n var lastColor = null;\r\n\r\n //init\r\n $timeout(function () {\r\n interact('.rp-trash').dropzone({\r\n accept: '.rp-day-task',\r\n overlap: 0.01,\r\n ondrop: function (event) {\r\n //get the current position\r\n var position = event.target.getBoundingClientRect();\r\n\r\n //if the task is over the trash\r\n if (event.interaction.pointers[0].pageX >= position.left &&\r\n event.interaction.pointers[0].pageY >= position.top &&\r\n event.interaction.pointers[0].pageX <= position.right &&\r\n event.interaction.pointers[0].pageY <= position.bottom) {\r\n event.relatedTarget.style.backgroundColor = '#c0392b';\r\n\r\n\r\n var taskToSave = ResourcePlannerService.getTaskById(event.relatedTarget.id.split('task')[1], vm.users);\r\n //deactivate the task\r\n taskToSave.Active = false;\r\n\r\n vm.resourcePlanner.updateTaskListWithoutEmail(taskToSave).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n }\r\n }\r\n })\r\n .on('dragenter', function (event) {\r\n //remember the initial color of the task;\r\n lastColor = angular.copy(event.relatedTarget.style.backgroundColor);\r\n })\r\n .on('dragleave', function (event) {\r\n //reset the color;\r\n event.relatedTarget.style.backgroundColor = lastColor;\r\n event.relatedTarget.style.zIndex = 10;\r\n })\r\n .on('dropmove', function (event) {\r\n //if the cursor is above the trash ==> make the task red\r\n var position = event.target.getBoundingClientRect();\r\n var mouseCoordinates = event.interaction.pointers[0];\r\n\r\n if (mouseCoordinates.pageX >= position.left &&\r\n mouseCoordinates.pageY >= position.top &&\r\n mouseCoordinates.pageX <= position.right &&\r\n mouseCoordinates.pageY <= position.bottom) {\r\n event.relatedTarget.style.backgroundColor = '#c0392b';//red color to mark it ready for delete\r\n event.relatedTarget.style.zIndex = 600;\r\n } else {\r\n event.relatedTarget.style.backgroundColor = lastColor;\r\n event.relatedTarget.style.zIndex = 10;\r\n }\r\n\r\n });\r\n });\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerViewController.$inject = [\r\n '$uibModal',\r\n 'ResourcePlannerService',\r\n '$timeout',\r\n '$filter',\r\n '$scope',\r\n 'sessionInformationService',\r\n 'UserUtilService'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerViewController', ResourcePlannerViewController)\r\n .directive('resourcePlannerView', function () {\r\n return {\r\n restrict: 'AE',\r\n controller: 'ResourcePlannerViewController as vm',\r\n templateUrl: 'template/resourcePlannerView.html',\r\n bindToController: true,\r\n scope: {\r\n resourcePlanner: '=',\r\n users: '=',\r\n allUsers: '=',\r\n isPersonnel: '='\r\n }\r\n };\r\n })\r\n .run(['$templateCache', function ($templateCache) {\r\n $templateCache.put('template/usersViewModal.html',\r\n '
\\\r\n {{vm.userViewEdit && vm.userViewEdit.id ? vm.userViewEdit.Name : \\'txtNewView\\' | translate}}\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
{{vm.resourcePlanner.getFullName(user)}} \\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
{{\\'txtNoUsers\\' | translate}}
\\\r\n
\\\r\n
\\\r\n
{{vm.resourcePlanner.getFullName(user)}} \\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
'\r\n );\r\n\r\n $templateCache.put('template/resourcePlannerView.html',\r\n '
\\\r\n \\\r\n
\\\r\n \\\r\n \\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n \\\r\n
'\r\n );\r\n }]);\r\n\r\n function ResourcePlannerViewController(\r\n $uibModal,\r\n ResourcePlannerService,\r\n $timeout,\r\n $filter,\r\n $scope,\r\n sessionInformationService,\r\n UserUtilService\r\n ) {\r\n var vm = this;\r\n vm.userViews = [];\r\n vm.loggedUser = {};\r\n\r\n var allView = {\r\n Name: 'Alle',\r\n ProgId: 'ALL'\r\n };\r\n\r\n vm.intellisense = { isUsersViewOpen: false };\r\n\r\n /**\r\n * Gets the user views\r\n */\r\n vm.getUsersView = function (includeDeactivatedViews) {\r\n vm.userViews = [];\r\n vm.resourcePlanner.getResourcePlannerDropdownViews(includeDeactivatedViews)\r\n .then(function (result) {\r\n //add the all view\r\n vm.userViews.push(allView);\r\n //add the views that came from the server\r\n for (var i = 0; i < result.length; i++)\r\n vm.userViews.push(result[i]);\r\n //set saved view if exists in factory, else set the all view as selected\r\n if (vm.resourcePlanner.userGroupId)\r\n $filter('filter')(vm.userViews, function (userView) {\r\n if (userView.id == vm.resourcePlanner.userGroupId) {\r\n //get users according to saved userView\r\n vm.setUserView(userView);\r\n return;\r\n }\r\n });\r\n else {\r\n vm.selectedUserView = null;\r\n }\r\n if (!vm.selectedUserView) {\r\n vm.selectedUserView = vm.userViews[0];\r\n if (!vm.isPersonnel)\r\n //get all users in the beginning\r\n vm.resourcePlanner.getUsers().then(function () {\r\n vm.setUserView(vm.selectedUserView);\r\n });\r\n else\r\n vm.setUserView(vm.selectedUserView);\r\n }\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Opens the modal to edit the given view\r\n * If no view is provided a new view will be created\r\n * @param selectedUserView\r\n */\r\n vm.openUserViewModal = function (selectedUserView) {\r\n if (selectedUserView) {\r\n vm.userViewEdit = selectedUserView;\r\n vm.resourcePlanner.getResourcePlannerViewUsers(vm.userViewEdit.id)\r\n .then(function (result) {\r\n vm.userViewEdit.Users = $filter('filter')(result, function (u) { return u.Active; });\r\n vm.userViewEdit.Users = $filter('orderBy')(result, 'FirstName');\r\n });\r\n } else {\r\n vm.userViewEdit = {\r\n Active: true,\r\n Users: []\r\n };\r\n }\r\n $uibModal.open({\r\n templateUrl: 'template/usersViewModal.html',\r\n scope: $scope\r\n });\r\n };\r\n\r\n /**\r\n * Adds the given user to the current view\r\n * @param user\r\n */\r\n vm.addUserToCurrentView = function (user) {\r\n var existingUsers = vm.userViewEdit.Users.map(function (user) { return { id: parseInt(user.id) }; });\r\n\r\n //check if the user exists already\r\n if ($filter('filter')(existingUsers, function (existingUser) { return existingUser.id === parseInt(user.id); }).length > 0)\r\n return;\r\n\r\n //add the user to the list\r\n vm.userViewEdit.Users.push(user);\r\n };\r\n\r\n /**\r\n * Sets the given view as the current one\r\n * @param userView\r\n */\r\n vm.setUserView = function (userView) {\r\n vm.selectedUserView = userView;\r\n vm.resourcePlanner.userGroupId = userView.id;\r\n var checkedUsers = [];\r\n\r\n if (vm.isPersonnel) {\r\n //remember the checked users by getting the participants\r\n if (vm.resourcePlanner.mainOrder.Participants && vm.resourcePlanner.mainOrder.Participants.length > 0)\r\n checkedUsers = vm.resourcePlanner.mainOrder.Participants.map(function (participant) { return participant.User });\r\n }\r\n\r\n //get the users for the selected view\r\n //if all get all users\r\n if (vm.selectedUserView.ProgId == 'ALL') {\r\n if (vm.isPersonnel) {\r\n vm.resourcePlanner.users = angular.copy(vm.resourcePlanner.allUsers);\r\n for (var i = 0; i < vm.resourcePlanner.users.length; i++)\r\n if ($filter('filter')(checkedUsers, function (u) { return u.id == vm.resourcePlanner.users[i].id }).length > 0)\r\n vm.resourcePlanner.users[i].Checked = true;\r\n\r\n $timeout(function () {\r\n vm.resourcePlanner.loading = true;\r\n vm.resourcePlanner.getTasks();\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.resourcePlanner.users);\r\n });\r\n }\r\n else {\r\n // get all users\r\n vm.resourcePlanner.getUsers()\r\n .then(function () {\r\n vm.getSidePanelTasksForSelectedUsers();\r\n });\r\n }\r\n\r\n } else {\r\n\r\n if ((!vm.users || vm.users.length === 0) && !vm.isPersonnel) {\r\n\r\n // the below code fixes the following issue:\r\n // - when the getUsers promise it's not yet resolved and this function (setUserView)\r\n // is called, the wrong users are displayed in the resource planner\r\n var subscription = $scope.$on('onGetUsersFromRPControllerResolved',\r\n function () {\r\n getUsersBySelectedView(vm.selectedUserView, checkedUsers);\r\n // call subscription to un-register the listener for 'onGetUsersFromRPControllerResolved' event\r\n subscription();\r\n });\r\n } else {\r\n getUsersBySelectedView(vm.selectedUserView, checkedUsers);\r\n }\r\n }\r\n };\r\n\r\n function getUsersBySelectedView(view, checkedUsers) {\r\n vm.resourcePlanner.getResourcePlannerViewUsers(view.id)\r\n .then(function (users) {\r\n\r\n if (!vm.isPersonnel) {\r\n vm.users = users;\r\n vm.users = $filter('filter')(vm.users, function (u) { return u.Active });\r\n vm.users = $filter('orderBy')(vm.users, 'FirstName');\r\n vm.users = UserUtilService.setLoggedUserFirst(vm.users, vm.loggedUser.id);\r\n //set all users checked\r\n for (var i = 0; i < users.length; i++)\r\n users[i].Checked = true;\r\n\r\n\r\n } else {\r\n\r\n vm.resourcePlanner.users = angular.copy(vm.resourcePlanner.allUsers);\r\n vm.resourcePlanner.users = $filter('filter')(vm.resourcePlanner.users, function (u) { return u.Active });\r\n vm.resourcePlanner.users = $filter('orderBy')(vm.resourcePlanner.users, 'FirstName');\r\n //remove those users that are not in view\r\n var i = vm.resourcePlanner.users.length;\r\n while (i--) {\r\n if ($filter('filter')(users, function (u) { return u.id == vm.resourcePlanner.users[i].id }).length == 0)\r\n vm.resourcePlanner.users.splice(i, 1);\r\n else if ($filter('filter')(checkedUsers, function (u) { return u.id == vm.resourcePlanner.users[i].id }).length > 0)\r\n vm.resourcePlanner.users[i].Checked = true;\r\n }\r\n vm.resourcePlanner.users = UserUtilService.setLoggedUserFirst(vm.resourcePlanner.users, vm.loggedUser.id);\r\n }\r\n $timeout(function () {\r\n vm.resourcePlanner.loading = true;\r\n vm.resourcePlanner.getTasks();\r\n if (!vm.isPersonnel) {\r\n vm.getSidePanelTasksForSelectedUsers();\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n }\r\n else {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.resourcePlanner.users);\r\n\r\n }\r\n\r\n\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Remove the given user from the current view\r\n * @param user\r\n */\r\n vm.removeSelectedUser = function (user) {\r\n var index = vm.userViewEdit.Users.indexOf(user);\r\n vm.userViewEdit.Users.splice(index, 1);\r\n };\r\n\r\n function removeInactiveViewFromViews(view) {\r\n var i = 0;\r\n for (i = 0; i < vm.userViews.length; i++)\r\n if (vm.userViews[i].id == view.id)\r\n break;\r\n vm.userViews.splice(i, 1);\r\n };\r\n\r\n vm.saveUserView = function () {\r\n vm.userViewEdit.Table = \"BOT_CONNECT_USER_RESOURCE_PLANNER\";\r\n vm.userViewEdit.OrganizationId = vm.resourcePlanner.getSelectedOrganizationId();\r\n vm.resourcePlanner.saveResourcePlannerView(vm.userViewEdit)\r\n .then(function (result) {\r\n // remove the inactive one from the list only\r\n // if include deactivated is not checked\r\n if (!result.Active && !vm.includeDeactivatedViews) {\r\n removeInactiveViewFromViews(result);\r\n return;\r\n }\r\n\r\n var existingViews = vm.userViews.map(function (userView) { return { id: parseInt(userView.id) } });\r\n\r\n //if the selected view is the same as the edited one, get the users, maybe some was added o removed\r\n if (result.id == vm.selectedUserView.id)\r\n vm.setUserView(result);\r\n\r\n //if it already exists, don't add it\r\n if ($filter('filter')(existingViews, function (existingView) { return existingView.id === parseInt(result.id); }).length > 0)\r\n return;\r\n //else add it to the list\r\n vm.userViews.push(result);\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the save should be disabled\r\n * @returns\r\n */\r\n vm.isSaveViewDisabled = function () {\r\n if (!vm.userViewEdit)\r\n return true;\r\n if (!vm.userViewEdit.Name)\r\n return true;\r\n if (!vm.userViewEdit.Users || vm.userViewEdit.Users.length == 0)\r\n return true;\r\n return false;\r\n };\r\n\r\n vm.filterSelected = function (user) {\r\n if (!vm.userViewEdit.Users || vm.userViewEdit.Users.length == 0)\r\n return true;\r\n for (var i = 0; i < vm.userViewEdit.Users.length; i++)\r\n if (vm.userViewEdit.Users[i].id == user.id)\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether to show the collapse button that collapses all the users\r\n * @returns\r\n */\r\n vm.showCollapseAllButton = function () {\r\n if (!vm.isPersonnel) {\r\n if (!vm.users || vm.users.length == 0)\r\n return false;\r\n for (var i = 0; i < vm.users.length; i++)\r\n if (vm.users[i].showCollapseButton && vm.users[i].Checked)\r\n return true;\r\n } else {\r\n if (!vm.resourcePlanner || !vm.resourcePlanner.users || vm.resourcePlanner.users.length == 0)\r\n return false;\r\n for (var i = 0; i < vm.resourcePlanner.users.length; i++)\r\n if (vm.resourcePlanner.users[i].showCollapseButton && vm.resourcePlanner.users[i].Checked)\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n vm.deselectAllExceptLoggedUser = function () {\r\n vm.resourcePlanner.deselectAllExceptLoggedUser();\r\n };\r\n\r\n vm.collapseAllUsers = function () {\r\n vm.resourcePlanner.collapseAllUsers();\r\n };\r\n\r\n vm.toggleViewDropdown = function () {\r\n $timeout(function () {\r\n vm.intellisense.isUsersViewOpen = !vm.intellisense.isUsersViewOpen;\r\n });\r\n };\r\n\r\n vm.getSidePanelTasksForSelectedUsers = function () {\r\n\r\n if (!vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers ||\r\n typeof (vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers) !== \"function\" ||\r\n !vm.resourcePlanner.showResourcePlannerTasks)\r\n return;\r\n\r\n vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers($filter('filter')(vm.users, { Checked: 'true' }));\r\n };\r\n\r\n vm.checkIfTheDropdownWillRemainOpen = function ($event, isClosing) {\r\n\r\n if (!isClosing)\r\n $event.stopPropagation();\r\n\r\n }\r\n\r\n function init() {\r\n vm.resourcePlanner.getUsersView = vm.getUsersView;\r\n vm.loggedUser = sessionInformationService.getUser();\r\n };\r\n\r\n //$timeout(vm.getUsersView);\r\n $timeout(init);\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n settingsService.$inject = [\r\n 'sessionInformationService'\r\n ];\r\n\r\n function settingsService(\r\n sessionInformationService\r\n ) {\r\n\r\n function canDemoContentTabBeDisplayed() {\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n // the tab is displayed only if the user is from the central organization\r\n return loggedUser.Organization.Central;\r\n }\r\n\r\n return {\r\n canDemoContentTabBeDisplayed: canDemoContentTabBeDisplayed\r\n };\r\n }\r\n\r\n angular\r\n .module('settings')\r\n .service('SettingsService', settingsService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n SettingsController.$inject = [\r\n '$scope',\r\n '$filter',\r\n 'titleService',\r\n 'dialogService',\r\n 'errorService',\r\n 'infoService',\r\n 'SettingsFactory',\r\n 'SettingsService',\r\n 'MenuItemFactory',\r\n 'GroupService'\r\n ];\r\n\r\n angular.module('settings').controller('SettingsController', SettingsController);\r\n\r\n function SettingsController(\r\n $scope,\r\n $filter,\r\n titleService,\r\n dialogService,\r\n errorService,\r\n infoService,\r\n SettingsFactory,\r\n SettingsService,\r\n MenuItemFactory,\r\n GroupService\r\n ) {\r\n\r\n titleService.changeTitle($filter('translate')('Settings'));\r\n\r\n var originalGroups = undefined;\r\n $scope.activeTab = 'GROUP_MENU_ACCESS';\r\n $scope.canDemoContentTabBeDisplayed = canDemoContentTabBeDisplayed;\r\n $scope.isAllAccessGroup = isAllAccessGroup;\r\n\r\n /**\r\n * Gets the menu accesses for the stored groups\r\n * @returns {} \r\n */\r\n $scope.getGroupsMenuAccess = function () {\r\n var organizationId = $scope.displayUser && $scope.displayUser.Organization && $scope.displayUser.Organization.id ? $scope.displayUser.Organization.id : $scope.loggedUser.Organization.id;\r\n var groupPromise = SettingsFactory.getGroupsMenuAccess(organizationId);\r\n groupPromise.$promise.then(function (result) {\r\n _.remove(result, function (g) { return g.ProgId === 'ADMIN_ALL' });\r\n _.remove(result, function (g) { return g.ProgId === 'USER_ALL' });\r\n $scope.groups = result;\r\n\r\n\r\n originalGroups = angular.copy(result);\r\n });\r\n };\r\n\r\n\r\n var tempAccess = false;\r\n /**\r\n * Changes the access for the given menu\r\n * @param {} menu \r\n * @param {} parentIndex \r\n * @param {} parentMenu \r\n * @returns {} \r\n */\r\n $scope.changeMenu = function (menu, parentIndex, parentMenu) {\r\n if ($scope.displayUser) {\r\n return;\r\n }\r\n\r\n if (menu.Name == $filter('translate')('Home') || ($scope.groups[parentIndex].ProgId == \"ADMIN\") && (menu.Name == $filter('translate')(\"Settings\")))\r\n errorService.changeError(($filter('translate')(\"txtYouCannot\")) + \" \" + $filter('translate')(menu.Name));\r\n else {\r\n menu.HasAccess = !menu.HasAccess;\r\n tempAccess = menu.HasAccess;\r\n if (parentMenu == undefined) {\r\n if (menu.MenuItems && menu.MenuItems.length > 0) {\r\n menu.MenuItems.forEach(function (menu) {\r\n menu.HasAccess = tempAccess;\r\n });\r\n }\r\n }\r\n else {\r\n var tempCount = 0;\r\n for (var index = 0; index < parentMenu.MenuItems.length; index++) {\r\n if (parentMenu.MenuItems[index].HasAccess == true)\r\n tempCount++;\r\n }\r\n parentMenu.HasAccess = true;\r\n if (tempCount == 0)\r\n parentMenu.HasAccess = false;\r\n }\r\n }\r\n\r\n\r\n };\r\n\r\n /**\r\n * Saves the menu settings\r\n * @returns {} \r\n */\r\n $scope.saveSettings = function () {\r\n if ($scope.displayUser) {\r\n return;\r\n }\r\n\r\n var savedMenus = SettingsFactory.saveGroupsMenuAccess($filter('filter')($scope.groups, function (g) { return g.ProgId != 'NOT_A_USER'; }));\r\n savedMenus.then(function (result) {\r\n if (result.SaveGroupsMenuAccessResult == \"msgSettingsSaved\")\r\n infoService.changeInfo($filter('translate')(result.SaveGroupsMenuAccessResult));\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether there were changes\r\n */\r\n function isDirty() {\r\n return angular.toJson($scope.groups) !== angular.toJson(originalGroups);\r\n };\r\n\r\n $scope.disabledSaveSettings = function () {\r\n if (isDirty())\r\n return false;\r\n return true;\r\n };\r\n\r\n function canDemoContentTabBeDisplayed() {\r\n return SettingsService.canDemoContentTabBeDisplayed();\r\n }\r\n\r\n function isAllAccessGroup(group) {\r\n return GroupService.isAllAccessGroup(group);\r\n }\r\n };\r\n\r\n})();\r\n\r\n","(function () {\r\n angular.module('settings').directive('displaySettings',\r\n function () { \r\n return {\r\n restrict: 'EA',\r\n templateUrl: 'Scripts/settings/settingsPartial.html',\r\n scope: {\r\n displayUser: '=?'\r\n },\r\n controller: 'SettingsController'\r\n };\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n SettingsFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('settings').factory('SettingsFactory', SettingsFactory);\r\n\r\n function SettingsFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var settingsFactory = {};\r\n\r\n var GroupsMenuAccess = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/GroupsMenuAccess');\r\n\r\n /**\r\n * Gets the menu accesses for the default roles\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n settingsFactory.getGroupsMenuAccess = function (organizationId) {\r\n return GroupsMenuAccess.query({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Saves the menu accesses for the given groups\r\n * @param {} groupList \r\n * @returns {} \r\n */\r\n settingsFactory.saveGroupsMenuAccess = function (groupList) {\r\n var group = new GroupsMenuAccess();\r\n group.groupList = groupList;\r\n return group.$save();\r\n };\r\n\r\n return settingsFactory;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .component('vbSearchBox', {\r\n\r\n templateUrl: 'Scripts/shared/search.component.html',\r\n controller: 'SearchController',\r\n controllerAs: 'vm',\r\n bindings: { \r\n table: ' 0) {\r\n if ($scope.isCompleted()) {\r\n $scope.processListElement.isCompleted = true;\r\n }\r\n // set the current element to the one before it and pop the queue\r\n $scope.processListElement = processListQueue[processListQueue.length - 1];\r\n processListQueue.pop();\r\n // initialize the simulation and continue from the last step\r\n initSimulation();\r\n if (processListQueue.length == 0) {\r\n $scope.canBack = false;\r\n }\r\n }\r\n };\r\n\r\n // if it's the root process list, go to the last page.\r\n $scope.processListDone = function () {\r\n if (processListQueue.length == 0) {\r\n // see what page you are on and go back to it\r\n $scope.close();\r\n } else {\r\n // go back to the parent process list\r\n $scope.backToParent();\r\n }\r\n };\r\n\r\n // when the user clicks on the Check button of a current action\r\n $scope.itemDone = function (index) {\r\n // first, cover the input for non-multi-select (STRING / NUMERICAL)\r\n if ($scope.processListElement.ProcessListItems[index].Option.Type.ProgId == \"NUMERIC\" || $scope.processListElement.ProcessListItems[index].Option.Type.ProgId == \"STRING\") {\r\n goToNextItem(index);\r\n }\r\n // handle the DROPDOWN or RADIO button depending on it's select\r\n if ($scope.processListElement.ProcessListItems[index].Option.SelectedValue && $scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem && $scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction) {\r\n switch ($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n jumpToStep($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.ProcessListItem.id);\r\n break;\r\n case \"ANOTHER_PROCESSLIST\":\r\n if (!$scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.ProcessList.isCompleted)\r\n $scope.jumpToProcessList($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.ProcessList);\r\n else\r\n goToNextItem(index);\r\n break;\r\n case \"CAMERA\":\r\n goToNextItem(index);\r\n break;\r\n case \"TEXT_FIELD\":\r\n goToNextItem(index);\r\n break;\r\n case \"SMS\":\r\n goToNextItem(index);\r\n break;\r\n case \"EMAIL\":\r\n goToNextItem(index);\r\n break;\r\n case \"SIGNATURE\":\r\n goToNextItem(index);\r\n break;\r\n default:\r\n goToNextItem(index);\r\n break;\r\n }\r\n // if there's no action assigned to the process list item option item :)\r\n\r\n } else {\r\n goToNextItem(index);\r\n }\r\n };\r\n\r\n // function to check if the button should be disabled \r\n $scope.isDisabled = function (index) {\r\n // if the input is string or numeric, check for it's value \r\n if ($scope.processListElement.ProcessListItems[index].Option.Type.ProgId == 'STRING' || $scope.processListElement.ProcessListItems[index].Option.Type.ProgId == 'NUMERIC') {\r\n if (($scope.processListElement.ProcessListItems[index].Option.StringInput && $scope.processListElement.ProcessListItems[index].Option.StringInput.length > 0)\r\n || ($scope.processListElement.ProcessListItems[index].Option.NumericInput && $scope.processListElement.ProcessListItems[index].Option.NumericInput >= 0))\r\n return false;\r\n }\r\n // if the input is radio or dropdown, check for it's selected value \r\n if ($scope.processListElement.ProcessListItems[index].Option.SelectedValue\r\n && $scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem) {\r\n if ($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction) {\r\n switch ($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n\r\n\r\n case \"TEXT_FIELD\":\r\n if ($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.DefaultAnswers.length <= 0) {\r\n return false;\r\n }\r\n else {\r\n if ($scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.ProcessListAction.SelectedDefaultAnswer == undefined) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n default:\r\n return $scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.id == undefined;\r\n }\r\n //default to \"no action\"\r\n } else\r\n if ($scope.processListElement.ProcessListItems[index].Option.Type.ProgId == \"RADIO_BUTTON\" || $scope.processListElement.ProcessListItems[index].Option.Type.ProgId == \"DROPDOWN\")\r\n return $scope.processListElement.ProcessListItems[index].Option.SelectedValue.OptionItem.id == undefined;\r\n\r\n\r\n }\r\n\r\n // return false if at least one of the elements is checked for Multiple Choice\r\n if ($scope.processListElement.ProcessListItems[index].Option.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n\r\n var anyCheckboxesChecked = ($scope.processListElement.ProcessListItems[index].Option.Items.some(function (choice) {\r\n return choice.IsChecked;\r\n }));\r\n return !anyCheckboxesChecked;\r\n }\r\n\r\n return true;\r\n\r\n };\r\n\r\n // jump to an already completed element\r\n $scope.itemSelected = function (index) {\r\n if ($scope.processListElement.ProcessListItems[$scope.processListElement.lastItem] != $scope.processListElement.ProcessListItems[index]\r\n && $scope.processListElement.ProcessListItems[index].PreventCollapse == false) {\r\n $scope.processListElement.ProcessListItems[$scope.processListElement.lastItem].isOpen = false;\r\n }\r\n $scope.processListElement.lastItem = index;\r\n };\r\n\r\n $scope.removeTextFromChoice = function (choice) {\r\n if (choice.IsChecked == false) {\r\n choice.UserComment = null;\r\n }\r\n };\r\n\r\n // standard answers\r\n $scope.isAnyStandardAnswerInEdit = function (items) {\r\n if (!items || items.length == 0)\r\n return false;\r\n for (var i = 0; i < items.length; i++)\r\n if (items[i].EditMode)\r\n return true;\r\n return false;\r\n };\r\n\r\n // check if a process list is fully completed to show the 'done' button - currently does nothing or goes back to parent\r\n $scope.isCompleted = function () {\r\n if ($scope.processListElement\r\n && $scope.processListElement.lastItem == $scope.processListElement.ProcessListItems.length - 1\r\n && $scope.isDisabled($scope.processListElement.lastItem) == false)\r\n return true;\r\n else\r\n return false;\r\n };\r\n\r\n // close button, go back to order page or process list page depending on position\r\n $scope.close = function () {\r\n if ($routeParams.orderId != undefined) {\r\n $scope.go('/order/' + $routeParams.orderId);\r\n }\r\n else {\r\n\r\n var processListId = $routeParams.processListElementId;\r\n\r\n ProcessListFactory.checkIfProcessListCanBeEdited(processListId)\r\n .then(function (result) {\r\n\r\n if (result.CanBeEdited) {\r\n $scope.go('/processListElement/' + processListId);\r\n } else {\r\n $scope.go('/processListElementReadOnly/' + processListId);\r\n }\r\n });\r\n }\r\n };\r\n\r\n $scope.openAttachment = function (attach) {\r\n if (attach.IsExternalURL == false) downloadFile(attach.URL);\r\n else {\r\n var win = window.open(attach.URL, '_blank');\r\n //win.focus();\r\n }\r\n return;\r\n };\r\n //TODO: use DownloadService\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n statusFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function statusFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var CourseStatuses = $resource(baseUrl + 'REST/Status.svc/CourseStatuses');\r\n\r\n function getCourseStatuses() {\r\n return CourseStatuses.query().$promise;\r\n }\r\n\r\n return {\r\n getCourseStatuses: getCourseStatuses\r\n };\r\n }\r\n\r\n angular\r\n .module('status')\r\n .factory('StatusFactory', statusFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n statusService.$inject = [\r\n '$translate'\r\n ];\r\n\r\n function statusService(\r\n $translate\r\n ) {\r\n\r\n function getStatusTranslation(status) {\r\n\r\n if (!status || !status.Translations || status.Translations.length === 0) {\r\n return '';\r\n }\r\n\r\n var currentLanguage = $translate.use();\r\n var translation = status.Translations.find(function(translation) {\r\n return translation.Culture === currentLanguage;\r\n });\r\n\r\n if (!translation) {\r\n return '';\r\n }\r\n\r\n return translation.Value;\r\n }\r\n\r\n return {\r\n getStatusTranslation: getStatusTranslation\r\n };\r\n }\r\n\r\n angular\r\n .module('status')\r\n .service('StatusService', statusService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n taskListService.$inject = [\r\n 'TableResources',\r\n '$translate'\r\n ];\r\n\r\n function taskListService(\r\n TableResources,\r\n $translate\r\n ) {\r\n\r\n function isTaskInteractable(task) {\r\n\r\n if (!task) {\r\n return false;\r\n }\r\n\r\n // the task is not interactable if it was generated from a management execution\r\n // or from a course\r\n if (task.Table === TableResources.InitiatedProcessListItemTable ||\r\n task.Table === TableResources.InitiatedProcessListItemCalendarTable ||\r\n task.Table === TableResources.CourseTable ||\r\n task.Table === TableResources.CourseDayHoursTable) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function lockNonInteractableTasks(usersWithTasks) {\r\n\r\n if (!usersWithTasks || usersWithTasks.length === 0) {\r\n return;\r\n }\r\n\r\n usersWithTasks.forEach(function(userWithTasks) {\r\n\r\n if (!userWithTasks.Tasks || userWithTasks.Tasks.length === 0) {\r\n return;\r\n }\r\n\r\n userWithTasks.Tasks.forEach(function(task) {\r\n\r\n if (!isTaskInteractable(task)) {\r\n task.isLocked = true;\r\n\r\n if (!task.warningInfo)\r\n task.warningInfo = '';\r\n\r\n task.warningInfo += $translate.instant('TASKLIST_MODEL.WARNINGS.NOT_INTERACTABLE_TASK') + '\\n';\r\n }\r\n });\r\n });\r\n }\r\n\r\n return {\r\n isTaskInteractable: isTaskInteractable,\r\n lockNonInteractableTasks: lockNonInteractableTasks\r\n };\r\n }\r\n\r\n angular\r\n .module('taskList')\r\n .service('TaskListService', taskListService);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n TaskListFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('execution').factory('TaskListFactory', TaskListFactory);\r\n\r\n function TaskListFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var taskListFactory = {};\r\n\r\n var TaskLists = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskLists');\r\n var TaskList = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskLists/:taskId');\r\n var TaskListsWithoutEmail = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/TaskListsWithoutEmail/:taskId', { taskId: '@taskId' }, { update: { method: 'PUT' } });\r\n var ExecutionTasks = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ExecutionTasks');\r\n var ResourcePlannerTasks = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/ResourcePlannerTasks');\r\n var SearchTasks = $resource(baseUrlService.getBaseUrl() + 'REST/TaskList.svc/SearchTasks');\r\n\r\n /**\r\n * Gets the tasks for the given user\r\n * @param {} userId \r\n * @returns {} \r\n */\r\n taskListFactory.getTasks = function (userId) {\r\n return TaskLists.query({ userId: userId });\r\n };\r\n\r\n /**\r\n * Gets the task by id\r\n * @param {} taskId \r\n * @returns {} \r\n */\r\n taskListFactory.getTask = function (taskId) {\r\n return TaskList.get({ taskId: taskId });\r\n };\r\n\r\n /**\r\n * Gets a new object to later be saved\r\n * @returns {} \r\n */\r\n taskListFactory.getTaskToSave = function () {\r\n return new TaskLists();\r\n };\r\n\r\n /**\r\n * Saves the given task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n taskListFactory.saveTask = function (task) {\r\n return task.$save();\r\n };\r\n\r\n /**\r\n * Updates the task without sending email\r\n * @param {} task \r\n * @returns {} \r\n */\r\n taskListFactory.updateTaskListWithoutEmail = function (task) {\r\n return TaskListsWithoutEmail.update({ taskId: task.id }, task).$promise;\r\n };\r\n\r\n /**\r\n * Get those tasks that are associated with an execution\r\n * @param {} userId \r\n * @param {} forDisplay \r\n * @returns {} \r\n */\r\n taskListFactory.getExecutionTasks = function (userId, forDisplay) {\r\n return ExecutionTasks.query({ userId: userId, forDisplay: forDisplay });\r\n };\r\n\r\n /**\r\n * Gets the tasks that are visible in resource planner as well\r\n * @param {} userIds \r\n * @returns {} \r\n */\r\n taskListFactory.getResourcePlannerTasksForSelectedUsers = function (userIds) {\r\n\r\n return ResourcePlannerTasks.query({\r\n userIds: userIds\r\n }).$promise;\r\n\r\n };\r\n\r\n /**\r\n * Gets the tasks based on the search criteria\r\n * @param {} userIds \r\n * @param {} searchText \r\n * @returns {} \r\n */\r\n taskListFactory.searchTasksByText = function (userIds, searchText) {\r\n return SearchTasks.query({\r\n userIds: userIds,\r\n searchText: searchText\r\n }).$promise;\r\n };\r\n\r\n return taskListFactory;\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n typeFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function typeFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n var NotificationTypes = $resource(baseUrl + 'REST/Type.svc/NotificationTypes');\r\n var EventTypes = $resource(baseUrl + 'REST/Type.svc/EventTypes');\r\n var MandatoryNotificationTypesByOrganization = $resource(baseUrl + 'REST/Type.svc/MandatoryNotificationTypes/:organizationId/:table');\r\n var CourseTypes = $resource(baseUrl + 'REST/Type.svc/CourseTypes');\r\n var CourseCategory = $resource(baseUrl + 'REST/Type.svc/CourseCategory');\r\n var CourseCategories = $resource(baseUrl + 'REST/Type.svc/CourseCategories');\r\n var TargetAudience = $resource(baseUrl + 'REST/Type.svc/TargetAudience');\r\n var TargetAudiences = $resource(baseUrl + 'REST/Type.svc/TargetAudiences');\r\n var CourseInvitationDispatchModes = $resource(baseUrl + 'REST/Type.svc/CourseInvitationDispatchModes');\r\n var CourseInvitationDispatchManualModeOptions = $resource(baseUrl + 'REST/Type.svc/CourseInvitationDispatchManualModeOptions');\r\n var ProductColumnTypes = $resource(baseUrl + 'REST/Type.svc/ProductColumnTypes');\r\n\r\n function getNotificationTypes() {\r\n return NotificationTypes.query().$promise;\r\n }\r\n\r\n function getEventTypes() {\r\n return EventTypes.query().$promise;\r\n }\r\n\r\n function getMandatoryNotificationTypesByOrganizationId(organizationId, table) {\r\n\r\n return MandatoryNotificationTypesByOrganization.query({\r\n organizationId: organizationId,\r\n table: table\r\n }).$promise;\r\n }\r\n\r\n function getCourseTypes() {\r\n return CourseTypes.query().$promise;\r\n }\r\n\r\n function saveCourseCategory(courseCategory) {\r\n return CourseCategory.save(courseCategory).$promise;\r\n }\r\n\r\n function getCourseCategories() {\r\n return CourseCategories.query().$promise;\r\n }\r\n\r\n function saveTargetAudience(targetAudience) {\r\n return TargetAudience.save(targetAudience).$promise;\r\n }\r\n\r\n function getTargetAudiences() {\r\n return TargetAudiences.query().$promise;\r\n }\r\n\r\n function getCourseInvitationDispatchModes() {\r\n return CourseInvitationDispatchModes.query().$promise;\r\n }\r\n\r\n function getCourseInvitationDispatchManualModeOptions() {\r\n return CourseInvitationDispatchManualModeOptions.query().$promise;\r\n }\r\n\r\n function getProductColumnTypes() {\r\n return ProductColumnTypes.query().$promise;\r\n }\r\n\r\n return {\r\n getNotificationTypes: getNotificationTypes,\r\n getEventTypes: getEventTypes,\r\n getMandatoryNotificationTypesByOrganizationId: getMandatoryNotificationTypesByOrganizationId,\r\n getCourseTypes: getCourseTypes,\r\n saveCourseCategory: saveCourseCategory,\r\n getCourseCategories: getCourseCategories,\r\n saveTargetAudience: saveTargetAudience,\r\n getTargetAudiences: getTargetAudiences,\r\n getCourseInvitationDispatchModes: getCourseInvitationDispatchModes,\r\n getCourseInvitationDispatchManualModeOptions: getCourseInvitationDispatchManualModeOptions,\r\n getProductColumnTypes: getProductColumnTypes\r\n };\r\n }\r\n\r\n angular\r\n .module('type')\r\n .factory('TypeFactory', typeFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n typeService.$inject = [\r\n '$translate'\r\n ];\r\n\r\n function typeService(\r\n $translate\r\n ) {\r\n\r\n function getTypeTranslation(type) {\r\n\r\n if (!type || !type.Translations || type.Translations.length === 0) {\r\n return '';\r\n }\r\n\r\n var currentLanguage = $translate.use();\r\n var translation = type.Translations.find(function(translation) {\r\n return translation.Culture === currentLanguage;\r\n });\r\n\r\n if (!translation) {\r\n return '';\r\n }\r\n\r\n return translation.Value;\r\n }\r\n\r\n function removeCharactersFromName(type, stringToRemove) {\r\n\r\n if (!type || !type.Name || !stringToRemove) {\r\n return;\r\n }\r\n\r\n type.Name = type.Name.replace(stringToRemove, '').trim();\r\n }\r\n\r\n return {\r\n getTypeTranslation: getTypeTranslation,\r\n removeCharactersFromName: removeCharactersFromName\r\n };\r\n }\r\n\r\n angular\r\n .module('type')\r\n .service('TypeService', typeService);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserUtilService.$inject = [];\r\n\r\n angular.module('user')\r\n .service('UserUtilService', UserUtilService);\r\n\r\n //Simple service that handles user data manipulation\r\n function UserUtilService() {\r\n\r\n /**\r\n * Sets the logged user first in a list of users\r\n * @param userList\r\n * @param loggedUserId\r\n * @returns\r\n */\r\n this.setLoggedUserFirst = function (userList, loggedUserId) {\r\n for (var i = 0; i < userList.length; i++)\r\n if (loggedUserId === userList[i].id) {\r\n userList.splice(0, 0, userList.splice(i, 1)[0]);\r\n break;\r\n }\r\n return userList;\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n 'DateUtilService'\r\n ];\r\n\r\n angular.module('user').factory('UserFactory', UserFactory);\r\n\r\n function UserFactory(\r\n $resource,\r\n baseUrlService,\r\n DateUtilService\r\n ) {\r\n var userFactory = {};\r\n\r\n var Users = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/Users');\r\n var Groups = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/Groups/:organizationId');\r\n var User = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/User/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var BusinessRoles = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/BusinessRoleTypes');\r\n var BusinessRoleParents = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/BusinessRoleParentTypes');\r\n var BusinessRole = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/BusinessRoleType/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var UserLanguage = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UserLanguage');\r\n var UsersOrganization = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UserByOrganization', { orgId: '@orgId', freeText: '@freeText' });\r\n var UsersForOrganization = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersForOrganization');\r\n var UserRights = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UserRights/:userId');\r\n var UserOrganizationAccess = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/CheckUsersForOrganizationAccess');\r\n var UnlockUser = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UnlockUser/:id', { id: '@id' }, { update: { method: 'PUT' } });\r\n var Managers = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/Managers');\r\n var Competence = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/Competence');\r\n var EducationLevels = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/EducationLevels');\r\n var UsersWhoSignedForQualityHandbook = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersWhoSignedQualityHandbook');\r\n var RequestImpersonateAccess = $resource(baseUrlService.getBaseUrl() + 'REST/UserGdprAccess.svc/UserImpersonateRequest');\r\n var SaveUserSettingsGdpr = $resource(baseUrlService.getBaseUrl() + 'REST/UserGdprAccess.svc/UserGdprSettings');\r\n var EnrollUsersToCourse = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/EnrollUsersToCourse');\r\n var UsersEnrolledToCourse = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersEnrolledToCourse');\r\n var NrOfUsersEnrolledToCourse = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/NrOfUsersEnrolledToCourse');\r\n var UsersPresentToCourseSession = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersPresentToCourseSession/:courseSessionId');\r\n var IntranettDetails = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/IntranettDetails/:userId');\r\n var AllUsersEnrolledToCourse = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/AllUsersEnrolledToCourse/:courseId');\r\n var IntranettPositions = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/IntranettPositions');\r\n var UsersInvitedToTheCourse = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersInvitedToTheCourse/:courseId');\r\n var UsersFromOrganizations = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersFromOrganizations', null, { getUsersFromOrganizations: { method: 'POST', isArray: true } });\r\n var UsersForCourseEnrollment = $resource(baseUrlService.getBaseUrl() + 'REST/User.svc/UsersForCourseEnrollment');\r\n\r\n /**\r\n * Gets a list of competences\r\n * @param userId\r\n * @param includeDeactivatedCompetences\r\n * @returns\r\n */\r\n userFactory.getCompetences = function (userId, includeDeactivatedCompetences) {\r\n return Competence.query({ userId: userId, includeDeactivatedCompetences: includeDeactivatedCompetences });\r\n };\r\n\r\n /**\r\n * Gets a list of users\r\n * @param freeText\r\n * @param includeDeactivated\r\n * @param organizationId\r\n * @param userGroupProgId\r\n * @returns\r\n */\r\n userFactory.getUsers = function (freeText, includeDeactivated, organizationId, userGroupProgId) {\r\n return Users.query({\r\n freeText: freeText,\r\n includeDeactivated: includeDeactivated,\r\n organizationId: organizationId,\r\n userGroupProgId: userGroupProgId\r\n });\r\n };\r\n\r\n /**\r\n * Get the groups\r\n * @returns\r\n */\r\n userFactory.getGroups = function (organizationId) {\r\n return Groups.query({ organizationId });\r\n };\r\n\r\n /**\r\n * Gets new object for later to be saved\r\n * @returns\r\n */\r\n userFactory.getUserToSave = function () {\r\n return new User();\r\n };\r\n\r\n /**\r\n * Saves or updates the current user\r\n * @param user\r\n * @returns\r\n */\r\n userFactory.saveUser = function (user) {\r\n if (user.Password != undefined && user.Password.length > 0)\r\n user.Password = btoa(user.Password);\r\n\r\n if (user.Settings) {\r\n if (user.Settings.FromDate)\r\n user.Settings.FromDate = moment(new Date(user.Settings.FromDate)).valueOf();\r\n if (user.Settings.ToDate)\r\n user.Settings.ToDate = moment(new Date(user.Settings.ToDate)).valueOf();\r\n }\r\n\r\n if (user.id) {\r\n return user.$update();\r\n } else {\r\n return user.$save();\r\n }\r\n };\r\n\r\n /**\r\n * Saves the given competence\r\n * @param competence\r\n * @returns\r\n */\r\n userFactory.saveCompetence = function (competence) {\r\n var competenceToSave = new Competence();\r\n\r\n competenceToSave.Active = competence.Active;\r\n competenceToSave.id = competence.id;\r\n competenceToSave.Table = competence.Table;\r\n competenceToSave.ForeignKey = competence.ForeignKey;\r\n competenceToSave.Name = competence.Name;\r\n competenceToSave.Certificate = competence.Certificate;\r\n competenceToSave.StartDate = competence.StartDate;\r\n competenceToSave.EndDate = competence.EndDate;\r\n competenceToSave.HighestEducationLevel = competence.HighestEducationLevel;\r\n\r\n return competenceToSave.$save();\r\n };\r\n\r\n /**\r\n * Gets by user by id\r\n * @param userId\r\n * @returns\r\n */\r\n userFactory.getUser = function (userId) {\r\n userFactory.userId = userId;\r\n return User.get({ id: userId });\r\n };\r\n\r\n /**\r\n * Saves the given bussines role\r\n * @param businessRole\r\n * @param organizationId\r\n * @returns\r\n */\r\n userFactory.saveBusinessRole = function (businessRole, organizationId) {\r\n var businessRoleToSave = new BusinessRole();\r\n\r\n businessRoleToSave.id = businessRole.id;\r\n businessRoleToSave.Name = businessRole.Name;\r\n businessRoleToSave.Active = businessRole.Active;\r\n businessRoleToSave.Parent = businessRole.Parent;\r\n\r\n if (businessRoleToSave.id != undefined)\r\n return businessRoleToSave.$update();\r\n else\r\n return businessRoleToSave.$save({ organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Gets the list of bussiness roles for the given comapny\r\n * @param organizationId\r\n * @returns\r\n */\r\n userFactory.getBusinessRoles = function (organizationId, onlyActive) {\r\n return BusinessRoles.query({ organizationId: organizationId, onlyActive: onlyActive });\r\n };\r\n\r\n /**\r\n * Get the list of parent bussines role (e.g CEO)\r\n * @returns\r\n */\r\n userFactory.getBusinessRoleParents = function () {\r\n return BusinessRoleParents.query();\r\n };\r\n\r\n /**\r\n * Saves the users language\r\n */\r\n userFactory.saveUserLanguage = function () {\r\n UserLanguage.save();\r\n };\r\n\r\n /**\r\n * Gets a list of users for the given organization\r\n * @param orgId\r\n * @param freeText\r\n * @returns\r\n */\r\n userFactory.getUsersByOrganizationId = function (orgId, freeText) {\r\n return UsersOrganization.query({ orgId: orgId, freeText: freeText });\r\n };\r\n\r\n /**\r\n * Gets the rights for the given user id\r\n * @param userId\r\n * @returns\r\n */\r\n userFactory.getUserRights = function (userId) {\r\n return UserRights.query({ userId: userId });\r\n };\r\n\r\n userFactory.getIntranettDetails = function (userId) {\r\n return IntranettDetails.get({ userId: userId }).$promise;\r\n }\r\n\r\n /**\r\n * Checks whether the user has access to the company\r\n * @param userId\r\n * @param organizationId\r\n * @returns\r\n */\r\n userFactory.checkUsersForOrganizationAccess = function (userId, organizationId) {\r\n return UserOrganizationAccess.query({ userId: userId, organizationId: organizationId }).$promise;\r\n };\r\n\r\n /**\r\n * Unlocks the given user\r\n * @param userId\r\n * @returns\r\n */\r\n userFactory.unlockUser = function (userId) {\r\n var unlockUser = new UnlockUser();\r\n unlockUser.id = userId;\r\n return unlockUser.$update();\r\n };\r\n\r\n /**\r\n * Get a list of managers\r\n * @param userId\r\n * @param organizationId\r\n * @returns\r\n */\r\n userFactory.getManagers = function (userId, organizationId) {\r\n return Managers.query({ userId: userId, organizationId: organizationId });\r\n };\r\n\r\n /**\r\n * Get the education levels\r\n * @returns\r\n */\r\n userFactory.getEducationLevels = function () {\r\n return EducationLevels.query().$promise;\r\n };\r\n\r\n /**\r\n * \r\n * @param qualityHandbookId\r\n * @param organizationId\r\n * @returns\r\n */\r\n userFactory.getUsersWhoSignedForQualityHandbook = function (qualityHandbookId, organizationId) {\r\n return UsersWhoSignedForQualityHandbook.query({\r\n qualityHandbookId: qualityHandbookId,\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the users for the given organization\r\n * @param orgId\r\n * @returns\r\n */\r\n userFactory.getUsersForOrganizationPage = function (orgId) {\r\n return UsersForOrganization.query({\r\n orgId: orgId\r\n });\r\n };\r\n\r\n /**\r\n * Performs a requests that sends an email for requesting access to impersonate\r\n * @param {any} userId\r\n */\r\n userFactory.requestImpersonateAccess = function (userId) {\r\n var requestImpersonateApiObject = new RequestImpersonateAccess();\r\n\r\n requestImpersonateApiObject.userIdToRequest = userId;\r\n\r\n return requestImpersonateApiObject.$save();\r\n };\r\n\r\n /**\r\n * Perform a requests that saves the users settings\r\n * Mostly used for impersonation setting\r\n * @param {any} userSettings\r\n */\r\n userFactory.saveUserSettingsGdpr = function (userSettings) {\r\n var saveUserSettingsGdprApiObject = new SaveUserSettingsGdpr();\r\n\r\n saveUserSettingsGdprApiObject.userSettings = userSettings;\r\n\r\n return saveUserSettingsGdprApiObject.$save();\r\n };\r\n\r\n userFactory.enrollUsersToCourse = function(users, courseId, selectedOrganizationsIds) {\r\n return EnrollUsersToCourse.save({\r\n users: users,\r\n courseId: courseId,\r\n selectedOrganizationsIds: selectedOrganizationsIds\r\n }).$promise;\r\n };\r\n\r\n userFactory.getUsersEnrolledToCourse = function (courseId, organizationId, fillCourseEnrollmentId, courseDayId) {\r\n\r\n if (fillCourseEnrollmentId === null || fillCourseEnrollmentId === undefined) {\r\n // default value is true\r\n fillCourseEnrollmentId = true;\r\n }\r\n\r\n return UsersEnrolledToCourse.query({\r\n courseId: courseId,\r\n organizationId: organizationId,\r\n fillCourseEnrollmentId: fillCourseEnrollmentId,\r\n courseDayId: courseDayId\r\n }).$promise;\r\n };\r\n\r\n userFactory.getNrOfUsersEnrolledToCourse = function(courseId) {\r\n return NrOfUsersEnrolledToCourse.get({\r\n courseId: courseId\r\n }).$promise;\r\n };\r\n\r\n userFactory.getUsersPresentToCourseSession = function(courseSessionId) {\r\n return UsersPresentToCourseSession.query({ courseSessionId: courseSessionId}).$promise;\r\n };\r\n\r\n userFactory.getAllUsersEnrolledToCourse = function(courseId) {\r\n return AllUsersEnrolledToCourse.query({ courseId: courseId }).$promise;\r\n };\r\n\r\n userFactory.getIntranettPositions = function (freeText) {\r\n return IntranettPositions.query({ freeText: freeText}).$promise;\r\n };\r\n\r\n userFactory.getUsersInvitedToTheCourse = function(courseId) {\r\n return UsersInvitedToTheCourse.query({ courseId: courseId }).$promise;\r\n };\r\n\r\n userFactory.getUsersFromOrganizations = function(organizationIds) {\r\n return UsersFromOrganizations.getUsersFromOrganizations(organizationIds).$promise;\r\n };\r\n\r\n userFactory.getUsersForCourseEnrollment = function(organizationId, courseId) {\r\n return UsersForCourseEnrollment.query({\r\n organizationId: organizationId,\r\n courseId: courseId\r\n }).$promise;\r\n };\r\n\r\n function createUserModel() {\r\n userFactory.User = (function () {\r\n function User() {\r\n this.FirstName = '';\r\n this.LastName = '';\r\n };\r\n\r\n return User;\r\n })();\r\n\r\n //add full name getter\r\n Object.defineProperty(userFactory.User.prototype,\r\n 'FullName',\r\n {\r\n get: function () {\r\n return (this.FirstName ? this.FirstName.trim() : '') + ' ' + (this.LastName ? this.LastName.trim() : '');\r\n },\r\n set: function (value) {\r\n this._fullName = value;\r\n }\r\n });\r\n\r\n return User;\r\n };\r\n\r\n\r\n userFactory.reverseUsers = true;\r\n userFactory.predicateUsers = \"id\";\r\n userFactory.currentPageUsers = 1;\r\n userFactory.userId = 0;\r\n userFactory.organizationId = null;\r\n userFactory.includeDeactivatedItems = false;\r\n //used on user page\r\n userFactory.organizationSettings = null;\r\n\r\n /**\r\n * Model for user\r\n */\r\n userFactory.User = null;\r\n\r\n createUserModel();\r\n\r\n return userFactory;\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function userService() {\r\n\r\n var _idOfTheLastVisitedUser = null;\r\n\r\n function markAlreadyEnrolledUsers(enrolledUsers, users) {\r\n\r\n if (!enrolledUsers || enrolledUsers.length === 0 ||\r\n !users || users.length === 0) {\r\n return;\r\n }\r\n\r\n users.forEach(function(user) {\r\n\r\n var userFound = enrolledUsers.find(function(enrolledUser) {\r\n return enrolledUser.id === user.id;\r\n });\r\n\r\n if (userFound) {\r\n user.isSelected = true;\r\n user.CourseEnrollment = userFound.CourseEnrollment;\r\n }\r\n });\r\n }\r\n\r\n function markUsersPresentToSession(usersPresentToSession, users) {\r\n\r\n if (!usersPresentToSession ||\r\n usersPresentToSession.length === 0 ||\r\n !users ||\r\n users.length === 0) {\r\n return;\r\n }\r\n\r\n users.forEach(function(user) {\r\n\r\n var userFound = usersPresentToSession.find(function(userPresent) {\r\n return userPresent.id === user.id;\r\n });\r\n\r\n if (userFound) {\r\n user.isSelected = true;\r\n }\r\n });\r\n }\r\n\r\n function extractUsersWithGroup(userGroupProgId, users) {\r\n\r\n if (!userGroupProgId || !users || users.length === 0) {\r\n return [];\r\n }\r\n\r\n return users.filter(function (user) {\r\n\r\n if (!user.Group) {\r\n return false;\r\n }\r\n\r\n return user.Group.ProgId === userGroupProgId;\r\n });\r\n }\r\n\r\n function convertIntranettPositionsToObjects(intranettPositions) {\r\n\r\n if (!intranettPositions || intranettPositions.length === 0) {\r\n return [];\r\n }\r\n\r\n var intranettPositionsObjects = [];\r\n\r\n intranettPositions.forEach(function(currentPosition, index) {\r\n intranettPositionsObjects.push({\r\n id: index,\r\n name: currentPosition\r\n });\r\n });\r\n\r\n return intranettPositionsObjects;\r\n }\r\n\r\n function isUserAvailableToNotifyForCourseEvents(user) {\r\n\r\n if (!user || !user.Organization || !user.Organization.Settings) {\r\n return false;\r\n }\r\n\r\n if (!user.Organization.Settings.HasNotificationTypesForCourse) {\r\n return false;\r\n }\r\n\r\n if (!user.Settings) {\r\n return false;\r\n }\r\n\r\n return user.Settings.HasNotificationTypesForCourse;\r\n }\r\n\r\n function hasUserSelectedAtLeastOneNotificationTypeForEvent(user, eventType) {\r\n\r\n if (!user || !user.EventNotificationTypeSettings ||\r\n user.EventNotificationTypeSettings.length === 0 || !eventType) {\r\n return false;\r\n }\r\n\r\n // find if at least one notification type was selected by user for the given event\r\n var notificationType = user.EventNotificationTypeSettings.find(function (eventNotificationTypeSetting) {\r\n\r\n if (!eventNotificationTypeSetting.Event ||\r\n !eventNotificationTypeSetting.NotificationType ||\r\n !eventNotificationTypeSetting.NotificationType.id) {\r\n return false;\r\n }\r\n\r\n return eventNotificationTypeSetting.Event.ProgId === eventType;\r\n });\r\n\r\n return notificationType ? true : false;\r\n }\r\n\r\n function getIdOfTheLastVisitedUser() {\r\n return _idOfTheLastVisitedUser;\r\n }\r\n\r\n function setIdOfTheLastVisitedUser(value) {\r\n _idOfTheLastVisitedUser = value;\r\n }\r\n\r\n return {\r\n markAlreadyEnrolledUsers: markAlreadyEnrolledUsers,\r\n markUsersPresentToSession: markUsersPresentToSession,\r\n extractUsersWithGroup: extractUsersWithGroup,\r\n convertIntranettPositionsToObjects: convertIntranettPositionsToObjects,\r\n isUserAvailableToNotifyForCourseEvents: isUserAvailableToNotifyForCourseEvents,\r\n hasUserSelectedAtLeastOneNotificationTypeForEvent: hasUserSelectedAtLeastOneNotificationTypeForEvent,\r\n setIdOfTheLastVisitedUser: setIdOfTheLastVisitedUser,\r\n getIdOfTheLastVisitedUser: getIdOfTheLastVisitedUser\r\n };\r\n }\r\n\r\n angular\r\n .module('user')\r\n .service('UserService', userService);\r\n})();","(function () {\r\n 'use strict';\r\n //Directive used for binding inputs of type file and reading only one file\r\n angular\r\n .module('VBSmart')\r\n .directive('fileModel', ['$parse', function ($parse) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n var model = $parse(attrs.fileModel);\r\n var modelSetter = model.assign;\r\n var fileNameModel = $parse(attrs.fileName);\r\n var fileNameSetter = fileNameModel.assign;\r\n var fileExtensionModel = $parse(attrs.fileExtension);\r\n var fileExtensionSetter = fileExtensionModel.assign;\r\n\r\n element.bind('change', function () {\r\n scope.$apply(function () {\r\n var file = element[0].files[0];\r\n var fileName;\r\n var extName;\r\n try {\r\n var nameArray = file.name.split('.');\r\n fileName = nameArray.slice(0, nameArray.length - 1).join('.');\r\n extName = angular.copy(nameArray).pop();\r\n } catch (error) {\r\n fileName = null;\r\n extName = null;\r\n }\r\n file.clear = function () {\r\n //element.val('');\r\n modelSetter(scope, undefined);\r\n fileNameSetter(scope, undefined);\r\n fileExtensionSetter(scope, undefined);\r\n }\r\n modelSetter(scope, file);\r\n fileNameSetter(scope, angular.copy(fileName));\r\n fileExtensionSetter(scope, angular.copy(extName));\r\n });\r\n });\r\n }\r\n };\r\n }]);\r\n\r\n //directive for binding inputs of type file and reading multiple files\r\n angular\r\n .module('VBSmart')\r\n .directive('multipleFileModel', ['$parse', function ($parse) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n var model = $parse(attrs.multipleFileModel);\r\n var modelSetter = model.assign;\r\n\r\n element.bind('change', function () {\r\n scope.$apply(function () {\r\n var files = element[0].files;\r\n var filesModel = [];\r\n var fileNameModel = $parse(attrs.fileName);\r\n var fileNameSetter = fileNameModel.assign;\r\n fileNameModel = '';\r\n for (var i = 0; i < files.length; i++) {\r\n var file = files[i];\r\n var nameArray, fileName, extName;\r\n\r\n try {\r\n nameArray = file.name.split('.');\r\n fileName = nameArray.slice(0, nameArray.length - 1).join('.');\r\n extName = angular.copy(nameArray).pop();\r\n } catch (error) {\r\n fileName = null;\r\n extName = null;\r\n }\r\n\r\n filesModel.push({\r\n file: file,\r\n fileName: fileName,\r\n extension: extName\r\n });\r\n\r\n fileNameModel += fileName + '.' + extName + ', ';\r\n }\r\n\r\n fileNameModel = fileNameModel.slice(0, -2);\r\n\r\n modelSetter(scope, filesModel);\r\n fileNameSetter(scope, fileNameModel);\r\n });\r\n });\r\n }\r\n }\r\n }]);\r\n\r\n //Directive used to create a timelined task in the resource planner\r\n //Implementation similar to click and hold\r\n angular\r\n .module('VBSmart')\r\n .directive('createTimeline', ['$parse', '$timeout', function ($parse, $timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n var createTimelineModel = $parse(attrs.createTimeline);\r\n var leaveTimelineModel = $parse(attrs.leaveTimeline);\r\n var timeoutHandler = null;\r\n\r\n element.on('mousedown', function (event) {\r\n $timeout.cancel(timeoutHandler);\r\n timeoutHandler = $timeout(function () {\r\n createTimelineModel(scope, { $event: event });\r\n }, 250);\r\n });\r\n\r\n element.on('mouseup', function (event) {\r\n $timeout.cancel(timeoutHandler);\r\n leaveTimelineModel(scope, { $event: event });\r\n });\r\n }\r\n };\r\n }]);\r\n\r\n //Directive that handles and compiles unsanatized html\r\n angular\r\n .module('VBSmart')\r\n .directive('bindUnsafeHtml', ['$compile', function ($compile) {\r\n return function (scope, element, attrs) {\r\n scope.$watch(\r\n function (scope) {\r\n // watch the 'bindUnsafeHtml' expression for changes\r\n return scope.$eval(attrs.bindUnsafeHtml);\r\n },\r\n function (value) {\r\n // when the 'bindUnsafeHtml' expression changes\r\n // assign it into the current DOM\r\n element.html(value);\r\n\r\n // compile the new DOM and link it to the current\r\n // scope.\r\n // NOTE: we only compile .childNodes so that\r\n // we don't get into infinite loop compiling ourselves\r\n $compile(element.contents())(scope);\r\n }\r\n );\r\n };\r\n }]);\r\n\r\n //Directive that focuses the element that lies within\r\n angular\r\n .module('VBSmart')\r\n .directive('focusMe', ['$timeout', function ($timeout) {\r\n return {\r\n scope: { trigger: '=focusMe' },\r\n link: function (scope, element) {\r\n scope.$watch('trigger', function (value) {\r\n if (value === true) {\r\n //console.log('trigger',value);\r\n $timeout(function () {\r\n element[0].focus();\r\n scope.trigger = false;\r\n }, 50);\r\n }\r\n });\r\n }\r\n };\r\n }]);\r\n\r\n //Directive that prevents the the click propagate to deeper elements\r\n angular\r\n .module('VBSmart')\r\n .directive('stopEvent', function () {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attr) {\r\n if (attr && attr.stopEvent)\r\n element.bind(attr.stopEvent, function (e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n });\r\n }\r\n };\r\n });\r\n\r\n //Directive that handles the snap state\r\n //TODO: not sure if we're using this anymore\r\n angular\r\n .module('VBSmart')\r\n .directive('snapState', ['snapRemote', function (snapRemote) {\r\n return {\r\n link: function (scope, element, attrs) {\r\n snapRemote.getSnapper().then(function (snapper) {\r\n scope.$watch(function () {\r\n return snapper.state().state;\r\n }\r\n , function (newState) {\r\n scope.snapStateClosed = (newState == 'closed');\r\n });\r\n });\r\n }\r\n };\r\n }]);\r\n\r\n //Directive that executes after the last item in ng-repeat finishes rendering\r\n angular\r\n .module('VBSmart')\r\n .directive('onFinishRender', ['$timeout', function ($timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attr) {\r\n if (scope.$last === true) {\r\n $timeout(function () {\r\n scope.$eval(attr.onFinishRender);\r\n });\r\n }\r\n }\r\n }\r\n }]);\r\n\r\n angular\r\n .module('VBSmart')\r\n .directive('vbScrollBarPadding',\r\n [\r\n '$timeout', function ($timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attr) {\r\n $timeout(function () {\r\n var scrollHeight = element[0].scrollHeight;\r\n var clientHeight = element[0].clientHeight;\r\n\r\n if (scrollHeight > clientHeight)\r\n element.children().addClass('padding-scroll-fix');\r\n });\r\n }\r\n }\r\n }\r\n ]);\r\n\r\n angular\r\n .module('VBSmart')\r\n .directive('vbAllRoleCheck', ['AllAccessPage', 'SessionFactory', 'sessionInformationService', '$compile', function (AllAccessPage, SessionFactory, sessionInformationService, $compile) {\r\n return {\r\n priority: 100000000,\r\n terminal: true,\r\n compile: function (element, attrs) {\r\n // get the value from the directive\r\n var value = attrs['vbAllRoleCheck'];\r\n\r\n // get the current logged user\r\n var loggedUser = sessionInformationService.getUser();\r\n // clear the directive so we don't loop like crazy\r\n attrs.$set('vbAllRoleCheck', null);\r\n // set a pointer to the compile function\r\n var compileElement = $compile(element);\r\n\r\n return {\r\n pre: function preLink(scope, element, attrs, controller) {\r\n // if the user has access to the whole Dextro\r\n if (sessionInformationService.hasLoggedUserFullAccess())\r\n // we just resolve\r\n scope.resolvedPromise = Promise.resolve();\r\n // if the user only has access to demo, meaning he's neither vb organisasjon nor customer\r\n else if (sessionInformationService.hasLoggedUserAccessOnlyToDemoContent())\r\n // we reject\r\n scope.resolvedPromise = Promise.reject();\r\n // if the user is only vb organisasjon\r\n else if (sessionInformationService.isLoggedUserOrganizationAVbOrganization()) {\r\n // we process the value\r\n var evaluedValue = scope.$eval(value);\r\n\r\n if (evaluedValue.page === AllAccessPage.NoAccess)\r\n scope.resolvedPromise = Promise.reject();\r\n else\r\n // make request and see if he has access to the page\r\n scope.resolvedPromise = SessionFactory.hasAllAccessToRoute(evaluedValue.page)\r\n .then(function (result) {\r\n // sorry no can do\r\n if (!result || !result.HasAccess)\r\n return Promise.reject();\r\n\r\n var loggedUserRole = loggedUser.Group.ProgId;\r\n if (loggedUserRole === evaluedValue.role)\r\n // alright, you can pass\r\n return Promise.resolve();\r\n\r\n return Promise.reject();\r\n });\r\n }\r\n },\r\n post: function postLink(scope, element, attrs, controller) {\r\n // wait for the promise\r\n scope.resolvedPromise\r\n .then(function () {\r\n // show the data\r\n compileElement(scope);\r\n })\r\n .catch(function (err) {\r\n // you shall not pass\r\n element.remove();\r\n });\r\n }\r\n };\r\n }\r\n };\r\n }]);\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n DatepickerDemoCtrl.$inject = [\r\n '$scope',\r\n '$filter',\r\n '$translate',\r\n 'uibDatepickerPopupConfig'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .controller('DatepickerDemoCtrl', DatepickerDemoCtrl);\r\n\r\n //Controller used for datepicker popup\r\n //TODO: fix naming\r\n function DatepickerDemoCtrl(\r\n $scope,\r\n $filter,\r\n $translate,\r\n uibDatepickerPopupConfig\r\n ) {\r\n\r\n uibDatepickerPopupConfig.currentText = $translate.instant('txtToday');\r\n uibDatepickerPopupConfig.clearText = $translate.instant('txtClearDatePicker');\r\n uibDatepickerPopupConfig.closeText = $translate.instant('txtCloseDatePicker');\r\n\r\n // Disable weekend selection\r\n $scope.disabled = function (date, mode) {\r\n return (mode === 'day' && (date.getDay() === 0 || date.getDay() === 6));\r\n };\r\n\r\n $scope.toggleMin = function () {\r\n $scope.minDate = $scope.minDate ? null : new Date();\r\n };\r\n $scope.toggleMin();\r\n\r\n $scope.open = function ($event) {\r\n $event.preventDefault();\r\n $event.stopPropagation();\r\n\r\n $scope.opened = true;\r\n };\r\n\r\n $scope.dateOptions = {\r\n formatYear: 'yy',\r\n customClass: isTodaysDate,\r\n startingDay: 1,\r\n currentText: $translate.instant('txtToday'),\r\n clearText: $translate.instant('txtClearDatePicker'),\r\n closeText: $translate.instant('txtCloseDatePicker')\r\n };\r\n\r\n $scope.getTodaysDate = function () {\r\n return new Date();\r\n };\r\n\r\n function isTodaysDate(data) {\r\n var date = data.date;\r\n if (!date)\r\n return '';\r\n\r\n if (moment(date).format('DD.MM.YYYY') === moment().format('DD.MM.YYYY'))\r\n return 'vb-today';\r\n\r\n return '';\r\n }\r\n\r\n $scope.format = 'dd-MM-yyyy';\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module('util').service('DateUtilService', DateUtilService);\r\n\r\n //Service that handles some basic date manipulation\r\n function DateUtilService() {\r\n var dateUtilService = {};\r\n\r\n /**\r\n * Gets the week number for the given date\r\n * @param date\r\n * @returns\r\n */\r\n function getWeekNumber(date) {\r\n\r\n if (!date) {\r\n return 0;\r\n }\r\n\r\n return moment(date).week();\r\n };\r\n\r\n /**\r\n * Gets the number of days in the given month\r\n * @param date\r\n * @returns\r\n */\r\n dateUtilService.getNumberOfDaysInMonth = function (date) {\r\n var month = date.getMonth();\r\n var year = date.getFullYear();\r\n return new Date(year, month + 1, 0).getDate();\r\n };\r\n\r\n /**\r\n * Sets the given date accordingly\r\n * @param date\r\n * @param hours\r\n * @param minutes\r\n * @param seconds\r\n * @returns\r\n */\r\n dateUtilService.setDate = function (date, hours, minutes, seconds) {\r\n date = angular.copy(date);\r\n if (Object.prototype.toString.call(date) !== '[object Date]')\r\n throw 'Incorect Date format!';\r\n\r\n date.setHours(hours);\r\n date.setMinutes(minutes);\r\n date.setSeconds(seconds);\r\n date.setMilliseconds(0);\r\n\r\n return date;\r\n };\r\n\r\n /**\r\n * Gets a new date with specified day, month, year\r\n * @param year\r\n * @param month\r\n * @param day\r\n * @returns\r\n */\r\n dateUtilService.getDateInMonth = function (year, month, day) {\r\n var date = new Date();\r\n date.setYear(year);\r\n date.setMonth(month);\r\n date.setDate(day);\r\n return date;\r\n };\r\n\r\n /**\r\n * Adds a number of months to the given date\r\n * @param date\r\n * @param months\r\n * @returns\r\n */\r\n dateUtilService.addMonthsToDate = function (date, months) {\r\n return new Date(date.setMonth(date.getMonth() + months));\r\n };\r\n\r\n /**\r\n * Adds a number of days to the given date\r\n * @param date\r\n * @param days\r\n * @returns\r\n */\r\n dateUtilService.addDaysToDate = function (date, days) {\r\n if (Object.prototype.toString.call(date) !== '[object Date]')\r\n throw 'Incorect Date format!';\r\n date = angular.copy(date);\r\n date.setDate(date.getDate() + days);\r\n\r\n return date;\r\n };\r\n\r\n /**\r\n * Subtracts a number of days from a given date\r\n * @param date\r\n * @param days\r\n * @returns\r\n */\r\n dateUtilService.subtractDaysFromDate = function (date, days) {\r\n\r\n if (Object.prototype.toString.call(date) !== '[object Date]')\r\n throw 'Incorect Date format !';\r\n\r\n date = angular.copy(date);\r\n date.setDate(date.getDate() - days);\r\n\r\n return date;\r\n };\r\n\r\n /**\r\n * Checks whether the date is sunday or saturday\r\n * @param date\r\n * @returns\r\n */\r\n dateUtilService.isSundayOrSaturday = function (date) {\r\n if (date.getDay() == 0 || date.getDay() == 6)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Gets the week number for the given date\r\n * @param date\r\n * @returns\r\n */\r\n dateUtilService.getWeekNumber = function (date) {\r\n if (!date)\r\n return getWeekNumber(new Date());\r\n return getWeekNumber(date);\r\n };\r\n\r\n /**\r\n * Adds the given hours to the date\r\n * @param date\r\n * @param hour\r\n * @returns\r\n */\r\n dateUtilService.addHours = function (date, hour) {\r\n date.setTime(date.getTime() + (hour * 60 * 60 * 1000));\r\n return date;\r\n };\r\n\r\n /**\r\n * Gets the date without the timezone\r\n * @param long\r\n * @returns\r\n */\r\n dateUtilService.getDateWithoutTimezone = function (long) {\r\n var currentDate = new Date(long);\r\n var timezoneOffsetInHours = currentDate.getTimezoneOffset() / 60;\r\n return new Date(long + timezoneOffsetInHours * 60 * 60 * 1000);\r\n };\r\n\r\n /**\r\n * Gets the long version of the date with the timezone offset\r\n * @param date\r\n * @returns\r\n */\r\n dateUtilService.getLongWithOffset = function (date) {\r\n\r\n if (!date) {\r\n return 0;\r\n }\r\n\r\n var timezoneOffsetInHours = date.getTimezoneOffset() / 60;\r\n return date.getTime() + Math.abs(timezoneOffsetInHours * 60 * 60 * 1000);\r\n };\r\n\r\n /**\r\n * Gets the long version of date without the timezone offset\r\n * @param long\r\n * @returns\r\n */\r\n dateUtilService.getLongWithoutOffset = function (long) {\r\n var currentDate = new Date(long);\r\n var timezoneOffsetInHours = currentDate.getTimezoneOffset() / 60;\r\n return long + timezoneOffsetInHours * 60 * 60 * 1000;\r\n };\r\n\r\n /**\r\n * Gets the monday of the given date\r\n * @param date\r\n * @returns\r\n */\r\n dateUtilService.getMondayOfDate = function (date) {\r\n var day = date.getDay(),\r\n diff = date.getDate() - day + (day == 0 ? -6 : 1);\r\n return new Date(date.setDate(diff));\r\n };\r\n\r\n /**\r\n * Changes the given date accordingly\r\n * @param dateToChange\r\n * @param date\r\n * @param month\r\n * @param year\r\n * @returns\r\n */\r\n dateUtilService.changeDate = function (dateToChange, date, month, year) {\r\n\r\n if (!dateToChange)\r\n return null;\r\n\r\n dateToChange.setUTCDate((date) ? date : 0);\r\n dateToChange.setUTCMonth((month) ? month : 0);\r\n dateToChange.setUTCFullYear((year) ? year : 0);\r\n\r\n return dateToChange.getTime();\r\n };\r\n\r\n dateUtilService.isDateAfter = function(date, dateToCheckAgainst) {\r\n\r\n if (!date || !dateToCheckAgainst) {\r\n throw new Error('Invalid date input');\r\n }\r\n\r\n return moment(date).isAfter(dateToCheckAgainst);\r\n };\r\n\r\n dateUtilService.isDateBefore = function(date, dateToCheckAgainst) {\r\n\r\n if (!date || !dateToCheckAgainst) {\r\n throw new Error('Invalid date input');\r\n }\r\n\r\n return moment(date).isBefore(dateToCheckAgainst);\r\n };\r\n\r\n dateUtilService.isSameDate = function(date, dateToCheckAgainst) {\r\n\r\n if (!date || !dateToCheckAgainst) {\r\n throw new Error('Invalid date input');\r\n }\r\n\r\n var dateDay = moment(date).date();\r\n var dateMonth = moment(date).month();\r\n var dateYear = moment(date).year();\r\n\r\n var dateToCheckAgainstDay = moment(dateToCheckAgainst).date();\r\n var dateToCheckAgainstMonth = moment(dateToCheckAgainst).month();\r\n var dateToCheckAgainstYear = moment(dateToCheckAgainst).year();\r\n\r\n return dateDay === dateToCheckAgainstDay &&\r\n dateMonth === dateToCheckAgainstMonth &&\r\n dateYear === dateToCheckAgainstYear;\r\n };\r\n\r\n return dateUtilService;\r\n };\r\n\r\n})();","(function () {\r\n\r\n detectChange.$inject = [\r\n 'formChangeDetector',\r\n 'formChanges',\r\n '$filter',\r\n '$timeout'\r\n ];\r\n\r\n angular.module(\"util\").directive(\"detectChange\", detectChange);\r\n\r\n function detectChange(\r\n formChangeDetector,\r\n formChanges,\r\n $filter,\r\n $timeout\r\n ) {\r\n\r\n function getCheckBoxChild(element) {\r\n\r\n var checkbox = element.find(\"input\");\r\n\r\n return checkbox[0];\r\n\r\n }\r\n\r\n /**\r\n * Registers event listeners for the input of type checkbox\r\n * @param checkbox\r\n */\r\n function registerCheckboxListeners(checkbox) {\r\n\r\n var isChangeEventListenerRegistered = false;\r\n\r\n angular.element(checkbox).on(\"focus\", function (event) {\r\n // console.log(\"onFocus called\");\r\n formChangeDetector.onFocusControl(checkbox.id, event, \"checkbox\", event.target.checked);\r\n\r\n if (!isChangeEventListenerRegistered) {\r\n\r\n angular.element(checkbox).on(\"change\", function (event) {\r\n // console.log(\"onChange called\");\r\n formChangeDetector.onValueChanged(event.target.checked);\r\n });\r\n\r\n isChangeEventRegistered = true;\r\n\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Registers event listeners for the input of type text\r\n * @param textElement\r\n */\r\n function registerTextElementListeners(textElement) {\r\n\r\n textElement.on(\"focus\", function (event) {\r\n\r\n var elementContent = event.target.innerHTML;\r\n\r\n if (!elementContent.trim()) {\r\n elementContent = \"


\";\r\n }\r\n\r\n formChangeDetector.onFocusControl(event.target.id, event, \"textElement\", elementContent);\r\n\r\n });\r\n\r\n textElement.on(\"blur\", function (event) {\r\n var elementContent = event.target.innerHTML;\r\n formChangeDetector.onValueChanged(elementContent.trim());\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Formats the given date accordingly\r\n * @param value\r\n * @param isDate\r\n * @returns\r\n */\r\n function formatValue(value, isDate) {\r\n if (isDate) {\r\n return $filter(\"date\")(value, \"dd-MM-yyyy\");\r\n } else {\r\n return $filter(\"date\")(value, \"dd-MM-yyyy hh:mm\");\r\n }\r\n }\r\n\r\n /**\r\n * Registers event listeners to the datepicker\r\n * @param scope\r\n * @param attributes\r\n * @param datepickerId\r\n * @param mainEntityId\r\n * @param isUpdatingEntity\r\n */\r\n function registerDatepickerWatcher(scope, attributes, datepickerId, mainEntityId, isUpdatingEntity) {\r\n\r\n scope.$watch(attributes.ngModel, function (newValue, oldValue) {\r\n\r\n oldValue = formatValue(oldValue, true);\r\n\r\n newValue = formatValue(newValue, true);\r\n\r\n if (oldValue != newValue) {\r\n\r\n var currentEntityId = formChanges.getEntityId();\r\n var previousEntityId = formChanges.getPreviousEntityId();\r\n\r\n var previousChangeForCurrentControl = formChanges.getChangeById(datepickerId, previousEntityId);\r\n\r\n if (!isUpdatingEntity && oldValue) {\r\n\r\n if (mainEntityId == currentEntityId || (previousChangeForCurrentControl && previousChangeForCurrentControl.newValue == previousChangeForCurrentControl.originalValue)) {\r\n formChangeDetector.onFocusControl(datepickerId, null, \"datepicker\", oldValue);\r\n } else {\r\n formChangeDetector.onFocusControl(datepickerId, null, \"datepicker\", newValue);\r\n }\r\n\r\n } else if (newValue) {\r\n formChangeDetector.onFocusControl(datepickerId, null, \"datepicker\", newValue);\r\n }\r\n\r\n if (newValue) {\r\n\r\n var currentChange = formChangeDetector.getChange();\r\n // console.log(\"onChanged called\");\r\n if (currentChange.controlType === \"datepicker\") {\r\n formChangeDetector.onValueChanged(newValue);\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n var timepickerId = 0;\r\n\r\n /**\r\n * Registers event listeners to the time picker input\r\n * @param scope\r\n * @param attributes\r\n * @param currentInput\r\n * @param mainEntityId\r\n * @param isUpdatingEntity\r\n */\r\n function registerTimepickerWatcher(scope, attributes, currentInput, mainEntityId, isUpdatingEntity) {\r\n\r\n timepickerId++;\r\n\r\n currentInput.id = \"timepicker\" + timepickerId;\r\n\r\n scope.$watch(attributes.ngModel, function (newValue, oldValue) {\r\n\r\n $timeout(function () {\r\n\r\n oldValue = formatValue(oldValue, false);\r\n\r\n newValue = formatValue(newValue, false);\r\n\r\n if (oldValue != newValue) {\r\n\r\n var currentEntityId = formChanges.getEntityId();\r\n var previousEntityId = formChanges.getPreviousEntityId();\r\n\r\n var previousChangeForCurrentControl = formChanges.getChangeById(currentInput.id, previousEntityId);\r\n\r\n if (!isUpdatingEntity && oldValue) {\r\n\r\n if (mainEntityId == currentEntityId || (previousChangeForCurrentControl && previousChangeForCurrentControl.newValue == previousChangeForCurrentControl.originalValue)) {\r\n formChangeDetector.onFocusControl(currentInput.id, null, \"timepicker\", oldValue);\r\n } else {\r\n formChangeDetector.onFocusControl(currentInput.id, null, \"timepicker\", newValue);\r\n }\r\n\r\n } else if (newValue) {\r\n formChangeDetector.onFocusControl(currentInput.id, null, \"timepicker\", newValue);\r\n }\r\n\r\n if (newValue) {\r\n\r\n var currentChange = formChangeDetector.getChange();\r\n\r\n if (currentChange.controlType === \"timepicker\") {\r\n formChangeDetector.onValueChanged(newValue);\r\n }\r\n }\r\n }\r\n\r\n }, 500);\r\n\r\n });\r\n\r\n }\r\n\r\n return {\r\n\r\n restrict: \"A\",\r\n link: function (scope, element, attributes) {\r\n\r\n var controlType = attributes.controlType;\r\n\r\n var mainEntityId = attributes.mainEntityId;\r\n\r\n var isUpdatingEntity = attributes.isUpdatingEntity;\r\n\r\n switch (controlType) {\r\n\r\n case \"checkbox\":\r\n\r\n var checkbox = getCheckBoxChild(element);\r\n\r\n if (checkbox) {\r\n\r\n registerCheckboxListeners(checkbox);\r\n\r\n element.on(\"mousedown\", function () {\r\n angular.element(checkbox).triggerHandler(\"focus\");\r\n });\r\n\r\n }\r\n break;\r\n\r\n case \"timepicker\":\r\n\r\n var timePickerInputs = element.find(\"input\");\r\n\r\n if (timePickerInputs) {\r\n\r\n for (var i = 0; i < timePickerInputs.length; i++) {\r\n\r\n var currentInput = timePickerInputs[i];\r\n\r\n registerTimepickerWatcher(scope, attributes, currentInput, mainEntityId, isUpdatingEntity);\r\n\r\n }\r\n }\r\n break;\r\n\r\n case \"datepicker\":\r\n\r\n var datePickerId = element[0].id;\r\n\r\n registerDatepickerWatcher(scope, attributes, datePickerId, mainEntityId, isUpdatingEntity);\r\n break;\r\n\r\n case \"text-angular\":\r\n\r\n $timeout(function () {\r\n\r\n var textElement = angular.element(element[0].querySelector(\"div[id]\"));\r\n registerTextElementListeners(textElement);\r\n\r\n });\r\n\r\n break;\r\n\r\n }\r\n }\r\n }\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module('util').service('DownloadService', DownloadService);\r\n\r\n /**\r\n * Simple service for downloading files\r\n */\r\n function DownloadService() {\r\n\r\n this.download = function (url) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = url;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = url.substring(url.lastIndexOf('/') + 1, url.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(url);\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n /**\r\n * Filter for shorting a text to the desired length\r\n */\r\n angular\r\n .module('VBSmart')\r\n .filter('shortenText', function () {\r\n return function (value, wordwise, max, tail) {\r\n if (!value) return '';\r\n max = parseInt(max, 10);\r\n if (!max) return value;\r\n if (value.length <= max) return value;\r\n value = value.substr(0, max);\r\n if (wordwise) {\r\n var lastspace = value.lastIndexOf(' ');\r\n if (lastspace != -1)\r\n value = value.substr(0, lastspace);\r\n }\r\n return value + (tail || ' ...');\r\n };\r\n });\r\n\r\n /**\r\n * Filter that returns the items that start at the given index\r\n */\r\n angular\r\n .module('VBSmart')\r\n .filter('startFrom', function () {\r\n return function (input, start) {\r\n if (input) {\r\n return input.slice(+start);\r\n } else {\r\n return null;\r\n }\r\n };\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('VBSmart')\r\n .factory('focus', focus)\r\n .directive('eventFocus', eventFocus);\r\n\r\n eventFocus.$inject = ['focus'];\r\n focus.$inject = ['$timeout', '$window'];\r\n\r\n function eventFocus(focus) {\r\n return function (scope, elem, attr) {\r\n elem.on(attr.eventFocus, function () {\r\n focus(attr.eventFocusId);\r\n });\r\n\r\n // Removes bound events in the element itself\r\n // when the scope is destroyed\r\n scope.$on('$destroy', function () {\r\n elem.off(attr.eventFocus);\r\n });\r\n };\r\n };\r\n\r\n function focus($timeout, $window) {\r\n return function (id) {\r\n // timeout makes sure that it is invoked after any other event has been triggered.\r\n // e.g. click events that need to run before the focus or\r\n // inputs elements that are in a disabled state but are enabled when those events\r\n // are triggered.\r\n $timeout(function () {\r\n var element = $window.document.getElementById(id);\r\n if (element)\r\n element.focus();\r\n });\r\n };\r\n };\r\n})();","\r\n(function () {\r\n formChangeDetector.$inject = [\r\n 'formChanges',\r\n '$filter',\r\n '$q'\r\n ];\r\n\r\n angular.module(\"util\").service(\"formChangeDetector\", formChangeDetector);\r\n\r\n function formChangeDetector(\r\n formChanges,\r\n $filter,\r\n $q\r\n ) {\r\n\r\n var change = {};\r\n\r\n /**\r\n * Function that handles the focus event and checks whether there are any changes\r\n * @param id\r\n * @param event\r\n * @param controlType\r\n * @param value\r\n */\r\n var onFocusControl = function (id, event, controlType, value) {\r\n\r\n var currentControlId = id;\r\n\r\n change.id = (currentControlId) ? currentControlId : ((event) ? event.target.id : \"\");\r\n change.controlType = controlType;\r\n\r\n var previousControlId = formChanges.getPreviousControlId();\r\n\r\n var currentEntityId = formChanges.getEntityId();\r\n var previousEntityId = formChanges.getPreviousEntityId();\r\n\r\n // if now is focused a different control we reset the original value\r\n\r\n if ((currentControlId !== previousControlId) || (currentControlId === previousControlId && currentEntityId !== previousEntityId)) {\r\n formChanges.setOriginalValue(null);\r\n formChanges.setPreviousControlId(currentControlId);\r\n }\r\n\r\n var originalValue = formChanges.getOriginalValue();\r\n\r\n if (!originalValue) {\r\n\r\n formChanges.setOriginalValue(value);\r\n change.originalValue = formChanges.getOriginalValue();\r\n\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Function that handles when the value has changed\r\n * @param newValue\r\n */\r\n var onValueChanged = function (newValue) {\r\n\r\n change.newValue = newValue;\r\n\r\n formChanges.performChange(change);\r\n\r\n change = {};\r\n\r\n };\r\n\r\n var getChange = function () {\r\n return change;\r\n };\r\n\r\n return {\r\n onFocusControl: onFocusControl,\r\n onValueChanged: onValueChanged,\r\n getChange: getChange\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n angular.module(\"util\").service(\"formChanges\", formChanges);\r\n\r\n function formChanges() {\r\n\r\n var changes = [];\r\n\r\n var previousEntityId = 0;\r\n var entityId = 0;\r\n\r\n var previousControlId = null;\r\n var originalValue = null;\r\n\r\n /**\r\n * Gets the changes for the current set entity\r\n * @returns\r\n */\r\n function getChangesForCurrentEntityId() {\r\n\r\n if (entityId != undefined && changes.length > 0) {\r\n\r\n for (var i = 0; i < changes.length; i++) {\r\n\r\n var currentChanges = changes[i];\r\n\r\n if (currentChanges.entityId == entityId) {\r\n\r\n return currentChanges;\r\n\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n\r\n }\r\n\r\n /**\r\n * Gets the changes for a given form input by id\r\n * @param formChanges\r\n * @param id\r\n * @returns\r\n */\r\n function getChange(formChanges, id) {\r\n\r\n if (formChanges) {\r\n for (var i = 0; i < formChanges.length; i++) {\r\n\r\n var currentChange = formChanges[i];\r\n\r\n if (currentChange.id === id) {\r\n return currentChange;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Performs a change for the current entity with the given change\r\n * @param change\r\n */\r\n var performChange = function (change) {\r\n\r\n if (!change.id) {\r\n return;\r\n }\r\n\r\n if (changes.length == 0) {\r\n\r\n changes.push({\r\n entityId: entityId,\r\n formChanges: [change]\r\n });\r\n\r\n } else {\r\n\r\n var currentEntityChanges = getChangesForCurrentEntityId();\r\n\r\n var formChanges;\r\n\r\n if (!currentEntityChanges) {\r\n\r\n formChanges = [];\r\n\r\n formChanges.push(change);\r\n\r\n changes.push({\r\n entityId: entityId,\r\n formChanges: formChanges\r\n })\r\n\r\n } else {\r\n\r\n formChanges = currentEntityChanges.formChanges;\r\n\r\n if (formChanges) {\r\n\r\n var formChange = getChange(formChanges, change.id);\r\n if (formChange) {\r\n formChange.newValue = change.newValue;\r\n } else {\r\n formChanges.push(change);\r\n }\r\n\r\n }\r\n }\r\n }\r\n };\r\n\r\n var hasBeenMadeFormChanges = function () {\r\n\r\n if (changes.length > 0) {\r\n\r\n for (var i = 0; i < changes.length; i++) {\r\n\r\n var currentChanges = changes[i];\r\n\r\n if (currentChanges.formChanges) {\r\n\r\n for (var j = 0; j < currentChanges.formChanges.length; j++) {\r\n\r\n var currentFormChange = currentChanges.formChanges[j];\r\n\r\n currentFormChange.newValue = (currentFormChange.newValue) ? currentFormChange.newValue : \"\";\r\n currentFormChange.originalValue = (currentFormChange.originalValue) ? currentFormChange.originalValue : \"\";\r\n\r\n if (currentFormChange.newValue != currentFormChange.originalValue) {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n return false;\r\n };\r\n\r\n var resetChanges = function () {\r\n\r\n changes = [];\r\n\r\n previousControlId = null;\r\n originalValue = null;\r\n\r\n entityId = 0;\r\n previousEntityId = 0;\r\n\r\n };\r\n\r\n var getChangeById = function (id, entityId) {\r\n\r\n for (var i = 0; i < changes.length; i++) {\r\n\r\n var currentChanges = changes[i];\r\n\r\n if (currentChanges.entityId === entityId) {\r\n\r\n var formChanges = currentChanges.formChanges;\r\n\r\n for (var j = 0; j < formChanges.length; j++) {\r\n\r\n var change = formChanges[j];\r\n\r\n if (change.id === id) {\r\n return change;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n return null;\r\n\r\n };\r\n\r\n var setPreviousControlId = function (id) {\r\n previousControlId = id;\r\n };\r\n\r\n var setOriginalValue = function (value) {\r\n originalValue = value;\r\n };\r\n\r\n var setEntityId = function (id) {\r\n previousEntityId = entityId;\r\n entityId = id;\r\n };\r\n\r\n var setPreviousEntityId = function (id) {\r\n previousEntityId = id;\r\n };\r\n\r\n var getPreviousControlId = function () {\r\n return previousControlId;\r\n };\r\n\r\n var getOriginalValue = function () {\r\n return originalValue;\r\n };\r\n\r\n var getEntityId = function () {\r\n return entityId;\r\n };\r\n\r\n var getPreviousEntityId = function () {\r\n return previousEntityId;\r\n };\r\n\r\n return {\r\n performChange: performChange,\r\n hasBeenMadeFormChanges: hasBeenMadeFormChanges,\r\n setPreviousControlId: setPreviousControlId,\r\n setOriginalValue: setOriginalValue,\r\n setEntityId: setEntityId,\r\n setPreviousEntityId: setPreviousEntityId,\r\n getPreviousControlId: getPreviousControlId,\r\n getOriginalValue: getOriginalValue,\r\n getEntityId: getEntityId,\r\n getPreviousEntityId: getPreviousEntityId,\r\n getChangeById: getChangeById,\r\n resetChanges: resetChanges\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n\r\n formChange.$inject = [\r\n 'formChangeDetector'\r\n ];\r\n\r\n angular.module(\"util\").directive(\"formChange\", formChange);\r\n\r\n function formChange(\r\n formChangeDetector\r\n ) {\r\n\r\n function registerListeners(formControls) {\r\n\r\n if (formControls) {\r\n\r\n /**\r\n * Function that handles the focus event\r\n * @param event\r\n */\r\n var onFocus = function (event) {\r\n\r\n var currentControlId = event.target.id;\r\n var currentControlValue = event.target.value;\r\n\r\n formChangeDetector.onFocusControl(currentControlId, event, event.target.type, currentControlValue);\r\n };\r\n\r\n /**\r\n * Function that handles the change event\r\n * @param event\r\n */\r\n var onChange = function (event) {\r\n\r\n formChangeDetector.onValueChanged(event.target.value);\r\n\r\n if (event.target.type === \"select-one\") {\r\n\r\n var control = event.target;\r\n angular.element(control).triggerHandler(\"focus\");\r\n\r\n }\r\n // console.log(\"onChange called\");\r\n }\r\n\r\n for (var i = 0; i < formControls.length; i++) {\r\n\r\n var currentControl = formControls[i];\r\n\r\n // give each control an id for unicity purpose\r\n currentControl.id = i;\r\n\r\n if (currentControl.type !== \"submit\" &&\r\n currentControl.type !== \"button\" &&\r\n currentControl.type !== \"checkbox\" &&\r\n !currentControl.hasAttribute(\"dropdown-toggle\") &&\r\n !currentControl.hasAttribute(\"datepicker-popup\")) {\r\n\r\n angular.element(currentControl).on(\"focus\", onFocus);\r\n angular.element(currentControl).on(\"change\", onChange);\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n return {\r\n restrict: \"A\",\r\n require: \"form\",\r\n link: function (scope, element, attrs) {\r\n\r\n var formControls = element[0].elements;\r\n\r\n registerListeners(formControls);\r\n\r\n }\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n httpInterceptor.$inject = [\r\n '$q',\r\n '$location',\r\n '$filter',\r\n 'sessionInformationService',\r\n 'errorService',\r\n 'infoService',\r\n '$localStorage'\r\n ];\r\n\r\n angular.module('VBSmart')\r\n .factory('httpInterceptor', httpInterceptor)\r\n .config(['$httpProvider', function ($httpProvider) {\r\n $httpProvider.interceptors.push('httpInterceptor');\r\n }]);\r\n\r\n function httpInterceptor(\r\n $q,\r\n $location,\r\n $filter,\r\n sessionInformationService,\r\n errorService,\r\n infoService,\r\n $localStorage\r\n ) {\r\n return {\r\n 'responseError': function (rejection) {\r\n\r\n if (rejection.status === 406) // not acceptable - happens only if the user is part of a vb organisasjon and does not have access to a certain part\r\n {\r\n console.error(rejection);\r\n\r\n return $q.when({});\r\n }\r\n //if we have any data coming back\r\n if (rejection.data) {\r\n // replace quotes\r\n var msgId = rejection.data.replace(\"\\\"\", '').replace(\"\\\"\", '').trim();\r\n // remove new lines\r\n msgId = msgId.replace(/(?:\\r\\n|\\r|\\n)/g, '');\r\n // try and translate it\r\n var message = $filter('translate')(msgId).trim();\r\n // if it's the same\r\n if (message == msgId) {\r\n if (msgId.indexOf('errExceptionGeneral') > -1) {\r\n msgId = msgId.replace(\"errExceptionGeneral\", '');\r\n\r\n message = $filter('translate')(\"errExceptionGeneral\");\r\n //remove the : from msgId\r\n var result = msgId.split(':');\r\n if (result && result[1])\r\n msgId = result[1].trim();\r\n message += ': ' + $filter('translate')(msgId);\r\n } else {\r\n\r\n var splitMessage = message.split(':');\r\n\r\n if (splitMessage.length > 1) {\r\n for (var i = 0; i < splitMessage.length; i++)\r\n splitMessage[i] = $filter('translate')(splitMessage[i]);\r\n\r\n message = splitMessage.join(' ');\r\n } else\r\n message = msgId;\r\n }\r\n }\r\n\r\n errorService.setErrorForbidden(false);\r\n errorService.changeError(message);\r\n\r\n }\r\n\r\n //if HttpStatusCode.InternalServerError\r\n if (rejection.status == 403) {\r\n errorService.setErrorForbidden(true);\r\n\r\n delete $localStorage.Session;\r\n delete $localStorage.User;\r\n delete $localStorage.Menus;\r\n delete $localStorage.SelectedMenu;\r\n sessionInformationService.resetInfo();\r\n $location.path(\"/login\");\r\n }\r\n\r\n\r\n return $q.reject(rejection);\r\n },\r\n\r\n 'response': function (response) {\r\n errorService.clearError();\r\n infoService.clearInfo();\r\n //if the message received is appropiately\r\n //show it\r\n if (typeof response.data == \"string\"\r\n && response.data != \"true\"\r\n && response.data != \"false\"\r\n && response.data.indexOf(\"<\") != 0\r\n && response.data.length > 0) {\r\n var msgId = response.data.replace(\"\\\"\", '').replace(\"\\\"\", '');\r\n var message = $filter('translate')(msgId);\r\n if (message == msgId) {\r\n message = \"The corresponding message translation is missing.\";\r\n }\r\n infoService.changeInfo(message);\r\n }\r\n return response || $q.when(response);\r\n }\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n lodashFactory.$inject = [\r\n '$window'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .factory('_', lodashFactory)\r\n .run(['$rootScope', '$window', function ($rootScope, $window) {\r\n $rootScope._ = $window._;\r\n }]);\r\n //simple factory for injecting lodash into angular\r\n function lodashFactory($window) {\r\n return $window._;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationUtilService.$inject = [\r\n '$localStorage'\r\n ];\r\n\r\n angular.module('util')\r\n .service('OrganizationUtilService', OrganizationUtilService);\r\n\r\n //Simple service that handles the current organization id selected\r\n function OrganizationUtilService(\r\n $localStorage\r\n ) {\r\n var organizationId;\r\n var hasCordel = false;\r\n this.getOrganizationId = function () {\r\n return organizationId;\r\n };\r\n\r\n /**\r\n * Gets the current organization id for the logged user\r\n * If the logged is user is not from central, the org id returned will be his\r\n * If the logged is user is from central, the org id returned will be the selected one\r\n * @param loggedUser\r\n * @returns\r\n */\r\n this.getOrganizationIdForLoggedUser = function (loggedUser) {\r\n\r\n var orgId;\r\n \r\n if (loggedUser.Organization.Central && loggedUser.Group.ProgId === \"ADMIN\") {\r\n\r\n if (!this.getOrganizationId()) {\r\n orgId = loggedUser.Organization.id;\r\n } else {\r\n orgId = this.getOrganizationId();\r\n }\r\n\r\n } else {\r\n orgId = loggedUser.Organization.id;\r\n }\r\n\r\n return orgId;\r\n\r\n };\r\n\r\n /**\r\n * Sets the has cordel status for current selected organization\r\n * @param orgHasCordel\r\n */\r\n this.setOrganizationHasCordel = function (orgHasCordel) {\r\n hasCordel = orgHasCordel;\r\n };\r\n\r\n /**\r\n * Gets the has cordel status for the current selected organizatio\r\n * @returns\r\n */\r\n this.getOrganizationHasCordel = function () {\r\n return hasCordel;\r\n };\r\n\r\n /**\r\n * Sets the given organization id\r\n * @param orgId\r\n */\r\n this.setOrganizationId = function (orgId) {\r\n organizationId = orgId;\r\n $localStorage.SelectedOrganizationId = orgId;\r\n };\r\n\r\n /**\r\n * Clears the current organization id\r\n */\r\n this.clearOrganizationId = function () {\r\n organizationId = null;\r\n $localStorage.SelectedOrganizationId = null;\r\n };\r\n };\r\n\r\n})();","(function () {\r\n\r\n angular\r\n .module('shared')\r\n .service('PageRouteUtilService', PageRouteUtilService);\r\n\r\n PageRouteUtilService.$inject = [];\r\n\r\n function PageRouteUtilService() {\r\n var service = {};\r\n\r\n var currentPageForExecution = null;\r\n\r\n service.setCurrentPageForExecution = function (page) {\r\n currentPageForExecution = page;\r\n }\r\n\r\n service.getCurrentPageForExecution = function () {\r\n return currentPageForExecution;\r\n }\r\n\r\n return service;\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n PingService.$inject = [\r\n '$q'\r\n ];\r\n\r\n angular.module('util').service('PingService', PingService);\r\n\r\n //Simple service that performs a request to the desired address\r\n //TODO: add interval possibility\r\n function PingService(\r\n $q\r\n ) {\r\n var dateUtilService = {};\r\n\r\n dateUtilService.ping = function (ip) {\r\n var deferred = $q.defer();\r\n\r\n //if (!this.inUse) {\r\n this.status = 'unchecked';\r\n this.inUse = true;\r\n this.ip = ip;\r\n this.img = new Image();\r\n this.img.onload = function () {\r\n //_that.inUse = false;\r\n\r\n deferred.resolve();\r\n\r\n };\r\n this.img.onerror = function (e) {\r\n\r\n deferred.resolve();\r\n };\r\n this.start = new Date().getTime();\r\n this.img.src = ip;\r\n this.timer = setTimeout(function () {\r\n\r\n deferred.reject();\r\n }, 1500);\r\n\r\n return deferred.promise;\r\n }\r\n\r\n return dateUtilService;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module('util')\r\n .service('PrintService', PrintService);\r\n\r\n PrintService.$inject = [\r\n '$timeout'\r\n ];\r\n\r\n /**\r\n * Simple service for printing sections of html\r\n */\r\n function PrintService($timeout) {\r\n \r\n this.print = function (printWindow, htmlElement) {\r\n\r\n $timeout(function () {\r\n printWindow.document.open();\r\n printWindow.document.writeln('');\r\n //printWindow.document.writeln('');\r\n //printWindow.document.writeln('');\r\n printWindow.document.writeln('');\r\n printWindow.document.writeln('');\r\n printWindow.document.writeln('');\r\n printWindow.document.writeln(htmlElement.outerHTML);\r\n printWindow.document.writeln('');\r\n printWindow.document.close();\r\n\r\n $timeout(function () {\r\n printWindow.print();\r\n\r\n //reset iframe\r\n printWindow.document.open();\r\n printWindow.document.write(\"\");\r\n printWindow.document.close();\r\n }, 1000);\r\n\r\n });\r\n\r\n } \r\n\r\n }\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n StorageService.$inject = [\r\n '_'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .service('StorageService', StorageService);\r\n\r\n /**\r\n * Simple service that handles inserting and fetching from an indexed db\r\n * @param {any} _\r\n */\r\n function StorageService(\r\n _\r\n ) {\r\n\r\n this.storeItem = function (key, value) {\r\n return localforage.setItem(key, value);\r\n };\r\n\r\n this.getItem = function (key) {\r\n return localforage.getItem(key);\r\n };\r\n\r\n this.clear = function() {\r\n return localforage.clear();\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n TranslateCtrl.$inject = [\r\n '$translate',\r\n '$scope',\r\n '$http',\r\n '$route',\r\n 'UserFactory'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .controller('TranslateCtrl', TranslateCtrl);\r\n\r\n //Simple controller for handling translation changes\r\n function TranslateCtrl($translate, $scope, $http, $route, UserFactory) {\r\n\r\n $scope.global.currentLanguage = 'nb_NO';\r\n\r\n if ($scope.loggedUser && $scope.loggedUser.Language) {\r\n $scope.global.currentLanguage = $scope.loggedUser.Language;\r\n $translate.use($scope.global.currentLanguage);\r\n }\r\n\r\n $http.defaults.headers.common['culture'] = $scope.global.currentLanguage;\r\n\r\n /**\r\n * Changes the language\r\n * @param langKey\r\n */\r\n $scope.changeLanguage = function (langKey) {\r\n $http.defaults.headers.common['culture'] = langKey;\r\n $scope.global.currentLanguage = langKey;\r\n\r\n var user = $scope.loggedUser;\r\n if (user && user.Language != langKey) {\r\n user.Language = langKey;\r\n UserFactory.saveUserLanguage();\r\n }\r\n\r\n $translate.use(langKey);\r\n };\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('appMenuItem')\r\n .component('vbAppMenuItemList',\r\n {\r\n templateUrl: 'Scripts/app-menu-item/app-menu-item-list/app-menu-item-list.component.html',\r\n controller: 'AppMenuItemListController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n appMenuItems: '<',\r\n onAfterDemoContentSave: '&?'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n appMenuItemListController.$inject = [\r\n '$uibModal',\r\n '$scope',\r\n 'AppMenuItemFactory'\r\n ];\r\n\r\n function appMenuItemListController(\r\n $uibModal,\r\n $scope,\r\n AppMenuItemFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.openModal = openModal;\r\n\r\n function openModal(appMenuItem) {\r\n\r\n var demoContent = appMenuItem.DemoContent;\r\n\r\n openDemoContentModal(demoContent)\r\n .then(function(editedContent) {\r\n return AppMenuItemFactory.saveDemoContentForAppMenuItem(editedContent, appMenuItem.id);\r\n })\r\n .then(function() {\r\n notifyParentComponentAboutDemoContentSave();\r\n });\r\n }\r\n\r\n function openDemoContentModal(demoContent) {\r\n\r\n $scope.demoContent = demoContent;\r\n\r\n return $uibModal.open({\r\n template: '\\\r\n ',\r\n scope: $scope,\r\n size: 'md'\r\n }).result;\r\n }\r\n\r\n function notifyParentComponentAboutDemoContentSave() {\r\n\r\n if (vm.onAfterDemoContentSave && typeof vm.onAfterDemoContentSave === 'function') {\r\n vm.onAfterDemoContentSave();\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('appMenuItem')\r\n .controller('AppMenuItemListController', appMenuItemListController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('attachment')\r\n .component('vbAttachmentItem',\r\n {\r\n templateUrl: 'Scripts/attachment/attachment-item/attachment-item.component.html',\r\n controller: 'AttachmentItemController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n selectedAttachment: '<',\r\n close: '&',\r\n getAttachments: '&',\r\n showIncludeInEndReport:'='\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n AttachmentItemController.$inject = [\r\n 'AttachmentFactory',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('attachment')\r\n .controller('AttachmentItemController', AttachmentItemController);\r\n\r\n /**\r\n * Simple controller for handling deviation attachment edit\r\n */\r\n function AttachmentItemController(\r\n AttachmentFactory,\r\n $q\r\n ) {\r\n var vm = this;\r\n\r\n vm.save = save;\r\n\r\n /**\r\n * Saves the current selected attachment and closes the edit \r\n */\r\n function save() {\r\n var promises = [];\r\n\r\n if (vm.showIncludeInEndReport)\r\n promises.push(AttachmentFactory.saveIncludeInEndReport(vm.selectedAttachment.id, vm.selectedAttachment.IncludeInReport));\r\n\r\n promises.push(AttachmentFactory.saveDescription(vm.selectedAttachment.id, vm.selectedAttachment.Description));\r\n\r\n return $q.all(promises)\r\n .then(vm.close);\r\n };\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('attachment')\r\n .component('vbAttachmentList',\r\n {\r\n templateUrl: 'Scripts/attachment/attachment-list/attachment-list.component.html',\r\n controller: 'AttachmentListController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n attachments: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n attachmentListController.$inject = [\r\n 'DownloadService'\r\n ];\r\n\r\n function attachmentListController(\r\n DownloadService\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.downloadAttachment = downloadAttachment;\r\n\r\n function downloadAttachment(attachment) {\r\n DownloadService.download(attachment.URL);\r\n }\r\n }\r\n\r\n angular\r\n .module('attachment')\r\n .controller('AttachmentListController', attachmentListController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('attachment')\r\n .component('vmAttachmentParticipants',\r\n {\r\n templateUrl: 'Scripts/attachment/attachment-participant/attachment-participant.component.html',\r\n controller: 'AttachmentParticipantController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n table: '<',\r\n foreignKey: '<',\r\n secondTable: '<',\r\n secondForeignKey:'<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n AttachmentParticipantController.$inject = [\r\n 'sessionInformationService',\r\n 'ParticipantFactory',\r\n 'UserFactory',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('attachment')\r\n .controller('AttachmentParticipantController', AttachmentParticipantController);\r\n\r\n function AttachmentParticipantController(\r\n sessionInformationService,\r\n ParticipantFactory,\r\n UserFactory,\r\n $q\r\n ) {\r\n var vm = this;\r\n\r\n vm.participants = [];\r\n vm.users = [];\r\n vm.loggedUser = sessionInformationService.getUser();\r\n\r\n vm.$onInit = onInit;\r\n vm.addParticipant = addParticipant;\r\n vm.deleteParticipant = deleteParticipant;\r\n vm.save = save;\r\n vm.getFilteredUsers = getFilteredUsers;\r\n\r\n function onInit() {\r\n $q.all([\r\n getUsers(),\r\n getParticipants()\r\n ]);\r\n };\r\n\r\n /**\r\n * Gets the participants for current foreign key\r\n */\r\n function getParticipants() {\r\n return ParticipantFactory.getParticipants(vm.table + '_ATTACHMENT', vm.foreignKey, vm.secondTable, vm.secondForeignKey)\r\n .then(function(result) {\r\n if (!result) {\r\n vm.participants = [];\r\n return;\r\n }\r\n vm.participants = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the company users\r\n */\r\n function getUsers() {\r\n return UserFactory.getUsersByOrganizationId(sessionInformationService.getUser().Organization.id, null)\r\n .$promise\r\n .then(function(result) {\r\n vm.users = result;\r\n\r\n if (_.isNil(vm.users) || _.isEmpty(vm.users))\r\n return;\r\n\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var user = vm.users[i];\r\n\r\n if (!user.FullName)\r\n vm.users[i] = Object.assign(new UserFactory.User(), user);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Adds the given user to the list of participants\r\n * @param {any} user\r\n */\r\n function addParticipant(user) {\r\n if (_.find(vm.participants, function(p) { return p.User.id == user.id }))\r\n return;\r\n\r\n vm.participants.push({\r\n User: Object.assign(new UserFactory.User(), user),\r\n ForeignKey: vm.foreignKey,\r\n Table: vm.table + '_ATTACHMENT',\r\n SecondForeignKey: vm.secondForeignKey,\r\n SecondTable: vm.secondTable,\r\n CreatedBy: {\r\n id: vm.loggedUser.id\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Removes the user from the list of participants\r\n * @param {any} user\r\n */\r\n function deleteParticipant(participant) {\r\n if (participant.CreatedBy.id != vm.loggedUser.id)\r\n return;\r\n\r\n _.remove(vm.participants, function(p) { return p.User.id == participant.User.id });\r\n };\r\n\r\n /**\r\n * Saves the current list of participants\r\n */\r\n function save() {\r\n return ParticipantFactory.saveParticipants(vm.participants)\r\n .then(function() {\r\n getParticipants();\r\n });\r\n };\r\n\r\n /**\r\n * Gets those users that aren't participants\r\n */\r\n function getFilteredUsers() {\r\n if (_.isNil(vm.users) || _.isEmpty(vm.users))\r\n return [];\r\n\r\n if (_.isNil(vm.participants) || _.isEmpty(vm.participants))\r\n return vm.users;\r\n\r\n return _.differenceBy(vm.users,\r\n _.map(vm.participants, function(p) { return p.User }),\r\n function(u) {\r\n return u.id;\r\n });\r\n };\r\n\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('automile')\r\n .component('tripDetails', {\r\n templateUrl: 'Scripts/automile/trip-details/trip-details.component.html',\r\n controller: 'AutomileTripDetailsController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n\r\n AutomileTripDetailsController.$inject = [\r\n '$routeParams',\r\n 'titleService',\r\n 'AutomileFactory',\r\n '$filter'\r\n ];\r\n\r\n angular.module('automile')\r\n .controller('AutomileTripDetailsController', AutomileTripDetailsController);\r\n\r\n function AutomileTripDetailsController(\r\n $routeParams,\r\n titleService,\r\n AutomileFactory,\r\n $filter\r\n ) {\r\n var vm = this;\r\n\r\n titleService.changeTitle($filter('translate')('AUTOMILE.Trip'));\r\n vm.$onInit = onInit;\r\n var tripId;\r\n\r\n function onInit() {\r\n tripId = $routeParams.tripId;\r\n if (tripId) {\r\n AutomileFactory.getTrip(tripId)\r\n .$promise\r\n .then(function (result) {\r\n vm.trip = result;\r\n vm.trip.Duration = vm.calcDuration(vm.trip.TripEndDateTimeLong, vm.trip.TripStartDateTimeLong);\r\n vm.trip.Speed = vm.calcSpeed(vm.trip.Duration, vm.trip.DistanceKilometers);\r\n return vm.trip;\r\n })\r\n }\r\n };\r\n\r\n vm.calcDuration = function(firstDate, secondDate) {\r\n var diff = Math.abs(new Date(firstDate) - new Date(secondDate));\r\n var totalMinutes = Math.floor((diff / 1000) / 60);\r\n\r\n return totalMinutes;\r\n }\r\n\r\n vm.getHours = function (totalMinutes) {\r\n var hours = Math.floor(totalMinutes / 60);\r\n var minutes = totalMinutes % 60;\r\n\r\n return (hours < 10 ? \"0\" + hours : hours) + \":\" + (minutes < 10 ? \"0\" + minutes : minutes);\r\n }\r\n\r\n vm.calcSpeed = function (time, distance) {\r\n var speed = distance / (time / 60);\r\n return Math.round(speed);\r\n }\r\n\r\n }\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('automile')\r\n .component('tripList', {\r\n templateUrl: 'Scripts/automile/trip-list/trip-list.component.html',\r\n controller: 'AutomileTripListController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n AutomileTripListController.$inject = [\r\n '$filter',\r\n 'titleService',\r\n 'searchService', \r\n '_',\r\n 'sessionInformationService',\r\n '$location',\r\n 'AutomileFactory'\r\n ];\r\n\r\n angular.module('automile').controller('AutomileTripListController', AutomileTripListController);\r\n\r\n function AutomileTripListController(\r\n $filter,\r\n titleService,\r\n searchService,\r\n _,\r\n sessionInformationService,\r\n $location,\r\n AutomileFactory\r\n ) {\r\n var vm = this;\r\n titleService.changeTitle($filter('translate')('AUTOMILE.TRIPS'));\r\n\r\n vm.predicate = AutomileFactory.predicateTrips;\r\n\r\n var allTrips = [];\r\n var nrOfRowsToLoadAtStart = 70;\r\n var nrOfRowsToLoad = 10;\r\n\r\n //pagination for small devices\r\n vm.currentPage = 1;\r\n vm.itemsPerPage = 30;\r\n vm.numPages = 1;\r\n\r\n vm.search = searchService.getSearch();\r\n vm.go = go;\r\n\r\n vm.changeOrder = function (orderBy) {\r\n vm.trips = [];\r\n if (orderBy != vm.predicate) {\r\n vm.predicate = orderBy;\r\n AutomileFactory.predicateTrips = orderBy;\r\n } else {\r\n vm.predicate = !vm.predicate;\r\n AutomileFactory.predicateTrips = vm.predicate;\r\n }\r\n\r\n allTrips = $filter('orderBy')(allTrips, AutomileFactory.predicateTrips, AutomileFactory.predicateTrips);\r\n\r\n vm.trips = allTrips.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n vm.getTrips = function (freeText) {\r\n if (freeText != undefined && freeText != null) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n searchService.setSearch(freeText);\r\n var trips = AutomileFactory.getTrips(freeText);\r\n trips.$promise.then(function (result) {\r\n allTrips = result;\r\n for (var index = 0; index < allTrips.length; index++) {\r\n allTrips[index].id = parseInt(allTrips[index].id);\r\n allTrips[index].TripId = parseInt(allTrips[index].TripId);\r\n }\r\n allTrips = $filter('orderBy')(allTrips, AutomileFactory.predicateTrips, AutomileFactory.predicateTrips);\r\n\r\n if (vm.isXs) {\r\n vm.trips = allTrips;\r\n vm.numPages = Math.ceil(allTrips.length / vm.itemsPerPage);\r\n } else\r\n vm.trips = allTrips.slice(0, nrOfRowsToLoadAtStart);\r\n });\r\n };\r\n\r\n vm.reachedEndOfList = false;\r\n\r\n vm.loadMore = function () {\r\n if (vm.trips && vm.trips.length < allTrips.length) {\r\n var last = vm.trips.length > 0 ? vm.trips.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allTrips.length ? allTrips.length : last + nrOfRowsToLoad;\r\n\r\n vm.trips = allTrips.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (allTrips.length > nrOfRowsToLoadAtStart) {\r\n vm.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n function go(path) {\r\n $location.path(path);\r\n }\r\n\r\n vm.getTrips();\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('configuration')\r\n .component('vbDataDetails',\r\n {\r\n templateUrl: 'Scripts/configuration/data-details/data-details.component.html',\r\n controller: 'DataDetailListController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DataDetailListController.$inject = [\r\n '_',\r\n 'ProcessListFactory',\r\n '$uibModal',\r\n '$scope',\r\n '$location'\r\n ];\r\n\r\n angular\r\n .module('configuration')\r\n .controller('DataDetailListController', DataDetailListController);\r\n\r\n function DataDetailListController(\r\n _,\r\n ProcessListFactory,\r\n $uibModal,\r\n $scope,\r\n $location\r\n ) {\r\n var vm = this;\r\n\r\n vm.reverse = true;\r\n vm.predicate = 'id';\r\n vm.dataDetails = [];\r\n vm.dataAbout = [];\r\n vm.selectedDataDetail = null;\r\n vm.dataDetailModalInstance = null;\r\n\r\n\r\n vm.$onInit = init;\r\n vm.changeOrder = changeOrder;\r\n vm.openDataDetailsModal = openDataDetailsModal;\r\n vm.checkIfDataDetailsAlreadyExists = checkIfDataDetailsAlreadyExists;\r\n vm.close = close;\r\n vm.getDataDetails = getDataDetails;\r\n\r\n $scope.includeDeactivatedItems = false;\r\n\r\n function init() {\r\n getDataDetails();\r\n };\r\n\r\n /**\r\n * Fetches the data types\r\n */\r\n function getDataDetails() {\r\n return ProcessListFactory.getProcessListDataTypes('BOT_PROCESSLIST_MANAGEMENT', !$scope.includeDeactivatedItems)\r\n .$promise\r\n .then(function (result) {\r\n if (!result)\r\n return;\r\n //get data about list\r\n var dataAboutList = vm.dataAbout = _.filter(result, function (r) { return !r.Parent || !r.Parent.id });\r\n\r\n if (_.isNil(dataAboutList) || _.isEmpty(dataAboutList))\r\n return;\r\n\r\n //get data details\r\n var dataDetails = _.filter(result, function (r) { return r.Parent && r.Parent.id });\r\n\r\n if (_.isNil(dataDetails) || _.isEmpty(dataDetails))\r\n return;\r\n\r\n //set parents\r\n for (var i = 0; i < dataDetails.length; i++) {\r\n var dataDetail = dataDetails[i];\r\n dataDetail.Parent = _.find(dataAboutList, function (d) { return d.id == dataDetail.Parent.id });\r\n dataDetail.SortNumber = dataDetail.SortNumber ? parseInt(dataDetail.SortNumber) : 100;\r\n }\r\n\r\n vm.dataDetails = dataDetails;\r\n });\r\n }\r\n\r\n /**\r\n * Changes the order base on the given predicate\r\n * @param orderBy\r\n */\r\n function changeOrder(predicate) {\r\n if (predicate != vm.predicate)\r\n vm.predicate = predicate;\r\n else\r\n vm.reverse = !vm.reverse;\r\n\r\n vm.dataDetails = _.orderBy(vm.dataDetails, [vm.predicate], [vm.reverse ? 'desc' : 'asc']);\r\n };\r\n\r\n /**\r\n * Open a modal for editing the given dataDetails\r\n * @param dataDetail\r\n */\r\n function openDataDetailsModal(dataDetail) {\r\n if (_.isNil(dataDetail))\r\n vm.selectedDataDetail = {\r\n Table: 'BOT_PROCESSLIST_MANAGEMENT',\r\n Active: true,\r\n SortNumber: 100\r\n };\r\n else\r\n vm.selectedDataDetail = _.cloneDeep(dataDetail);\r\n\r\n vm.dataDetailModalInstance = $uibModal.open({\r\n template: '',\r\n scope: $scope\r\n });\r\n\r\n vm.dataDetailModalInstance.result.finally(function () {\r\n getDataDetails();\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether a dataDetails exists already\r\n */\r\n function checkIfDataDetailsAlreadyExists(selectedDataDetail) {\r\n if (_.isNil(vm.dataDetails) || _.isEmpty(vm.dataDetails))\r\n return false;\r\n\r\n if (!selectedDataDetail || !selectedDataDetail.Name)\r\n return false;\r\n\r\n var existing = _.find(vm.dataDetails,\r\n function (d) {\r\n return d.Name.toUpperCase() == selectedDataDetail.Name.toUpperCase() && d.id != selectedDataDetail.id;\r\n });\r\n\r\n return !!existing;\r\n }\r\n\r\n function close() {\r\n $location.path('/organizations');\r\n }\r\n };\r\n})();","(function () {\r\n\r\n ContactModalController.$inject = [\r\n '$scope',\r\n 'contact',\r\n 'isFromOrderPage',\r\n 'CustomerFactory',\r\n '$uibModalInstance'\r\n ];\r\n\r\n function ContactModalController(\r\n $scope,\r\n contact,\r\n isFromOrderPage,\r\n CustomerFactory,\r\n $uibModalInstance) {\r\n \r\n $scope.contact = contact; \r\n $scope.isFromOrderPage = isFromOrderPage;\r\n\r\n function phonePattern(phone) {\r\n return /([0-9][0-9])([0-9]{1,20})$/.test(phone);\r\n }\r\n\r\n function closeModal(data) {\r\n $uibModalInstance.close(data);\r\n };\r\n\r\n $scope.dismissModal = function () {\r\n $uibModalInstance.dismiss();\r\n };\r\n\r\n /**\r\n * Check whether the save button for contact should be disabled\r\n * @returns\r\n */\r\n $scope.disableSaveContact = function () {\r\n\r\n if ($scope.contact &&\r\n $scope.contact.Name &&\r\n $scope.contact.Email &&\r\n $scope.contact.Mobile) {\r\n\r\n if (($scope.contact.Telephone && !phonePattern($scope.contact.Telephone)))\r\n return true;\r\n \r\n return false;\r\n }\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Saves the contact\r\n */\r\n $scope.saveContact = function () {\r\n\r\n CustomerFactory.saveContact($scope.contact)\r\n .then(function (savedContact) {\r\n closeModal(savedContact);\r\n });\r\n };\r\n\r\n }\r\n\r\n angular\r\n .module('contact')\r\n .controller('ContactModalController', ContactModalController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseAgenda')\r\n .component('vbCourseAgenda',\r\n {\r\n templateUrl: 'Scripts/course/course-agenda/course-agenda.component.html',\r\n controller: 'CourseAgendaController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n //course: '<',\r\n courseSession: '<',\r\n onCourseAgendaDetailsFormInitialized: '&?'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n // Not sure what to do yet with the commented code so instead of deleting i commented it\r\n\r\n courseAgendaController.$inject = [\r\n //'CourseDayFactory',\r\n //'ModalService',\r\n //'$scope'\r\n ];\r\n\r\n function courseAgendaController(\r\n //CourseDayFactory,\r\n //ModalService,\r\n //$scope\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.$onInit = onInit;\r\n //vm.addNewAgendaForDay = addNewAgendaForDay;\r\n vm.toggleAgendaState = toggleAgendaState;\r\n //vm.editAgenda = editAgenda;\r\n vm.onCourseAgendaDetailsFormInit = onCourseAgendaDetailsFormInit;\r\n\r\n function onInit() {\r\n //if (vm.course.Settings.IsSpanningSeveralDays) {\r\n // getCourseDays();\r\n //}\r\n }\r\n\r\n //function getCourseDays() {\r\n\r\n // if (!vm.course.id) {\r\n // return;\r\n // }\r\n\r\n // CourseDayFactory.getCourseDaysForCourse(vm.course.id)\r\n // .then(function(days) {\r\n // vm.course.Days = days;\r\n // });\r\n //}\r\n\r\n //function addNewAgendaForDay(day) {\r\n\r\n // openCourseAgendaModal()\r\n // .then(function(editedAgenda) {\r\n\r\n // if (!day.Agendas) {\r\n // day.Agendas = [];\r\n // }\r\n\r\n // day.Agendas.push(editedAgenda);\r\n // });\r\n //}\r\n\r\n //function openCourseAgendaModal(agenda) {\r\n\r\n // // prepare data for the modal window\r\n // $scope.agenda = angular.copy(agenda);\r\n\r\n // var htmlComponent = '\\\r\n // ';\r\n\r\n // return ModalService.openModal($scope, htmlComponent, 'md');\r\n //}\r\n\r\n function toggleAgendaState(agenda) {\r\n agenda.Active = !agenda.Active;\r\n }\r\n\r\n //function editAgenda(agenda, agendaIndex, day) {\r\n\r\n // openCourseAgendaModal(agenda)\r\n // .then(function(editedAgenda) {\r\n\r\n // day.Agendas[agendaIndex] = editedAgenda;\r\n // });\r\n //}\r\n\r\n function onCourseAgendaDetailsFormInit(form) {\r\n\r\n // notify the parent component about the form init\r\n if (vm.onCourseAgendaDetailsFormInitialized &&\r\n typeof vm.onCourseAgendaDetailsFormInitialized === 'function') {\r\n\r\n vm.onCourseAgendaDetailsFormInitialized({ form: form });\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('courseAgenda')\r\n .controller('CourseAgendaController', courseAgendaController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseAgendaFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function courseAgendaFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var _baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var CourseAgendas = $resource(_baseUrl + 'REST/CourseAgenda.svc/CourseAgendas/:courseId');\r\n\r\n function getAgendasForCourse(courseId) {\r\n return CourseAgendas.query({ courseId: courseId }).$promise;\r\n }\r\n\r\n return {\r\n getAgendasForCourse: getAgendasForCourse\r\n };\r\n }\r\n\r\n angular\r\n .module('courseAgenda')\r\n .factory('CourseAgendaFactory', courseAgendaFactory);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDayFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function courseDayFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n var CourseDays = $resource(baseUrl + 'REST/CourseDay.svc/CourseDays/:courseId');\r\n var CourseDayByCourseSessionId = $resource(baseUrl + 'REST/CourseDay.svc/CourseDayByCourseSessionId/:courseSessionId');\r\n\r\n function getCourseDaysForCourse(courseId) {\r\n return CourseDays.query({ courseId: courseId}).$promise;\r\n }\r\n\r\n function getCourseDayByCourseSessionId(courseSessionId) {\r\n return CourseDayByCourseSessionId.get({\r\n courseSessionId: courseSessionId\r\n }).$promise;\r\n }\r\n\r\n return {\r\n getCourseDaysForCourse: getCourseDaysForCourse,\r\n getCourseDayByCourseSessionId: getCourseDayByCourseSessionId\r\n };\r\n }\r\n\r\n angular\r\n .module('courseDay')\r\n .factory('CourseDayFactory', courseDayFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDayService.$inject = [\r\n 'CourseDayHoursService',\r\n 'DateUtilService'\r\n ];\r\n\r\n function courseDayService(\r\n CourseDayHoursService,\r\n DateUtilService\r\n ) {\r\n\r\n function convertCourseDaysDatesToMillisecondsWithOffset(courseDays) {\r\n\r\n if (!courseDays || courseDays.length === 0) {\r\n return;\r\n }\r\n\r\n courseDays.forEach(function(courseDay) {\r\n\r\n if (courseDay.Date) {\r\n courseDay.Date = DateUtilService.getLongWithOffset(moment(courseDay.Date).toDate());\r\n }\r\n\r\n if (!courseDay.HoursList || courseDay.HoursList.length === 0) {\r\n return;\r\n }\r\n\r\n CourseDayHoursService.convertHoursListToMillisecondsWithOffset(courseDay.HoursList);\r\n });\r\n }\r\n\r\n function convertCourseDaysDatesToMillisecondsWithoutOffset(courseDays) {\r\n\r\n if (!courseDays || courseDays.length === 0) {\r\n return;\r\n }\r\n\r\n courseDays.forEach(function(courseDay) {\r\n\r\n if (courseDay.Date) {\r\n courseDay.Date = DateUtilService.getLongWithoutOffset(moment(courseDay.Date).valueOf());\r\n }\r\n\r\n if (!courseDay.HoursList || courseDay.HoursList.length === 0) {\r\n return;\r\n }\r\n\r\n CourseDayHoursService.convertHoursListToMillisecondsWithoutOffset(courseDay.HoursList);\r\n });\r\n }\r\n\r\n function findDayIndexInList(day, days) {\r\n\r\n if (!day || !day.Date || !days) {\r\n return null;\r\n }\r\n\r\n var dayDate = moment(day.Date);\r\n\r\n var index = days.findIndex(function(currentDay) {\r\n\r\n if (!currentDay.Date) {\r\n return false;\r\n }\r\n\r\n var currentDayDate = moment(currentDay.Date);\r\n\r\n return currentDayDate.date() === dayDate.date() &&\r\n currentDayDate.month() === dayDate.month() &&\r\n currentDayDate.year() === dayDate.year();\r\n });\r\n\r\n return index;\r\n }\r\n\r\n return {\r\n convertCourseDaysDatesToMillisecondsWithOffset: convertCourseDaysDatesToMillisecondsWithOffset,\r\n convertCourseDaysDatesToMillisecondsWithoutOffset: convertCourseDaysDatesToMillisecondsWithoutOffset,\r\n findDayIndexInList: findDayIndexInList\r\n };\r\n }\r\n\r\n angular\r\n .module('courseDay')\r\n .service('CourseDayService', courseDayService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetails',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details.component.html',\r\n controller: 'CourseDetailsController',\r\n controllerAs: 'vm'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsController.$inject = [\r\n 'CourseTypes',\r\n '$location',\r\n 'CourseFactory',\r\n '$routeParams',\r\n '$q',\r\n 'CourseInvitationDispatchModes',\r\n 'ModalService',\r\n '$scope',\r\n 'CourseService',\r\n 'sessionInformationService',\r\n 'CourseEnrollmentFactory',\r\n 'userGroups',\r\n 'CourseSessionFactory',\r\n 'UserFactory',\r\n '$translate',\r\n 'TabUtilService',\r\n 'courseDetailsTabSetTabs',\r\n 'courseStatuses',\r\n 'UserSettingsFactory',\r\n 'infoService',\r\n 'AppRoutes',\r\n 'UserService',\r\n 'CourseDetailsTimeIntervalTabService'\r\n ];\r\n\r\n function courseDetailsController(\r\n CourseTypes,\r\n $location,\r\n CourseFactory,\r\n $routeParams,\r\n $q,\r\n CourseInvitationDispatchModes,\r\n ModalService,\r\n $scope,\r\n CourseService,\r\n sessionInformationService,\r\n CourseEnrollmentFactory,\r\n userGroups,\r\n CourseSessionFactory,\r\n UserFactory,\r\n $translate,\r\n TabUtilService,\r\n courseDetailsTabSetTabs,\r\n courseStatuses,\r\n UserSettingsFactory,\r\n infoService,\r\n AppRoutes,\r\n UserService,\r\n CourseDetailsTimeIntervalTabService\r\n ) {\r\n\r\n var vm = this;\r\n var courseIdentificationForm = {};\r\n var loggedUser = sessionInformationService.getUser();\r\n var loggedUserCourseEnrollment = {};\r\n var _nrOfUsersEnrolledToCourse = 0;\r\n var _loggedUserSettings = {};\r\n var _courseSessionForToday = null;\r\n\r\n Object.defineProperties(vm,\r\n {\r\n nrOfUsersEnrolledToCourse: {\r\n get: function() {\r\n return _nrOfUsersEnrolledToCourse;\r\n }\r\n }\r\n });\r\n\r\n vm.tabs = {\r\n activeTab: null\r\n };\r\n vm.showTabset = false;\r\n vm.course = {};\r\n\r\n vm.$onInit = onInit;\r\n vm.selectTab = selectTab;\r\n vm.canLocationTabBeDisplayed = canLocationTabBeDisplayed;\r\n vm.closeCourse = closeCourse;\r\n vm.saveCourse = saveCourse;\r\n vm.saveAndSendInvitations = saveAndSendInvitations;\r\n vm.isSaveButtonDisabled = isSaveButtonDisabled;\r\n vm.onCourseIdentificationFormInitialized = onCourseIdentificationFormInitialized;\r\n vm.canEnrollOthersButtonBeDisplayed = canEnrollOthersButtonBeDisplayed;\r\n vm.enrollOthers = enrollOthers;\r\n vm.canEnrollButtonBeDisplayed = canEnrollButtonBeDisplayed;\r\n vm.enroll = enroll;\r\n vm.getLoggedUserCourseEnrollment = getLoggedUserCourseEnrollment;\r\n vm.isEnrollButtonDisabled = isEnrollButtonDisabled;\r\n vm.isEnrollOthersButtonDisabled = isEnrollOthersButtonDisabled;\r\n vm.canStartCourseButtonBeDisplayed = canStartCourseButtonBeDisplayed;\r\n vm.startCourse = startCourse;\r\n vm.canSessionsTabBeDisplayed = canSessionsTabBeDisplayed;\r\n vm.getStartCourseButtonTooltipMessage = getStartCourseButtonTooltipMessage;\r\n vm.canAgendaTabBeDisplayed = canAgendaTabBeDisplayed;\r\n vm.canSaveButtonBeDisplayed = canSaveButtonBeDisplayed;\r\n vm.canSaveAndSendInvitationsButtonBeDisplayed = canSaveAndSendInvitationsButtonBeDisplayed;\r\n vm.isLoggedUserFromCentral = isLoggedUserFromCentral;\r\n vm.canAttachmentComponentBeDisplayed = canAttachmentComponentBeDisplayed;\r\n vm.canAttachmentsTabReadonlyBeDisplayed = canAttachmentsTabReadonlyBeDisplayed;\r\n vm.canEnrolledUsersTabBeDisplayed = canEnrolledUsersTabBeDisplayed;\r\n vm.canNotificationsSentTabBeDisplayed = canNotificationsSentTabBeDisplayed;\r\n vm.canGenerateDiplomaButtonBeDisplayed = canGenerateDiplomaButtonBeDisplayed;\r\n vm.openEnrolledUsersSelectionForDiplomaModal = openEnrolledUsersSelectionForDiplomaModal;\r\n vm.onCourseDateIntervalChange = onCourseDateIntervalChange;\r\n vm.getTextForStartSessionButton = getTextForStartSessionButton;\r\n vm.canAttachmentsTabBeDisplayed = canAttachmentsTabBeDisplayed;\r\n vm.canTimeIntervalTabBeDisplayed = canTimeIntervalTabBeDisplayed;\r\n\r\n function onInit() {\r\n \r\n initCourse()\r\n .then(function () {\r\n\r\n if (!vm.course || !vm.course.id) {\r\n return $q.when();\r\n }\r\n\r\n if (!CourseService.isRepeatingDaily(vm.course)) {\r\n return $q.when();\r\n }\r\n\r\n return getCourseSessionForToday();\r\n })\r\n .then(function() {\r\n initTabs();\r\n vm.showTabset = true;\r\n });\r\n }\r\n\r\n function getCourseSessionForToday() {\r\n return CourseSessionFactory.getCourseSessionForToday(vm.course.id)\r\n .then(function(courseSessionForToday) {\r\n _courseSessionForToday = courseSessionForToday;\r\n });\r\n }\r\n\r\n function initTabs() {\r\n\r\n var currentTab = TabUtilService.getCurrentTab(TabUtilService.pages.COURSE_DETAIL);\r\n\r\n if (!currentTab) {\r\n currentTab = courseDetailsTabSetTabs.informationTab;\r\n }\r\n\r\n vm.tabs.activeTab = currentTab;\r\n }\r\n\r\n function initCourse() {\r\n\r\n var courseId = $routeParams.courseId;\r\n\r\n if (!courseId) {\r\n vm.course = createNewCourseInstance();\r\n return $q.when();\r\n } else {\r\n return getCourseById(courseId)\r\n .then(function () {\r\n return getCourseEnrollmentByUserAndCourseIds();\r\n })\r\n .then(function() {\r\n return getNrOfUsersEnrolledToCourse();\r\n })\r\n .then(function() {\r\n return getLoggedUserSettings();\r\n });\r\n }\r\n }\r\n\r\n function createNewCourseInstance() {\r\n var startTime = new Date();\r\n startTime.setHours(8, 0, 0);\r\n var endTime = new Date();\r\n endTime.setHours(16, 0, 0);\r\n\r\n return {\r\n Active: true,\r\n Settings: { ItRepeatsDaily: true, AvailableForOrganizations: [], LimitedAccess: true },\r\n Location: {\r\n Address: { Country: {} }\r\n },\r\n StartDate: moment(startTime).valueOf(),\r\n EndDate: moment(endTime).valueOf()\r\n };\r\n }\r\n\r\n function getCourseById(courseId) {\r\n\r\n return CourseFactory.getCourseById(courseId)\r\n .then(function(course) {\r\n vm.course = course;\r\n CourseService.convertCourseDatesToMillisecondsWithoutOffset(vm.course);\r\n });\r\n }\r\n\r\n function onCourseIdentificationFormInitialized(form) {\r\n courseIdentificationForm = form;\r\n }\r\n\r\n function selectTab(tabName) {\r\n\r\n if (!tabName) {\r\n return;\r\n }\r\n\r\n vm.tabs.activeTab = tabName;\r\n TabUtilService.setCurrentTab(TabUtilService.pages.COURSE_DETAIL, tabName);\r\n }\r\n\r\n function canLocationTabBeDisplayed() {\r\n return vm.course.Type && vm.course.Type.ProgId === CourseTypes.Classroom;\r\n }\r\n\r\n function closeCourse() {\r\n\r\n var courseDetailsPageOpenedFromRoute = CourseService.getCourseDetailsPageOpenedFromRoute();\r\n\r\n if (courseDetailsPageOpenedFromRoute === AppRoutes.userDetails) {\r\n\r\n var userId = UserService.getIdOfTheLastVisitedUser();\r\n\r\n if (!userId) {\r\n userId = loggedUser.id;\r\n }\r\n\r\n $location.path('/user/' + userId);\r\n } else if (courseDetailsPageOpenedFromRoute === AppRoutes.courses) {\r\n\r\n if (sessionInformationService.isLoggedUserFromCentral()) {\r\n $location.path('/courses');\r\n } else {\r\n $location.path('/user/' + loggedUser.id);\r\n }\r\n } else {\r\n $location.path('/user/' + loggedUser.id);\r\n }\r\n }\r\n \r\n function saveCourse() {\r\n\r\n CourseService.convertCourseDatesToMilliseconds(vm.course);\r\n\r\n if (vm.course && vm.course.TargetAudiences && vm.course.TargetAudiences.length > 0)\r\n // make sure limited access to user is turned off when there are target audiences connected with the course\r\n turnOffLimitedAccessToUser();\r\n else\r\n // make sure limited access to target audiences ('LimitedAccess') is turned off when there are no target audiences connected with the course\r\n turnOffLimitedAccessToTargetAudiences();\r\n\r\n return CourseFactory.saveCourse(vm.course)\r\n .then(function (course) {\r\n CourseDetailsTimeIntervalTabService.clearDaysNotPresentInCourseDateInterval();\r\n\r\n $location.path('/course/' + course.id);\r\n initTabs();\r\n initCourse();\r\n return course;\r\n });\r\n }\r\n\r\n function turnOffLimitedAccessToUser() {\r\n if (!vm.course || !vm.course.Settings)\r\n return;\r\n\r\n vm.course.Settings.LimitedAccessToUser = false;\r\n }\r\n\r\n function turnOffLimitedAccessToTargetAudiences() {\r\n if (!vm.course || !vm.course.Settings)\r\n return;\r\n\r\n vm.course.Settings.LimitedAccess = false;\r\n }\r\n\r\n function saveAndSendInvitations() {\r\n\r\n // if the invitation dispatch mode is set to automatic, all the course enrolled users will be notified\r\n if (vm.course.Settings.InvitationDispatchMode.ProgId === CourseInvitationDispatchModes.Automatic) {\r\n saveCourse()\r\n .then(function (savedCourse) {\r\n return CourseFactory.sendInvitationsToTheParticipantsOfTheCourse(savedCourse.id,\r\n vm.course.InvitationTemplate);\r\n })\r\n .then(function(response) {\r\n showCourseInvitationResponseMessage(response);\r\n });\r\n } else {\r\n // otherwise let the user choose who will get notified\r\n openCourseSelectionForInvitationModal()\r\n .then(function (selectedUsers) {\r\n \r\n var data = {\r\n selectedUsers: selectedUsers,\r\n course: null\r\n };\r\n\r\n return saveCourse()\r\n .then(function(savedCourse) {\r\n data.course = savedCourse;\r\n return data;\r\n });\r\n })\r\n .then(function(data) {\r\n return CourseFactory.sendInvitationsToSelectedParticipantsOfTheCourse(data.selectedUsers,\r\n data.course.id, vm.course.InvitationTemplate);\r\n })\r\n .then(function(response) {\r\n showCourseInvitationResponseMessage(response);\r\n });\r\n }\r\n }\r\n\r\n function openCourseSelectionForInvitationModal() {\r\n\r\n // prepare data for the modal\r\n $scope.course = vm.course;\r\n\r\n var htmlComponent = '\\\r\n ';\r\n\r\n return ModalService.openModal($scope, htmlComponent, 'lg');\r\n }\r\n\r\n function isSaveButtonDisabled() {\r\n\r\n return courseIdentificationForm.$invalid ||\r\n // below checks are for vb-dropdown dropdown :)\r\n (!vm.course.Category || !vm.course.Category.id);\r\n }\r\n\r\n function canEnrollOthersButtonBeDisplayed() {\r\n return sessionInformationService.isLoggedUserAdminFromCentral() &&\r\n CourseService.isRepeatingDaily(vm.course) &&\r\n CourseService.isPublished(vm.course);\r\n }\r\n\r\n function enrollOthers() {\r\n\r\n // prepare data for component\r\n $scope.course = vm.course;\r\n\r\n var htmlComponent = '';\r\n\r\n ModalService.openModal($scope, htmlComponent, 'lg')\r\n .then(function () {\r\n getCourseEnrollmentByUserAndCourseIds();\r\n getNrOfUsersEnrolledToCourse();\r\n }, function() {\r\n getCourseEnrollmentByUserAndCourseIds();\r\n getNrOfUsersEnrolledToCourse();\r\n });\r\n }\r\n\r\n function canEnrollButtonBeDisplayed() {\r\n return _loggedUserSettings && _loggedUserSettings.CanSignUpForCourses &&\r\n CourseService.isRepeatingDaily(vm.course) &&\r\n CourseService.isPublished(vm.course);\r\n }\r\n\r\n function enroll() {\r\n\r\n // prepare data for component\r\n $scope.courseEnrollment = loggedUserCourseEnrollment;\r\n $scope.course = vm.course;\r\n $scope.user = loggedUser;\r\n\r\n var htmlComponent = '\\\r\n ';\r\n\r\n ModalService.openModal($scope, htmlComponent, 'lg')\r\n .then(function() {\r\n getCourseEnrollmentByUserAndCourseIds();\r\n getNrOfUsersEnrolledToCourse();\r\n });\r\n }\r\n\r\n function getCourseEnrollmentByUserAndCourseIds() {\r\n return CourseEnrollmentFactory.getCourseEnrollmentByUserAndCourseIds(loggedUser.id, vm.course.id)\r\n .then(function(courseEnrollment) {\r\n loggedUserCourseEnrollment = courseEnrollment;\r\n });\r\n }\r\n\r\n function getLoggedUserCourseEnrollment() {\r\n return loggedUserCourseEnrollment;\r\n }\r\n\r\n function isEnrollButtonDisabled() {\r\n if (!vm.course || !vm.course.id) {\r\n return true;\r\n }\r\n\r\n if (vm.course.Type && vm.course.Type.ProgId === CourseTypes.Classroom) {\r\n if (!vm.course.NrOfParticipants) {\r\n return true;\r\n }\r\n\r\n if (vm.course.NrOfParticipants < 1) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function isEnrollOthersButtonDisabled() {\r\n if (!vm.course || !vm.course.id) {\r\n return true;\r\n }\r\n\r\n if (vm.course.Type && vm.course.Type.ProgId === CourseTypes.Classroom) {\r\n\r\n if (!vm.course.NrOfParticipants) {\r\n return true;\r\n }\r\n\r\n if (vm.course.NrOfParticipants < 1) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function canStartCourseButtonBeDisplayed() {\r\n return isLoggedUserAdminFromCentral() && CourseService.isRepeatingDaily(vm.course) &&\r\n vm.course && vm.course.id;\r\n }\r\n\r\n function startCourse() {\r\n\r\n if (_courseSessionForToday && _courseSessionForToday.id) {\r\n $location.path('/course-session/' + _courseSessionForToday.id);\r\n } else {\r\n CourseSessionFactory.createSessionForCourse(vm.course.id, null)\r\n .then(function (courseSession) {\r\n $location.path('/course-session/' + courseSession.id);\r\n });\r\n }\r\n }\r\n\r\n function canSessionsTabBeDisplayed() {\r\n return isLoggedUserAdminFromCentral() &&\r\n vm.course && vm.course.id;\r\n }\r\n\r\n function getNrOfUsersEnrolledToCourse() {\r\n return UserFactory.getNrOfUsersEnrolledToCourse(vm.course.id)\r\n .then(function(response) {\r\n _nrOfUsersEnrolledToCourse = response.GetNrOfUsersEnrolledToCourseResult;\r\n });\r\n }\r\n\r\n function getStartCourseButtonTooltipMessage() {\r\n\r\n if (!_nrOfUsersEnrolledToCourse) {\r\n return $translate.instant('COURSE_PAGE.CANNOT_START_COURSE');\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function canAgendaTabBeDisplayed() {\r\n return vm.course.Type && vm.course.Type.ProgId === CourseTypes.Classroom;\r\n }\r\n\r\n function canSaveButtonBeDisplayed() {\r\n return sessionInformationService.isLoggedUserFromCentral();\r\n }\r\n\r\n function canSaveAndSendInvitationsButtonBeDisplayed() {\r\n return vm.course &&\r\n vm.course.id &&\r\n sessionInformationService.isLoggedUserFromCentral();\r\n }\r\n\r\n function isLoggedUserFromCentral() {\r\n return sessionInformationService.isLoggedUserFromCentral();\r\n }\r\n\r\n function canAttachmentComponentBeDisplayed() {\r\n return vm.course && vm.course.id && vm.tabs.activeTab === 'ATTACHMENTS' && isLoggedUserFromCentral();\r\n }\r\n\r\n function canAttachmentsTabReadonlyBeDisplayed() {\r\n return vm.course && vm.course.id && vm.tabs.activeTab === 'ATTACHMENTS' && !isLoggedUserFromCentral();\r\n }\r\n\r\n function isLoggedUserAdminFromCentral() {\r\n return sessionInformationService.isLoggedUserFromCentral() &&\r\n loggedUser.Group.ProgId === userGroups.admin;\r\n }\r\n\r\n function canEnrolledUsersTabBeDisplayed() {\r\n return (sessionInformationService.isLoggedUserAdminFromCentral() ||\r\n !CourseService.hasLimitedAccessToEnrolledUsers(vm.course)) &&\r\n vm.course && vm.course.id;\r\n }\r\n\r\n function canNotificationsSentTabBeDisplayed() {\r\n return sessionInformationService.isLoggedUserFromCentral() && loggedUser.Group.ProgId === userGroups.admin\r\n && vm.course && vm.course.id;\r\n }\r\n\r\n function canGenerateDiplomaButtonBeDisplayed() {\r\n\r\n if (!vm.course || !vm.course.id) {\r\n return false;\r\n }\r\n\r\n if (!vm.course.Status) {\r\n return false;\r\n }\r\n\r\n if (!vm.course.Settings) {\r\n return false;\r\n }\r\n\r\n return sessionInformationService.isLoggedUserFromCentral() &&\r\n vm.course.Status.ProgId === courseStatuses.completed &&\r\n vm.course.Settings.GenerateCertificate;\r\n }\r\n\r\n function openEnrolledUsersSelectionForDiplomaModal() {\r\n\r\n $scope.courseId = vm.course.id;\r\n\r\n var htmlComponent = '\\\r\n ';\r\n\r\n ModalService.openModal($scope, htmlComponent, 'lg');\r\n }\r\n\r\n function getLoggedUserSettings() {\r\n return UserSettingsFactory.get()\r\n .then(function (loggedUserSettings) {\r\n _loggedUserSettings = loggedUserSettings;\r\n });\r\n }\r\n\r\n function showCourseInvitationResponseMessage(response) {\r\n\r\n if (!response) {\r\n return;\r\n }\r\n\r\n var message = response.Message\r\n ? $translate.instant(response.Message)\r\n : null;\r\n\r\n if (response.UnnotifiedUsers && response.UnnotifiedUsers.length > 0) {\r\n var unnotifiedUsers = '';\r\n response.UnnotifiedUsers.forEach(function(user) {\r\n unnotifiedUsers += (user.FullName + ',');\r\n });\r\n // remove last ',' character\r\n unnotifiedUsers = unnotifiedUsers.slice(0, -1);\r\n message += unnotifiedUsers;\r\n }\r\n\r\n if (message) {\r\n infoService.changeInfo(message);\r\n }\r\n }\r\n\r\n function onCourseDateIntervalChange() {\r\n\r\n if (!vm.course || !vm.course.id) {\r\n return;\r\n }\r\n\r\n if (!CourseService.isRepeatingDaily(vm.course)) {\r\n return;\r\n }\r\n\r\n if (!_courseSessionForToday) {\r\n getCourseSessionForToday();\r\n }\r\n }\r\n\r\n function getTextForStartSessionButton() {\r\n\r\n if (!_courseSessionForToday || !_courseSessionForToday.id) {\r\n return $translate.instant('COURSE.START_SESSION');\r\n }\r\n\r\n return $translate.instant('COURSE_PAGE.VIEW_SESSION');\r\n }\r\n\r\n function canAttachmentsTabBeDisplayed() {\r\n return sessionInformationService.isLoggedUserAdminFromCentral();\r\n }\r\n\r\n function canTimeIntervalTabBeDisplayed() {\r\n return CourseService.isCourseOfTypeELearning(vm.course) === false;\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsController', courseDetailsController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseEnrolledUsers')\r\n .component('vbCourseEnrolledUsers',\r\n {\r\n templateUrl: 'Scripts/course/course-enrolled-users/course-enrolled-users.component.html',\r\n controller: 'CourseEnrolledUsersController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<',\r\n courseDay: ' 0) {\r\n ListService.markExistentItemsAsSelected(courseTargetAudiences, existentTargetAudiences, 'name');\r\n }\r\n });\r\n }\r\n\r\n function getCourseInvitationDispatchModes() {\r\n\r\n TypeFactory.getCourseInvitationDispatchModes()\r\n .then(function (invitationDispatchModes) {\r\n\r\n vm.courseInvitationDispatchModes = invitationDispatchModes;\r\n\r\n if (!vm.course.Settings.InvitationDispatchMode || !vm.course.Settings.InvitationDispatchMode.id) {\r\n // select Automatic by default\r\n vm.course.Settings.InvitationDispatchMode = vm.courseInvitationDispatchModes[0];\r\n }\r\n\r\n translateCourseInvitationDispatchModes();\r\n });\r\n }\r\n\r\n function getCourseInvitationDispatchManualModeOptions() {\r\n\r\n TypeFactory.getCourseInvitationDispatchManualModeOptions()\r\n .then(function (invitationDispatchModeOptions) {\r\n vm.invitationDispatchModeOptions = invitationDispatchModeOptions;\r\n });\r\n }\r\n\r\n function canInvitationDispatchModeOptionsBeDisplayed() {\r\n return vm.course.Settings.InvitationDispatchMode &&\r\n vm.course.Settings.InvitationDispatchMode.ProgId === CourseInvitationDispatchModes.Manual;\r\n }\r\n\r\n function getOrganizations() {\r\n\r\n return OrganizationFactory.getOrganizationsDropdown()\r\n .$promise\r\n .then(function(organizations) {\r\n\r\n _organizations = organizations;\r\n\r\n ListService.markExistentItemsAsSelected(_organizations,\r\n vm.course.Settings.AvailableForOrganizations,\r\n 'id');\r\n\r\n markCentralOrganizationAsSelectedAndMandatory();\r\n });\r\n }\r\n\r\n function markCentralOrganizationAsSelectedAndMandatory() {\r\n\r\n if (!_organizations) {\r\n return;\r\n }\r\n\r\n var centralOrganization = _organizations.find(function(organization) {\r\n return organization.Central;\r\n });\r\n\r\n if (!centralOrganization) {\r\n return;\r\n }\r\n\r\n centralOrganization.checked = true;\r\n centralOrganization.mandatory = true;\r\n\r\n // add central org. to AvailableForOrganizations list\r\n onOrganizationSelect(centralOrganization);\r\n }\r\n\r\n function onOrganizationSelect(selectedOrganization) {\r\n\r\n var availableForOrganizations = vm.course.Settings.AvailableForOrganizations;\r\n\r\n var index = availableForOrganizations.findIndex(function (organization) {\r\n return organization.id === selectedOrganization.id;\r\n });\r\n\r\n if (index === -1) {\r\n availableForOrganizations.push(selectedOrganization);\r\n\r\n if (isCourseConnectedWithTargetAudiences()) {\r\n \r\n getCourseTargetAudiencesByOrganizationId(selectedOrganization)\r\n .then(function() {\r\n\r\n // manually trigger $onChanges on dropdowns to update the selection text\r\n if (_targetAudienceDropdownComponent)\r\n _targetAudienceDropdownComponent.$onChanges();\r\n });\r\n } else {\r\n getUsersFromOrganization(selectedOrganization);\r\n }\r\n }\r\n }\r\n\r\n function onOrganizationUnselect(unselectedOrganization) {\r\n\r\n var availableForOrganizations = vm.course.Settings.AvailableForOrganizations;\r\n\r\n var index = availableForOrganizations.findIndex(function (organization) {\r\n return organization.id === unselectedOrganization.id;\r\n });\r\n\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n availableForOrganizations.splice(index, 1);\r\n\r\n // manually trigger $onChanges on dropdowns to update the selection text\r\n if (isCourseConnectedWithTargetAudiences()) {\r\n if (_targetAudienceDropdownComponent)\r\n _targetAudienceDropdownComponent.$onChanges();\r\n } else {\r\n removeOrganizationUsersFromUsersFromOrganizationsWithAccessList(unselectedOrganization.id);\r\n removeOrganizationUsersFromUsersWithAccessList(unselectedOrganization.id);\r\n if (_usersWithAccessDropdownComponent)\r\n _usersWithAccessDropdownComponent.$onChanges();\r\n }\r\n }\r\n\r\n function removeOrganizationUsersFromUsersWithAccessList(organizationId) {\r\n\r\n if (!organizationId)\r\n return;\r\n\r\n if (!vm.course)\r\n return;\r\n\r\n if (!vm.course.UsersWithAccess || vm.course.UsersWithAccess.length === 0)\r\n return;\r\n\r\n _.remove(vm.course.UsersWithAccess, function(user) {\r\n return user.Organization && user.Organization.id == organizationId;\r\n });\r\n }\r\n\r\n function removeOrganizationUsersFromUsersFromOrganizationsWithAccessList(organizationId) {\r\n\r\n if (!organizationId)\r\n return;\r\n\r\n if (!_usersFromOrganizationsWithAccess || _usersFromOrganizationsWithAccess.length === 0)\r\n return;\r\n\r\n _.remove(_usersFromOrganizationsWithAccess, function(user) {\r\n return user.Organization && user.Organization.id == organizationId;\r\n });\r\n }\r\n\r\n function getCourseTargetAudiencesByOrganizationId(selectedOrganization) {\r\n\r\n if (!vm.course || !vm.course.id) {\r\n return $q.when();\r\n }\r\n\r\n return CourseFactory.getCourseTargetAudiencesByOrganizationId(selectedOrganization.id, vm.course.id)\r\n .then(function (courseTargetAudiences) {\r\n\r\n courseTargetAudiences = UserService.convertIntranettPositionsToObjects(courseTargetAudiences);\r\n\r\n var existentTargetAudiences = findExistentTargetAudiencesForCurrentOrganization(selectedOrganization);\r\n\r\n if (existentTargetAudiences && existentTargetAudiences.length > 0) {\r\n ListService.markExistentItemsAsSelected(courseTargetAudiences, existentTargetAudiences, 'name');\r\n }\r\n\r\n // we need below properties in order to present this data in the target audiences dropdown from access section\r\n selectedOrganization.header = selectedOrganization.Name;\r\n selectedOrganization.items = courseTargetAudiences;\r\n });\r\n }\r\n\r\n function onCourseTargetAudienceSelect(targetAudience, organization) {\r\n \r\n if (!vm.course.TargetAudienceAccesses) {\r\n vm.course.TargetAudienceAccesses = [];\r\n }\r\n\r\n var access = null;\r\n var targetAudienceName = targetAudience.name;\r\n\r\n var accessIndex = vm.course.TargetAudienceAccesses.findIndex(function (access) {\r\n return access.Organization.id == organization.id;\r\n });\r\n\r\n if (accessIndex === -1) {\r\n access = {\r\n Organization: organization,\r\n TargetAudiences: []\r\n };\r\n vm.course.TargetAudienceAccesses.push(access);\r\n } else {\r\n access = vm.course.TargetAudienceAccesses[accessIndex];\r\n }\r\n\r\n ListService.addPrimitiveItemIfNotExists(targetAudienceName, access.TargetAudiences);\r\n }\r\n\r\n function onCourseTargetAudienceUnselect(targetAudience, organization) {\r\n\r\n if (!vm.course.TargetAudienceAccesses) {\r\n vm.course.TargetAudienceAccesses = [];\r\n }\r\n\r\n var accessIndex = vm.course.TargetAudienceAccesses.findIndex(function (currentAccess) {\r\n return currentAccess.Organization.id == organization.id;\r\n });\r\n\r\n if (accessIndex === -1) {\r\n return;\r\n }\r\n\r\n var access = vm.course.TargetAudienceAccesses[accessIndex];\r\n var targetAudienceName = targetAudience.name;\r\n\r\n ListService.removePrimitiveItemFromList(targetAudienceName, access.TargetAudiences);\r\n\r\n console.log(vm.course.TargetAudienceAccesses);\r\n }\r\n\r\n function findExistentTargetAudiencesForCurrentOrganization(selectedOrganization) {\r\n\r\n if (!vm.course.TargetAudienceAccesses || vm.course.TargetAudienceAccesses.length === 0) {\r\n return [];\r\n }\r\n\r\n if (!selectedOrganization) {\r\n return [];\r\n }\r\n\r\n var organization = selectedOrganization;\r\n\r\n var access = vm.course.TargetAudienceAccesses.find(function (access) {\r\n return access.Organization.id === organization.id;\r\n });\r\n\r\n if (!access) {\r\n return [];\r\n }\r\n\r\n return UserService.convertIntranettPositionsToObjects(access.TargetAudiences);\r\n }\r\n\r\n function canAccessSettingsBeDisplayed() {\r\n return isLoggedUserAdminFromCentral();\r\n }\r\n\r\n function isLoggedUserAdminFromCentral() {\r\n return sessionInformationService.isLoggedUserFromCentral() &&\r\n _loggedUser.Group.ProgId === userGroups.admin;\r\n }\r\n\r\n function onCourseInvitationDispatchModeSelect(courseInvitationDispatchMode) {\r\n vm.course.Settings.InvitationDispatchMode = courseInvitationDispatchMode;\r\n\r\n if (vm.course.Settings.InvitationDispatchMode.ProgId === CourseInvitationDispatchModes.Automatic) {\r\n vm.course.Settings.InvitationDispatchModeOption = null;\r\n }\r\n }\r\n\r\n function translateCourseInvitationDispatchModes() {\r\n\r\n // use a copy to trigger $onChanges on vb-dropdown\r\n var courseInvitationDispatchModesCopy = angular.copy(vm.courseInvitationDispatchModes);\r\n\r\n if (courseInvitationDispatchModesCopy && courseInvitationDispatchModesCopy.length > 0) {\r\n courseInvitationDispatchModesCopy.forEach(function(invitationDispatchMode) {\r\n invitationDispatchMode.Name = TypeService.getTypeTranslation(invitationDispatchMode);\r\n });\r\n }\r\n\r\n if (vm.course.Settings &&\r\n vm.course.Settings.InvitationDispatchMode &&\r\n vm.course.Settings.InvitationDispatchMode.id) {\r\n\r\n vm.course.Settings.InvitationDispatchMode.Name\r\n = TypeService.getTypeTranslation(vm.course.Settings.InvitationDispatchMode);\r\n }\r\n\r\n vm.courseInvitationDispatchModes = courseInvitationDispatchModesCopy;\r\n }\r\n\r\n function onTargetAudiencesDropdownInit(componentReference) {\r\n _targetAudienceDropdownComponent = componentReference;\r\n }\r\n\r\n function canAccessForTargetAudiencesSectionBeDisplayed() {\r\n return isCourseConnectedWithTargetAudiences();\r\n }\r\n\r\n function canAccessForUsersSectionBeDisplayed() {\r\n\r\n if (!vm.course)\r\n return false;\r\n\r\n return !vm.course.TargetAudiences || vm.course.TargetAudiences.length === 0;\r\n }\r\n\r\n function getUsersFromOrganizationsWithAccessToTheCourse() {\r\n\r\n if (!vm.course || !vm.course.Settings || !vm.course.Settings.AvailableForOrganizations ||\r\n vm.course.Settings.AvailableForOrganizations.length === 0)\r\n return;\r\n\r\n var organizationIds = vm.course.Settings.AvailableForOrganizations.map(function(organization) {\r\n return organization.id;\r\n });\r\n\r\n getUsersFromOrganizations(organizationIds);\r\n }\r\n\r\n function getUsersFromOrganizations(organizationIds) {\r\n\r\n UserFactory.getUsersFromOrganizations(organizationIds)\r\n .then(function (users) {\r\n\r\n if (!users || users.length === 0)\r\n return;\r\n\r\n _usersFromOrganizationsWithAccess = users;\r\n markExistentUsersWithAccessToCourse();\r\n initOrganizationsWithUsersWithAccess();\r\n\r\n // manually trigger $onChanges on dropdown to update the selection text\r\n if (_usersWithAccessDropdownComponent)\r\n _usersWithAccessDropdownComponent.$onChanges();\r\n });\r\n }\r\n\r\n function markExistentUsersWithAccessToCourse() {\r\n\r\n if (!vm.course || !vm.course.UsersWithAccess || vm.course.UsersWithAccess.length === 0)\r\n return;\r\n\r\n if (!_usersFromOrganizationsWithAccess || _usersFromOrganizationsWithAccess.length === 0)\r\n return;\r\n\r\n _usersFromOrganizationsWithAccess.forEach(function(user) {\r\n\r\n // check if user has access in order to mark it\r\n var index = vm.course.UsersWithAccess.findIndex(function(userWithAccess) {\r\n return userWithAccess.id == user.id;\r\n });\r\n\r\n if (index === -1)\r\n return;\r\n\r\n user.checked = true;\r\n });\r\n }\r\n\r\n function initOrganizationsWithUsersWithAccess() {\r\n\r\n if (!vm.course ||\r\n !vm.course.Settings ||\r\n !vm.course.Settings.AvailableForOrganizations ||\r\n vm.course.Settings.AvailableForOrganizations.length === 0)\r\n return;\r\n\r\n if (!_usersFromOrganizationsWithAccess || _usersFromOrganizationsWithAccess.length === 0)\r\n return;\r\n\r\n var availableForOrganizations = vm.course.Settings.AvailableForOrganizations;\r\n \r\n availableForOrganizations.forEach(function(organization) {\r\n\r\n // extract users from _usersFromOrganizationsWithAccess for each org.\r\n var users = _usersFromOrganizationsWithAccess.filter(function(user) {\r\n return user.Organization && user.Organization.id == organization.id;\r\n });\r\n\r\n initUserItemsForOrganization(users, organization);\r\n });\r\n }\r\n\r\n function onUserWithAccessSelect(user) {\r\n\r\n if (!vm.course)\r\n return;\r\n\r\n if (!_usersFromOrganizationsWithAccess || _usersFromOrganizationsWithAccess.length === 0)\r\n return;\r\n\r\n if (!vm.course.UsersWithAccess)\r\n vm.course.UsersWithAccess = [];\r\n \r\n // get the 'real' user object before adding\r\n var userObject = _usersFromOrganizationsWithAccess.find(function(currentUser) {\r\n return currentUser.id == user.realId;\r\n });\r\n\r\n if (!userObject)\r\n return;\r\n\r\n ListService.addItemIfNotExists(userObject, vm.course.UsersWithAccess, 'id');\r\n }\r\n\r\n function onUserWithAccessUnselect(user) {\r\n\r\n if (!vm.course)\r\n return;\r\n\r\n if (!vm.course.UsersWithAccess || vm.course.UsersWithAccess.length === 0)\r\n return;\r\n\r\n if (!_usersFromOrganizationsWithAccess || _usersFromOrganizationsWithAccess.length === 0)\r\n return;\r\n\r\n // get the 'real' user object before removing\r\n var userObject = _usersFromOrganizationsWithAccess.find(function(currentUser) {\r\n return currentUser.id == user.realId;\r\n });\r\n\r\n if (!userObject)\r\n return;\r\n\r\n ListService.removeItemFromList(userObject, vm.course.UsersWithAccess);\r\n }\r\n\r\n function canUsersDropdownBeDisplayed() {\r\n\r\n if (!vm.course || !vm.course.Settings)\r\n return false;\r\n\r\n return vm.course.Settings.LimitedAccessToUser;\r\n }\r\n\r\n function onUsersWithAccessDropdownInit(component) {\r\n _usersWithAccessDropdownComponent = component;\r\n }\r\n\r\n function convertOrganizationsTargetAudiencesToObjects() {\r\n\r\n if (!vm.course || !vm.course.Settings || !vm.course.Settings.AvailableForOrganizations)\r\n return;\r\n\r\n vm.course.Settings.AvailableForOrganizations.forEach(function (organization) {\r\n\r\n // we need this for target audiences dropdown in access section from course settings tab\r\n organization.header = organization.Name;\r\n organization.items = [];\r\n\r\n if (!organization.CourseTargetAudiences || organization.CourseTargetAudiences.length === 0)\r\n return;\r\n\r\n // we need this for target audiences dropdown in access section from course settings tab\r\n organization.items = UserService.convertIntranettPositionsToObjects(organization.CourseTargetAudiences);\r\n });\r\n }\r\n\r\n function isCourseConnectedWithTargetAudiences() {\r\n\r\n if (!vm.course)\r\n return false;\r\n\r\n return vm.course.TargetAudiences && vm.course.TargetAudiences.length > 0;\r\n }\r\n\r\n function getUsersFromOrganization(organization) {\r\n UserFactory.getUsersByOrganizationId(organization.id, null)\r\n .$promise\r\n .then(function (users) {\r\n addUsersToUsersFromOrganizationsWithAccessList(users);\r\n initUserItemsForOrganization(users, organization);\r\n });\r\n }\r\n\r\n function addUsersToUsersFromOrganizationsWithAccessList(users) {\r\n\r\n if (!users || users.length === 0)\r\n return;\r\n\r\n if (!_usersFromOrganizationsWithAccess)\r\n _usersFromOrganizationsWithAccess = [];\r\n\r\n users.forEach(function(user) {\r\n\r\n var userIndex = _usersFromOrganizationsWithAccess.findIndex(function(userWithAccess) {\r\n return userWithAccess.id == user.id;\r\n });\r\n\r\n if (userIndex === -1)\r\n _usersFromOrganizationsWithAccess.push(user);\r\n });\r\n }\r\n\r\n function initUserItemsForOrganization(users, organization) {\r\n\r\n if (!users || users.length === 0 || !organization)\r\n return;\r\n\r\n // prepare header for dropdown component\r\n organization.header = organization.Name;\r\n // convert the users list into a list compatible with dropdown component\r\n organization.items = users.map(function (user, index) {\r\n return {\r\n id: index,\r\n name: user.FullName,\r\n realId: user.id, // id from the database\r\n checked: user.checked\r\n };\r\n });\r\n }\r\n\r\n function onLimitedAccessToTargetAudienceChange() {\r\n\r\n if (!vm.course)\r\n return;\r\n\r\n if (!vm.course.Settings)\r\n return;\r\n \r\n if (vm.course.Settings.LimitedAccess)\r\n // make sure LimitedAccessToUser is turned off when limited access to target audiences 'LimitedAccess' is on\r\n vm.course.Settings.LimitedAccessToUser = false;\r\n }\r\n\r\n function onLimitedAccessToUserChange() {\r\n\r\n if (!vm.course)\r\n return;\r\n\r\n if (!vm.course.Settings)\r\n return;\r\n \r\n if (vm.course.Settings.LimitedAccessToUser)\r\n // make sure limited access to target audiences 'LimitedAccess' is turned off when limited access to user is on\r\n vm.course.Settings.LimitedAccess = false;\r\n }\r\n\r\n _translateChangeSuccessDeregistrationFunction = $rootScope.$on('$translateChangeSuccess', function() {\r\n translateCourseInvitationDispatchModes();\r\n });\r\n\r\n _onTargetAudienceFromCourseInformationTabSelectDeregistrationFunction\r\n = $scope.$on('onTargetAudienceFromCourseInformationTabSelect', function () {\r\n initOrganizationsItemsForDropdown();\r\n });\r\n\r\n _onTargetAudienceFromCourseInformationTabSelectAllDeregistrationFunction\r\n = $scope.$on('onTargetAudienceFromCourseInformationTabSelectAll', function () {\r\n initOrganizationsItemsForDropdown();\r\n });\r\n\r\n _onTargetAudienceFromCourseInformationTabUnselectDeregistrationFunction\r\n = $scope.$on('onTargetAudienceFromCourseInformationTabUnselect', function () {\r\n initOrganizationsItemsForDropdown();\r\n });\r\n\r\n function unsubscribeFromEvents() {\r\n if (_translateChangeSuccessDeregistrationFunction &&\r\n typeof _translateChangeSuccessDeregistrationFunction === 'function')\r\n // unsubscribe from $translateChangeSuccess event\r\n _translateChangeSuccessDeregistrationFunction();\r\n\r\n if (_onTargetAudienceFromCourseInformationTabSelectDeregistrationFunction &&\r\n typeof _onTargetAudienceFromCourseInformationTabSelectDeregistrationFunction === 'function')\r\n // unsubscribe from onTargetAudienceFromCourseInformationTabSelect event\r\n _onTargetAudienceFromCourseInformationTabSelectDeregistrationFunction();\r\n\r\n if (_onTargetAudienceFromCourseInformationTabSelectAllDeregistrationFunction &&\r\n typeof _onTargetAudienceFromCourseInformationTabSelectAllDeregistrationFunction === 'function')\r\n // unsubscribe from onTargetAudienceFromCourseInformationTabSelectAll event\r\n _onTargetAudienceFromCourseInformationTabSelectAllDeregistrationFunction();\r\n\r\n if (_onTargetAudienceFromCourseInformationTabUnselectDeregistrationFunction &&\r\n typeof _onTargetAudienceFromCourseInformationTabUnselectDeregistrationFunction === 'function')\r\n // unsubscribe from onTargetAudienceFromCourseInformationTabUnselect event\r\n _onTargetAudienceFromCourseInformationTabUnselectDeregistrationFunction();\r\n }\r\n\r\n function onDestroy() {\r\n unsubscribeFromEvents();\r\n }\r\n }\r\n\r\n angular\r\n .module('courseSettings')\r\n .controller('CourseSettingsController', courseSettingsController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseSubjectManagerFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function courseSubjectManagerFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var CourseSubjectManager = $resource(baseUrl + 'REST/CourseSubjectManager.svc/CourseSubjectManager');\r\n var CourseSubjectManagers = $resource(baseUrl + 'REST/CourseSubjectManager.svc/CourseSubjectManagers');\r\n\r\n function saveSubjectManager(subjectManager) {\r\n return CourseSubjectManager.save(subjectManager).$promise;\r\n }\r\n\r\n function getCourseSubjectManagers() {\r\n return CourseSubjectManagers.query().$promise;\r\n }\r\n\r\n return {\r\n saveSubjectManager: saveSubjectManager,\r\n getCourseSubjectManagers: getCourseSubjectManagers\r\n };\r\n }\r\n\r\n angular\r\n .module('courseSubjectManager')\r\n .factory('CourseSubjectManagerFactory', courseSubjectManagerFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseTargetAudienceFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function courseTargetAudienceFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var TargetAudienceUsedInAccessForCourseCheck\r\n = $resource(baseUrl + 'REST/Course.svc/TargetAudienceUsedInAccessForCourseCheck');\r\n\r\n function checkIfTargetAudienceIsUsedInAccessForCourse(targetAudience, courseId) {\r\n return TargetAudienceUsedInAccessForCourseCheck.get({\r\n courseId: courseId,\r\n targetAudience: targetAudience\r\n }).$promise;\r\n }\r\n\r\n return {\r\n checkIfTargetAudienceIsUsedInAccessForCourse: checkIfTargetAudienceIsUsedInAccessForCourse\r\n };\r\n }\r\n\r\n angular\r\n .module('courseTargetAudience')\r\n .factory('CourseTargetAudienceFactory', courseTargetAudienceFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('course')\r\n .component('vbCourses',\r\n {\r\n templateUrl: 'Scripts/course/courses/courses.component.html',\r\n controller: 'CoursesController',\r\n controllerAs: 'vm'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n coursesController.$inject = [\r\n '$location',\r\n 'CourseFactory',\r\n 'sessionInformationService',\r\n 'StatusFactory',\r\n 'StatusService',\r\n 'CourseService',\r\n 'AppRoutes',\r\n 'TabUtilService'\r\n ];\r\n\r\n function coursesController(\r\n $location,\r\n CourseFactory,\r\n sessionInformationService,\r\n StatusFactory,\r\n StatusService,\r\n CourseService,\r\n AppRoutes,\r\n TabUtilService\r\n ) {\r\n\r\n var vm = this;\r\n var _courseStatuses = [];\r\n var _activeTab = null;\r\n\r\n Object.defineProperties(vm,\r\n {\r\n courseStatuses: {\r\n get: function() {\r\n return _courseStatuses;\r\n }\r\n },\r\n activeTab: {\r\n get: function() {\r\n return _activeTab;\r\n }\r\n }\r\n });\r\n\r\n vm.courses = null;\r\n\r\n vm.$onInit = onInit;\r\n vm.createCourse = createCourse;\r\n vm.onCourseClick = onCourseClick;\r\n vm.canNewCourseButtonBeDisplayed = canNewCourseButtonBeDisplayed;\r\n vm.getStatusTranslation = getStatusTranslation;\r\n vm.selectTab = selectTab;\r\n\r\n function onInit() {\r\n getCourseStatuses();\r\n }\r\n\r\n function getCourses() {\r\n\r\n var courseStatusProgId = _activeTab;\r\n \r\n CourseFactory.getCourses(courseStatusProgId)\r\n .then(function(courses) {\r\n vm.courses = courses;\r\n });\r\n }\r\n\r\n function createCourse() {\r\n CourseService.setCourseDetailsPageOpenedFromRoute(AppRoutes.courses);\r\n $location.path('/course');\r\n }\r\n\r\n function onCourseClick(course) {\r\n CourseService.setCourseDetailsPageOpenedFromRoute(AppRoutes.courses);\r\n $location.path('/course/' + course.id);\r\n }\r\n\r\n function canNewCourseButtonBeDisplayed() {\r\n return sessionInformationService.isLoggedUserFromCentral();\r\n }\r\n\r\n function getCourseStatuses() {\r\n StatusFactory.getCourseStatuses()\r\n .then(function(courseStatuses) {\r\n _courseStatuses = courseStatuses;\r\n\r\n if (_courseStatuses.length === 0) {\r\n return;\r\n }\r\n\r\n initActiveTab();\r\n });\r\n }\r\n\r\n function getStatusTranslation(courseStatus) {\r\n return StatusService.getStatusTranslation(courseStatus);\r\n }\r\n\r\n function selectTab(tab) {\r\n _activeTab = tab;\r\n TabUtilService.setCurrentTab(TabUtilService.pages.COURSES, _activeTab);\r\n getCourses();\r\n }\r\n\r\n function initActiveTab() {\r\n\r\n var cachedTab = TabUtilService.getCurrentTab(TabUtilService.pages.COURSES);\r\n\r\n if (cachedTab) {\r\n _activeTab = cachedTab;\r\n } else if (_courseStatuses.length > 0) {\r\n _activeTab = _courseStatuses[0].ProgId;\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('course')\r\n .controller('CoursesController', coursesController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('customer')\r\n .component('customerDelete',\r\n {\r\n templateUrl: 'Scripts/customer/customer-delete/customer-delete.component.html',\r\n controller: 'CustomerDeleteController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n customerId: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CustomerDeleteController.$inject = [\r\n '_',\r\n 'dialogService',\r\n 'GdprFactory',\r\n '$location'\r\n ];\r\n\r\n angular\r\n .module('customer')\r\n .controller('CustomerDeleteController', CustomerDeleteController);\r\n\r\n /**\r\n * Controller that handles the delete of a customer\r\n * User is asked for password for confirmation\r\n */\r\n function CustomerDeleteController(\r\n _,\r\n dialogService,\r\n GdprFactory,\r\n $location\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = onInit;\r\n vm.deleteCustomer = deleteCustomer;\r\n\r\n function onInit() {\r\n\r\n };\r\n\r\n /**\r\n * Triggered when the user presses the delete button\r\n */\r\n function deleteCustomer() {\r\n if (!vm.customerId)\r\n return Promise.resolve();\r\n //ask user if sure\r\n return dialogService.showConfirmDialog('COMMON.WARNING', 'CUSTOMER_MODEL.DELETE_CUSTOMER_CONFIRM')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return Promise.resolve(true);\r\n //ask for password\r\n return handlePassword();\r\n })\r\n .then(function (result) {\r\n if (result === true)\r\n return Promise.resolve(result);\r\n\r\n //delete customer\r\n return GdprFactory.markCustomerAsDeletedFromWeb(vm.customerId, result.password);\r\n }).then(function(result) {\r\n if (result === true)\r\n return Promise.resolve(result);\r\n\r\n $location.path('/customers');\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a dialog where the users needs to type in the password and the reason why he's impersonating this user\r\n */\r\n function handlePassword() {\r\n return dialogService.showDialogWithInputs('COMMON.CONFIRM', 'CUSTOMER_MODEL.ENTER_PASSWORD_FOR_CONFIRM', null, [\r\n { type: 'password', model: null, label: 'COMMON.PASSWORD', inputType: 'input', name: 'passwordInput' }\r\n ])\r\n .then(function (result) {\r\n if (!result || (result.result != dialogService.DIALOG_RESULT_OK))\r\n return Promise.resolve(true);\r\n\r\n var resultedInputs = result.inputs;\r\n\r\n if (_.isNil(resultedInputs) || _.isEmpty(resultedInputs))\r\n return Promise.resolve(true);\r\n\r\n var password = resultedInputs[0].model;\r\n\r\n return { password: btoa(password) };\r\n });\r\n };\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('customer')\r\n .component('customerDeleteConfirmButton',\r\n {\r\n template: '',\r\n controller: 'CustomerDeleteConfirmButtonController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organizationId: '<'\r\n }\r\n })\r\n .controller('CustomerDeleteConfirmButtonController', CustomerDeleteConfirmButtonController);\r\n\r\n CustomerDeleteConfirmButtonController.$inject = [\r\n '$location',\r\n 'CustomerDeleteConfirmFactory',\r\n '_'\r\n ];\r\n\r\n /**\r\n * Controller that handles the logic for when the admin wants to see the customers that have been requested to be deleted\r\n */\r\n function CustomerDeleteConfirmButtonController(\r\n $location,\r\n CustomerDeleteConfirmFactory,\r\n _\r\n ) {\r\n var vm = this;\r\n\r\n vm.numberOfDeleteRequests = 0;\r\n\r\n vm.$onInit = onInit;\r\n vm.$onChanges = onChanges;\r\n vm.viewCustomerDeleteRequests = viewCustomerDeleteRequests;\r\n\r\n function onInit() {\r\n };\r\n\r\n /**\r\n * Triggered when the inputs are changed\r\n * In this case when organizationId changes\r\n * @param {any} changesObj\r\n */\r\n function onChanges(changesObj) {\r\n if (_.isNil(changesObj) || _.isNil(changesObj.organizationId) || _.isNil(changesObj.organizationId.currentValue))\r\n return;\r\n //get number of delete requests with the new organizationId\r\n getNumberOfDeleteRequests(changesObj.organizationId.currentValue);\r\n };\r\n\r\n function viewCustomerDeleteRequests() {\r\n //go to page\r\n $location.path('/customerDeleteRequests');\r\n };\r\n\r\n /**\r\n * Gets the number of customers that were requested to be deleted\r\n * @param {any} organizationId\r\n */\r\n function getNumberOfDeleteRequests(organizationId) {\r\n return CustomerDeleteConfirmFactory.getNumberOfDeleteRequests(organizationId)\r\n .then(function(result) {\r\n vm.numberOfDeleteRequests = result.DeleteRequestedCustomers;\r\n });\r\n };\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('customer')\r\n .component('customerDeleteConfirm',\r\n {\r\n templateUrl: 'Scripts/customer/customer-delete-confirm/customer-delete-confirm.component.html',\r\n controller: 'CustomerDeleteConfirmController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n CustomerDeleteConfirmController.$inject = [\r\n '_',\r\n 'titleService',\r\n '$translate',\r\n 'CustomerDeleteConfirmFactory',\r\n 'OrganizationUtilService',\r\n 'dialogService',\r\n '$location'\r\n ];\r\n\r\n angular\r\n .module('customer')\r\n .controller('CustomerDeleteConfirmController', CustomerDeleteConfirmController);\r\n\r\n /**\r\n * Controller that handles the confirm or decline of delete request for customer\r\n */\r\n function CustomerDeleteConfirmController(\r\n _,\r\n titleService,\r\n $translate,\r\n CustomerDeleteConfirmFactory,\r\n OrganizationUtilService,\r\n dialogService,\r\n $location\r\n ) {\r\n var vm = this;\r\n\r\n vm.customers = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.confirmDelete = confirmDelete;\r\n vm.declineDelete = declineDelete;\r\n vm.goBack = goBack;\r\n\r\n function onInit() {\r\n //set title accordingly\r\n titleService.changeTitle($translate.instant('GDPR.DELETE_REQUESTS'));\r\n\r\n getDeleteRequests()\r\n .then(function() {\r\n //TODO:\r\n });\r\n };\r\n\r\n /**\r\n * Occurs when the admin approves the delete\r\n * Password is required for confirmation\r\n * @param {any} customer\r\n */\r\n function confirmDelete(customer) {\r\n return handlePassword()\r\n .then(function(result) {\r\n if (result === true)\r\n return Promise.resolve(true);\r\n //make request\r\n return CustomerDeleteConfirmFactory.confirmDelete(customer.id, result.password);\r\n })\r\n .then(function() {\r\n //TODO: show success message\r\n return getDeleteRequests();\r\n });\r\n };\r\n\r\n /**\r\n * Occurs when the admin declines the delete and the customer is restored, but as inactive\r\n * Password is required for confirmation\r\n * @param {any} customer\r\n */\r\n function declineDelete(customer) {\r\n return handlePassword()\r\n .then(function(result) {\r\n if (result === true)\r\n return Promise.resolve(true);\r\n //make request\r\n return CustomerDeleteConfirmFactory.declineDelete(customer.id, result.password);\r\n })\r\n .then(function() {\r\n //TODO: show success message\r\n return getDeleteRequests();\r\n });\r\n };\r\n\r\n /**\r\n * Gets the list of customers that requested to be deleted\r\n */\r\n function getDeleteRequests() {\r\n return CustomerDeleteConfirmFactory.getDeleteRequests(OrganizationUtilService.getOrganizationId())\r\n .then(function(result) {\r\n vm.customers = result;\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a dialog where the users needs to type in the password and the reason why he's impersonating this user\r\n */\r\n function handlePassword() {\r\n return dialogService.showDialogWithInputs('COMMON.CONFIRM',\r\n 'CUSTOMER_MODEL.ENTER_PASSWORD_FOR_CONFIRM',\r\n null,\r\n [\r\n {\r\n type: 'password',\r\n model: null,\r\n label: 'COMMON.PASSWORD',\r\n inputType: 'input',\r\n name: 'passwordInput'\r\n }\r\n ])\r\n .then(function(result) {\r\n if (!result || (result.result != dialogService.DIALOG_RESULT_OK))\r\n return Promise.resolve(true);\r\n\r\n var resultedInputs = result.inputs;\r\n\r\n if (_.isNil(resultedInputs) || _.isEmpty(resultedInputs))\r\n return Promise.resolve(true);\r\n\r\n var password = resultedInputs[0].model;\r\n\r\n return { password: btoa(password) };\r\n });\r\n };\r\n\r\n function goBack() {\r\n $location.path('/customers');\r\n };\r\n }\r\n})();","(function() {\r\n 'use strict';\r\n\r\n CustomerDeleteConfirmFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular\r\n .module('customer')\r\n .factory('CustomerDeleteConfirmFactory', CustomerDeleteConfirmFactory);\r\n\r\n /**\r\n * Factory that handles requests for Customer delete\r\n */\r\n function CustomerDeleteConfirmFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var GetNumberOfDeleteRequestsApi = $resource(api + 'REST/CustomerGdpr.svc/NrOfDeleteRequests');\r\n var GetDeleteRequestsApi = $resource(api + 'REST/CustomerGdpr.svc/DeleteRequests');\r\n var ConfirmDeleteApi = $resource(api + 'REST/CustomerGdpr.svc/ConfirmDelete');\r\n var DeclineDeleteApi = $resource(api + 'REST/CustomerGdpr.svc/DeclineDelete');\r\n\r\n this.getNumberOfDeleteRequests = function(organizationId) {\r\n return GetNumberOfDeleteRequestsApi.get({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n this.getDeleteRequests = function(organizationId) {\r\n return GetDeleteRequestsApi.query({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n this.confirmDelete = function(customerId, password) {\r\n var confirmDeleteApiObject = new ConfirmDeleteApi();\r\n\r\n confirmDeleteApiObject.customerId = customerId;\r\n confirmDeleteApiObject.password = password;\r\n\r\n return confirmDeleteApiObject.$save();\r\n };\r\n\r\n this.declineDelete = function (customerId, password) {\r\n var declineDeleteApiObject = new DeclineDeleteApi();\r\n\r\n declineDeleteApiObject.customerId = customerId;\r\n declineDeleteApiObject.password = password;\r\n\r\n return declineDeleteApiObject.$save();\r\n };\r\n\r\n return this;\r\n\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('customer')\r\n .component('vbCustomerDetails', {\r\n templateUrl: 'Scripts/customer/customer-details/customer-details.component.html',\r\n controller: 'CustomerController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n isFromOrderWindow: ' 30)\r\n return true;\r\n\r\n if ($scope.customer.PostalAddress.PostalCode && $scope.customer.PostalAddress.PostalCode.length > 10)\r\n return true;\r\n\r\n if ($scope.customer.PostalAddress.Street && $scope.customer.PostalAddress.Street.length > 50)\r\n return true;\r\n\r\n if ($scope.customer.PostalAddress.Street2 && $scope.customer.PostalAddress.Street2.length > 50)\r\n return true;\r\n\r\n if ($scope.customer.PostalAddress.Street3 && $scope.customer.PostalAddress.Street3.length > 50)\r\n return true;\r\n }\r\n\r\n //if phone/telefax is provide check for pattern\r\n if ($scope.customer.Telephone && !$scope.phonePattern($scope.customer.Telephone))\r\n return true;\r\n if ($scope.customer.Telefax && !$scope.phonePattern($scope.customer.Telefax))\r\n return true;\r\n\r\n //if (!$scope.customer.Email && $scope.customer.Type.ProgId != 'PRIVATE')\r\n // return true;\r\n\r\n if ($scope.customer.Type.ProgId == 'PRIVATE') {\r\n if ($scope.customer.FirstName) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the save button is disabled\r\n * @returns\r\n */\r\n $scope.disableSaveCustomer = function () {\r\n if ($scope.customer && $scope.customer.id == undefined) {\r\n return disableSaveCustomer();\r\n } else\r\n if ($scope.customer && angular.toJson($scope.customer) != angular.toJson(originalCustomer)) {\r\n return disableSaveCustomer();\r\n }\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * If there are any changes ask the user if he wants to close the customer window\r\n * @param newUrl\r\n */\r\n function closeCustomer(newUrl) {\r\n if (isDirty()) {\r\n dialogService.showConfirmDialog('txtCloseCustomerTitle', 'txtCloseCustomerMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n $scope.go('/customers');\r\n }\r\n });\r\n } else {\r\n navigate(newUrl);\r\n }\r\n }\r\n\r\n /**\r\n * Closes the customer window\r\n */\r\n $scope.closeCustomer = function () {\r\n if (vm.isFromOrderWindow)\r\n notifyParentComponentAboutCustomerClose();\r\n else\r\n //closeCustomer('/customers');\r\n navigate('/customers');\r\n };\r\n\r\n function navigate(url) {\r\n if (url)\r\n $scope.go(url);\r\n else\r\n $scope.go('/customers');\r\n }\r\n\r\n /**\r\n * Checks whether there are any changes between the original customer and current customer\r\n * @returns\r\n */\r\n function isDirty() {\r\n return angular.toJson($scope.customer) !== angular.toJson(originalCustomer);\r\n }\r\n\r\n function isEmailValid(email) {\r\n\r\n if (!email) {\r\n return false;\r\n }\r\n\r\n return Patterns.EmailPattern.test(email);\r\n }\r\n\r\n function getNrOfContactsOnCustomer() {\r\n\r\n ContactFactory.getNrOfContactsOnCustomer($scope.customer.id)\r\n .then(function (nrOfContacts) {\r\n\r\n $scope.nrOfContactsOnCustomer = nrOfContacts[0];\r\n });\r\n }\r\n\r\n function notifyParentComponentAboutCustomerSave(customer) {\r\n\r\n if (vm.onAfterCustomerSave && typeof vm.onAfterCustomerSave === 'function') {\r\n vm.onAfterCustomerSave({ customer: customer });\r\n }\r\n }\r\n\r\n function notifyParentComponentAboutCustomerClose() {\r\n\r\n if (vm.onCustomerClose && typeof vm.onCustomerClose === 'function') {\r\n vm.onCustomerClose();\r\n }\r\n }\r\n };\r\n\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('customer')\r\n .component('vbCustomerDetailsModal',\r\n {\r\n templateUrl: 'Scripts/customer/customer-details-modal/customer-details-modal.component.html',\r\n controller: 'CustomerDetailsModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n customerId: '<',\r\n close: '&?',\r\n dismiss: '&?'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function customerDetailsModalController() {\r\n\r\n var vm = this;\r\n\r\n vm.onAfterCustomerSave = onAfterCustomerSave;\r\n vm.onCustomerClose = onCustomerClose;\r\n\r\n function onAfterCustomerSave(customer) {\r\n vm.close({ customerSaved: customer });\r\n }\r\n\r\n function onCustomerClose() {\r\n vm.dismiss();\r\n }\r\n }\r\n\r\n angular\r\n .module('customer')\r\n .controller('CustomerDetailsModalController', customerDetailsModalController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('customer')\r\n .component('vbCustomerList', {\r\n templateUrl: 'Scripts/customer/customer-list/customer-list.component.html',\r\n controller: 'CustomersController'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CustomersController.$inject = [\r\n '$scope',\r\n '$filter',\r\n 'titleService',\r\n 'searchService',\r\n 'CustomerFactory',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'sessionInformationService',\r\n '$location'\r\n ];\r\n\r\n angular.module('customer').controller('CustomersController', CustomersController);\r\n\r\n function CustomersController(\r\n $scope,\r\n $filter,\r\n titleService,\r\n searchService,\r\n CustomerFactory,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n sessionInformationService,\r\n $location\r\n ) {\r\n\r\n titleService.changeTitle($filter('translate')('Customers'));\r\n\r\n $scope.reverse = CustomerFactory.reverseCustomers;\r\n $scope.predicate = CustomerFactory.predicateCustomers;\r\n $scope.includeDeactivatedItems = CustomerFactory.includeDeactivatedItems;\r\n\r\n var allCustomers = [];\r\n var nrOfRowsToLoadAtStart = 70;\r\n var nrOfRowsToLoad = 10;\r\n\r\n //pagination for small devices\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 30;\r\n $scope.numPages = 1;\r\n $scope.search = searchService.getSearch();\r\n $scope.loggedUser = sessionInformationService.getUser();\r\n\r\n /**\r\n * Goes to the specified page\r\n * @param {} path \r\n * @returns {} \r\n */\r\n $scope.go = function (path) {\r\n $location.path(path);\r\n };\r\n\r\n /**\r\n * Changes the order for a given predicate\r\n * @param orderBy\r\n */\r\n $scope.changeOrder = function (orderBy) {\r\n $scope.customers = [];\r\n if (orderBy != $scope.predicate) {\r\n $scope.predicate = orderBy;\r\n CustomerFactory.predicateCustomers = orderBy;\r\n } else {\r\n $scope.reverse = !$scope.reverse;\r\n CustomerFactory.reverseCustomers = $scope.reverse;\r\n }\r\n\r\n allCustomers = $filter('orderBy')(allCustomers, CustomerFactory.predicateCustomers, CustomerFactory.reverseCustomers);\r\n\r\n\r\n $scope.customers = allCustomers.slice(0, nrOfRowsToLoadAtStart);\r\n\r\n };\r\n\r\n /**\r\n * Gets the customer full name\r\n * @param customer\r\n * @returns\r\n */\r\n function getCustomerFullName(customer) {\r\n return (customer.FirstName ? customer.FirstName + ' ' : '') + (customer.LastName ? customer.LastName : '');\r\n };\r\n\r\n /**\r\n * Fetches the customers based on a search criteria\r\n * @param freeText\r\n * @param organizationId\r\n */\r\n $scope.getCustomers = function (freeText, organizationId) {\r\n OrganizationUtilService.setOrganizationId(organizationId ? organizationId : null);\r\n\r\n if (freeText != undefined) {\r\n if (!freeText.replace(/\\s/g, '').length) // check if contains only spaces\r\n freeText = null;\r\n if (freeText == '') //check if empty string\r\n freeText = null;\r\n }\r\n\r\n searchService.setSearch(freeText);\r\n CustomerFactory.includeDeactivatedItems = $scope.includeDeactivatedItems;\r\n var customersPromise = CustomerFactory.getCustomers(freeText, $scope.includeDeactivatedItems, OrganizationUtilService.getOrganizationId());\r\n customersPromise.$promise.then(function (result) {\r\n allCustomers = result;\r\n for (var index = 0; index < allCustomers.length; index++) {\r\n allCustomers[index].id = parseInt(allCustomers[index].id);\r\n allCustomers[index].CustomerNumber = parseInt(allCustomers[index].CustomerNumber);\r\n allCustomers[index].FullName = getCustomerFullName(allCustomers[index]);\r\n }\r\n allCustomers = $filter('orderBy')(allCustomers, CustomerFactory.predicateCustomers, CustomerFactory.reverseCustomers);\r\n\r\n if ($scope.isXs) {\r\n $scope.customers = allCustomers;\r\n $scope.numPages = Math.ceil(allCustomers.length / $scope.itemsPerPage);\r\n } else\r\n $scope.customers = allCustomers.slice(0, nrOfRowsToLoadAtStart);\r\n });\r\n };\r\n\r\n $scope.reachedEndOfList = false;\r\n /**\r\n * Function used for infinite scroll\r\n */\r\n $scope.loadMore = function () {\r\n if ($scope.customers && $scope.customers.length < allCustomers.length) {\r\n var last = $scope.customers.length > 0 ? $scope.customers.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allCustomers.length ? allCustomers.length : last + nrOfRowsToLoad;\r\n\r\n $scope.customers = allCustomers.slice(0, indexToLoad);\r\n } else {\r\n if (allCustomers.length > nrOfRowsToLoadAtStart) {\r\n $scope.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n $scope.onOrganizationChange = function (organization, firstTime) {\r\n\r\n $scope.search.Organization = organization;\r\n $scope.getCustomers($scope.search.text, organization.id);\r\n };\r\n\r\n $scope.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationAuditController.$inject = [\r\n 'DeviationFactory',\r\n '$timeout'\r\n ];\r\n\r\n angular.module('deviation')\r\n .controller('DeviationAuditController', DeviationAuditController)\r\n .directive('deviationAudit', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/deviation/audit/deviationAuditPartial.html',\r\n controller: 'DeviationAuditController as auditCtrl',\r\n bindToController: true,\r\n scope: {\r\n deviation: '='\r\n }\r\n };\r\n });\r\n\r\n function DeviationAuditController(\r\n DeviationFactory,\r\n $timeout\r\n ) {\r\n var auditCtrl = this;\r\n auditCtrl.audit = [];\r\n\r\n /**\r\n * Get and set up history for the deviation\r\n */\r\n function init() {\r\n DeviationFactory.getDeviationAudit(auditCtrl.deviation.id)\r\n .then(function (result) {\r\n auditCtrl.audit = result;\r\n });\r\n };\r\n\r\n $timeout(function () {\r\n init();\r\n });\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('deviation')\r\n .component('vbDeviationDetails', {\r\n templateUrl: 'Scripts/deviation/deviation-details/deviation-details.component.html',\r\n controller: 'DeviationController',\r\n controllerAs: 'deviationCtrl',\r\n bindings: {\r\n deviationId: '=?',\r\n isModal: '=?',\r\n foreignKey: '=?',\r\n table: '=?',\r\n object: '=?',\r\n resolve: '<',\r\n close: '&',\r\n dismiss: '&'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationController.$inject = [\r\n 'DateUtilService',\r\n 'DeviationFactory',\r\n '$routeParams',\r\n '$scope',\r\n '$q',\r\n '$filter',\r\n '$location',\r\n 'sessionInformationService',\r\n 'OrganizationFactory',\r\n 'ProjectFactory',\r\n 'UserFactory',\r\n 'OrderFactory',\r\n 'EmailTemplateFactory',\r\n 'EmailSettingsFactory',\r\n '$uibModal',\r\n '$route',\r\n '_',\r\n 'ContactFactory',\r\n 'CustomerFactory',\r\n 'OrganizationUtilService',\r\n 'OfficerFactory',\r\n 'TableResources',\r\n 'infoService',\r\n '$translate',\r\n 'errorService'\r\n ];\r\n\r\n angular.module('deviation')\r\n .controller('DeviationController', DeviationController);\r\n\r\n\r\n function DeviationController(\r\n DateUtilService,\r\n DeviationFactory,\r\n $routeParams,\r\n $scope,\r\n $q,\r\n $filter,\r\n $location,\r\n sessionInformationService,\r\n OrganizationFactory,\r\n ProjectFactory,\r\n UserFactory,\r\n OrderFactory,\r\n EmailTemplateFactory,\r\n EmailSettingsFactory,\r\n $uibModal,\r\n $route,\r\n _,\r\n ContactFactory,\r\n CustomerFactory,\r\n OrganizationUtilService,\r\n OfficerFactory,\r\n TableResources,\r\n infoService,\r\n $translate,\r\n errorService\r\n ) {\r\n var deviationCtrl = this;\r\n\r\n var currentDeviationStatus;\r\n\r\n if (!deviationCtrl.deviationId)\r\n deviationCtrl.deviationId = $routeParams.deviationId;\r\n\r\n deviationCtrl.officers = [];\r\n deviationCtrl.statuses = [];\r\n deviationCtrl.types = [];\r\n deviationCtrl.orders = [];\r\n deviationCtrl.projects = [];\r\n deviationCtrl.users = [];\r\n deviationCtrl.customers = [];\r\n deviationCtrl.orderFreeText = '';\r\n deviationCtrl.projectFreeText = '';\r\n deviationCtrl.userFreeText = '';\r\n deviationCtrl.customerFreeText = '';\r\n deviationCtrl.deviation = {};\r\n deviationCtrl.objectAssignList = [\r\n 'BOT_ORDER',\r\n 'BOT_PROJECT',\r\n 'GOT_USER_DEVIATION',//we need to diferentiate from 'GOT_USER' that is used for management process lists\r\n 'BOT_CUSTOMER'\r\n ];\r\n\r\n deviationCtrl.selectedCustomerForExternalInput = {};\r\n deviationCtrl.externalInputCustomerFreeText = '';\r\n deviationCtrl.externalInputCustomers = [];\r\n deviationCtrl.emailPattern = (function () {//todo move somewhere\r\n var regexp = /^([\\w.\\-\\_]{2,30})+@([\\w-\\_]{1,30})+([\\.]{1,1}[\\w]{1,30}|[\\.]{1,1})+([\\w]{1,10})$/;\r\n return {\r\n test: function (value) {\r\n return regexp.test(value);\r\n }\r\n };\r\n })();\r\n\r\n deviationCtrl.canGenerateReportButtonBeDisplayed = canGenerateReportButtonBeDisplayed;\r\n deviationCtrl.onSendDeviationDetailsReportThroughEmailClick = onSendDeviationDetailsReportThroughEmailClick;\r\n\r\n deviationCtrl.$onInit = function () {\r\n if (deviationCtrl.resolve) {\r\n deviationCtrl.deviationId = deviationCtrl.resolve.deviationId;\r\n deviationCtrl.object = deviationCtrl.resolve.object;\r\n deviationCtrl.isModal = deviationCtrl.resolve.isModal;\r\n deviationCtrl.foreignKey = deviationCtrl.resolve.foreignKey;\r\n deviationCtrl.table = deviationCtrl.resolve.table;\r\n }\r\n\r\n init();\r\n }\r\n\r\n /**\r\n * Fetches a list of statuses for deviation\r\n */\r\n function getDeviationStatuses() {\r\n return DeviationFactory.getDeviationStatuses().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n deviationCtrl.statuses = $filter('orderBy')(result, 'SortNumber');\r\n });\r\n };\r\n\r\n /**\r\n * Fetches a list of types for deviation\r\n */\r\n function getDeviationTypes() {\r\n return DeviationFactory.getDeviationTypes().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n deviationCtrl.types = $filter('orderBy')(result, 'SortNumber');\r\n });\r\n };\r\n\r\n /**\r\n * Fetches a list of type of causes for deviation\r\n */\r\n function getTypeOfCauses() {\r\n return DeviationFactory.getTypeOfCauses().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n deviationCtrl.typeOfCauses = $filter('orderBy')(result, 'SortNumber');\r\n });\r\n };\r\n\r\n /**\r\n * Prepares the deviation external input entity to be displayed in the ui.\r\n * First gets all customers into a dropdown, then pre-selects the customer\r\n * associated with the entity, if the respective customer doesn't exist\r\n * in the dropdown, then makes a request to the server in order to get him\r\n * @param {any} externalInputEntity\r\n */\r\n function initDeviationExternalInputEntity(externalInputEntity) {\r\n\r\n getCustomers()\r\n .then(function (customers) {\r\n\r\n deviationCtrl.externalInputCustomers = customers;\r\n\r\n // pre-select the customer associated with the external entity\r\n\r\n deviationCtrl.selectedCustomerForExternalInput = _.find(deviationCtrl.externalInputCustomers, function (element) {\r\n return element.id === externalInputEntity.ForeignKey;\r\n });\r\n\r\n\r\n if (deviationCtrl.selectedCustomerForExternalInput) {\r\n deviationCtrl.externalInputCustomerFreeText = deviationCtrl.getFullName(deviationCtrl.selectedCustomerForExternalInput);\r\n return $q.when();\r\n }\r\n else {\r\n // if the customer does not exist in the dropdown get him from the server\r\n return CustomerFactory.getCustomer(externalInputEntity.ForeignKey).$promise;\r\n }\r\n\r\n })\r\n .then(function (customer) {\r\n\r\n if (customer) {\r\n\r\n // add the missing customer to the dropdown\r\n deviationCtrl.externalInputCustomers.push(customer);\r\n\r\n deviationCtrl.externalInputCustomerFreeText = deviationCtrl.getFullName(customer);\r\n deviationCtrl.selectedCustomerForExternalInput = customer;\r\n }\r\n\r\n\r\n getContactsForCustomer(deviationCtrl.selectedCustomerForExternalInput.id);\r\n\r\n });\r\n\r\n }\r\n\r\n function getOfficers(organizationId) {\r\n\r\n OfficerFactory.getOfficers(organizationId)\r\n .then(function (officers) {\r\n\r\n if (!officers || officers.length === 0) {\r\n return;\r\n }\r\n\r\n deviationCtrl.officers = officers;\r\n });\r\n }\r\n\r\n /**\r\n * First get necessary data and get the deviation if id is provided\r\n */\r\n function init() {\r\n $q.all([\r\n getDeviationStatuses(),\r\n getDeviationTypes(),\r\n getTypeOfCauses(),\r\n getOfficers(getOrganizationId())\r\n ]).then(function () {\r\n if (deviationCtrl.deviationId)\r\n return DeviationFactory.getDeviation(deviationCtrl.deviationId);\r\n\r\n return $q.when();\r\n }).then(function (result) {\r\n if (result) {\r\n deviationCtrl.deviation = result;\r\n\r\n // convert to int the unhandled number of days to be displayed into the input\r\n deviationCtrl.deviation.UnhandledNumberOfDays = _.parseInt(deviationCtrl.deviation.UnhandledNumberOfDays);\r\n\r\n // store deviation current status for checking later if changed\r\n currentDeviationStatus = angular.copy(deviationCtrl.deviation.Status);\r\n\r\n if (deviationCtrl.deviation && deviationCtrl.deviation.Type) {\r\n // get e-mail template settings for selected type\r\n getDeviationTypeEmailSettings(deviationCtrl.deviation.Type.id);\r\n }\r\n\r\n // if an external entity for input was set\r\n // get all customers and pre-select his\r\n // and get all the contacts associated with its customer\r\n if (deviationCtrl.deviation.ExternalInputEntity.id)\r\n initDeviationExternalInputEntity(deviationCtrl.deviation.ExternalInputEntity);\r\n\r\n }\r\n else {\r\n deviationCtrl.deviation = DeviationFactory.getDeviationForSave();\r\n //set first type and status\r\n deviationCtrl.deviation.Type = DeviationFactory.selectedType ? DeviationFactory.selectedType : deviationCtrl.types[0];\r\n\r\n // get e-mail template settings for selected type\r\n getDeviationTypeEmailSettings(deviationCtrl.deviation.Type.id);\r\n\r\n deviationCtrl.deviation.Status = deviationCtrl.statuses[0];\r\n //set date to today\r\n deviationCtrl.deviation.Date = (new Date()).getTime();\r\n\r\n if (deviationCtrl.foreignKey && deviationCtrl.table) {\r\n deviationCtrl.deviation.Table = deviationCtrl.table;\r\n deviationCtrl.deviation.ForeignKey = deviationCtrl.foreignKey;\r\n\r\n if (deviationCtrl.table == 'BOT_ORDER')\r\n deviationCtrl.deviation.Order = deviationCtrl.object;\r\n }\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Get the email settings for deviation type\r\n * @param deviationTypeId\r\n */\r\n function getDeviationTypeEmailSettings(deviationTypeId) {\r\n\r\n if (deviationTypeId) {\r\n EmailSettingsFactory.getEmailSettingsForDeviationType(deviationTypeId).then(function (result) {\r\n deviationCtrl.deviationTypeEmailSettings = result;\r\n });\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Verifies whether the deviation can be saved\r\n * @returns\r\n */\r\n function canSaveDeviation() {\r\n if (!deviationCtrl.deviation)\r\n return false;\r\n\r\n if (!deviationCtrl.deviation.Table)\r\n return false;\r\n\r\n if (!deviationCtrl.deviation.ForeignKey)\r\n return false;\r\n\r\n if (!deviationCtrl.deviation.Date)\r\n return false;\r\n\r\n if ((!!deviationCtrl.deviation.Comment && deviationCtrl.deviation.Comment.length > 1000)\r\n || (!!deviationCtrl.deviation.Improvement && deviationCtrl.deviation.Improvement.length > 1000)\r\n || (!!deviationCtrl.deviation.Severity && deviationCtrl.deviation.Severity.length > 1000)\r\n || (!!deviationCtrl.deviation.WhatHappened && deviationCtrl.deviation.WhatHappened.length > 1000)\r\n || (!!deviationCtrl.deviation.Description && deviationCtrl.deviation.Description.length > 1000)\r\n || (!!deviationCtrl.deviation.ImmediateMeasure && deviationCtrl.deviation.ImmediateMeasure.length > 1000)\r\n || (!!deviationCtrl.deviation.ChanceOfHappeningAgain && deviationCtrl.deviation.ChanceOfHappeningAgain.length > 1000)\r\n || (!!deviationCtrl.deviation.Consequence && deviationCtrl.deviation.Consequence.length > 1000))\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Get the email template for the associated entity\r\n * @param templateFor\r\n * @returns\r\n */\r\n function getDeviationEmailTemplateForAssociatedEntity(templateFor, organizationId) {\r\n\r\n if (templateFor) {\r\n\r\n templateFor = getAssociatedEntityType(templateFor);\r\n\r\n return EmailTemplateFactory.getDeviationEmailTemplateForAssociatedEntity(templateFor, organizationId)\r\n .then(function (emailTemplate) {\r\n\r\n // if there is no custom customer template defined by the organization\r\n // retrieve the default deviation customer e-mail template\r\n if (!emailTemplate.id && templateFor === TableResources.DeviationCustomerTable) {\r\n\r\n return EmailTemplateFactory\r\n .getDeviationEmailTemplateForAssociatedEntity(TableResources.DeviationCustomerDefaultTable, null);\r\n }\r\n\r\n return emailTemplate;\r\n });\r\n }\r\n\r\n return $q.when({});\r\n }\r\n\r\n function getAssociatedEntityType(templateFor) {\r\n\r\n if (!templateFor)\r\n return \"\";\r\n\r\n if (templateFor === \"GOT_USER_DEVIATION\")\r\n templateFor = \"BOT_DEVIATION_INTERNAL\";\r\n else\r\n templateFor = \"BOT_DEVIATION_CUSTOMER\";\r\n\r\n return templateFor;\r\n }\r\n\r\n /**\r\n * Fetch the entities for which the user wants to notify them\r\n * @param deviationTable \r\n * @returns\r\n */\r\n function getEntitiesToNotify(deviationTable) {\r\n\r\n if (deviationTable) {\r\n\r\n var deviationId = deviationCtrl.deviation.id;\r\n\r\n return DeviationFactory.getEntitiesToNotify(deviationCtrl.deviation.ForeignKey,\r\n deviationCtrl.deviation.Table,\r\n deviationId);\r\n }\r\n\r\n return null;\r\n\r\n }\r\n\r\n /**\r\n * Opens a modal where the user can preview the email that is going to be sent \r\n */\r\n function showEmailPreview() {\r\n\r\n DeviationFactory.emailPreviewModalInstance = $uibModal.open({\r\n\r\n templateUrl: \"Scripts/deviation/email/emailTemplate/modalPreviewEmailTemplate/modalPreviewEmailTemplate.html\",\r\n controller: \"ModalPreviewEmailTemplateController\",\r\n scope: $scope,\r\n resolve: {\r\n associatedEntityType: function () {\r\n return getAssociatedEntityType(deviationCtrl.deviation.Table);\r\n },\r\n emailTemplate: function () {\r\n return getDeviationEmailTemplateForAssociatedEntity(deviationCtrl.deviation.Table, getOrganizationId());\r\n },\r\n notificationRecipients: function () {\r\n return getEntitiesToNotify(deviationCtrl.deviation.Table);\r\n },\r\n organizationId: function () {\r\n return getOrganizationId();\r\n }\r\n },\r\n size: \"lg\"\r\n });\r\n\r\n DeviationFactory.emailPreviewModalInstance.result.then(function (result) {\r\n\r\n var emailTemplate = result.emailTemplate;\r\n var recipients = result.notificationRecipients;\r\n\r\n var deviationDataForEmail = {\r\n Table: deviationCtrl.deviation.Table,\r\n Type: deviationCtrl.deviation.Type\r\n };\r\n\r\n DeviationFactory.saveDeviation(deviationCtrl.deviation).then(function (savedDeviation) {\r\n\r\n deviationDataForEmail.id = savedDeviation.id;\r\n deviationDataForEmail.Organization = savedDeviation.Organization;\r\n\r\n DeviationFactory.sendEmailWithDeviation(recipients, deviationDataForEmail, emailTemplate)\r\n .then(function () {\r\n\r\n if (DeviationFactory.emailPreviewModalInstance)\r\n DeviationFactory.emailPreviewModalInstance.dismiss();\r\n\r\n deviationCtrl.closeDeviation(true, savedDeviation.id);\r\n });\r\n\r\n });\r\n\r\n });\r\n }\r\n\r\n /**\r\n * Checks whether the notification will be triggered by status\r\n * @param statusProgId\r\n * @returns\r\n */\r\n function IsNotifyingForDeviationStatus(statusProgId) {\r\n\r\n var emailSettings = deviationCtrl.deviationTypeEmailSettings;\r\n\r\n if (statusProgId && emailSettings) {\r\n switch (statusProgId) {\r\n case \"IN_PROCESS\":\r\n return emailSettings.SendEmailForInProcessStatusChange;\r\n case \"READY_FOR_CLOSING\":\r\n return emailSettings.SendEmailForReadyForClosingStatusChange;\r\n case \"CLOSED\":\r\n return emailSettings.SendEmailForClosedStatusChange;\r\n }\r\n }\r\n\r\n return false;\r\n\r\n }\r\n\r\n /**\r\n * Get basic infor about the deviation\r\n * @returns\r\n */\r\n function getDeviationData() {\r\n var deviationData = {\r\n id: deviationCtrl.deviation.id,\r\n table: deviationCtrl.deviation.Table\r\n };\r\n\r\n if (deviationCtrl.deviation.Table === 'BOT_PROJECT') {\r\n deviationData.foreignKey = deviationCtrl.deviation.Project.id;\r\n }\r\n\r\n return deviationData;\r\n }\r\n\r\n\r\n function notifyForDeviationStatusChange(deviationId, foreignKey, deviationTable) {\r\n DeviationFactory.notifyForStatusChange(deviationId, foreignKey, deviationTable);\r\n }\r\n\r\n /**\r\n * Gets a list of contacts for a given customer by its id\r\n * @param {any} customerId\r\n */\r\n function getContactsForCustomer(customerId) {\r\n\r\n return ContactFactory.getContactsByCustomerId(customerId)\r\n .then(function (contacts) {\r\n\r\n // empty the array\r\n deviationCtrl.externalCustomerContacts = [];\r\n\r\n if (!contacts || contacts.length === 0)\r\n return;\r\n\r\n deviationCtrl.externalCustomerContacts = contacts;\r\n\r\n // pre-select first contact in the dropdown\r\n // if the external entity is not set or\r\n // the customer for external input was changed\r\n // meaning a new set of contacts are loaded\r\n if (!deviationCtrl.deviation.ExternalInputEntity ||\r\n !deviationCtrl.deviation.ExternalInputEntity.id ||\r\n deviationCtrl.deviation.ExternalInputEntity.ForeignKey !== deviationCtrl.selectedCustomerForExternalInput.id) {\r\n\r\n deviationCtrl.deviation.ExternalInputEntity = deviationCtrl.externalCustomerContacts[0];\r\n\r\n }\r\n\r\n\r\n });\r\n }\r\n\r\n /**\r\n * Gets a list of customer based on a free text entered by the end user\r\n * @param {any} freeText\r\n */\r\n function getCustomers(freeText) {\r\n return OrderFactory.getCustomersForOrder(null, null, freeText, false).$promise;\r\n }\r\n\r\n function getOrganizationId() {\r\n\r\n var organizationId = OrganizationUtilService.getOrganizationId();\r\n\r\n if (!organizationId)\r\n organizationId = sessionInformationService.getUser().Organization.id;\r\n\r\n return organizationId;\r\n }\r\n\r\n deviationCtrl.getFullName = function (object) {\r\n if (!object)\r\n return '';\r\n\r\n return (object.FirstName ? object.FirstName : '') + ' ' + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Saves the current deviation\r\n */\r\n deviationCtrl.saveDeviation = function () {\r\n\r\n if (!canSaveDeviation())\r\n return;\r\n\r\n var notifyForStatusChange = false;\r\n\r\n var deviationData;\r\n\r\n if (currentDeviationStatus && currentDeviationStatus.id != deviationCtrl.deviation.Status.id) {\r\n\r\n notifyForStatusChange = IsNotifyingForDeviationStatus(deviationCtrl.deviation.Status.ProgId);\r\n\r\n deviationData = getDeviationData();\r\n }\r\n if (deviationCtrl.deviation.Date)\r\n deviationCtrl.deviation.Date = angular.copy(new Date(deviationCtrl.deviation.Date)).getTime();\r\n\r\n if (!deviationCtrl.deviation.id)\r\n deviationCtrl.deviation.Order = null;\r\n\r\n DeviationFactory.saveDeviation(deviationCtrl.deviation).then(function (savedDeviation) {\r\n\r\n if (notifyForStatusChange && deviationData) {\r\n notifyForDeviationStatusChange(deviationData.id, deviationData.foreignKey, deviationData.table);\r\n }\r\n\r\n deviationCtrl.closeDeviation(true, savedDeviation.id);\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Closes the deviation window\r\n * @param isSaving\r\n * @param deviationId\r\n */\r\n deviationCtrl.closeDeviation = function (isSaving, deviationId) {\r\n if (deviationCtrl.isModal) {\r\n deviationCtrl.close();\r\n } else {\r\n //if it came from saving and it has a deviation id\r\n if (isSaving && deviationId) {\r\n //if it was a new deviation\r\n if (!$routeParams.deviationId)\r\n $scope.go('/deviation/' + deviationId);\r\n else {//existing deviation\r\n $route.reload();\r\n }\r\n } else\r\n $scope.go('/deviations');\r\n }\r\n };\r\n\r\n deviationCtrl.goToOrder = function (order) {\r\n $location.path('/order/' + ((order.MainOrderId) ? order.MainOrderId : order.id));\r\n };\r\n\r\n deviationCtrl.goToProject = function (project) {\r\n $location.path('/project/' + project.id);\r\n };\r\n\r\n /**\r\n * Gets a list of order for which to be associated with the deviation\r\n * @param freeText\r\n */\r\n deviationCtrl.getOrders = function (freeText) {\r\n var organizationId = sessionInformationService.getUser().Organization.id;\r\n\r\n OrganizationFactory.getOrders(organizationId, freeText).then(function (orders) {\r\n deviationCtrl.orders = orders;\r\n });\r\n };\r\n\r\n /**\r\n * Associates any given order with the deviation\r\n * @param order\r\n */\r\n deviationCtrl.setOrder = function (order) {\r\n deviationCtrl.orderFreeText = (order.OrderNumber ? 'Ext. ID ' + order.OrderNumber : order.id) + ' ' + deviationCtrl.getFullName(order.Customer);\r\n\r\n deviationCtrl.deviation.ForeignKey = order.id;\r\n\r\n deviationCtrl.projectFreeText = '';\r\n deviationCtrl.customerFreeText = '';\r\n deviationCtrl.userFreeText = '';\r\n };\r\n\r\n deviationCtrl.clearOrder = function () {\r\n deviationCtrl.orderFreeText = '';\r\n deviationCtrl.deviation.ForeignKey = null;\r\n };\r\n\r\n /**\r\n * Gets a list of projects for which to be associated with the deviation\r\n * @param freeText\r\n */\r\n deviationCtrl.getProjects = function (freeText) {\r\n var organizationId = sessionInformationService.getUser().Organization.id;\r\n\r\n ProjectFactory.getProjects(freeText, organizationId).$promise.then(function (result) {\r\n deviationCtrl.projects = result;\r\n });\r\n };\r\n\r\n /**\r\n * Associates any given project with the deviation\r\n * @param project\r\n */\r\n deviationCtrl.setProject = function (project) {\r\n deviationCtrl.projectFreeText = project.ProjectNumber + ' - ' + project.Name;\r\n\r\n deviationCtrl.deviation.ForeignKey = project.id;\r\n\r\n deviationCtrl.orderFreeText = '';\r\n deviationCtrl.customerFreeText = '';\r\n deviationCtrl.userFreeText = '';\r\n };\r\n\r\n deviationCtrl.clearProject = function () {\r\n deviationCtrl.projectFreeText = '';\r\n deviationCtrl.deviation.ForeignKey = null;\r\n };\r\n\r\n /**\r\n * Gets a list of users to be associated with the deviation\r\n * @param freeText\r\n */\r\n deviationCtrl.getUsers = function (freeText) {\r\n var organizationId = sessionInformationService.getUser().Organization.id;\r\n\r\n UserFactory.getUsers(freeText, false, organizationId).$promise.then(function (result) {\r\n deviationCtrl.users = result;\r\n });\r\n };\r\n\r\n /**\r\n * Associates any given user with the deviation\r\n * @param user\r\n */\r\n deviationCtrl.setUser = function (user) {\r\n deviationCtrl.userFreeText = deviationCtrl.getFullName(user);\r\n\r\n deviationCtrl.deviation.ForeignKey = user.id;\r\n\r\n deviationCtrl.orderFreeText = '';\r\n deviationCtrl.projectFreeText = '';\r\n deviationCtrl.customerFreeText = '';\r\n };\r\n\r\n deviationCtrl.clearUser = function () {\r\n deviationCtrl.userFreeText = '';\r\n deviationCtrl.deviation.ForeignKey = null;\r\n };\r\n\r\n /**\r\n * Gets a list of customers to be associatd with the deviation\r\n * @param freeText\r\n */\r\n deviationCtrl.getCustomers = function (freeText, isSearchingForExternalCustomerDropdown) {\r\n\r\n getCustomers(freeText)\r\n .then(function (result) {\r\n\r\n if (!isSearchingForExternalCustomerDropdown)\r\n deviationCtrl.customers = result;\r\n else\r\n deviationCtrl.externalInputCustomers = result;\r\n\r\n });\r\n\r\n };\r\n\r\n\r\n /**\r\n * Associates any given customer with the deviation\r\n * @param customer\r\n */\r\n deviationCtrl.setCustomer = function (customer, isForExternalInputCustomer) {\r\n\r\n if (isForExternalInputCustomer) {\r\n\r\n deviationCtrl.externalInputCustomerFreeText = deviationCtrl.getFullName(customer);\r\n deviationCtrl.selectedCustomerForExternalInput = customer;\r\n getContactsForCustomer(deviationCtrl.selectedCustomerForExternalInput.id);\r\n\r\n } else {\r\n deviationCtrl.customerFreeText = deviationCtrl.getFullName(customer);\r\n\r\n deviationCtrl.deviation.ForeignKey = customer.id;\r\n\r\n deviationCtrl.orderFreeText = '';\r\n deviationCtrl.projectFreeText = '';\r\n deviationCtrl.userFreeText = '';\r\n }\r\n };\r\n\r\n deviationCtrl.clearCustomer = function (isForExternalInputCustomer) {\r\n\r\n if (isForExternalInputCustomer) {\r\n\r\n deviationCtrl.externalInputCustomerFreeText = '';\r\n deviationCtrl.selectedCustomerForExternalInput = {};\r\n\r\n } else {\r\n deviationCtrl.customerFreeText = '';\r\n deviationCtrl.deviation.ForeignKey = null;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Checks whether the basic information fields should be displayed\r\n * @returns\r\n */\r\n deviationCtrl.showInfoFields = function () {\r\n if (!deviationCtrl.deviation)\r\n return false;\r\n\r\n if (!deviationCtrl.deviation.id)\r\n return false;\r\n\r\n if (deviationCtrl.deviation.Table == 'GOT_USER_DEVIATION')\r\n return false;\r\n\r\n if (deviationCtrl.deviation.Table == 'BOT_CUSTOMER')\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n deviationCtrl.onDeviationTypeChange = function () {\r\n\r\n getDeviationTypeEmailSettings(deviationCtrl.deviation.Type.id);\r\n\r\n };\r\n\r\n deviationCtrl.onAssociatedEntityChange = function (templateFor) {\r\n getDeviationEmailTemplateForAssociatedEntity(templateFor, getOrganizationId())\r\n .then(function (result) {\r\n deviationCtrl.emailTemplate = result;\r\n });\r\n }\r\n\r\n deviationCtrl.sendEmail = function () {\r\n showEmailPreview();\r\n };\r\n\r\n deviationCtrl.isNotAssociatedToExistentProject = function () {\r\n\r\n if (!deviationCtrl.object || !deviationCtrl.object.projectId)\r\n return true;\r\n\r\n return false;\r\n\r\n };\r\n\r\n deviationCtrl.openContactModal = function (contact) {\r\n\r\n // if contact is null or undefined\r\n // means we are creating a new contact\r\n if (!contact) {\r\n\r\n contact = CustomerFactory.getContactToSave();\r\n contact.Active = true;\r\n contact.Table = 'BOT_CUSTOMER';\r\n contact.ForeignKey = deviationCtrl.selectedCustomerForExternalInput.id;\r\n\r\n }\r\n\r\n var contactModal = $uibModal.open({\r\n\r\n templateUrl: 'Scripts/contact/contact-modal/contact-modal.html',\r\n controller: 'ContactModalController',\r\n resolve: {\r\n contact: function () {\r\n return contact;\r\n },\r\n isFromOrderPage: function () {\r\n return false;\r\n }\r\n },\r\n size: 'lg'\r\n });\r\n\r\n // after we create/edit a contact\r\n // refresh te contact dropdown\r\n contactModal.result.then(function (savedContact) {\r\n getContactsForCustomer(deviationCtrl.selectedCustomerForExternalInput.id)\r\n .then(function () {\r\n\r\n // pre-select the newly added/edited contact\r\n deviationCtrl.deviation.ExternalInputEntity = _.find(deviationCtrl.externalCustomerContacts, function (contact) {\r\n return contact.id === savedContact.id;\r\n });\r\n\r\n });\r\n });\r\n\r\n };\r\n\r\n\r\n deviationCtrl.sendEmailToExternal = function () {\r\n\r\n var externalPartyNotificationConfirmationModal = $uibModal.open({\r\n templateUrl: 'Scripts/deviation/external-party-notification-confirmation-modal/external-party-notification-confirmation.html',\r\n controller: 'ExternalPartyNotificationConfirmationController',\r\n controllerAs: 'vm',\r\n resolve: {\r\n deviation: function () {\r\n return deviationCtrl.deviation;\r\n }\r\n },\r\n size: 'md'\r\n });\r\n\r\n\r\n externalPartyNotificationConfirmationModal\r\n .result.then(function () {\r\n\r\n DeviationFactory.saveDeviation(deviationCtrl.deviation)\r\n .then(function (savedDeviation) {\r\n\r\n // if the deviation has set an external party, notify them\r\n if (savedDeviation.ExternalInputEntity &&\r\n savedDeviation.ExternalInputEntity.id) {\r\n\r\n DeviationFactory.sendEmailToExternalParty({\r\n id: savedDeviation.id,\r\n ExternalInputEntity: savedDeviation.ExternalInputEntity,\r\n MessageToExternalParty: savedDeviation.MessageToExternalParty\r\n }).then(function () {\r\n deviationCtrl.closeDeviation(true, savedDeviation.id);\r\n });\r\n }\r\n });\r\n\r\n },\r\n // in case the user closed the modal\r\n // remove the message for the external party\r\n // and uncheck the 'Send deviation to external party'\r\n function () {\r\n deviationCtrl.deviation.MessageToExternalParty = null;\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Checks if 'Send e-mail to external' button is disabled\r\n * \r\n */\r\n deviationCtrl.isSentToExternalDisabled = function () {\r\n\r\n if (!deviationCtrl.deviation.ExternalInputEntity)\r\n return true;\r\n\r\n if (!deviationCtrl.deviation.ExternalInputEntity.id)\r\n return true;\r\n\r\n if (!canSaveDeviation())\r\n return true;\r\n\r\n return false;\r\n\r\n };\r\n\r\n function canGenerateReportButtonBeDisplayed() {\r\n\r\n if (!deviationCtrl.deviation || !deviationCtrl.deviation.id) {\r\n return false;\r\n }\r\n\r\n if (deviationCtrl.deviation.Table !== TableResources.OrderTable) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function onSendDeviationDetailsReportThroughEmailClick(reportData) {\r\n DeviationFactory.sendDeviationDetailsReportThroughEmail(reportData, deviationCtrl.deviation.id)\r\n .then(function (response) {\r\n\r\n var wasEmailSent = response.SendDeviationDetailsReportThroughEmailResult;\r\n\r\n if (wasEmailSent) {\r\n infoService.changeInfo($translate.instant('DEVIATION_MODEL.SUCCESS_MESSAGES.DEVIATION_DETAILS_REPORT_SENT'));\r\n } else {\r\n errorService.changeError($translate.instant('DEVIATION_MODEL.ERROR_MESSAGES.DEVIATION_DETAILS_REPORT_FAIL_TO_SEND'));\r\n }\r\n });\r\n }\r\n\r\n $scope.go = function (path) {\r\n $location.path(path);\r\n }\r\n };\r\n})();\r\n","(function () {\r\n\r\n angular\r\n .module('deviation')\r\n .component('deviationExternalInput', {\r\n templateUrl: 'Scripts/deviation/deviation-external-input/deviation-external-input.component.html',\r\n controller: 'DeviationExternalInputController',\r\n controllerAs : 'vm'\r\n });\r\n\r\n})();","(function () {\r\n\r\n DeviationExternalInputController.$inject = [\r\n '$routeParams',\r\n 'DeviationFactory',\r\n 'SessionFactory',\r\n '$scope'\r\n ];\r\n\r\n function DeviationExternalInputController(\r\n $routeParams,\r\n DeviationFactory,\r\n SessionFactory,\r\n $scope\r\n ) {\r\n\r\n var vm = this;\r\n vm.deviationId = $routeParams.deviationId;\r\n vm.sessionId = $routeParams.sessionId;\r\n vm.originalDeviation = {};\r\n vm.deviation = {};\r\n vm.hasDeviationCommentExceededAllowedLength = hasDeviationCommentExceededAllowedLength;\r\n\r\n /**\r\n * Gets a deviation details by its id\r\n * @param {any} deviationId\r\n * @param {any} sessionId\r\n */\r\n function getDeviationDetails(deviationId, sessionId) {\r\n DeviationFactory.getDeviationForExternalInput(deviationId, sessionId)\r\n .then(function (deviation) {\r\n vm.originalDeviation = deviation;\r\n vm.deviation.id = deviation.id;\r\n });\r\n }\r\n\r\n function checkIfSessionExpired(sessionId) {\r\n return SessionFactory.checkIfExternalSessionExpired(sessionId);\r\n }\r\n\r\n function hasDeviationCommentExceededAllowedLength() {\r\n\r\n if (!vm.originalDeviation.Comment) {\r\n vm.originalDeviation.Comment = '';\r\n }\r\n\r\n if (!vm.deviation.Comment) {\r\n vm.deviation.Comment = '';\r\n }\r\n\r\n // concatenate deviation additional comment and the original deviation comment value\r\n var concatenatedValue = vm.originalDeviation.Comment + vm.deviation.Comment;\r\n\r\n return concatenatedValue.length > 1000;\r\n }\r\n\r\n /**\r\n * Gets the full name of a given user\r\n * \r\n * @param {any} user\r\n */\r\n vm.getFullName = function (user) {\r\n\r\n if (!user || (!user.FirstName && !user.LastName))\r\n return '';\r\n\r\n var userFullName = '';\r\n\r\n if (user.FirstName)\r\n userFullName += (user.FirstName + ' ');\r\n\r\n if (user.LastName)\r\n userFullName += user.LastName;\r\n\r\n return userFullName;\r\n };\r\n\r\n /**\r\n * Saves additional data added on a deviation\r\n * @param {any} deviation\r\n */\r\n vm.saveDeviationAdditionalComments = function (deviation) {\r\n DeviationFactory.saveDeviationAdditionalComments(deviation, vm.sessionId)\r\n .then(function (savedDeviation) {\r\n\r\n if (!savedDeviation)\r\n return;\r\n\r\n vm.deviation = {};\r\n getDeviationDetails(savedDeviation.id, vm.sessionId);\r\n\r\n });\r\n };\r\n\r\n vm.$onInit = function () {\r\n\r\n // call logout from SessionController parent scope\r\n $scope.$parent.logout(true);\r\n\r\n checkIfSessionExpired(vm.sessionId)\r\n .then(function () {\r\n getDeviationDetails(vm.deviationId, vm.sessionId);\r\n },\r\n function () {\r\n $scope.$emit('onLogout');\r\n });\r\n };\r\n\r\n }\r\n\r\n angular\r\n .module('deviation')\r\n .controller('DeviationExternalInputController', DeviationExternalInputController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('deviation')\r\n .component('vbDeviationList', {\r\n templateUrl: 'Scripts/deviation/deviation-list/deviation-list.component.html',\r\n controller: 'DeviationListController',\r\n controllerAs: 'deviationListCtrl'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationListController.$inject = [\r\n 'DeviationFactory',\r\n '$scope',\r\n '$uibModal',\r\n '$timeout',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'searchService',\r\n 'sessionInformationService',\r\n 'titleService',\r\n '$filter',\r\n 'DeviationListService',\r\n '$location'\r\n ];\r\n\r\n angular.module('deviation')\r\n .controller('DeviationListController', DeviationListController)\r\n .directive('deviationList', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'DeviationListController as deviationListCtrl',\r\n templateUrl: 'Scripts/deviation/deviation-list/deviation-list.component.html',\r\n bindToController: true,\r\n scope: {\r\n numberOfDeviations: '=',\r\n foreignKey: '=',\r\n table: '=',\r\n object: '='\r\n }\r\n };\r\n });\r\n\r\n function DeviationListController(\r\n DeviationFactory,\r\n $scope,\r\n $uibModal,\r\n $timeout,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n searchService,\r\n sessionInformationService,\r\n titleService,\r\n $filter,\r\n DeviationListService,\r\n $location\r\n ) {\r\n\r\n var deviationListCtrl = this;\r\n\r\n var allDeviations = [];\r\n var filteredDeviations = [];\r\n var nrOfRowsToLoadAtStart = 30;\r\n var nrOfRowsToLoad = 10;\r\n var deviationDefaultUnhandledNrOfDays = null;\r\n var typesPromise = null;\r\n\r\n deviationListCtrl.types = [];\r\n deviationListCtrl.organizations = [];\r\n deviationListCtrl.deviations = [];\r\n deviationListCtrl.currentSelectedTab = null;\r\n deviationListCtrl.activeTypeTab = '';\r\n deviationListCtrl.activeStatusTab = 'BOT_DEVIATION';\r\n\r\n deviationListCtrl.search = searchService.getSearch();\r\n deviationListCtrl.reverse = DeviationFactory.reverse;\r\n deviationListCtrl.predicate = DeviationFactory.predicate;\r\n deviationListCtrl.reachedEndOfList = false;\r\n deviationListCtrl.currentPage = 1;\r\n deviationListCtrl.itemsPerPage = 30;\r\n deviationListCtrl.numPages = 1;\r\n\r\n deviationListCtrl.statusTabs = [\r\n\r\n {\r\n ProgId: 'BOT_DEVIATION',\r\n Name: 'Avvik'\r\n },\r\n {\r\n ProgId: 'CLOSED',\r\n Name: 'Lukket avvik'\r\n }\r\n ];\r\n\r\n deviationListCtrl.loggedUser = sessionInformationService.getUser();\r\n deviationListCtrl.onOrganizationChange = onOrganizationChange;\r\n\r\n /**\r\n * Get deviations for grid\r\n * @param {any} freeText\r\n * @param {any} organizationId\r\n * @param {any} typeId\r\n * @param {any} foreignKey\r\n */\r\n function getDeviations(freeText, organizationId, typeId, foreignKey) {\r\n OrganizationUtilService.setOrganizationId(organizationId ? organizationId : null);\r\n\r\n // if we have table and foreign key\r\n // we will not allow freetext since the input is hidden\r\n if (!!deviationListCtrl.table && !!deviationListCtrl.foreignKey)\r\n freeText = null;\r\n\r\n if (freeText != undefined) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n if (!deviationListCtrl.table && !deviationListCtrl.foreignKey)\r\n searchService.setSearch(freeText, null, null, typeId);\r\n\r\n DeviationFactory.getDeviations(\r\n freeText,\r\n organizationId,\r\n deviationListCtrl.table,\r\n (foreignKey) ? foreignKey : deviationListCtrl.foreignKey,\r\n typeId\r\n ).then(function (result) {\r\n allDeviations = result;\r\n\r\n if (allDeviations.length == 0) {\r\n deviationListCtrl.deviations = [];\r\n deviationListCtrl.reachedEndOfList = false;\r\n return;\r\n }\r\n\r\n //go through each one and translate the object name associated with the deviation\r\n angular.forEach(allDeviations, function (deviation) {\r\n deviation.id = parseInt(deviation.id);\r\n if (deviation.Table == 'BOT_ORDER') {\r\n if (deviation.Order) {\r\n if (deviation.Order.OrderNumber)\r\n deviation.Title = $filter('translate')('txtOrder') + ' Ext. ID ' + deviation.Order.OrderNumber;\r\n else\r\n deviation.Title = $filter('translate')('txtOrderId') + ' ' + deviation.ForeignKey;\r\n }\r\n } else if (deviation.Table == 'BOT_PROJECT') {\r\n if (deviation.Project) {\r\n if (deviation.Project.ProjectNumber)\r\n deviation.Title = $filter('translate')('txtProject') + ' ' + deviation.Project.ProjectNumber;\r\n else\r\n deviation.Title = $filter('translate')('txtProjectId') + deviation.ForeignKey;\r\n }\r\n } else if (deviation.Table == 'GOT_USER' || deviation.Table == 'GOT_ORGANIZATION') {\r\n if (deviation.ProcessList)\r\n deviation.Title = $filter('translate')('Process List') + ' ' + deviation.ProcessList.Name;\r\n } else if (deviation.Table == 'GOT_USER_DEVIATION') {\r\n if (deviation.User)\r\n deviation.Title = $filter('translate')('txtUser') + ' ' + deviationListCtrl.getFullName(deviation.User);\r\n } else if (deviation.Table == 'BOT_CUSTOMER')\r\n if (deviation.Order && deviation.Order.Customer)\r\n deviation.Title = $filter('translate')('txtCustomer') + ' ' + deviationListCtrl.getFullName(deviation.Order.Customer);\r\n });\r\n\r\n allDeviations = $filter('orderBy')(allDeviations, deviationListCtrl.predicate, deviationListCtrl.reverse);\r\n\r\n deviationListCtrl.onStatusTabSelect($filter('filter')(deviationListCtrl.statusTabs, function (s) { return s.ProgId === deviationListCtrl.activeStatusTab })[0]);\r\n\r\n //TODO: support xs\r\n //if ($scope.isXs) {\r\n // deviationListCtrl.deviations = allDeviations;\r\n // deviationListCtrl.numPages = Math.ceil(allDeviations.length / deviationListCtrl.itemsPerPage);\r\n //} else\r\n // deviationListCtrl.deviations = allDeviations.slice(0, nrOfRowsToLoadAtStart);\r\n });\r\n };\r\n\r\n function getDeviationTypes() {\r\n return DeviationFactory.getDeviationTypes().then(function (result) {\r\n\r\n deviationListCtrl.types = $filter('orderBy')(result, 'SortNumber');\r\n if (searchService.currentTabId) {\r\n angular.forEach(deviationListCtrl.types, function (type) {\r\n //look for the current active tab\r\n if (type.id == searchService.currentTabId) {\r\n deviationListCtrl.activeTypeTab = type.ProgId;\r\n deviationListCtrl.currentSelectedTab = type;\r\n }\r\n });\r\n } else {\r\n //set the first type as active tab\r\n deviationListCtrl.activeTypeTab = deviationListCtrl.types[0].ProgId;\r\n deviationListCtrl.currentSelectedTab = deviationListCtrl.types[0];\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the default unhandled number of days setted on an organization\r\n * @param {any} organizationId \r\n */\r\n function getDeviationDefaultUnhandledNrOfDays(organizationId) {\r\n\r\n OrganizationFactory.getDeviationDefaultUnhandledNrOfDays(organizationId)\r\n .then(function (result) {\r\n\r\n // the response from the server is an object \r\n // which wraps the string we want which has as name\r\n // the name of the method called from the server\r\n // GetDeviationDefaultUnhandledNrOfDays suffixed with 'Result'\r\n\r\n if (!result.GetDeviationDefaultUnhandledNrOfDaysResult) {\r\n deviationDefaultUnhandledNrOfDays = null;\r\n return;\r\n }\r\n\r\n deviationDefaultUnhandledNrOfDays = _.parseInt(result.GetDeviationDefaultUnhandledNrOfDaysResult);\r\n\r\n });\r\n\r\n };\r\n\r\n function init() {\r\n typesPromise = getDeviationTypes();\r\n\r\n if (!deviationListCtrl.table && !deviationListCtrl.foreignKey)\r\n titleService.changeTitle($filter('translate')('Deviation'));\r\n\r\n\r\n if (deviationListCtrl.object && deviationListCtrl.table && deviationListCtrl.table === \"BOT_ORDER\") {\r\n\r\n // if we reach this block it means a new instance of deviationListCtrl is created\r\n // we need to notify the selected order to update the reference to getDeviations function for\r\n // each order from the hierarchy\r\n\r\n if (deviationListCtrl.object.notifySelectedOrder)\r\n deviationListCtrl.object.notifySelectedOrder(deviationListCtrl.getDeviations);\r\n\r\n }\r\n\r\n };\r\n\r\n function onOrganizationChange(organization, firstTime) {\r\n if ((!organization) || (!organization.id))\r\n return;\r\n deviationListCtrl.search.Organization = organization;\r\n //If typesPromise is null for some reason, initialize it first\r\n if (!typesPromise)\r\n init();\r\n\r\n typesPromise.then(function () {\r\n getDeviations(null, deviationListCtrl.search.Organization.id, (deviationListCtrl.currentSelectedTab ? deviationListCtrl.currentSelectedTab.id : null));\r\n getDeviationDefaultUnhandledNrOfDays(deviationListCtrl.search.Organization.id);\r\n });\r\n };\r\n\r\n\r\n /**\r\n * Computes the difference between a deviation last updated date and today date\r\n *\r\n * @param {any} deviation\r\n */\r\n function computeDifferenceBetweenTodayAndLastUpdatedDate(deviation) {\r\n\r\n if (!deviation)\r\n return null;\r\n\r\n var today = moment();\r\n var deviationCreatedDate = moment(_.parseInt(deviation.CreatedDate));\r\n var deviationLastUpdatedDate = moment(_.parseInt(deviation.LastUpdatedDate));\r\n var daysFromLastUpdate = null;\r\n\r\n // if deviation last updated date is greater than its creation date\r\n // then compute the difference between today and its last updated date\r\n if (deviationLastUpdatedDate.isAfter(deviationCreatedDate))\r\n daysFromLastUpdate = today.diff(deviationLastUpdatedDate, 'days');\r\n // if deviation last updated date is equal with its creation date\r\n // compute the difference between today and its created date\r\n else if (deviationLastUpdatedDate.isSame(deviationCreatedDate))\r\n daysFromLastUpdate = today.diff(deviationCreatedDate, 'days');\r\n\r\n return daysFromLastUpdate;\r\n\r\n };\r\n\r\n /**\r\n * Change the orderby based on the given predicate\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n deviationListCtrl.changeOrder = function (orderBy) {\r\n deviationListCtrl.deviations = [];\r\n if (orderBy != deviationListCtrl.predicate)\r\n deviationListCtrl.predicate = DeviationFactory.predicate = orderBy;\r\n else\r\n deviationListCtrl.reverse = DeviationFactory.reverse = !deviationListCtrl.reverse;\r\n\r\n filteredDeviations = $filter('orderBy')(filteredDeviations, deviationListCtrl.predicate, deviationListCtrl.reverse);\r\n\r\n deviationListCtrl.deviations = filteredDeviations.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Infinite scroll function that is called when reached the end of list\r\n * @returns {} \r\n */\r\n deviationListCtrl.loadMore = function () {\r\n if (deviationListCtrl.deviations && deviationListCtrl.deviations.length < filteredDeviations.length) {\r\n var last = deviationListCtrl.deviations.length > 0 ? deviationListCtrl.deviations.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > filteredDeviations.length ? filteredDeviations.length : last + nrOfRowsToLoad;\r\n\r\n deviationListCtrl.deviations = filteredDeviations.slice(0, indexToLoad);\r\n } else {\r\n if (!deviationListCtrl.deviations)\r\n return;\r\n\r\n if (filteredDeviations.length == deviationListCtrl.deviations.length || filteredDeviations.length > nrOfRowsToLoadAtStart) {\r\n deviationListCtrl.reachedEndOfList = true;\r\n return;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Get the deviations for the new selected tab\r\n * @param {} type \r\n * @returns {} \r\n */\r\n deviationListCtrl.onTypeTabSelect = function (type) {\r\n\r\n deviationListCtrl.activeTypeTab = type.ProgId;\r\n\r\n deviationListCtrl.currentSelectedTab = _.find(deviationListCtrl.types, function (t) { return t.ProgId === type.ProgId });\r\n\r\n getDeviations(deviationListCtrl.search.text, deviationListCtrl.search.Organization.id, deviationListCtrl.currentSelectedTab.id);\r\n };\r\n\r\n deviationListCtrl.getFullName = function (object) {\r\n if (!object)\r\n return '';\r\n\r\n return (object.FirstName ? object.FirstName : '') + ' ' + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Open the selected deviation\r\n * If deviation is in the order/project window, open a modal with the deviation\r\n * @param {} deviation \r\n * @returns {} \r\n */\r\n deviationListCtrl.selectDeviation = function (deviation) {\r\n if (deviationListCtrl.foreignKey && deviationListCtrl.table) {\r\n DeviationFactory.modalInstance = $uibModal.open({\r\n component: 'vbDeviationDetails',\r\n size: 'x-lg',\r\n keyboard: false,\r\n backdrop: 'static',\r\n resolve: {\r\n deviationId: function () { return deviation.id; },\r\n isModal: function () { return true; },\r\n foreignKey: function () { return deviationListCtrl.foreignKey; },\r\n table: function () { return deviationListCtrl.table; }\r\n }\r\n });\r\n\r\n DeviationFactory.modalInstance.result.finally(function () {\r\n DeviationFactory.modalInstance = null;\r\n deviationListCtrl.getDeviations();\r\n });\r\n } else\r\n $scope.go('deviation/' + deviation.id);\r\n };\r\n\r\n /**\r\n * Whether the search bar should be displayed\r\n * If the deviation is on order/project page, hide the search bar\r\n * @param {} isDropdown \r\n * @returns {} \r\n */\r\n deviationListCtrl.showSearchBar = function (isDropdown) {\r\n if (deviationListCtrl.foreignKey && deviationListCtrl.table && isDropdown)\r\n return false;\r\n\r\n var selectedOrganizationId = OrganizationUtilService.getOrganizationId();\r\n var loggedUserOrganizationId = sessionInformationService.getUser().Organization.id;\r\n\r\n if (selectedOrganizationId && !isDropdown && selectedOrganizationId != loggedUserOrganizationId)\r\n return false;\r\n\r\n if (deviationListCtrl.table == 'BOT_ORDER')\r\n return true;\r\n\r\n if (deviationListCtrl.table == 'BOT_PROJECT')\r\n return true;\r\n\r\n return true;\r\n };\r\n\r\n deviationListCtrl.getLoggedUser = function () {\r\n return sessionInformationService.getUser();\r\n };\r\n\r\n /**\r\n * Get the deviation list for grid\r\n * @param {} foreignKey \r\n * @returns {} \r\n */\r\n deviationListCtrl.getDeviations = function (foreignKey) {\r\n return getDeviations(deviationListCtrl.search.text, deviationListCtrl.search.Organization.id, deviationListCtrl.currentSelectedTab.id, foreignKey);\r\n };\r\n\r\n deviationListCtrl.clearSearch = function () {\r\n deviationListCtrl.search.text = null;\r\n deviationListCtrl.getDeviations();\r\n };\r\n\r\n /**\r\n * Opens a new window/modal with the inputs for the deviation\r\n * @returns {} \r\n */\r\n deviationListCtrl.createNewDeviation = function () {\r\n DeviationFactory.selectedType = deviationListCtrl.currentSelectedTab;\r\n\r\n if (deviationListCtrl.foreignKey && deviationListCtrl.table) {\r\n DeviationFactory.modalInstance = $uibModal.open({\r\n component: 'vbDeviationDetails',\r\n size: 'x-lg',\r\n keyboard: false,\r\n backdrop: 'static',\r\n resolve: {\r\n object: function () { return deviationListCtrl.object; },\r\n isModal: function () { return true; },\r\n foreignKey: function () { return deviationListCtrl.foreignKey; },\r\n table: function () { return deviationListCtrl.table; }\r\n }\r\n });\r\n\r\n DeviationFactory.modalInstance.result.finally(function () {\r\n DeviationFactory.modalInstance = null;\r\n deviationListCtrl.getDeviations();\r\n });\r\n }\r\n else\r\n $scope.go('deviation/');\r\n };\r\n\r\n /**\r\n * Fiter the current deviations based on the newly selected status\r\n * @param {} status \r\n * @returns {} \r\n */\r\n deviationListCtrl.onStatusTabSelect = function (status) {\r\n deviationListCtrl.activeStatusTab = status.ProgId;\r\n\r\n filteredDeviations = $filter('filter')(allDeviations, function (d) {\r\n if (status.ProgId == 'CLOSED')\r\n return d.Status.ProgId == 'CLOSED';\r\n return d.Status.ProgId != 'CLOSED';\r\n });\r\n\r\n if ($scope.isXs) {\r\n deviationListCtrl.deviations = filteredDeviations;\r\n deviationListCtrl.numPages = Math.ceil(filteredDeviations.length / deviationListCtrl.itemsPerPage);\r\n } else\r\n deviationListCtrl.deviations = filteredDeviations.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Open a modal with the settings for email for the types of deviation\r\n * @returns {} \r\n */\r\n deviationListCtrl.configureEmailSettingsForDeviationType = function () {\r\n\r\n DeviationFactory.modalInstance = $uibModal.open({\r\n templateUrl: \"Scripts/deviation/email/emailTemplate/modalEmailSettings/modalDeviationTypeEmailSettings.html\",\r\n scope: $scope,\r\n controller: \"ModalDeviationTypeEmailSettingsController\",\r\n size: \"md\"\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Open a modal with the settings for email for deviation\r\n * @returns {} \r\n */\r\n deviationListCtrl.configureEmailTemplatesForDeviation = function () {\r\n\r\n DeviationFactory.modalInstance = $uibModal.open({\r\n\r\n templateUrl: \"Scripts/deviation/email/emailTemplate/modalEmailTemplates/modalDeviationEmailTemplates.html\",\r\n controller: \"ModalDeviationEmailTemplatesController\",\r\n size: \"lg\"\r\n\r\n });\r\n\r\n };\r\n\r\n deviationListCtrl.getDeviationDefaultUnhandledNrOfDays = function (organizationId) {\r\n\r\n getDeviationDefaultUnhandledNrOfDays(organizationId);\r\n\r\n };\r\n\r\n /**\r\n * Checks if a given deviation has warning or not\r\n *\r\n * @param {any} deviation\r\n */\r\n deviationListCtrl.hasWarning = function (deviation) {\r\n\r\n if (!deviation || (deviation.Status && deviation.Status.ProgId === 'CLOSED'))\r\n return false;\r\n\r\n var daysFromLastUpdate = computeDifferenceBetweenTodayAndLastUpdatedDate(deviation);\r\n\r\n // check if the deviation has an unhandled nr of days setted\r\n if (deviation.UnhandledNumberOfDays) {\r\n\r\n if (daysFromLastUpdate && (daysFromLastUpdate > deviation.UnhandledNumberOfDays))\r\n return true;\r\n\r\n // else check if its organization has setted a\r\n // default number of unhandled days for all deviations\r\n } else if (deviationDefaultUnhandledNrOfDays) {\r\n\r\n if (daysFromLastUpdate && (daysFromLastUpdate > deviationDefaultUnhandledNrOfDays))\r\n return true;\r\n\r\n }\r\n\r\n return false;\r\n\r\n };\r\n\r\n deviationListCtrl.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n deviationListCtrl.getCustomerNameByDeviationTable = function (deviation) {\r\n return DeviationListService.getCustomerNameByDeviationTable(deviation);\r\n };\r\n\r\n $scope.go = function (path) {\r\n $location.path(path);\r\n }\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n deviationListService.$inject = [\r\n 'TableResources'\r\n ];\r\n\r\n function deviationListService(\r\n TableResources\r\n ) {\r\n\r\n function getCustomerNameByDeviationTable(deviation) {\r\n\r\n if (!deviation || !deviation.Table) {\r\n return '-';\r\n }\r\n\r\n // if the deviation is not associated with an order, project or customer, customer name is empty\r\n if (deviation.Table !== TableResources.OrderTable &&\r\n deviation.Table !== TableResources.ProjectTable &&\r\n deviation.Table !== TableResources.CustomerTable) {\r\n return '-';\r\n }\r\n\r\n switch (deviation.Table) {\r\n case TableResources.OrderTable:\r\n case TableResources.CustomerTable:\r\n return deviation.Order.Customer.FullName;\r\n\r\n case TableResources.ProjectTable:\r\n return deviation.Project.Order.Customer.FullName;\r\n default:\r\n return '-';\r\n }\r\n\r\n }\r\n\r\n return {\r\n getCustomerNameByDeviationTable: getCustomerNameByDeviationTable\r\n };\r\n }\r\n\r\n angular\r\n .module('deviation')\r\n .service('DeviationListService', deviationListService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationEmailController.$inject = [\r\n '$timeout',\r\n '$filter',\r\n 'DeviationFactory',\r\n '$uibModal',\r\n '$scope',\r\n '$sce',\r\n 'notificationTypes'\r\n ];\r\n\r\n angular.module('deviation')\r\n .controller('DeviationEmailController', DeviationEmailController)\r\n .directive('deviationEmail', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/deviation/email/deviationEmailPartial.html',\r\n controller: 'DeviationEmailController as emailCtrl',\r\n bindToController: true,\r\n scope: {\r\n deviation: '='\r\n }\r\n };\r\n });\r\n\r\n function DeviationEmailController(\r\n $timeout,\r\n $filter,\r\n DeviationFactory,\r\n $uibModal,\r\n $scope,\r\n $sce,\r\n notificationTypes\r\n ) {\r\n var emailCtrl = this;\r\n\r\n emailCtrl.emailMessages = [];\r\n emailCtrl.smsMessages = [];\r\n emailCtrl.pushMessages = [];\r\n emailCtrl.emailReverse = true;\r\n emailCtrl.smsReverse = true;\r\n emailCtrl.pushReverse = true;\r\n emailCtrl.emailPredicate = 'id';\r\n emailCtrl.smsPredicate = 'id';\r\n emailCtrl.pushPredicate = 'id';\r\n\r\n emailCtrl.selectedNotification = null;\r\n\r\n function init() {\r\n DeviationFactory.getDeviationNotificationList(emailCtrl.deviation.id).then(function (result) {\r\n emailCtrl.emails = result;\r\n\r\n angular.forEach(result, function (notification) {\r\n notification.CreatedBy.FullName = emailCtrl.getFullName(notification.CreatedBy);\r\n notification.Recipients = emailCtrl.getRecipients(notification.Recipients);\r\n });\r\n\r\n emailCtrl.emailMessages = $filter('filter')(result, function (n) { return n.Type.ProgId == 'EMAIL' });\r\n emailCtrl.smsMessages = $filter('filter')(result, function (n) { return n.Type.ProgId == 'SMS' });\r\n emailCtrl.pushMessages = $filter('filter')(result, function (n) {\r\n return n.Type.ProgId === notificationTypes.push;\r\n });\r\n\r\n emailCtrl.emailMessages = $filter('orderBy')(emailCtrl.emailMessages, emailCtrl.emailPredicate, emailCtrl.emailReverse);\r\n emailCtrl.smsMessages = $filter('orderBy')(emailCtrl.smsMessages, emailCtrl.smsPredicate, emailCtrl.smsReverse);\r\n emailCtrl.pushMessages = $filter('orderBy')(emailCtrl.pushMessages, emailCtrl.pushPredicate, emailCtrl.pushReverse);\r\n });\r\n };\r\n\r\n /**\r\n * Get the list of recipients sepparated by comma\r\n * @param recipients\r\n * @returns\r\n */\r\n emailCtrl.getRecipients = function (recipients) {\r\n if (!recipients)\r\n return '';\r\n\r\n return recipients.toString();\r\n };\r\n\r\n /**\r\n * Get the fullname for a given object\r\n * @param object\r\n * @returns\r\n */\r\n emailCtrl.getFullName = function (object) {\r\n return (object.FirstName ? object.FirstName + ' ' : '') + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Changes the order of emails by a given predicate\r\n * @param predicate\r\n */\r\n emailCtrl.changeEmailOrder = function (predicate) {\r\n if (predicate != emailCtrl.emailPredicate)\r\n emailCtrl.emailPredicate = predicate;\r\n else\r\n emailCtrl.emailReverse = !emailCtrl.emailReverse;\r\n\r\n emailCtrl.emailMessages = $filter('orderBy')(emailCtrl.emailMessages, emailCtrl.emailPredicate, emailCtrl.emailReverse);\r\n };\r\n\r\n /**\r\n * Changes the order of sms by a given predicate\r\n * @param predicate\r\n */\r\n emailCtrl.changeSmsOrder = function (predicate) {\r\n if (predicate != emailCtrl.smsPredicate)\r\n emailCtrl.smsPredicate = predicate;\r\n else\r\n emailCtrl.smsReverse = !emailCtrl.smsReverse;\r\n\r\n emailCtrl.smsMessages = $filter('orderBy')(emailCtrl.smsMessages, emailCtrl.smsPredicate, emailCtrl.smsReverse);\r\n };\r\n\r\n /**\r\n * Changes the order of push messages by a given predicate\r\n * @param predicate\r\n */\r\n emailCtrl.changePushOrder = function(predicate) {\r\n\r\n if (predicate != emailCtrl.pushPredicate) {\r\n emailCtrl.pushPredicate = predicate;\r\n } else {\r\n emailCtrl.pushReverse = !emailCtrl.pushReverse;\r\n }\r\n\r\n emailCtrl.pushMessages = $filter('orderBy')(emailCtrl.pushMessages, emailCtrl.pushPredicate, emailCtrl.pushReverse);\r\n };\r\n\r\n /**\r\n * Open a modal and view the selected notification\r\n * @param notification\r\n */\r\n emailCtrl.viewNotification = function (notification) {\r\n emailCtrl.selectedNotification = notification;\r\n\r\n var notificationModal = $uibModal.open({\r\n templateUrl: 'Scripts/deviation/email/deviationEmailPreviewModal.html',\r\n scope: $scope\r\n });\r\n\r\n notificationModal.result.finally(function () {\r\n emailCtrl.selectedNotification = null;\r\n });\r\n };\r\n\r\n emailCtrl.isSelectedNotificationAPushNotification = function() {\r\n\r\n if (!emailCtrl.selectedNotification) {\r\n return false;\r\n }\r\n\r\n if (!emailCtrl.selectedNotification.Type) {\r\n return false;\r\n }\r\n\r\n return emailCtrl.selectedNotification.Type.ProgId === notificationTypes.push;\r\n };\r\n\r\n emailCtrl.getSelectedNotificationContactName = function() {\r\n\r\n if (!emailCtrl.selectedNotification) {\r\n return '';\r\n }\r\n\r\n if (!emailCtrl.selectedNotification.Contact) {\r\n return '';\r\n }\r\n\r\n return emailCtrl.selectedNotification.Contact.Name;\r\n };\r\n\r\n emailCtrl.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationExecutionController.$inject = [\r\n 'DeviationFactory',\r\n '$timeout',\r\n '$filter',\r\n 'PrintService'\r\n ];\r\n\r\n angular.module('deviation')\r\n .controller('DeviationExecutionController', DeviationExecutionController)\r\n .directive('deviationExecution', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/deviation/execution/deviationExecutionPartial.html',\r\n controller: 'DeviationExecutionController as executionCtrl',\r\n bindToController: true,\r\n scope: {\r\n deviation: '='\r\n }\r\n };\r\n });\r\n\r\n function DeviationExecutionController(\r\n DeviationFactory,\r\n $timeout,\r\n $filter,\r\n PrintService\r\n ) {\r\n var executionCtrl = this;\r\n\r\n executionCtrl.initiatedProcessList = {};\r\n executionCtrl.processListLoaded = false;\r\n\r\n /**\r\n * Returns the selected value based on a given choice\r\n * @param choice\r\n * @param initiatedOption\r\n * @returns\r\n */\r\n function getSelectedValueForChoice(choice, initiatedOption) {\r\n for (var i = 0; i < initiatedOption.SelectedValues.length; i++) {\r\n if (initiatedOption.SelectedValues[i].OptionItem && initiatedOption.SelectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n return initiatedOption.SelectedValues[i];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Makes any given list ready for execution\r\n * In this case for viewing where the deviation took place\r\n * @param processList\r\n * @returns\r\n */\r\n function initExecution(processList) {\r\n //flag for knowing if the processlist has a deviation\r\n processList.hasDeviation = false;\r\n var index = 0;\r\n angular.forEach(processList.ProcessListItems, function (item) {\r\n item.hasDeviation = false;\r\n if (processList.FlexibleExecution)\r\n item.isLocked = false;\r\n else\r\n item.isLocked = true;\r\n\r\n item.isOpen = false;\r\n\r\n //if it's not \"jumped\", unlock the item\r\n if (item.InitiatedOption.SelectedValue) {\r\n if (item.InitiatedOption.SelectedValue.OptionItem && item.InitiatedOption.SelectedValue.OptionItem.InitiatedId > 0) {\r\n item.isLocked = false;\r\n processList.lastItem = index;\r\n\r\n item.InitiatedOption.SelectedValue.OptionItem = $filter('filter')(item.InitiatedOption.Items, { InitiatedId: item.InitiatedOption.SelectedValue.OptionItem.InitiatedId })[0];\r\n\r\n if (item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction &&\r\n item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == 'DEVIATION' &&\r\n item.InitiatedOption.SelectedValue.DeviationId == executionCtrl.deviation.id) {\r\n item.hasDeviation = true;\r\n processList.hasDeviation = true;\r\n item.InitiatedOption.SelectedValue.hasDeviation = true;\r\n }\r\n\r\n\r\n //if(item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction && item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST')\r\n //init()\r\n } else {\r\n if (item.InitiatedOption.SelectedValue.CustomDataType && item.InitiatedOption.SelectedValue.CustomDataType.length > 0) {\r\n item.isLocked = false;\r\n processList.lastItem = index;\r\n }\r\n }\r\n }\r\n\r\n else if (item.InitiatedOption.Type.ProgId == 'STANDARD_TEXT') {\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItemEdited)\r\n item.InitiatedOption.SelectedValue.OptionItem.Text = item.InitiatedOption.SelectedValue.OptionItemEdited;\r\n }\r\n //multiple choice\r\n else if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n var choice = item.InitiatedOption.Items[j];\r\n var selectedValueForChoice = getSelectedValueForChoice(choice, item.InitiatedOption);\r\n if (!!selectedValueForChoice) {\r\n choice.isChecked = true;\r\n // assign the selected value as a choice property for easy access\r\n choice.selectedValue = selectedValueForChoice;\r\n\r\n if (choice.selectedValue.OptionItem && choice.selectedValue.OptionItem.ProcessListAction &&\r\n choice.selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'DEVIATION' &&\r\n choice.selectedValue.DeviationId == executionCtrl.deviation.id) {\r\n item.hasDeviation = true;\r\n processList.hasDeviation = true;\r\n choice.selectedValue.hasDeviation = true;\r\n }\r\n\r\n processList.lastItem = index;\r\n item.isLocked = false;\r\n }\r\n }\r\n }\r\n index++;\r\n });\r\n\r\n if (!processList.lastItem && processList.ProcessListItems.length > 0) {\r\n processList.ProcessListItems[0].isOpen = true;\r\n processList.ProcessListItems[0].isLocked = false;\r\n processList.lastItem = 0;\r\n } else {\r\n if (processList.ProcessListItems[processList.lastItem])\r\n processList.ProcessListItems[processList.lastItem].isLocked = false;\r\n if (processList.lastItem != processList.ProcessListItems.length - 1)\r\n processList.ProcessListItems[processList.lastItem].isOpen = true;\r\n }\r\n\r\n if (processList.lastItem + 1 == processList.ProcessListItems.length)\r\n processList.IsCompleted = true;\r\n\r\n return processList.hasDeviation;\r\n };\r\n\r\n /**\r\n * Makes ready any given list for execution and for visualization of where the deviation took place\r\n * Another process lists are processed as well\r\n * @param initiatedProcessList\r\n * @param colorIndex\r\n */\r\n function initExecutionForAllProcessLists(initiatedProcessList, colorIndex) {\r\n //init execution for the current processlist\r\n initExecution(initiatedProcessList);\r\n\r\n initiatedProcessList.colorIndex = colorIndex;\r\n\r\n if (!initiatedProcessList.ProcessListItems || initiatedProcessList.ProcessListItems.length == 0)\r\n return;\r\n var selectedValue;\r\n for (var i = 0; i < initiatedProcessList.ProcessListItems.length; i++) {\r\n var processListItem = initiatedProcessList.ProcessListItems[i];\r\n if (!processListItem)\r\n continue;\r\n\r\n if (!processListItem.InitiatedOption)\r\n continue;\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE') {\r\n selectedValue = processListItem.InitiatedOption.SelectedValue;\r\n\r\n if (!selectedValue)\r\n continue;\r\n\r\n if (!selectedValue.OptionItem)\r\n continue;\r\n\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n continue;\r\n\r\n //if we find an another processlist, initExecution for it\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n initExecutionForAllProcessLists(selectedValue.OptionItem.ProcessListAction.ProcessList, colorIndex + 1);\r\n }\r\n } else if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n if (!processListItem.InitiatedOption.SelectedValues)\r\n continue;\r\n\r\n for (var j = 0; j < processListItem.InitiatedOption.SelectedValues.length; j++) {\r\n selectedValue = processListItem.InitiatedOption.SelectedValues[j];\r\n\r\n if (!selectedValue)\r\n continue;\r\n if (!selectedValue.OptionItem)\r\n continue;\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n continue;\r\n\r\n\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n initExecutionForAllProcessLists(selectedValue.OptionItem.ProcessListAction.ProcessList, colorIndex + 1);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n function init() {\r\n DeviationFactory.getDeviationExecution(executionCtrl.deviation.id).then(function (result) {\r\n if (!result || !result.InitiatedId) {\r\n executionCtrl.deviation.hideExecutionTab = true;\r\n return;\r\n }\r\n executionCtrl.initiatedProcessList = result;\r\n initExecutionForAllProcessLists(executionCtrl.initiatedProcessList, 0);\r\n executionCtrl.processListLoaded = true;\r\n });\r\n };\r\n\r\n executionCtrl.getFullName = function (object) {\r\n if (!object)\r\n return '';\r\n\r\n return (object.FirstName ? object.FirstName : '') + ' ' + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Get the selected default answers by a given initiated id\r\n * @param initiatedId\r\n * @param defaultAnswers\r\n */\r\n executionCtrl.getSelectedDefaultAnswer = function (initiatedId, defaultAnswers) {\r\n var filteredAnswers = $filter('filter')(defaultAnswers, function (defaultAnswer) { return defaultAnswer.InitiatedId == initiatedId });\r\n\r\n return !!filteredAnswers && filteredAnswers.length > 0 ? filteredAnswers[0] : {};\r\n };\r\n\r\n executionCtrl.printDeviationExecutionDetails = function () {\r\n\r\n var printWindow = window.frames['executionFrame'];\r\n var htmlElement = document.getElementsByClassName('deviation-execution-content')[0];\r\n\r\n PrintService.print(printWindow, htmlElement);\r\n\r\n };\r\n\r\n $timeout(function () {\r\n init();\r\n });\r\n };\r\n\r\n})();","(function () {\r\n\r\n ExternalPartyNotificationConfirmationController.$inject = [\r\n 'deviation'\r\n ];\r\n\r\n function ExternalPartyNotificationConfirmationController(deviation) {\r\n\r\n var vm = this;\r\n vm.deviation = deviation;\r\n\r\n }\r\n\r\n angular\r\n .module('deviation')\r\n .controller('ExternalPartyNotificationConfirmationController', ExternalPartyNotificationConfirmationController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('VBSmart')\r\n .directive('vbReportError', ReportErrorDirective)\r\n .controller('ReportErrorController', ReportErrorController);\r\n\r\n function ReportErrorDirective() {\r\n return {\r\n restrict: 'A',\r\n scope: {},\r\n controller: 'ReportErrorController',\r\n controllerAs: 'vm',\r\n link: function (scope, element) {\r\n //listen for click events\r\n element.bind('click', function (e) {\r\n //call function from controller\r\n scope.vm.handleClick();\r\n });\r\n }\r\n }\r\n };\r\n\r\n ReportErrorController.$inject = [\r\n '_',\r\n 'dialogService',\r\n 'sessionInformationService',\r\n 'StorageService',\r\n 'LogFactory',\r\n 'infoService',\r\n '$translate'\r\n ];\r\n\r\n /**\r\n * Directive that handles the reporting of an error \r\n */\r\n function ReportErrorController(\r\n _,\r\n dialogService,\r\n sessionInformationService,\r\n StorageService,\r\n LogFactory,\r\n infoService,\r\n $translate\r\n ) {\r\n var vm = this;\r\n\r\n vm.handleClick = handleClick;\r\n\r\n /**\r\n * Handles the Report error button click event\r\n * User is asked for a short description of what happened\r\n */\r\n function handleClick() {\r\n showReportErrorDialog()\r\n .then(function (result) {\r\n\r\n if (!result) \r\n return Promise.resolve(null);\r\n\r\n var whatHappened = result.whatHappened;\r\n var placeInApp = result.placeInApp;\r\n\r\n if (!whatHappened && !placeInApp)\r\n return Promise.resolve(null);\r\n\r\n return createLogs({\r\n placeInApp: placeInApp,\r\n whatHappened: whatHappened\r\n });\r\n })\r\n .then(function (result) {\r\n if (result !== null)\r\n infoService.changeInfo($translate.instant('REPORT_ERROR.LOG_SYNCHED'));\r\n });\r\n };\r\n\r\n function showReportErrorDialog() {\r\n //ask user for a short description\r\n return dialogService.showDialogWithInputs('COMMON.CONFIRM', 'REPORT_ERROR.REPORT_ERROR_WHAT_HAPPENED', null, [\r\n { type: null, model: null, label: 'REPORT_ERROR.PLACE_IN_APP', inputType: 'input', name: 'placeInApp' },\r\n { type: null, model: null, label: 'REPORT_ERROR.WHAT_HAPPENED', inputType: 'textarea', name: 'whatHappened' }\r\n ]).then(function (result) {\r\n if (!result)\r\n return Promise.resolve(null);\r\n\r\n if (result.result != dialogService.DIALOG_RESULT_OK || _.isNil(result.inputs) || _.isEmpty(result.inputs))\r\n return Promise.resolve(null);\r\n\r\n // get placeInApp input\r\n var placeInAppInput = _.first(result.inputs);\r\n\r\n // get whatHappened input\r\n var whatHappenedInput = _.last(result.inputs);\r\n\r\n //return the text\r\n return Promise.resolve({\r\n placeInApp: placeInAppInput.model,\r\n whatHappened: whatHappenedInput.model\r\n });\r\n });\r\n };\r\n\r\n function createLogs(reportedErrorData) {\r\n\r\n var startLog = {\r\n Message: '--- Start error report ---',\r\n Code: 0,\r\n Table: 'START_LOG',\r\n Key: sessionInformationService.getUser().id\r\n }\r\n\r\n if (!reportedErrorData.placeInApp) {\r\n reportedErrorData.placeInApp = '';\r\n }\r\n\r\n if (!reportedErrorData.whatHappened) {\r\n reportedErrorData.whatHappened = '';\r\n }\r\n\r\n var reportedErrorDataString = 'Place in app : ' + reportedErrorData.placeInApp + '|'\r\n + 'What happened : ' + reportedErrorData.whatHappened;\r\n\r\n //create a log with what happened\r\n var whatHappenedLog = {\r\n Code: 0,\r\n Message: reportedErrorDataString,\r\n Key: sessionInformationService.getUser().id,\r\n Table: 'GOT_SUPPORT_USER'\r\n };\r\n var endLog = {\r\n Message: '--- End error report ---',\r\n Code: 0,\r\n Table: 'END_LOG',\r\n Key: sessionInformationService.getUser().id\r\n }\r\n\r\n //get errors from storage\r\n return StorageService.getItem('Errors')\r\n .then(function (result) {\r\n if (!result)\r\n result = [];\r\n //add what happened and start log at the begining of the list\r\n result.unshift(whatHappenedLog);\r\n result.unshift(startLog);\r\n //add the end log at the end of the list\r\n result.push(endLog);\r\n //save logs on server\r\n return LogFactory.saveLogs(result);\r\n })\r\n .then(function () {\r\n //clear errors from storage service\r\n return StorageService.clear();\r\n });\r\n\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CameraImageItemController.$inject = [\r\n 'fileReader',\r\n 'errorService',\r\n 'sessionInformationService',\r\n '$timeout',\r\n '$uibModal',\r\n '$scope',\r\n 'ExecutionFactory',\r\n '$filter',\r\n '$q',\r\n 'DownloadService',\r\n 'OrderFactory'\r\n ];\r\n\r\n angular.module('execution')\r\n .controller('CameraImageItemController', CameraImageItemController)\r\n .directive('cameraImageItem', function () {\r\n return {\r\n restrict: 'AE',\r\n templateUrl: 'template/cameraImageItem.html',\r\n controller: 'CameraImageItemController as cameraItem',\r\n bindToController: true,\r\n scope: {\r\n processListType: '=',\r\n horizontalItemField: '=?',\r\n processListItem: '=?',\r\n cameraTab: '=',\r\n includeInReport: '=',\r\n isManagement: '=',\r\n onAttachmentUpload: '&?'\r\n }\r\n }\r\n }).run(['$templateCache', function ($templateCache) {\r\n $templateCache.put('template/cameraImageItem.html',\r\n '
\\\r\n \\\r\n \\\r\n 0 && !cameraItem.cameraTab\"> \\\r\n {{cameraItem.numberOfImages}} \\\r\n \\\r\n
\\\r\n '\r\n );\r\n $templateCache.put('template/executionCameraImage.html',\r\n '
\\\r\n
\\\r\n \\\r\n
\\\r\n \\\r\n

{{cameraItem.selectedImage.User.FirstName + \\' \\' + cameraItem.selectedImage.User.LastName}}

\\\r\n
\\\r\n
\\\r\n \\\r\n

{{cameraItem.selectedImage.CameraImageOriginal.LastUpdatedDate | date:\\'EEE dd.MMMM.yyyy HH:mm\\'}}

\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
'\r\n );\r\n }]);\r\n\r\n function CameraImageItemController(\r\n fileReader,\r\n errorService,\r\n sessionInformationService,\r\n $timeout,\r\n $uibModal,\r\n $scope,\r\n ExecutionFactory,\r\n $filter,\r\n $q,\r\n DownloadService,\r\n OrderFactory\r\n ) {\r\n var cameraItem = this;\r\n cameraItem.numberOfImages = 0;\r\n cameraItem.fileUpload = {\r\n file: null,\r\n name: '',\r\n extension: '',\r\n files: []\r\n };\r\n\r\n /**\r\n * Open a modal where the user can upload images\r\n * Checked whether the user has access to this action\r\n * @returns {} \r\n */\r\n cameraItem.openImageGallery = function () {\r\n if (!sessionInformationService.hasAccess(\"UPLOAD_GALLERY\")) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n $uibModal.open({\r\n templateUrl: 'Scripts/execution/cameraImage/cameraImageItemModal.html',\r\n scope: $scope\r\n }).result.finally(function () {\r\n cameraItem.clearFileUpload();\r\n });\r\n };\r\n\r\n cameraItem.clearFileUpload = function () {\r\n cameraItem.fileUpload = {\r\n file: null,\r\n name: '',\r\n extension: '',\r\n files: []\r\n };\r\n };\r\n\r\n cameraItem.isFileEligible = function () {\r\n if (!cameraItem.fileUpload.files || cameraItem.fileUpload.files.length == 0)\r\n return true;\r\n\r\n if (cameraItem.isManagement)\r\n return true;\r\n\r\n for (var i = 0; i < cameraItem.fileUpload.files.length; i++) {\r\n if (!(/(jpg|jpeg|png)$/i).test(cameraItem.fileUpload.files[i].extension))\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Get the resized widths and heights for the newly uploaded image\r\n * Resized images must be of max 800px\r\n * @param {any} currentWidth\r\n * @param {any} currentHeight\r\n */\r\n function getWidthAndHeightResized(currentWidth, currentHeight) {\r\n var maxWidth = 800;\r\n var maxHeight = 800;\r\n var ratio = 0;\r\n\r\n if (currentWidth > maxWidth) {\r\n ratio = maxWidth / currentWidth;\r\n return {\r\n widthResized: maxWidth,\r\n heightResized: currentHeight * ratio\r\n };\r\n }\r\n\r\n if (currentHeight > maxHeight) {\r\n ratio = maxHeight / currentHeight;\r\n return {\r\n widthResized: currentWidth * ratio,\r\n heightResized: maxHeight\r\n };\r\n }\r\n\r\n return {\r\n widthResized: currentWidth,\r\n heightResized: currentHeight\r\n };\r\n };\r\n\r\n /**\r\n * Make any white color transparent\r\n * @param {any} context\r\n * @param {any} canvas\r\n */\r\n function makeTransparentWhite(context, canvas) {\r\n //TODO: must make sure we dont make other transparent as well\r\n var imageData = context.getImageData(0, 0, canvas.width, canvas.height);\r\n var data = imageData.data;\r\n for (var i = 0; i < data.length; i += 4) {\r\n if (data[i + 3] < 255) {\r\n data[i] = 255;\r\n data[i + 1] = 255;\r\n data[i + 2] = 255;\r\n data[i + 3] = 255;\r\n }\r\n }\r\n context.putImageData(imageData, 0, 0);\r\n };\r\n\r\n /**\r\n * Resize the image to the correct size and return it\r\n * @param {any} image\r\n */\r\n function getResizedAttachmentBytes(image) {\r\n var canvasElement = document.createElement('CANVAS'), context = canvasElement.getContext('2d');\r\n //set the width\r\n canvasElement.width = image.width;\r\n canvasElement.height = image.height;\r\n //clear the canvas before drawing\r\n context.clearRect(0, 0, canvasElement.width, canvasElement.height);\r\n //set the background to white\r\n context.fillStyle = '#fff';\r\n context.fillRect = '#fff';\r\n //draw the image\r\n context.drawImage(image, 0, 0, canvasElement.width, canvasElement.height);\r\n\r\n makeTransparentWhite(context, canvasElement);\r\n\r\n return canvasElement.toDataURL('image/jpeg');\r\n };\r\n\r\n /**\r\n * Resize to the correct size for any given attachment bytes\r\n * @param {any} attachmentBytes\r\n */\r\n function resizeImage(attachmentBytes) {\r\n return $q(function (resolve, reject) {\r\n\r\n var image = new Image();\r\n\r\n image.onload = function () {\r\n var resizedSize = getWidthAndHeightResized(image.width, image.height);\r\n\r\n //set the new size\r\n image.width = resizedSize.widthResized;\r\n image.height = resizedSize.heightResized;\r\n\r\n var resizedBytes = getResizedAttachmentBytes(image);\r\n resolve(resizedBytes);\r\n attachmentBytes = null;\r\n };\r\n\r\n image.onerror = function (err) {\r\n reject(err);\r\n };\r\n\r\n image.src = attachmentBytes;\r\n });\r\n };\r\n\r\n /**\r\n * Read the images from local\r\n * Wait 1 millisecond to be able to have unique name files\r\n * @param {any} file\r\n */\r\n function readImageFile(file) {\r\n return $q(function (resolve, reject) {\r\n $timeout(function () {\r\n\r\n var newCameraImage = ExecutionFactory.CameraImage();\r\n\r\n newCameraImage.CameraImageOriginal = createImageObject();\r\n\r\n if (cameraItem.includeInReport)\r\n newCameraImage.IncludeInReport = true;\r\n else\r\n newCameraImage.IncludeInReport = false;\r\n\r\n //set a default size\r\n newCameraImage.Size = \"25%\";\r\n\r\n fileReader.readAsDataUrl(file, $scope)\r\n .then(function (bytes) {\r\n return resizeImage(bytes);\r\n }).then(function (resizedBytes) {\r\n newCameraImage.CameraImageOriginal.AttachmentBytes = resizedBytes;\r\n resolve(newCameraImage);\r\n }).catch(function (err) {\r\n reject(err);\r\n });\r\n }, 1);\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Get the correct table and foreign key for the newly image\r\n */\r\n function createImageObject() {\r\n\r\n var imageObject;\r\n\r\n if (cameraItem.processListType === 'HORIZONTAL') {\r\n imageObject = {\r\n\r\n AttachmentName: $filter('date')(new Date().getTime(), 'yyyyMMddhhmmsss') + '.jpeg',\r\n ForeignKey: cameraItem.horizontalItemField.InitiatedId,\r\n Table: 'BOT_HORIZONTAL_ITEM_FIELD',\r\n LastUpdatedDate: (new Date()).getTime()\r\n }\r\n\r\n } else {\r\n\r\n imageObject = {\r\n\r\n AttachmentName: $filter('date')(new Date().getTime(), 'yyyyMMddhhmmsss') + '.jpeg',\r\n ForeignKey: cameraItem.processListItem.InitiatedId,\r\n Table: 'BOT_PROCESSLIST_ITEM',\r\n LastUpdatedDate: (new Date()).getTime()\r\n };\r\n\r\n }\r\n\r\n return imageObject;\r\n\r\n }\r\n\r\n /**\r\n * Count the number of images\r\n */\r\n function calculateTotalNrOfAttachments() {\r\n\r\n cameraItem.numberOfImages = 0;\r\n\r\n if (cameraItem.processListType === \"HORIZONTAL\") {\r\n\r\n if (cameraItem.horizontalItemField &&\r\n cameraItem.horizontalItemField.CameraImages &&\r\n cameraItem.horizontalItemField.CameraImages.length > 0) {\r\n\r\n cameraItem.numberOfImages = cameraItem.horizontalItemField.CameraImages.length;\r\n\r\n }\r\n\r\n } else {\r\n\r\n if (cameraItem.processListItem && cameraItem.processListItem.CameraImages && cameraItem.processListItem.CameraImages.length > 0) {\r\n cameraItem.numberOfImages = cameraItem.processListItem.CameraImages.length;\r\n }\r\n\r\n if (cameraItem.processListItem && cameraItem.processListItem.ProcessListItemAttachments && cameraItem.processListItem.ProcessListItemAttachments.length > 0) {\r\n cameraItem.numberOfImages += cameraItem.processListItem.ProcessListItemAttachments.length;\r\n }\r\n }\r\n\r\n\r\n };\r\n\r\n /**\r\n * Read the base64 from the file\r\n * @param {any} file\r\n */\r\n function readAttachmentFile(file) {\r\n var attachmentToReturn = OrderFactory.Attachment();\r\n attachmentToReturn.AttachmentName = file.name;\r\n attachmentToReturn.ForeignKey = cameraItem.processListItem.InitiatedId;\r\n attachmentToReturn.Table = 'BOT_PROCESSLIST_ITEM';\r\n\r\n if (cameraItem.includeInReport)\r\n attachmentToReturn.IncludeInReport = true;\r\n else\r\n attachmentToReturn.IncludeInReport = false;\r\n\r\n return fileReader.readAsDataUrl(file, $scope).then(function (bytes) {\r\n attachmentToReturn.AttachmentBytes = bytes;\r\n return attachmentToReturn;\r\n });\r\n };\r\n\r\n /**\r\n * Add the images before or after upload\r\n * @param {any} onImagesUploadedEventArgs\r\n * @param {any} entity\r\n * @param {any} isAfterUpload\r\n */\r\n function addImageListsToEventArgs(onImagesUploadedEventArgs, entity, isAfterUpload) {\r\n\r\n if (isAfterUpload) {\r\n onImagesUploadedEventArgs.IncludedCameraImagesAfterUpload = entity.IncludedCameraImages;\r\n onImagesUploadedEventArgs.CameraImagesAfterUpload = entity.CameraImages;\r\n } else {\r\n onImagesUploadedEventArgs.IncludedCameraImagesBeforeUpload = angular.copy(entity.IncludedCameraImages);\r\n onImagesUploadedEventArgs.CameraImagesBeforeUpload = angular.copy(entity.CameraImages);\r\n }\r\n\r\n\r\n };\r\n\r\n function addAssociatedEntityType(entityType, imageList) {\r\n\r\n if (!entityType || !imageList || imageList.length === 0)\r\n return;\r\n\r\n for (var index = 0; index < imageList.length; index++) {\r\n var currentImage = imageList[index];\r\n if (!currentImage.associatedEntityType)\r\n currentImage.associatedEntityType = entityType;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Save the images to server\r\n * @param {any} images\r\n */\r\n function saveImages(images) {\r\n return ExecutionFactory.saveCameraImages(images)\r\n .then(function (imagesSaved) {\r\n //free memory\r\n angular.forEach(imagesSaved, function (image) {\r\n image.CameraImageOriginal.AttachmentBytes = null;\r\n });\r\n\r\n var onImagesUploadedEventArgs = {};\r\n\r\n if (cameraItem.includeInReport && cameraItem.cameraTab) {\r\n\r\n if (cameraItem.processListType === \"HORIZONTAL\") {\r\n\r\n if (!cameraItem.horizontalItemField.IncludedCameraImages) {\r\n cameraItem.horizontalItemField.IncludedCameraImages = [];\r\n }\r\n\r\n // add image lists before upload\r\n addImageListsToEventArgs(onImagesUploadedEventArgs, cameraItem.horizontalItemField);\r\n\r\n Array.prototype.push.apply(cameraItem.horizontalItemField.IncludedCameraImages, imagesSaved);\r\n\r\n // add image lists after upload\r\n addImageListsToEventArgs(onImagesUploadedEventArgs, cameraItem.horizontalItemField, true);\r\n\r\n addAssociatedEntityType(\"BOT_HORIZONTAL_PROCESSLIST_FIELD\", cameraItem.horizontalItemField.IncludedCameraImages);\r\n\r\n // add as an attribute to event args object the actual updated list IncludedCameraImages\r\n onImagesUploadedEventArgs.UpdatedImageList = cameraItem.horizontalItemField.IncludedCameraImages;\r\n }\r\n else {\r\n\r\n if (!cameraItem.processListItem.IncludedCameraImages) {\r\n cameraItem.processListItem.IncludedCameraImages = [];\r\n }\r\n \r\n Array.prototype.push.apply(cameraItem.processListItem.IncludedCameraImages, imagesSaved);\r\n\r\n addAssociatedEntityType(\"BOT_QUESTION\", cameraItem.processListItem.IncludedCameraImages);\r\n }\r\n\r\n } else {\r\n\r\n if (cameraItem.processListType === \"HORIZONTAL\") {\r\n\r\n if (!cameraItem.horizontalItemField.CameraImages) {\r\n cameraItem.horizontalItemField.CameraImages = [];\r\n }\r\n\r\n // add image lists before upload\r\n addImageListsToEventArgs(onImagesUploadedEventArgs, cameraItem.horizontalItemField);\r\n\r\n Array.prototype.push.apply(cameraItem.horizontalItemField.CameraImages, imagesSaved);\r\n\r\n // add image lists after upload\r\n addImageListsToEventArgs(onImagesUploadedEventArgs, cameraItem.horizontalItemField, true);\r\n\r\n addAssociatedEntityType(\"BOT_HORIZONTAL_PROCESSLIST_FIELD\", cameraItem.horizontalItemField.CameraImages);\r\n\r\n // add as an attribute to event args object the actual updated list CameraImages\r\n onImagesUploadedEventArgs.UpdatedImageList = cameraItem.horizontalItemField.CameraImages;\r\n }\r\n else {\r\n\r\n if (!cameraItem.processListItem.CameraImages)\r\n cameraItem.processListItem.CameraImages = [];\r\n \r\n Array.prototype.push.apply(cameraItem.processListItem.CameraImages, imagesSaved);\r\n \r\n addAssociatedEntityType(\"BOT_QUESTION\", cameraItem.processListItem.CameraImages);\r\n }\r\n }\r\n $scope.$emit(\"onImagesUploaded\", onImagesUploadedEventArgs);\r\n //calculate the number of images\r\n calculateTotalNrOfAttachments();\r\n });\r\n };\r\n\r\n /**\r\n * Save the attachments on server\r\n * @param {any} attachments\r\n */\r\n function saveAttachments(attachments) {\r\n var attachmentsSaved = [];\r\n return attachments.reduce(function (promise, value) {\r\n return promise.then(function () {\r\n return value.$save().then(function (result) {\r\n attachmentsSaved.push(result);\r\n });\r\n });\r\n }, $q.when()).then(function () {\r\n //free memory\r\n angular.forEach(attachmentsSaved, function (attachment) {\r\n attachment.AttachmentBytes = null;\r\n });\r\n\r\n if (cameraItem.includeInReport && cameraItem.cameraTab) {\r\n if (!cameraItem.processListItem.IncludedAttachments)\r\n cameraItem.processListItem.IncludedAttachments = [];\r\n\r\n Array.prototype.push.apply(cameraItem.processListItem.IncludedAttachments, attachmentsSaved);\r\n } else {\r\n if (!cameraItem.processListItem.ProcessListItemAttachments)\r\n cameraItem.processListItem.ProcessListItemAttachments = [];\r\n\r\n Array.prototype.push.apply(cameraItem.processListItem.ProcessListItemAttachments, attachmentsSaved);\r\n }\r\n\r\n //calculate the number of attachments\r\n calculateTotalNrOfAttachments();\r\n });\r\n };\r\n\r\n /**\r\n * Add selected files to item\r\n * @returns {} \r\n */\r\n cameraItem.addFile = function () {\r\n\r\n if (!cameraItem.isFileEligible())\r\n return;\r\n\r\n var attachmentPromises = [];\r\n for (var i = 0; i < cameraItem.fileUpload.files.length; i++) {\r\n //if it's image, we need to resize it\r\n if ((/(jpg|jpeg|png)$/i).test(cameraItem.fileUpload.files[i].extension))\r\n attachmentPromises.push(readImageFile(cameraItem.fileUpload.files[i].file));\r\n else//just fetch the base64\r\n attachmentPromises.push(readAttachmentFile(cameraItem.fileUpload.files[i].file));\r\n }\r\n\r\n var images = [], attachments = [];\r\n $q.all(attachmentPromises)\r\n .then(function (result) {\r\n //get images\r\n images = $filter('filter')(result, function (i) { return i.CameraImageOriginal });\r\n //get other types of attachments\r\n attachments = $filter('filter')(result, function (a) { return !a.CameraImageOriginal });\r\n\r\n if (images && images.length > 0)\r\n //save images on server\r\n return saveImages(images);\r\n\r\n return $q.when();\r\n }).then(function () {\r\n if (attachments && attachments.length > 0)\r\n //save attachments on server\r\n return saveAttachments(attachments);\r\n\r\n return $q.when();\r\n }).then(function () {\r\n cameraItem.clearFileUpload();\r\n\r\n if (cameraItem.onAttachmentUpload && typeof cameraItem.onAttachmentUpload === 'function') {\r\n cameraItem.onAttachmentUpload();\r\n }\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Opens a modal with the selected image\r\n * @param {} image \r\n * @returns {} \r\n */\r\n cameraItem.openImage = function (image) {\r\n cameraItem.selectedImage = image;\r\n $uibModal.open({\r\n scope: $scope,\r\n templateUrl: 'template/executionCameraImage.html',\r\n size: 'lg'\r\n });\r\n };\r\n\r\n cameraItem.downloadImage = function (image) {\r\n var url = '';\r\n if (image.CameraImageOriginal)\r\n url = image.CameraImageOriginal.URL;\r\n else\r\n url = image.URL;\r\n DownloadService.download(url);\r\n };\r\n\r\n cameraItem.getAttachmentIcon = function (attachment) {\r\n var extension = attachment.AttachmentName.split('.').pop();\r\n switch (extension) {\r\n case 'pdf':\r\n return 'fa-file-pdf-o';\r\n case 'doc':\r\n case 'docx':\r\n return 'fa-file-word-o';\r\n case 'xls':\r\n case 'xlsx':\r\n return 'fa-file-excel-o';\r\n default:\r\n return 'fa-file-o';\r\n }\r\n };\r\n\r\n cameraItem.deleteAttachment = function (attachment, index) {\r\n return OrderFactory.deleteAttachment(attachment).then(function () {\r\n cameraItem.processListItem.ProcessListItemAttachments.splice(index, 1);\r\n\r\n calculateTotalNrOfAttachments();\r\n });\r\n };\r\n\r\n cameraItem.deleteImage = function (image, index) {\r\n\r\n if (cameraItem.processListType === \"HORIZONTAL\") {\r\n\r\n if (!cameraItem.horizontalItemField.CameraImagesToDelete) {\r\n cameraItem.horizontalItemField.CameraImagesToDelete = [];\r\n }\r\n\r\n cameraItem.horizontalItemField.CameraImagesToDelete.push(image);\r\n\r\n cameraItem.horizontalItemField.CameraImages.splice(index, 1);\r\n\r\n } else {\r\n\r\n if (!cameraItem.processListItem.CameraImagesToDelete)\r\n cameraItem.processListItem.CameraImagesToDelete = [];\r\n\r\n cameraItem.processListItem.CameraImagesToDelete.push(image);\r\n\r\n cameraItem.processListItem.CameraImages.splice(index, 1);\r\n\r\n }\r\n\r\n calculateTotalNrOfAttachments();\r\n };\r\n\r\n //wait for first digest cycle\r\n $timeout(function () {\r\n calculateTotalNrOfAttachments();\r\n });\r\n };\r\n\r\n})();\r\n\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('execution')\r\n .component('vbMultiUserExecution', {\r\n templateUrl: 'Scripts/execution/multi-user-execution/multi-user-execution.component.html',\r\n controller: 'MultiUserExecutionController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n processListItem: ' 0)) {\r\n areThereAnswers = true;\r\n break;\r\n }\r\n }\r\n\r\n vm.showMultiUserAction = areThereAnswers;\r\n return;\r\n }\r\n\r\n function prepareMultipleUserAnswers() {\r\n if (!vm.showMultiUserAction)\r\n return;\r\n\r\n vm.userAnswer = _.cloneDeep(vm.listHistory);\r\n var lastUpdatedBy = vm.processListItem.InitiatedOption.LastUpdatedBy;\r\n\r\n // remove the user that has current answer\r\n _.remove(vm.userAnswer, function (u) { return u.id === lastUpdatedBy.id; });\r\n\r\n // keep only the initiated option for this list item\r\n for (var i = 0; i < vm.userAnswer.length; i++) {\r\n var userHistory = vm.userAnswer[i];\r\n\r\n _.remove(userHistory.InitiatedOptions, function (o) { return o.InitiatedId != vm.processListItem.InitiatedOption.InitiatedId });\r\n\r\n var item = getItemForUser(userHistory);\r\n userHistory.Answer = item;\r\n }\r\n\r\n _.remove(vm.userAnswer, function (u) { return !_.first(u.InitiatedOptions).SelectedValue && vm.processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE' });\r\n }\r\n\r\n function showAlternativeAnswers() {\r\n var modalInstance = $uibModal.open({\r\n templateUrl: 'Scripts/execution/multi-user-execution/multi-user-execution.modal.html',\r\n scope: $scope\r\n });\r\n\r\n modalInstance.result.finally(function () {\r\n console.log('closed');\r\n });\r\n };\r\n\r\n function isSelectDisabled() {\r\n return !_.some(vm.userAnswer, function (u) { return u.selectedAnswer });\r\n };\r\n\r\n function hasAction(user) {\r\n //return the text of the answer\r\n var item = getItemForUser(user);\r\n\r\n\r\n return !_.isNil(item.ProcessListAction) && item.ProcessListAction.id;\r\n };\r\n\r\n function getItemForUser(user) {\r\n if (_.isNil(user.InitiatedOptions) || _.isEmpty(user.InitiatedOptions))\r\n return null;\r\n\r\n if (vm.processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n var optionItems = _.map(_.first(user.InitiatedOptions).SelectedValues, function (e) { return e.OptionItem });\r\n\r\n var items = _.intersectionBy(vm.processListItem.InitiatedOption.Items, optionItems, 'InitiatedId');//get answers\r\n //now get answers that conflict user the users answer\r\n var currentAnswers = vm.processListItem.InitiatedOption.SelectedValues;\r\n\r\n items = _.intersectionBy(currentAnswers, items, 'InitiatedId');\r\n\r\n if (items.length == 0)\r\n vm.showSelectButton = false;\r\n\r\n return items;\r\n }\r\n\r\n if (_.isNil(_.first(user.InitiatedOptions).SelectedValue))\r\n return null;\r\n\r\n //get optionItem id from user\r\n var optionItemInitiatedId = _.first(user.InitiatedOptions).SelectedValue.OptionItem.InitiatedId;\r\n\r\n //return the text of the answer\r\n var item = _.find(vm.processListItem.InitiatedOption.Items, function (i) { return i.InitiatedId == optionItemInitiatedId; });\r\n\r\n return item;\r\n };\r\n\r\n function isAnswerAnnet(user) {\r\n if (!user.Answer || !user.Answer.ProcessListAction || !user.Answer.ProcessListAction.DefaultAnswers || user.Answer.ProcessListAction.DefaultAnswers.length == 0)\r\n return false;\r\n\r\n if (!user.InitiatedOptions[0].SelectedValue.SelectedDefaultAnswer || !user.InitiatedOptions[0].SelectedValue.SelectedDefaultAnswer.InitiatedId)\r\n return false;\r\n\r\n var defaultAnswerInitiatedId = user.InitiatedOptions[0].SelectedValue.SelectedDefaultAnswer.InitiatedId;\r\n\r\n return _.some(user.Answer.ProcessListAction.DefaultAnswers, function (e) { return e.InitiatedId == defaultAnswerInitiatedId && e.ProgId == 'PROG_ANNET' });\r\n };\r\n\r\n function selectAnswer(user) {\r\n //deselect all the answers from users\r\n for (var i = 0; i < vm.userAnswer.length; i++)\r\n vm.userAnswer[i].selectedAnswer = false;\r\n\r\n user.selectedAnswer = true;\r\n };\r\n }\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n RiskAnalysisFormController.$inject = [\r\n '$scope',\r\n '$filter',\r\n '$timeout',\r\n 'DateUtilService',\r\n 'ExecutionFactory',\r\n 'UserFactory'\r\n ];\r\n\r\n angular.module('execution').controller('RiskAnalysisFormController', RiskAnalysisFormController);\r\n\r\n function RiskAnalysisFormController(\r\n $scope,\r\n $filter,\r\n $timeout,\r\n DateUtilService,\r\n ExecutionFactory,\r\n UserFactory\r\n ) {\r\n\r\n $scope.showRiskForm = false;\r\n\r\n var riskRowIndex = 0;\r\n var getNewRiskRowIndex = function () {\r\n riskRowIndex--;\r\n return riskRowIndex;\r\n }\r\n\r\n /**\r\n * Show the risk row for the given row selected\r\n * @param {} riskRow \r\n * @returns {} \r\n */\r\n $scope.openRiskRow = function (riskRow) {\r\n if (!riskRow) {\r\n $scope.currentRiskRow = { probabilityChoice: 1, consequenceChoice: 1, id: getNewRiskRowIndex(), Active: true };\r\n } else {\r\n $scope.currentRiskRow.deadline = $scope.currentRiskRow.Deadline ? DateUtilService.getDateWithoutTimezone(new Date($scope.currentRiskRow.Deadline)) : null;\r\n\r\n $scope.currentRiskRow = angular.copy(riskRow);\r\n }\r\n\r\n $scope.showRiskForm = true;\r\n $timeout(function () {\r\n $scope.$broadcast('rzSliderForceRender');\r\n });\r\n }\r\n\r\n var resetRiskRowValues = function (riskRow) {\r\n riskRow.ProbabilityOne = false;\r\n riskRow.ProbabilityTwo = false;\r\n riskRow.ProbabilityThree = false;\r\n riskRow.ProbabilityFour = false;\r\n riskRow.ProbabilityFive = false;\r\n\r\n riskRow.ConsequenceOne = false;\r\n riskRow.ConsequenceTwo = false;\r\n riskRow.ConsequenceThree = false;\r\n riskRow.ConsequenceFour = false;\r\n riskRow.ConsequenceFive = false;\r\n }\r\n\r\n var setRiskRowValues = function (riskRow) {\r\n\r\n resetRiskRowValues(riskRow);\r\n\r\n switch (riskRow.probabilityChoice) {\r\n case 1:\r\n riskRow.ProbabilityOne = true;\r\n break;\r\n case 2:\r\n riskRow.ProbabilityTwo = true;\r\n break;\r\n case 3:\r\n riskRow.ProbabilityThree = true;\r\n break;\r\n case 4:\r\n riskRow.ProbabilityFour = true;\r\n break;\r\n case 5:\r\n riskRow.ProbabilityFive = true;\r\n break;\r\n }\r\n\r\n switch (riskRow.consequenceChoice) {\r\n case 1:\r\n riskRow.ConsequenceOne = true;\r\n break;\r\n case 2:\r\n riskRow.ConsequenceTwo = true;\r\n break;\r\n case 3:\r\n riskRow.ConsequenceThree = true;\r\n break;\r\n case 4:\r\n riskRow.ConsequenceFour = true;\r\n break;\r\n case 5:\r\n riskRow.ConsequenceFive = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!$scope.selectedValue.RiskHead) {\r\n $scope.selectedValue.RiskHead = {\r\n RiskRows: []\r\n };\r\n $scope.openRiskRow();\r\n $scope.showRiskForm = true;\r\n } else if (!$scope.selectedValue.RiskHead.RiskRows || $scope.selectedValue.RiskHead.RiskRows.length <= 0) {\r\n $scope.selectedValue.RiskHead.RiskRows = [];\r\n $scope.openRiskRow();\r\n $scope.showRiskForm = true;\r\n }\r\n\r\n $scope.riskHead = $scope.selectedValue.RiskHead;\r\n\r\n /**\r\n * Save the current risk row\r\n * @returns {} \r\n */\r\n $scope.saveRiskRow = function () {\r\n\r\n var riskRows = $filter('filter')($scope.riskHead.RiskRows, { id: $scope.currentRiskRow.id });\r\n\r\n $scope.currentRiskRow.Deadline = DateUtilService.getLongWithOffset(new Date($scope.currentRiskRow.deadline));\r\n\r\n setRiskRowValues($scope.currentRiskRow);\r\n\r\n if (riskRows.length > 0) {\r\n var index = $scope.riskHead.RiskRows.indexOf(riskRows[0]);\r\n $scope.riskHead.RiskRows[index] = angular.copy($scope.currentRiskRow);\r\n } else {\r\n $scope.riskHead.RiskRows.push($scope.currentRiskRow);\r\n }\r\n\r\n $scope.showRiskForm = false;\r\n $scope.currentRiskRow = null;\r\n }\r\n \r\n /**\r\n * Get the list of users for the given organization id\r\n */\r\n function getUsersDropdown() {\r\n var users = UserFactory.getUsersByOrganizationId(ExecutionFactory.organizationId);\r\n users.$promise.then(function (result) {\r\n $scope.users = result;\r\n });\r\n };\r\n \r\n var initRiskRows = function () {\r\n if (!$scope.riskHead || $scope.riskHead.RiskRows.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < $scope.riskHead.RiskRows.length; i++) {\r\n var riskRow = $scope.riskHead.RiskRows[i];\r\n\r\n if (riskRow.ProbabilityOne) {\r\n riskRow.probabilityChoice = 1;\r\n } else if (riskRow.ProbabilityTwo) {\r\n riskRow.probabilityChoice = 2;\r\n } else if (riskRow.ProbabilityThree) {\r\n riskRow.probabilityChoice = 3;\r\n } else if (riskRow.ProbabilityFour) {\r\n riskRow.probabilityChoice = 4;\r\n } else if (riskRow.ProbabilityFive) {\r\n riskRow.probabilityChoice = 5;\r\n } else {\r\n riskRow.probabilityChoice = 1;\r\n }\r\n\r\n if (riskRow.ConsequenceOne) {\r\n riskRow.consequenceChoice = 1;\r\n } else if (riskRow.ConsequenceTwo) {\r\n riskRow.consequenceChoice = 2;\r\n } else if (riskRow.ConsequenceThree) {\r\n riskRow.consequenceChoice = 3;\r\n } else if (riskRow.ConsequenceFour) {\r\n riskRow.consequenceChoice = 4;\r\n } else if (riskRow.ConsequenceFive) {\r\n riskRow.consequenceChoice = 5;\r\n } else {\r\n riskRow.consequenceChoice = 1;\r\n }\r\n\r\n if (!riskRow.id) {\r\n riskRow.id = getNewRiskRowIndex();\r\n }\r\n\r\n riskRow.Active = true;\r\n riskRow.deadline = riskRow.Deadline ? DateUtilService.getDateWithoutTimezone(riskRow.Deadline) : null;\r\n }\r\n\r\n $timeout(function () {\r\n $scope.$broadcast('rzSliderForceRender');\r\n });\r\n };\r\n\r\n $scope.disableRiskRow = function (riskRow, index) {\r\n if (riskRow.id < 0) {\r\n $scope.riskHead.RiskRows.splice(index, 1);\r\n }\r\n else\r\n riskRow.Active = false;\r\n };\r\n\r\n /**\r\n * Check whether the form is disabled based on the current risk row\r\n * @returns {} \r\n */\r\n $scope.riskRowDisabled = function () {\r\n if (!$scope.currentRiskRow)\r\n return true;\r\n\r\n if (!$scope.currentRiskRow.Case)\r\n return true;\r\n\r\n if (!$scope.currentRiskRow.Measures)\r\n return true;\r\n\r\n if (!$scope.currentRiskRow.Responsability)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n $scope.closeRiskForm = function () {\r\n $scope.currentRiskRow = null;\r\n $scope.showRiskForm = false;\r\n };\r\n\r\n\r\n\r\n initRiskRows();\r\n getUsersDropdown();\r\n };\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n angular.module('execution')\r\n .directive('riskAnalysisForm', function () {\r\n return {\r\n restrict: 'EA',\r\n templateUrl: 'Scripts/execution/riskAnalysisForm/riskAnalysisFormTemplate.html',\r\n scope: {\r\n selectedValue: '='\r\n },\r\n controller: 'RiskAnalysisFormController'\r\n };\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('gdpr')\r\n .component('gdprDeleteConfirmation', {\r\n templateUrl: 'Scripts/gdpr/gdpr-delete-confirmation/gdpr-delete-confirmation.component.html',\r\n controller: 'GdprDeleteConfirmationController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n GdprDeleteConfirmationController.$inject = [\r\n '_',\r\n '$routeParams',\r\n 'GdprFactory',\r\n '$uibModal',\r\n '$scope',\r\n 'sessionInformationService',\r\n '$location',\r\n 'dialogService',\r\n 'titleService',\r\n '$translate'\r\n ];\r\n\r\n angular\r\n .module('gdpr')\r\n .controller('GdprDeleteConfirmationController', GdprDeleteConfirmationController);\r\n\r\n /**\r\n * Controller that handles the approval or decline of user/company delete\r\n */\r\n function GdprDeleteConfirmationController(\r\n _,\r\n $routeParams,\r\n GdprFactory,\r\n $uibModal,\r\n $scope,\r\n sessionInformationService,\r\n $location,\r\n dialogService,\r\n titleService,\r\n $translate\r\n ) {\r\n var vm = this;\r\n\r\n var externalSessionModalInstance = null;\r\n\r\n vm.externalSessionId = null;\r\n vm.isLoggedIn = !_.isEmpty(sessionInformationService.getSession());\r\n vm.users = [];\r\n vm.organizations = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.closeExternalSessionModalInstance = closeExternalSessionModalInstance;\r\n vm.confirmDelete = confirmDelete;\r\n vm.declineDelete = declineDelete;\r\n vm.close = close;\r\n\r\n function onInit() {\r\n //change title accordingly\r\n titleService.changeTitle($translate.instant('GDPR.DELETE_REQUESTS'));\r\n //save session external if any\r\n vm.externalSessionId = $routeParams.sessionId;\r\n //if we have external session\r\n //we need the password for the user\r\n if (vm.externalSessionId &&\r\n (_.isNil(sessionInformationService.getUser()) || _.isEmpty(sessionInformationService.getUser())) &&\r\n (_.isNil(sessionInformationService.getSession()) ||\r\n _.isEmpty(sessionInformationService.getSession()))) {\r\n //need to login the user\r\n handleExternalLogin();\r\n } else\r\n //else get necessary data\r\n Promise.all([\r\n getUsersThatHaveRequestedDelete(),\r\n getOrganizationsThatHaveRequestedDelete()\r\n ]).then(function () {\r\n //TODO:\r\n });\r\n ;\r\n };\r\n\r\n function handleExternalLogin() {\r\n //open the modal and ask for password\r\n externalSessionModalInstance = $uibModal.open({\r\n template: '',\r\n scope: $scope,\r\n backdrop: 'static',\r\n keyboard: false\r\n });\r\n externalSessionModalInstance.result.finally(function (result) {\r\n //we need to reload the page without the sessionid\r\n $location.path('/gdpr-delete-confirm');\r\n });\r\n }\r\n\r\n /**\r\n * Gets those users that have requested to be deleted\r\n */\r\n function getUsersThatHaveRequestedDelete() {\r\n return GdprFactory.getUsersThatHaveRequestedDelete()\r\n .then(function (users) {\r\n vm.users = users;\r\n });\r\n };\r\n\r\n /**\r\n * Gets those companies that have requested to be deleted\r\n */\r\n function getOrganizationsThatHaveRequestedDelete() {\r\n return GdprFactory.getOrganizationsThatHaveRequestedDelete()\r\n .then(function (organizations) {\r\n vm.organizations = organizations;\r\n });\r\n }\r\n\r\n /**\r\n * Called from the password modal\r\n */\r\n function closeExternalSessionModalInstance() {\r\n externalSessionModalInstance.close();\r\n };\r\n\r\n /**\r\n * Triggered when the user confirms the delete of the user\r\n * Password is required for confirmation\r\n * @param {any} table\r\n * @param {any} value\r\n */\r\n function confirmDelete(table, value) {\r\n //ask user if sure\r\n return dialogService.showConfirmDialog('COMMON.WARNING', 'GDPR.SURE_TO_DELETE')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return Promise.resolve(null);\r\n\r\n return handlePasswordDialog();\r\n })\r\n .then(function (enteredPassword) {\r\n //make request and delete\r\n if (!enteredPassword)\r\n return Promise.resolve(null);\r\n //make request\r\n return GdprFactory.confirmDelete(table, value.id, enteredPassword.password);\r\n })\r\n .then(function (result) {\r\n if (_.isNil(result))\r\n return;\r\n //remove from list\r\n switch (table) {\r\n case 'GOT_USER':\r\n _.remove(vm.users,\r\n function (user) {\r\n return user.id == value.id;\r\n });\r\n break;\r\n case 'GOT_ORGANIZATION':\r\n default:\r\n _.remove(vm.organizations,\r\n function (organization) {\r\n return organization.id == value.id;\r\n });\r\n //todo: get users\r\n break;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Triggered when the admin declines the delete and the company/user is restored\r\n * @param {any} table\r\n * @param {any} value\r\n */\r\n function declineDelete(table, value) {\r\n //ask user if sure\r\n return dialogService.showConfirmDialog('COMMON.WARNING', 'GDPR.SURE_TO_RESTORE')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return Promise.resolve(null);\r\n\r\n return handlePasswordDialog();\r\n })\r\n .then(function (enteredPassword) {\r\n //make request and restore\r\n if (!enteredPassword)\r\n return Promise.resolve(null);\r\n\r\n return GdprFactory.declineDelete(table, value.id, enteredPassword.password);\r\n })\r\n .then(function (result) {\r\n if (_.isNil(result))\r\n return;\r\n\r\n switch (table) {\r\n case 'GOT_USER':\r\n _.remove(vm.users,\r\n function (user) {\r\n return user.id == value.id;\r\n });\r\n break;\r\n case 'GOT_ORGANIZATION':\r\n default:\r\n _.remove(vm.organizations,\r\n function (organization) {\r\n return organization.id == value.id;\r\n });\r\n break;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a dialog where the users needs to type in the password and the reason why he's impersonating this user\r\n */\r\n function handlePasswordDialog() {\r\n return dialogService.showDialogWithInputs('COMMON.CONFIRM', 'SESSION_MODEL.PASSWORD_CONFIRM', null, [\r\n { type: 'password', model: null, label: 'COMMON.PASSWORD', inputType: 'input', name: 'passwordInput' }\r\n ])\r\n .then(function (result) {\r\n if (!result || (result.result != dialogService.DIALOG_RESULT_OK))\r\n return null;\r\n\r\n var resultedInputs = result.inputs;\r\n\r\n if (_.isNil(resultedInputs) || _.isEmpty(resultedInputs))\r\n return null;\r\n\r\n var password = resultedInputs[0].model;\r\n\r\n return { password: btoa(password) };\r\n });\r\n };\r\n\r\n function close() {\r\n if (!!vm.externalSessionId)\r\n return;\r\n $location.path('/organizations');\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('gdpr')\r\n .component('gdprOverview',\r\n {\r\n templateUrl: 'Scripts/gdpr/gdpr-overview/gdpr-overview.component.html',\r\n controller: 'GdprOverviewController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organizationId: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n GdprOverviewController.$inject = [\r\n '_',\r\n 'GdprFactory',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular\r\n .module('gdpr')\r\n .controller('GdprOverviewController', GdprOverviewController);\r\n\r\n /**\r\n * Simple controller that handles the overview report regarding user acceptance of gdpr\r\n */\r\n function GdprOverviewController(\r\n _,\r\n GdprFactory,\r\n sessionInformationService\r\n ) {\r\n var vm = this;\r\n\r\n vm.usersWhichRejectedGdprTableVisibility = false;\r\n vm.gdprOverview = {};\r\n\r\n vm.$onInit = onInit;\r\n vm.toggleUsersWhichRejectedGdprTableVisibility = toggleUsersWhichRejectedGdprTableVisibility;\r\n vm.usersWhichRejectedGdpr = [];\r\n vm.isLoggedUserOrganization = isLoggedUserOrganization;\r\n\r\n function onInit() {\r\n Promise.all([\r\n getGdprOverviewReport()\r\n ]).then(function() {});\r\n };\r\n\r\n function getGdprOverviewReport() {\r\n return GdprFactory.getGdprOverview(vm.organizationId)\r\n .then(function (result) {\r\n vm.gdprOverview = result;\r\n });\r\n };\r\n\r\n function getUsersWhichRejectedGdpr(organizationId) {\r\n\r\n GdprFactory.getUsersWhichRejectedGdpr(organizationId)\r\n .then(function(users) {\r\n vm.usersWhichRejectedGdpr = users;\r\n });\r\n };\r\n\r\n function toggleUsersWhichRejectedGdprTableVisibility() {\r\n\r\n vm.usersWhichRejectedGdprTableVisibility = !vm.usersWhichRejectedGdprTableVisibility;\r\n\r\n if (vm.usersWhichRejectedGdprTableVisibility) {\r\n getUsersWhichRejectedGdpr(vm.organizationId);\r\n } else {\r\n vm.usersWhichRejectedGdpr = [];\r\n }\r\n }\r\n\r\n function isLoggedUserOrganization() {\r\n return sessionInformationService.isLoggedUserOrganization(vm.organizationId);\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('gdpr')\r\n .component('gdprPrivateCustomer',\r\n {\r\n templateUrl: 'Scripts/gdpr/gdpr-private-customer/gdpr-private-customer.component.html',\r\n controller: 'GdprPrivateCustomerController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n GdprPrivateCustomerController.$inject = [\r\n '_',\r\n '$routeParams',\r\n 'GdprFactory'\r\n ];\r\n\r\n angular\r\n .module('gdpr')\r\n .controller('GdprPrivateCustomerController', GdprPrivateCustomerController);\r\n\r\n /**\r\n * Simple controller that handles the delete confirmation of a customer\r\n * @deprecated - maybe will be used in future\r\n */\r\n function GdprPrivateCustomerController(\r\n _,\r\n $routeParams,\r\n GdprFactory\r\n ) {\r\n var vm = this;\r\n\r\n vm.requestSent = false;\r\n\r\n var externalSessionId = null;\r\n\r\n vm.$onInit = onInit;\r\n\r\n function onInit() {\r\n externalSessionId = $routeParams.sessionId;\r\n\r\n GdprFactory.markCustomerAsDeleted(externalSessionId)\r\n .then(function() {\r\n vm.requestSent = true;\r\n });\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('gdpr')\r\n .component('gdprExternal', {\r\n templateUrl: 'Scripts/gdpr/gdpr.component.html',\r\n controller: 'GdprController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('help')\r\n .component('vbGeneralHelp', {\r\n templateUrl: 'Scripts/help/general-help/general-help.component.html',\r\n controller: 'GeneralHelpController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n GeneralHelpController.$inject = [\r\n 'titleService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('help').controller('GeneralHelpController', GeneralHelpController);\r\n\r\n function GeneralHelpController(\r\n titleService,\r\n $filter\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = function () {\r\n titleService.changeTitle($filter('translate')('GeneralHelp'));\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('help')\r\n .component('vbQuickGuide', {\r\n templateUrl: 'Scripts/help/quick-guide/quick-guide.component.html',\r\n controller: 'QuickGuideController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QuickGuideController.$inject = [\r\n 'titleService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('help').controller('QuickGuideController', QuickGuideController);\r\n\r\n function QuickGuideController(\r\n titleService,\r\n $filter\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = function () {\r\n titleService.changeTitle($filter('translate')('QuickGuide'));\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('help')\r\n .component('vbUserManual', {\r\n templateUrl: 'Scripts/help/user-manual/user-manual.component.html',\r\n controller: 'UserManualController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserManualController.$inject = [\r\n 'titleService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('help').controller('UserManualController', UserManualController);\r\n\r\n function UserManualController(\r\n titleService,\r\n $filter\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = function () {\r\n titleService.changeTitle($filter('translate')('UserManual'));\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('laws')\r\n .component('vbLawsAndRegulationsConfiguration',\r\n {\r\n templateUrl: 'Scripts/laws-regulations/laws-regulations-configuration/laws-regulations-configuration.component.html',\r\n controller: 'LawsAndRegulationsConfigurationController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n project:'<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n LawsAndRegulationsConfigurationController.$inject = [\r\n 'LawsAndRegulationsFactory',\r\n 'DownloadService',\r\n '$uibModal',\r\n '$scope'\r\n ];\r\n\r\n angular\r\n .module('laws')\r\n .controller('LawsAndRegulationsConfigurationController', LawsAndRegulationsConfigurationController);\r\n\r\n function LawsAndRegulationsConfigurationController(\r\n LawsAndRegulationsFactory,\r\n DownloadService,\r\n $uibModal,\r\n $scope\r\n ) {\r\n var vm = this;\r\n\r\n var valueTypes = [];\r\n\r\n vm.selectedPdf = null;\r\n vm.pdfs = [];\r\n vm.fields = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.getFillData = getFillData;\r\n vm.downloadSelectedPdf = downloadSelectedPdf;\r\n vm.saveFillData = saveFillData;\r\n vm.saveFillDataAndOpen = saveFillDataAndOpen;\r\n vm.getTypes = getTypes;\r\n vm.getValues = getValues;\r\n vm.hideValueInput = hideValueInput;\r\n vm.closeModal = closeModal;\r\n\r\n function onInit() {\r\n getPdfs()\r\n .then(function () {\r\n\r\n });\r\n };\r\n\r\n function getFillData() {\r\n Promise.all([\r\n getValueTypes(), getPdfFields()\r\n ])\r\n .then(function () {\r\n\r\n });\r\n };\r\n\r\n function downloadSelectedPdf() {\r\n if (!vm.selectedPdf || !vm.selectedPdf.URL)\r\n return;\r\n\r\n DownloadService.download(vm.selectedPdf.URL);\r\n };\r\n\r\n function saveFillData() {\r\n var filteredList = _.filter(vm.fields, function (i) {\r\n return i.Value || (!i.Value && _.some(['BOT_CUSTOM_NUMBER', 'BOT_CUSTOM_TEXT', 'BOT_CUSTOM_DATE'], function (s) { return i.ParentValue && s == i.ParentValue.ProgId }));\r\n });\r\n\r\n return LawsAndRegulationsFactory.savePdfMappings(filteredList, vm.selectedPdf.id);\r\n };\r\n\r\n function saveFillDataAndOpen() {\r\n saveFillData()\r\n .then(function () {\r\n vm.modalInstance = $uibModal.open({\r\n template: '',\r\n scope: $scope,\r\n size: 'lg'\r\n });\r\n });\r\n };\r\n\r\n function closeModal() {\r\n vm.modalInstance.close();\r\n vm.modalInstance = null;\r\n };\r\n\r\n function getTypes() {\r\n return _.filter(valueTypes, function (type) {\r\n return !type.Parent || !type.Parent.id;\r\n });\r\n };\r\n\r\n function getValues(input) {\r\n return _.filter(valueTypes, function (t) {\r\n return t.Parent && t.Parent.id == input.ParentValue.id;\r\n });\r\n };\r\n\r\n function hideValueInput(input) {\r\n if (!input.ParentValue)\r\n return false;\r\n\r\n return _.some(['BOT_CUSTOM_NUMBER', 'BOT_CUSTOM_TEXT', 'BOT_CUSTOM_DATE'], function (s) { return s == input.ParentValue.ProgId });\r\n };\r\n\r\n function getPdfs() {\r\n return LawsAndRegulationsFactory.getMappedPdfs()\r\n .$promise\r\n .then(function (result) {\r\n vm.pdfs = result;\r\n\r\n if (_.isNil(vm.pdfs) || _.isEmpty(vm.pdfs))\r\n return;\r\n\r\n for (var i = 0; i < vm.pdfs.length; i++)\r\n vm.pdfs[i].AttachmentName = vm.pdfs[i].AttachmentName.replace('Mapped_', '');\r\n });\r\n };\r\n\r\n\r\n function getValueTypes() {\r\n return LawsAndRegulationsFactory.getPdfMappingTypes()\r\n .$promise\r\n .then(function (result) {\r\n valueTypes = result;\r\n });\r\n };\r\n\r\n function getPdfFields() {\r\n return LawsAndRegulationsFactory.getPdfMappings(vm.selectedPdf.id)\r\n .$promise\r\n .then(function (result) {\r\n vm.fields = result;\r\n });\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('laws')\r\n .component('vbLawsAndRegulationsDocuments',\r\n {\r\n templateUrl: 'Scripts/laws-regulations/laws-regulations-documents/laws-regulations-documents.component.html',\r\n controller: 'LawsAndRegulationsDocumentsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n project:'<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n LawsAndRegulationsDocumentsController.$inject = [\r\n 'sessionInformationService',\r\n '$sce',\r\n 'F5ReportFactory',\r\n '$timeout',\r\n '_',\r\n '$compile',\r\n '$scope',\r\n 'infoService',\r\n '$translate',\r\n '$uibModal',\r\n 'dialogService',\r\n 'LawsAndRegulationsFactory',\r\n 'menuService',\r\n 'DownloadService',\r\n '$location',\r\n 'errorService',\r\n 'AttachmentFactory',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('laws')\r\n .controller('LawsAndRegulationsDocumentsController', LawsAndRegulationsDocumentsController);\r\n\r\n function LawsAndRegulationsDocumentsController(\r\n sessionInformationService,\r\n $sce,\r\n F5ReportFactory,\r\n $timeout,\r\n _,\r\n $compile,\r\n $scope,\r\n infoService,\r\n $translate,\r\n $uibModal,\r\n dialogService,\r\n LawsAndRegulationsFactory,\r\n menuService,\r\n DownloadService,\r\n $location,\r\n errorService,\r\n AttachmentFactory,\r\n $q\r\n ) {\r\n var vm = this;\r\n\r\n var oldReport = null;\r\n var _linksConvertedStatus = 'LINKS_CONVERTED';\r\n var canUserSeeSection = false;\r\n\r\n vm.loggedUser = sessionInformationService.getUser();\r\n vm.isEditMode = false;\r\n vm.lawsReport = null;\r\n vm.reportId = Math.floor(Math.random() * 1000000000);\r\n vm.modalInstance = null;\r\n\r\n vm.$onInit = onInit;\r\n vm.startEdit = startEdit;\r\n vm.saveEdit = saveEdit;\r\n vm.cancelEdit = cancelEdit;\r\n vm.trustedText = trustedText;\r\n vm.openFile = openFile;\r\n vm.closeModal = closeModal;\r\n vm.isSectionVisibleToUser = isSectionVisibleToUser;\r\n LawsAndRegulationsFactory.newAttachment = newAttachment;\r\n LawsAndRegulationsFactory.saveAttachment = saveAttachment;\r\n\r\n\r\n function onInit() {\r\n\r\n getLawsAndRegulationsReport();\r\n\r\n var menuItem = menuService.getMenuByHref('/lawsAndRegulations');\r\n\r\n canUserSeeSection = menuItem ? true : false;\r\n };\r\n\r\n function isSectionVisibleToUser() {\r\n\r\n return (vm.loggedUser.Organization.Central && vm.loggedUser.Group.ProgId != 'ADMIN' && canUserSeeSection) ||\r\n (!vm.loggedUser.Organization.Central && canUserSeeSection) ||\r\n vm.project;\r\n }\r\n\r\n function startEdit() {\r\n vm.isEditMode = true;\r\n //make a copy in case the user cancels the edit\r\n oldReport = _.cloneDeep(vm.lawsReport.ReportCode);\r\n\r\n $timeout(function () {\r\n angular.element('text-angular[name=lawsEditor]').find('*[id*=taTextElement]').focus();\r\n });\r\n };\r\n\r\n function saveEdit() {\r\n vm.isEditMode = false;\r\n\r\n return saveReport()\r\n .then(function () {\r\n var attachmentsToDelete = getDeletedAttachments();\r\n\r\n return deleteAttachments(attachmentsToDelete);\r\n })\r\n .then(function () {\r\n infoService.changeInfo($translate.instant(\"msgPageSaved\"));\r\n return getLawsAndRegulationsReport();\r\n });\r\n };\r\n\r\n function cancelEdit() {\r\n vm.isEditMode = false;\r\n //restore the old value\r\n vm.lawsReport.ReportCode = _.cloneDeep(oldReport);\r\n oldReport = null;\r\n //re-add the actions\r\n $timeout(addActionToDocuments);\r\n\r\n };\r\n\r\n /**\r\n * Makes the given html secure for rendering\r\n * @param {any} html\r\n */\r\n function trustedText(html) {\r\n return $sce.trustAsHtml(html);\r\n };\r\n\r\n function openFile(attachmentId) {\r\n //On the project page, download the pdf; otherwise show the modal\r\n if (vm.project && $location.path() === ('/project/' + vm.project.id)) {\r\n \r\n AttachmentFactory.getParentAttachmentForAttachment(attachmentId)\r\n .then(function(parentAttachment) {\r\n\r\n // if the document has no parent means no fields/mappings exists\r\n if (!parentAttachment.id) {\r\n return $q.when();\r\n }\r\n\r\n // get the fields/mappings of the document\r\n return LawsAndRegulationsFactory.getPdfMappings(parentAttachment.id).$promise;\r\n })\r\n .then(function(documentFields) {\r\n \r\n if (!documentFields || documentFields.length === 0) {\r\n // download the document directly if no fields/mappings exists\r\n downloadDocument(attachmentId);\r\n } else {\r\n // if fields/mappings exists download the filled document\r\n downloadFilledPdf(attachmentId);\r\n }\r\n });\r\n }\r\n else\r\n vm.modalInstance = $uibModal.open({\r\n template: '',\r\n scope: $scope,\r\n size: 'lg'\r\n });\r\n };\r\n\r\n function downloadDocument(attachmentId) {\r\n\r\n AttachmentFactory.getAttachment(attachmentId)\r\n .$promise\r\n .then(function(attachment) {\r\n DownloadService.download(attachment.URL);\r\n });\r\n }\r\n\r\n function downloadFilledPdf(attachmentId) {\r\n return LawsAndRegulationsFactory.getFilledPdfMappingTypes(attachmentId, null)\r\n .$promise\r\n .then(function (fillData) {\r\n if (vm.project && vm.project.id) {\r\n if (_.isNil(fillData) || _.isEmpty(fillData)) {\r\n errorService.changeError($translate.instant('LAWS_AND_REGULATIONS.NO_CONFIGURATION_AVAILABLE'));\r\n return Promise.resolve();\r\n }\r\n for (var i = 0; i < fillData.length; i++) {\r\n if (fillData[i].ProgId === 'BOT_CUSTOMER')\r\n pdfSetProjectCustomer(fillData[i]);\r\n if (fillData[i].ProgId === 'BOT_ORDER')\r\n pdfSetProjectOrder(fillData[i]);\r\n }\r\n }\r\n\r\n for (var i = 0; i < fillData.length; i++) {\r\n switch (fillData[i].ProgId) {\r\n case 'BOT_CUSTOM_DATE':\r\n var date = _.cloneDeep(fillData[i].Value);\r\n date = moment(date).valueOf();\r\n\r\n fillData[i].Value = date;\r\n break;\r\n }\r\n }\r\n\r\n return LawsAndRegulationsFactory.getFilledPdfUrl(attachmentId, null, fillData)\r\n .then(function (result) {\r\n DownloadService.download(result.URL);\r\n });\r\n });\r\n };\r\n\r\n function pdfSetProjectCustomer(input) {\r\n if (!vm.project || !vm.project.Order || !vm.project.Order.Customer)\r\n return;\r\n\r\n input.freetext = vm.project.Order.Customer.FullName;\r\n input.Value = vm.project.Order.Customer.id;\r\n };\r\n\r\n function pdfSetProjectOrder(input) {\r\n if (!vm.project || !vm.project.Order)\r\n return;\r\n\r\n input.freetext = $translate.instant('txtOrder') + ' ' + (vm.project.Order.OrderNumber ? + vm.project.Order.OrderNumber : vm.project.Order.id);\r\n input.Value = vm.project.Order.id;\r\n };\r\n\r\n function closeModal() {\r\n vm.modalInstance.close();\r\n vm.modalInstance = null;\r\n };\r\n\r\n /**\r\n * Gets the report\r\n */\r\n function getLawsAndRegulationsReport() {\r\n return F5ReportFactory.getReport('LawsAndRegulations')\r\n .$promise\r\n .then(function (result) {\r\n vm.lawsReport = result;\r\n\r\n oldReport = _.cloneDeep(vm.lawsReport.ReportCode);\r\n\r\n //wait a bit for the report to appear\r\n return $timeout(function () { });\r\n }).then(function () {\r\n //get report element\r\n var reportElement = angular.element('#' + vm.reportId);\r\n //convert links to attachments\r\n return processExternalPdfFiles(reportElement);\r\n }).then(function (result) {\r\n if (result === _linksConvertedStatus) //save the document with the links converted\r\n return saveEdit();\r\n\r\n return $timeout(addActionToDocuments, 250);\r\n });\r\n };\r\n\r\n /**\r\n * Goes through all links and adds interaction to the links\r\n */\r\n function addActionToDocuments() {\r\n //get report element\r\n var reportElement = angular.element('#' + vm.reportId);\r\n //get attachments\r\n var attachmentElements = reportElement.find('a[id^=\"attachmentId\"]');\r\n\r\n if (_.isNil(attachmentElements) || _.isEmpty(attachmentElements))\r\n return;\r\n\r\n for (var i = 0; i < attachmentElements.length; i++) {\r\n var attachmentElement = attachmentElements[i];\r\n\r\n if (!!attachmentElement.href && attachmentElement.href.indexOf('.docx') > -1)\r\n continue;\r\n\r\n var content = attachmentElement.innerHTML.replace(/<[^>]*>/g, \"\");\r\n //clear inner html\r\n attachmentElement.innerHTML = \"\";\r\n //remove link\r\n attachmentElement.removeAttribute(\"href\");\r\n //get id of the attachment\r\n var attachmentId = attachmentElement.id.replace('attachmentId#', '').replace('#', '');\r\n //add interaction to the file\r\n var newInnerHtml = '' + content + '';\r\n //make it angular aware\r\n var compiledHtml = $compile(newInnerHtml)($scope);\r\n //add it\r\n angular.element(attachmentElement).append(compiledHtml);\r\n }\r\n };\r\n\r\n function processExternalPdfFiles(reportElement) {\r\n var externalPdfFiles = reportElement.find(\"a[href$='.pdf']\");\r\n\r\n externalPdfFiles = _.filter(externalPdfFiles,\r\n function (e) {\r\n return e.href.toLowerCase().indexOf('vbsmart') < 0 && e.href.toLowerCase().indexOf('blob.core.windows') < 0;\r\n });//only those that aren't related to vbsmart\r\n\r\n if (_.isNil(externalPdfFiles) || _.isEmpty(externalPdfFiles))\r\n return Promise.resolve();\r\n\r\n var linksToBeDownloaded = [];\r\n //go through each element\r\n for (var i = 0; i < externalPdfFiles.length; i++) {\r\n var externalFile = externalPdfFiles[i];\r\n //double check for extension\r\n var extension = externalFile.href.split('.').pop();\r\n\r\n if (extension != 'pdf')\r\n continue;\r\n\r\n //set a random id so we can identify it later\r\n externalFile.id = Math.floor(Math.random() * 1000000000).toString();\r\n linksToBeDownloaded.push({ m_Item1: externalFile.href, m_Item2: externalFile.id });\r\n }\r\n\r\n //ask user if he wants to convert to files in vbsmart\r\n return dialogService.showConfirmDialog('COMMON.CONFIRM', ['LAWS_AND_REGULATIONS.FOUND_PDF_LINKS', 'LAWS_AND_REGULATIONS.REJECT_PDF_LINKS'])\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return Promise.resolve();\r\n //let us begin\r\n return LawsAndRegulationsFactory.convertToFile(linksToBeDownloaded);\r\n })\r\n .then(function (result) {\r\n if (_.isNil(result) || _.isEmpty(result))\r\n return Promise.resolve();\r\n\r\n //go through each result and set the id \r\n for (var i = 0; i < result.length; i++) {\r\n var item = result[i];\r\n\r\n //m_Item1 is path of the attachment\r\n //m_Item2 is the id of the attachment\r\n //m_Item3 is the unique thingy\r\n\r\n //get element by unique thingy\r\n var element = _.find(externalPdfFiles, function (e) { return e.id == item.m_Item3 });\r\n\r\n //set the id to attachmentId#id#\r\n element.id = 'attachmentId#' + item.m_Item2 + '#';\r\n element.href = item.m_Item1;\r\n element.innerHTML = element.innerHTML.replace(/<[^>]*>/g, \"\") + ' (' + element.href.substring(element.href.lastIndexOf('/') + 1) + ')';\r\n }\r\n //replace the html with the changed one\r\n vm.lawsReport.ReportCode = reportElement[0].innerHTML;\r\n //resolve with thingy\r\n return Promise.resolve(_linksConvertedStatus);\r\n });\r\n };\r\n\r\n /**\r\n * Saves the current report to backend\r\n */\r\n function saveReport() {\r\n return F5ReportFactory.save(vm.lawsReport);\r\n };\r\n\r\n /**\r\n * Returns a list of deleted attachments by comparing the new report with the old one\r\n */\r\n function getDeletedAttachments() {\r\n var oldAttachmentIds = findStringBetween(oldReport, 'attachmentId#', '#');\r\n var newAttachmentIds = findStringBetween(vm.lawsReport.ReportCode, 'attachmentId#', '#');\r\n //if we had before attachments\r\n if (!_.isNil(oldAttachmentIds) && !_.isEmpty(oldAttachmentIds)) {\r\n var attachmentsToDelete = [];\r\n //if we don't have any attachments -> remove all\r\n if (_.isNil(newAttachmentIds) || _.isEmpty(newAttachmentIds))\r\n attachmentsToDelete = oldAttachmentIds;\r\n else//see which were removed\r\n attachmentsToDelete = _.filter(oldAttachmentIds, function (o) {\r\n return newAttachmentIds.indexOf(o) == -1;\r\n });\r\n\r\n return attachmentsToDelete;\r\n }\r\n return [];\r\n };\r\n\r\n /**\r\n * Returns the matching string between the first and last strings\r\n * @param {any} str\r\n * @param {any} first\r\n * @param {any} last\r\n */\r\n function findStringBetween(str, first, last) {\r\n var r = new RegExp(first + '(.*?)' + last, 'gm');\r\n return str.match(r);\r\n };\r\n\r\n /**\r\n * Deletes a list of attachments from backend\r\n * @param {any} attachments\r\n */\r\n function deleteAttachments(attachments) {\r\n if (_.isNil(attachments) || _.isEmpty(attachments))\r\n return Promise.resolve();\r\n //delete one by one\r\n return attachments.reduce(function (promise, value) {\r\n return promise.then(function () {\r\n return F5ReportFactory.deleteAttachment(value.replace(\"attachmentId#\", \"\").replace(\"#\", \"\"));\r\n });\r\n }, Promise.resolve());\r\n };\r\n\r\n function newAttachment() {\r\n return F5ReportFactory.newAttachment();\r\n };\r\n\r\n function saveAttachment(attachment) {\r\n attachment.ForeignKey = vm.lawsReport.id;\r\n return F5ReportFactory.saveAttachment(attachment);\r\n };\r\n };\r\n})(); ","(function() {\r\n 'use strict';\r\n\r\n riskAnalysisUtilsFactory.$inject = [\r\n '$uibModal',\r\n '$q'\r\n ];\r\n\r\n //TODO: Rename this to risk analysis service and make it a service\r\n function riskAnalysisUtilsFactory(\r\n $uibModal,\r\n $q\r\n ) {\r\n\r\n function isRiskRowInvalid(riskRow) {\r\n if (!riskRow)\r\n return true;\r\n\r\n if (!riskRow.Case)\r\n return true;\r\n\r\n if (!riskRow.Measures)\r\n return true;\r\n\r\n if (!riskRow.Status)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n function openRiskHeadModal(scope) {\r\n\r\n if (!scope) {\r\n return $q.when();\r\n }\r\n\r\n return $uibModal.open({\r\n template: '\\\r\n ',\r\n scope: scope,\r\n size: 'lg',\r\n keyboard: false,\r\n backdrop: 'static'\r\n }).result;\r\n }\r\n\r\n return {\r\n isRiskRowInvalid: isRiskRowInvalid,\r\n openRiskHeadModal: openRiskHeadModal\r\n };\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .factory('RiskAnalysisUtilsFactory', riskAnalysisUtilsFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n RiskAnalysisFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function RiskAnalysisFactory (\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var RiskHeadsForOrder = $resource(baseUrlService.getBaseUrl() + 'REST/RiskAnalysis.svc/orders/:orderId/risk-heads');\r\n var RiskHeadsForProject = $resource(baseUrlService.getBaseUrl() + 'REST/RiskAnalysis.svc/Projects/:projectId/RiskHeads');\r\n\r\n function getRiskHeadsForOrder(orderId) {\r\n\r\n return RiskHeadsForOrder.query({\r\n orderId : orderId\r\n }).$promise;\r\n }\r\n\r\n function getRiskHeadsForProject(projectId) {\r\n\r\n return RiskHeadsForProject.query({\r\n projectId: projectId\r\n }).$promise;\r\n }\r\n\r\n return {\r\n getRiskHeadsForOrder: getRiskHeadsForOrder,\r\n getRiskHeadsForProject: getRiskHeadsForProject\r\n };\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .factory('RiskAnalysisFactory', RiskAnalysisFactory);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('menu')\r\n .component('vbNavbarNotifications',\r\n {\r\n templateUrl: 'Scripts/menu/navbar-notifications/navbar-notifications.component.html',\r\n controller: 'NavbarNotificationsController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n navbarNotificationsController.$inject = [\r\n 'NotificationFactory',\r\n 'StatusService',\r\n 'TypeService',\r\n '$scope',\r\n '$interval',\r\n 'sessionInformationService',\r\n 'ModalService',\r\n '$translate',\r\n 'TableResources',\r\n 'TabUtilService',\r\n 'userDetailsTabset',\r\n 'coursesAndCompetencesTabset',\r\n '$location',\r\n 'CompetenceService',\r\n 'ProcessListFactory',\r\n 'processListTypes',\r\n 'dialogService',\r\n 'ExecutionFactory',\r\n 'ProjectFactory',\r\n 'projectDetailsTabSet',\r\n 'ExecutionService',\r\n 'QualityHandbookFactory',\r\n 'QualityHandbookTypes'\r\n ];\r\n\r\n function navbarNotificationsController(\r\n NotificationFactory,\r\n StatusService,\r\n TypeService,\r\n $scope,\r\n $interval,\r\n sessionInformationService,\r\n ModalService,\r\n $translate,\r\n TableResources,\r\n TabUtilService,\r\n userDetailsTabset,\r\n coursesAndCompetencesTabset,\r\n $location,\r\n CompetenceService,\r\n ProcessListFactory,\r\n processListTypes,\r\n dialogService,\r\n ExecutionFactory,\r\n ProjectFactory,\r\n projectDetailsTabSet,\r\n ExecutionService,\r\n QualityHandbookFactory,\r\n QualityHandbookTypes\r\n ) {\r\n\r\n var vm = this;\r\n\r\n var closeNotificationMenuEventDeregistrationFunction = null;\r\n var _isNotificationListOpened = false;\r\n var _notifications = [];\r\n var _notificationsSearchResult = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n isNotificationListOpened: {\r\n get: function() {\r\n return _isNotificationListOpened;\r\n }\r\n },\r\n notifications: {\r\n get: function() {\r\n return _notifications;\r\n }\r\n },\r\n notificationsSearchResult: {\r\n get: function() {\r\n return _notificationsSearchResult;\r\n },\r\n set: function(value) {\r\n _notificationsSearchResult = value;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.$onDestroy = onDestroy;\r\n vm.getNotificationTypeTranslation = getNotificationTypeTranslation;\r\n vm.onNotificationIconClick = onNotificationIconClick;\r\n vm.computeNrOfNewNotifications = computeNrOfNewNotifications;\r\n vm.onNotificationClick = onNotificationClick;\r\n vm.canNewBadgeBeDisplayedForNotification = canNewBadgeBeDisplayedForNotification;\r\n vm.canNrOfNewNotificationsBadgeBeDisplayed = canNrOfNewNotificationsBadgeBeDisplayed;\r\n vm.canMarkNotificationsAsSeenIconBeDisplayed = canMarkNotificationsAsSeenIconBeDisplayed;\r\n vm.markAllNotificationsAsSeen = markAllNotificationsAsSeen;\r\n vm.getTranslationForTable = getTranslationForTable;\r\n vm.onOpenEntityClick = onOpenEntityClick;\r\n\r\n function onInit() {\r\n getMyNotifications();\r\n\r\n $interval(function () {\r\n getMyNotifications();\r\n }, 30000);\r\n }\r\n\r\n function getMyNotifications() {\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n // make the request only if the user is logged in\r\n if (loggedUser && loggedUser.id) {\r\n NotificationFactory.getMyNotifications()\r\n .then(function (notifications) {\r\n _notifications = notifications;\r\n });\r\n }\r\n }\r\n\r\n function onNotificationIconClick() {\r\n _isNotificationListOpened = !_isNotificationListOpened;\r\n }\r\n\r\n function getNotificationTypeTranslation(notification) {\r\n return TypeService.getTypeTranslation(notification.Type);\r\n }\r\n\r\n function computeNrOfNewNotifications() {\r\n\r\n var nrOfNewNotifications = _notificationsSearchResult.filter(function(notification) {\r\n return !notification.Seen;\r\n }).length;\r\n\r\n return nrOfNewNotifications;\r\n }\r\n\r\n function getNotificationById(notificationId) {\r\n return NotificationFactory.getNotificationById(notificationId);\r\n }\r\n\r\n function onNotificationClick(notification) {\r\n\r\n // get notification from server with its content\r\n getNotificationById(notification.id)\r\n .then(function(retrievedNotification) {\r\n \r\n notification.TextMessage = retrievedNotification.TextMessage;\r\n\r\n openNotificationModal(notification);\r\n\r\n if (!notification.Seen) {\r\n NotificationFactory.markNotificationAsSeen(notification.id)\r\n .then(function () {\r\n getMyNotifications();\r\n });\r\n }\r\n });\r\n }\r\n\r\n function canNewBadgeBeDisplayedForNotification(notification) {\r\n\r\n // if the notification hasn't been seen, it means it's new\r\n return !notification.Seen;\r\n }\r\n\r\n function canNrOfNewNotificationsBadgeBeDisplayed() {\r\n return existsNewNotifications();\r\n }\r\n\r\n function existsNewNotifications() {\r\n var nrOfNewNotifications = computeNrOfNewNotifications();\r\n\r\n if (nrOfNewNotifications > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function openNotificationModal(notification) {\r\n\r\n // prepare input for the modal component\r\n $scope.notification = notification;\r\n\r\n var htmlComponent = '\\\r\n ';\r\n\r\n ModalService.openModal($scope, htmlComponent, 'lg');\r\n }\r\n\r\n function canMarkNotificationsAsSeenIconBeDisplayed() {\r\n return existsNewNotifications();\r\n }\r\n\r\n function markAllNotificationsAsSeen() {\r\n\r\n if (!_notifications) {\r\n return;\r\n }\r\n\r\n var newNotifications = _notifications.filter(function(notification) {\r\n return !notification.Seen;\r\n });\r\n\r\n NotificationFactory.markNotificationsAsSeen(newNotifications)\r\n .then(function() {\r\n getMyNotifications();\r\n });\r\n }\r\n\r\n function getTranslationForTable(table) {\r\n\r\n if (!table) {\r\n return '';\r\n }\r\n\r\n var translation = $translate.instant('NAVBAR_NOTIFICATIONS.' + table);\r\n\r\n if (translation === ('NAVBAR_NOTIFICATIONS.' + table)) {\r\n return '';\r\n }\r\n\r\n return translation.toLowerCase();\r\n }\r\n\r\n function openCompetence(competenceId) {\r\n\r\n if (!competenceId) {\r\n return;\r\n }\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n TabUtilService.setCurrentTab(TabUtilService.pages.USER_DETAIL, userDetailsTabset.coursesAndCompetences);\r\n TabUtilService.setCurrentTab(TabUtilService.pages.COURSES_AND_COMPETENCES_TAB, coursesAndCompetencesTabset.competences);\r\n\r\n CompetenceService.idOfCompetenceToOpenFromNotification = competenceId;\r\n\r\n $location.path('/user/' + loggedUser.id);\r\n }\r\n\r\n function openDeviation(deviationId) {\r\n\r\n if (!deviationId) {\r\n return;\r\n }\r\n\r\n $location.path('/deviation/' + deviationId);\r\n }\r\n\r\n function openOrganization(organizationId) {\r\n\r\n if (!organizationId) {\r\n return;\r\n }\r\n\r\n $location.path('/organization/' + organizationId);\r\n }\r\n\r\n function openUser(userId) {\r\n\r\n if (!userId) {\r\n return;\r\n }\r\n\r\n $location.path('/user/' + userId);\r\n }\r\n\r\n function openCourse(courseId) {\r\n\r\n if (!courseId) {\r\n return;\r\n }\r\n\r\n $location.path('/course/' + courseId);\r\n }\r\n\r\n function openOrder(orderId) {\r\n\r\n if (!orderId) {\r\n return;\r\n }\r\n\r\n $location.path('/order/' + orderId);\r\n }\r\n\r\n function getProcessListType(processListId) {\r\n return ProcessListFactory.getSelectedProcessListType(processListId);\r\n }\r\n\r\n function showAlertDialogAboutManagementProcessListOpen() {\r\n\r\n dialogService.showAlertDialog(\r\n 'NOTIFICATION.MESSAGES.MANAGEMENT_PROCESS_LIST_MODAL_TITLE',\r\n 'NOTIFICATION.MESSAGES.MANAGEMENT_PROCESS_LIST_MODAL_MESSAGE',\r\n 'md'\r\n );\r\n }\r\n\r\n function checkIfProcessListCanBeEdited(processListId) {\r\n return ProcessListFactory.checkIfProcessListCanBeEdited(processListId);\r\n }\r\n\r\n function openProcessList(processListId) {\r\n\r\n if (!processListId) {\r\n return;\r\n }\r\n\r\n getProcessListType(processListId)\r\n .then(function(type) {\r\n\r\n if (!type) {\r\n return null;\r\n }\r\n\r\n if (type.ProgId === processListTypes.management\r\n && !sessionInformationService.isLoggedUserFromCentral()) {\r\n showAlertDialogAboutManagementProcessListOpen();\r\n return null;\r\n } else {\r\n return checkIfProcessListCanBeEdited(processListId);\r\n }\r\n }).then(function (result) {\r\n\r\n if (!result) {\r\n return;\r\n }\r\n\r\n if (result.CanBeEdited) {\r\n $location.path('/processListElement/' + processListId);\r\n } else {\r\n $location.path('/processListElementReadOnly/' + processListId);\r\n }\r\n });\r\n }\r\n\r\n function getRootInitiatedProcessListByWorkingValueId(workingValueId) {\r\n return ExecutionFactory.getRootInitiatedProcessListByWorkingValueId(workingValueId);\r\n }\r\n\r\n function getManagementExecution(rootInitiatedId) {\r\n return ExecutionFactory.getManagementExecution(rootInitiatedId)\r\n .then(function(execution) {\r\n\r\n if (!execution || !execution.ForeignKey || !execution.Table)\r\n return;\r\n\r\n switch (execution.Table) {\r\n case TableResources.UserTable:\r\n case TableResources.OrganizationTable:\r\n $location.path('/managementExecution/' + execution.ForeignKey + '/' + rootInitiatedId);\r\n break;\r\n case TableResources.ProjectTable:\r\n ExecutionService.setIdOfExecutionToOpenFromProjectPage(rootInitiatedId);\r\n $location.path('/project/' + execution.ForeignKey);\r\n listenForTabConfigClearSuccess();\r\n break;\r\n case TableResources.QualityHandbookTable:\r\n openQualityHandbook(execution.ForeignKey, rootInitiatedId);\r\n break;\r\n }\r\n });\r\n }\r\n\r\n function getQualityHandbookById(qualityHandbookId) {\r\n return QualityHandbookFactory.getQualityHandbookById(qualityHandbookId);\r\n }\r\n\r\n function openQualityHandbook(qualityHandbookId, rootInitiatedId) {\r\n getQualityHandbookById(qualityHandbookId)\r\n .then(function(qualityHandbook) {\r\n\r\n if (!qualityHandbook || !qualityHandbook.Type)\r\n return;\r\n\r\n if (qualityHandbook.Type.ProgId !== QualityHandbookTypes.qualityHandbook)\r\n return;\r\n\r\n ExecutionService.setIdOfExecutionToOpenFromQualityHandbookPage(rootInitiatedId);\r\n\r\n if (qualityHandbook.Archived)\r\n $location.path('/qualityHandbookArchive/' + qualityHandbook.id);\r\n else\r\n $location.path('/qualityHandbook');\r\n });\r\n }\r\n\r\n function openExecutionUsingWorkingValue(workingValueId) {\r\n\r\n if (!workingValueId) {\r\n return;\r\n }\r\n\r\n getRootInitiatedProcessListByWorkingValueId(workingValueId)\r\n .then(function(rootInitiatedProcessList) {\r\n\r\n if (!rootInitiatedProcessList || !rootInitiatedProcessList.ProcessListType) {\r\n return;\r\n }\r\n\r\n if (rootInitiatedProcessList.ProcessListType.ProgId !== processListTypes.management) {\r\n return;\r\n }\r\n\r\n getManagementExecution(rootInitiatedProcessList.InitiatedId);\r\n });\r\n }\r\n\r\n function getRootInitiatedProcessListStartingFrom(initiatedProcessListId) {\r\n return ExecutionFactory.getRootInitiatedProcessListStartingFrom(initiatedProcessListId);\r\n }\r\n\r\n function openExecution(initiatedProcessListId) {\r\n\r\n if (!initiatedProcessListId)\r\n return;\r\n\r\n getRootInitiatedProcessListStartingFrom(initiatedProcessListId)\r\n .then(function (rootInitiatedProcessList) {\r\n\r\n if (!rootInitiatedProcessList || !rootInitiatedProcessList.ProcessListType)\r\n return;\r\n\r\n if (rootInitiatedProcessList.ProcessListType.ProgId !== processListTypes.management)\r\n return;\r\n\r\n getManagementExecution(rootInitiatedProcessList.InitiatedId);\r\n });\r\n }\r\n\r\n function onOpenEntityClick(notification) {\r\n\r\n if (!notification.Table) {\r\n return;\r\n }\r\n\r\n switch (notification.Table) {\r\n case TableResources.CompetenceTable:\r\n openCompetence(notification.ForeignKey);\r\n break;\r\n case TableResources.DeviationTable:\r\n openDeviation(notification.ForeignKey);\r\n break;\r\n case TableResources.OrganizationTable:\r\n openOrganization(notification.ForeignKey);\r\n break;\r\n case TableResources.UserTable:\r\n openUser(notification.ForeignKey);\r\n break;\r\n case TableResources.CourseTable:\r\n openCourse(notification.ForeignKey);\r\n break;\r\n case TableResources.OrderTable:\r\n openOrder(notification.ForeignKey);\r\n break;\r\n case TableResources.QualityHandbookTable:\r\n $location.path('/qualityHandbookView');\r\n break;\r\n case TableResources.ProcessListTable:\r\n openProcessList(notification.ForeignKey);\r\n break;\r\n case TableResources.WorkingValueTable:\r\n openExecutionUsingWorkingValue(notification.ForeignKey);\r\n break;\r\n case TableResources.InitiatedProcessListTable:\r\n openExecution(notification.ForeignKey);\r\n break;\r\n }\r\n\r\n _isNotificationListOpened = false;\r\n }\r\n\r\n function listenForTabConfigClearSuccess() {\r\n\r\n var onTabConfigClearSuccessUnsubscribeFunction = $scope.$on('onTabConfigClearSuccess',\r\n function() {\r\n\r\n // set selected tab for project details page\r\n ProjectFactory.setCurrentTab(projectDetailsTabSet.projectManagementTab);\r\n\r\n // call the function to unsubscribe from onTabConfigClearSuccess event\r\n onTabConfigClearSuccessUnsubscribeFunction();\r\n });\r\n }\r\n\r\n closeNotificationMenuEventDeregistrationFunction = $scope.$on('closeNotificationMenuEvent', function() {\r\n $scope.$apply(function() {\r\n _isNotificationListOpened = false;\r\n });\r\n });\r\n\r\n var onAfterShadowLoginSubscription = $scope.$on('onAfterShadowLogin', function() {\r\n getMyNotifications();\r\n });\r\n\r\n function onDestroy() {\r\n\r\n if (closeNotificationMenuEventDeregistrationFunction) {\r\n closeNotificationMenuEventDeregistrationFunction();\r\n }\r\n\r\n if (onAfterShadowLoginSubscription &&\r\n typeof onAfterShadowLoginSubscription === 'function') {\r\n // unsubscribe from the event\r\n onAfterShadowLoginSubscription();\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('menu')\r\n .controller('NavbarNotificationsController', navbarNotificationsController);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n demoContentFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function demoContentFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var DemoContent = $resource(baseUrl + 'REST/MenuItemDemoContent.svc/DemoContent');\r\n\r\n function getDemoContentByMenuItemId(menuItemId) {\r\n\r\n return DemoContent.get({ menuItemId: menuItemId }).$promise;\r\n }\r\n\r\n return {\r\n getDemoContentByMenuItemId: getDemoContentByMenuItemId\r\n };\r\n }\r\n\r\n angular\r\n .module('demoContent')\r\n .factory('DemoContentFactory', demoContentFactory);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('menuItem')\r\n .component('vbMenuItemHierarchy',\r\n {\r\n templateUrl: 'Scripts/menu-item/menu-item-hierarchy/menu-item-hierarchy.component.html',\r\n controller: 'MenuItemHierarchyController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n menuItems: '<',\r\n level: '<',\r\n onDemoContentSaveForMenuItem: '&?'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n menuItemHierarchyController.$inject = [\r\n '$scope',\r\n 'MenuItemHierarchyService',\r\n 'MenuItemFactory'\r\n ];\r\n\r\n function menuItemHierarchyController(\r\n $scope,\r\n MenuItemHierarchyService,\r\n MenuItemFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.$onInit = onInit;\r\n vm.openMenuItemDemoContentModal = openMenuItemDemoContentModal;\r\n vm.onDemoContentSavedForMenuItem = onDemoContentSavedForMenuItem;\r\n\r\n function onInit() {\r\n\r\n if (!vm.menuItems) {\r\n vm.menuItems = [];\r\n }\r\n }\r\n\r\n function openMenuItemDemoContentModal(menuItem) {\r\n\r\n // attach on scope the needed data\r\n $scope.menuItemDemoContent = angular.copy(menuItem.DemoContent);\r\n\r\n MenuItemHierarchyService.openMenuItemDemoContentModal($scope)\r\n .then(function (editedContent) {\r\n\r\n return MenuItemFactory.saveDemoContentForMenuItem(editedContent, menuItem.id);\r\n })\r\n .then(function () {\r\n\r\n // notify the parent component that a demo content was saved for a menu item\r\n if (vm.onDemoContentSaveForMenuItem && typeof vm.onDemoContentSaveForMenuItem === 'function') {\r\n vm.onDemoContentSaveForMenuItem();\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Listener for an onDemoContentSaveForMenuItem event on a menu item hierarchy component\r\n *\r\n * This function is called only when the component is a parent to a vbMenuItemHierarchy component\r\n */\r\n function onDemoContentSavedForMenuItem() {\r\n\r\n // notify the parent component that a demo content was saved for a menu item\r\n if (vm.onDemoContentSaveForMenuItem && typeof vm.onDemoContentSaveForMenuItem === 'function') {\r\n vm.onDemoContentSaveForMenuItem();\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('menuItem')\r\n .controller('MenuItemHierarchyController', menuItemHierarchyController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n menuItemHierarchyService.$inject = [\r\n '$uibModal'\r\n ];\r\n\r\n function menuItemHierarchyService(\r\n $uibModal\r\n ) {\r\n\r\n function openMenuItemDemoContentModal(scope) {\r\n\r\n return $uibModal.open({\r\n template: '\\\r\n ',\r\n scope: scope,\r\n size: 'md'\r\n }).result;\r\n }\r\n\r\n return {\r\n openMenuItemDemoContentModal: openMenuItemDemoContentModal\r\n };\r\n }\r\n\r\n angular\r\n .module('menuItem')\r\n .service('MenuItemHierarchyService', menuItemHierarchyService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('message')\r\n .component('vbImpersonateNotification', {\r\n templateUrl: 'Scripts/message/impersonate-notification/impersonate-notification.component.html',\r\n controller: 'ImpersonateNotificationController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n abortImpersonation: '&'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ImpersonateNotificationController.$inject = [\r\n '_',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular\r\n .module('message')\r\n .controller('ImpersonateNotificationController', ImpersonateNotificationController);\r\n\r\n /**\r\n * Simple controller that shows a warning that you are impersonating someone\r\n */\r\n function ImpersonateNotificationController(\r\n _,\r\n sessionInformationService\r\n ) {\r\n var vm = this;\r\n\r\n vm.loggedUserName = '';\r\n\r\n vm.$onInit = onInit;\r\n vm.abort = abort;\r\n\r\n function onInit() {\r\n vm.loggedUserName = sessionInformationService.getImpersonatingUser().FullName;\r\n };\r\n\r\n function abort() {\r\n vm.abortImpersonation()();\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('notification')\r\n .component('vbNotificationDetails',\r\n {\r\n templateUrl: 'Scripts/notification/notification-details/notification-details.component.html',\r\n controller: 'NotificationDetailsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n notification: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n notificationDetailsController.$inject = [\r\n '$sce'\r\n ];\r\n\r\n function notificationDetailsController(\r\n $sce\r\n ) {\r\n var vm = this;\r\n\r\n vm.trustNotificationText = trustNotificationText;\r\n\r\n function trustNotificationText() {\r\n return $sce.trustAsHtml(vm.notification.TextMessage);\r\n }\r\n }\r\n\r\n angular\r\n .module('notification')\r\n .controller('NotificationDetailsController', notificationDetailsController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('notification')\r\n .component('vbNotificationList',\r\n {\r\n templateUrl: 'Scripts/notification/notification-list/notification-list.component.html',\r\n controller: 'NotificationListController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n notifications: '<',\r\n onNotificationClick: '&?'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n notificationListController.$inject = [\r\n '$sce',\r\n 'StatusService'\r\n ];\r\n\r\n function notificationListController(\r\n $sce,\r\n StatusService\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.trustNotificationText = trustNotificationText;\r\n vm.selectNotification = selectNotification;\r\n vm.getStatusTranslation = getStatusTranslation;\r\n\r\n function trustNotificationText(value) {\r\n return $sce.trustAsHtml(value);\r\n }\r\n\r\n function selectNotification(notification) {\r\n notifyParentComponentAboutNotificationClick(notification);\r\n }\r\n\r\n function notifyParentComponentAboutNotificationClick(notification) {\r\n\r\n if (vm.onNotificationClick && typeof vm.onNotificationClick === 'function') {\r\n vm.onNotificationClick({\r\n notification: notification\r\n });\r\n }\r\n }\r\n\r\n function getStatusTranslation(notification) {\r\n return StatusService.getStatusTranslation(notification.Status);\r\n }\r\n }\r\n\r\n angular\r\n .module('notification')\r\n .controller('NotificationListController', notificationListController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('notification')\r\n .component('vbNotificationModal',\r\n {\r\n templateUrl: 'Scripts/notification/notification-modal/notification-modal.component.html',\r\n controller: 'NotificationModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n notification: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n function notificationModalController() {\r\n var vm = this;\r\n }\r\n\r\n angular\r\n .module('notification')\r\n .controller('NotificationModalController', notificationModalController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrderAttachmentController.$inject = [\r\n '$scope',\r\n 'OrderFactory',\r\n 'fileReader',\r\n 'DownloadService'\r\n ];\r\n\r\n angular\r\n .module('order')\r\n .controller('OrderAttachmentController', OrderAttachmentController);\r\n\r\n function OrderAttachmentController(\r\n $scope,\r\n OrderFactory,\r\n fileReader,\r\n DownloadService\r\n ) {\r\n\r\n /**\r\n * Function that makes sure the user uploads files named properly\r\n * @param name\r\n * @returns\r\n */\r\n $scope.attachmentNamePattern = function (name) {\r\n if (name) {\r\n //allow characters, digits, norwegian characters, '-', '_', '.' and space \r\n var regexp = /^[\\w\\d\\u00C5\\u00E5\\u00C6\\u00E6\\u00D8\\u00F8\\-\\_\\.\\ ]{1,250}$/;\r\n if (regexp.test(name))\r\n return true;\r\n else {\r\n return false;\r\n }\r\n } else\r\n return true;\r\n };\r\n\r\n /**\r\n * Adds an attachment or url on the selected order\r\n * @param myFile\r\n * @param fileName\r\n * @param videoUrl\r\n * @param videoUrlName\r\n */\r\n $scope.addAttachment = function (myFile, fileName, videoUrl, videoUrlName) {\r\n\r\n var newAttachment = new OrderFactory.Attachment();\r\n if (myFile) {\r\n newAttachment.AttachmentName = fileName;\r\n newAttachment.ForeignKey = $scope.order.id;\r\n\r\n var response = fileReader.readAsDataUrl(myFile, $scope);\r\n response.then(function (result) {\r\n newAttachment.AttachmentBytes = result;\r\n var savedAttachmentFile = OrderFactory.saveAttachment(newAttachment);\r\n savedAttachmentFile.then(function (attachment) {\r\n attachment.IsExternalURL = false;\r\n $scope.order.Attachments.push(attachment);\r\n });\r\n });\r\n\r\n myFile.clear();\r\n\r\n } else if (videoUrl) {\r\n\r\n newAttachment.AttachmentName = videoUrlName;\r\n newAttachment.URL = videoUrl;\r\n newAttachment.ForeignKey = $scope.order.id;\r\n\r\n var savedAttachmentUrl = OrderFactory.saveAttachment(newAttachment);\r\n savedAttachmentUrl.then(function (attachment) {\r\n attachment.IsExternalURL = true;\r\n $scope.order.Attachments.push(attachment);\r\n });\r\n this.videoUrl = '';\r\n this.videoUrlName = '';\r\n }\r\n\r\n\r\n };\r\n\r\n /**\r\n * Resets the field to allow adding of attachments\r\n * @param myFile\r\n * @param videoUrl\r\n * @param videoUrlName\r\n */\r\n $scope.resetAttachment = function (myFile, videoUrl, videoUrlName) {\r\n if (myFile != null) \r\n myFile.clear();\r\n\r\n if (videoUrl != null) {\r\n this.videoUrl = '';\r\n }\r\n if (videoUrlName != null) {\r\n this.videoUrlName = '';\r\n }\r\n };\r\n\r\n /**\r\n * Removes a given attachment from the order\r\n * @param attachment\r\n */\r\n $scope.deleteAttachment = function (attachment) {\r\n\r\n if (!attachment || !attachment.id) {\r\n if ($scope.order.Attachments.indexOf(attachment) != -1) {\r\n $scope.order.Attachments.splice($scope.order.Attachments.indexOf(attachment), 1);\r\n }\r\n } else {\r\n var deleteAttachmentPromise = OrderFactory.deleteAttachment(attachment);\r\n deleteAttachmentPromise.then(function () {\r\n if ($scope.order.Attachments.indexOf(attachment) != -1) {\r\n $scope.order.Attachments.splice($scope.order.Attachments.indexOf(attachment), 1);\r\n }\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Downloads or opens the attachments in a new tab\r\n * @param attach\r\n */\r\n $scope.openAttachment = function (attach) {\r\n if (attach.IsExternalURL == false)\r\n DownloadService.download(attach.URL);\r\n else {\r\n var win = window.open(attach.URL, '_blank');\r\n }\r\n return;\r\n };\r\n\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrderCameraImagesController.$inject = [\r\n 'baseUrlService',\r\n '$filter',\r\n '$scope',\r\n '$uibModal',\r\n '$timeout',\r\n 'DownloadService',\r\n 'ExecutionFactory',\r\n 'infoService',\r\n 'OrderFactory',\r\n 'UiTreeHelper',\r\n '_',\r\n 'ReportBuilderService',\r\n 'ListService'\r\n ];\r\n\r\n angular.module('order')\r\n .controller('OrderCameraImagesController', OrderCameraImagesController)\r\n .directive('orderCameraImages', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'OrderCameraImagesController as cameraImage',\r\n templateUrl: 'Scripts/order/cameraImages/orderCameraImagesPartial.html',\r\n bindToController: true,\r\n scope: {\r\n orderCameraImage: '=',\r\n currentOrder: '='\r\n }\r\n }\r\n })\r\n .run(['$templateCache', function ($templateCache) {\r\n $templateCache.put('template/orderCameraImage.html',\r\n '
\\\r\n
\\\r\n \\\r\n
\\\r\n \\\r\n

{{cameraImage.selectedImage.User.FirstName + \\' \\' + cameraImage.selectedImage.User.LastName}}

\\\r\n
\\\r\n
\\\r\n \\\r\n

{{cameraImage.selectedImage.CameraImageOriginal.LastUpdatedDate | date:\\'EEE dd.MMMM.yyyy HH:mm\\'}}

\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
'\r\n );\r\n }]);\r\n\r\n function OrderCameraImagesController(\r\n baseUrlService,\r\n $filter,\r\n $scope,\r\n $uibModal,\r\n $timeout,\r\n DownloadService,\r\n ExecutionFactory,\r\n infoService,\r\n OrderFactory,\r\n UiTreeHelper,\r\n _,\r\n ReportBuilderService,\r\n ListService\r\n ) {\r\n var cameraImage = this;\r\n //subOrder images\r\n cameraImage.subOrder = null;\r\n cameraImage.orders = [];\r\n\r\n var currentExpandedOrderId;\r\n\r\n cameraImage.onAttachmentUploadedInIncludedSection = onAttachmentUploadedInIncludedSection;\r\n cameraImage.onAttachmentUploadedInNotIncludedSection = onAttachmentUploadedInNotIncludedSection;\r\n\r\n cameraImage.$onInit = function () {\r\n initDelegateFunctions();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n cameraImage.orderCameraImage.init = init;\r\n };\r\n\r\n /**\r\n * Set the base url to all image urls\r\n * @param {any} processList\r\n * @param {any} isHorizontal\r\n */\r\n function setBaseUrl(processList, isHorizontal) {\r\n\r\n if (isHorizontal) {\r\n\r\n if (!processList || !processList.ItemsImages || processList.ItemsImages.length === 0) {\r\n return;\r\n }\r\n\r\n angular.forEach(processList.ItemsImages, function (itemImages) {\r\n\r\n if (itemImages.CameraImages && itemImages.CameraImages.length > 0) {\r\n setUrlToImages(itemImages.CameraImages);\r\n itemImages.CameraImages = sortImages(itemImages.CameraImages);\r\n }\r\n\r\n });\r\n\r\n }\r\n else {\r\n\r\n if (!processList.Questions || processList.Questions.length == 0)\r\n return;\r\n\r\n angular.forEach(processList.Questions, function (question) {\r\n if (question.CameraImages && question.CameraImages.length > 0)\r\n setUrlToImages(question.CameraImages);\r\n\r\n if (question.Answers && question.Answers.length > 0)\r\n angular.forEach(question.Answers, function (answer) {\r\n if (answer.CameraImages && answer.CameraImages.length > 0) {\r\n setUrlToImages(answer.CameraImages);\r\n answer.CameraImages = sortImages(answer.CameraImages);\r\n }\r\n\r\n // set base url for another processlists\r\n\r\n if (answer.AnotherProcessList) {\r\n setBaseUrl(answer.AnotherProcessList, false);\r\n }\r\n\r\n if (answer.AnotherHorizontalProcessList) {\r\n setBaseUrl(answer.AnotherHorizontalProcessList, true);\r\n }\r\n\r\n });\r\n });\r\n\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Set the url to images\r\n * Url is base url + image url\r\n * @param {any} images\r\n */\r\n function setUrlToImages(images) {\r\n\r\n if (!images || images.length === 0)\r\n return;\r\n\r\n angular.forEach(images, function (image) {\r\n image.CameraImageOriginal.URL = baseUrlService.getBaseUrl() + image.CameraImageOriginal.URL;\r\n });\r\n\r\n }\r\n\r\n function sortImages(images) {\r\n if (!images || images.length === 0)\r\n return [];\r\n\r\n return _.orderBy(images, function (i) { return [parseInt(i.SortNumber), i.CameraImageOriginal.LastUpdatedDate]; }, ['asc', 'asc']);\r\n }\r\n\r\n /**\r\n * Associate the object list (which is a list of images) with the given table\r\n * @param {any} entityType\r\n * @param {any} objectList\r\n */\r\n function addEntityType(entityType, objectList) {\r\n\r\n if (!entityType || !objectList || objectList.length === 0)\r\n return;\r\n\r\n for (var index = 0; index < objectList.length; index++) {\r\n\r\n var currentObject = objectList[index];\r\n\r\n currentObject.associatedEntityType = entityType;\r\n\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Slit the images into images that are included in report and images that aren't included\r\n * @param {any} entity\r\n */\r\n function splitImages(entity) {\r\n\r\n if (!entity || entity.CameraImages.length === 0)\r\n return;\r\n\r\n entity.IncludedCameraImages = $filter('filter')(entity.CameraImages, function (image) { return image.IncludeInReport });\r\n entity.IncludedCameraImages = _.orderBy(entity.IncludedCameraImages, function (i) { return parseInt(i.SortNumber); }, ['asc']);\r\n\r\n //bug fix for ui tree => ui tree doesn't allow list with filter in html\r\n\r\n entity.CameraImages = $filter('filter')(entity.CameraImages, function (image) { return !image.IncludeInReport });\r\n entity.CameraImages = _.orderBy(entity.CameraImages, function (i) { return parseInt(i.CameraImageOriginal.LastUpdatedDate); }, ['asc']);\r\n }\r\n\r\n /**\r\n * Check whether the process list has images\r\n * If yes, process them\r\n * @param {any} processList\r\n * @param {any} isHorizontal\r\n */\r\n function checkForCameraImages(processList, isHorizontal) {\r\n\r\n processList.show = false;\r\n\r\n if (isHorizontal && processList.ItemsImages && processList.ItemsImages.length > 0) {\r\n\r\n processList.show = true;\r\n\r\n angular.forEach(processList.ItemsImages, function (itemImages) {\r\n\r\n itemImages.show = true;\r\n\r\n if (itemImages.CameraImages && itemImages.CameraImages.length > 0) {\r\n\r\n if (cameraImage.mainOrder.length === 0 || currentExpandedOrderId !== cameraImage.mainOrder[0].id)\r\n addEntityType(\"BOT_HORIZONTAL_PROCESSLIST_FIELD\", itemImages.CameraImages);\r\n\r\n splitImages(itemImages);\r\n\r\n } else {\r\n itemImages.IncludedCameraImages = [];\r\n }\r\n\r\n });\r\n\r\n } else {\r\n\r\n angular.forEach(processList.Questions, function (question) {\r\n\r\n question.show = true;\r\n\r\n if (question.CameraImages && question.CameraImages.length > 0) {\r\n\r\n processList.show = true;\r\n\r\n question.show = true;\r\n\r\n // add entity type for each image for ui-tree\r\n if (cameraImage.mainOrder.length === 0 || currentExpandedOrderId !== cameraImage.mainOrder[0].id)\r\n addEntityType(\"BOT_QUESTION\", question.CameraImages);\r\n\r\n // split images into included in report and excluded from report\r\n splitImages(question);\r\n\r\n }\r\n else {\r\n question.IncludedCameraImages = [];\r\n }\r\n\r\n if (question.Answers && question.Answers.length > 0)\r\n\r\n angular.forEach(question.Answers, function (answer) {\r\n\r\n answer.show = false;\r\n\r\n if (answer.CameraImages && answer.CameraImages.length > 0) {\r\n\r\n processList.show = true;\r\n\r\n question.show = true;\r\n\r\n answer.show = true;\r\n\r\n if (cameraImage.mainOrder.length === 0 || currentExpandedOrderId !== cameraImage.mainOrder[0].id)\r\n addEntityType(\"BOT_ANSWER\", answer.CameraImages);\r\n\r\n splitImages(answer);\r\n\r\n //generate random key to avoid drag and drop on other answers\r\n answer.key = Math.random();\r\n }\r\n\r\n // check for vertical/management another\r\n\r\n if (answer.AnotherProcessList) {\r\n answer.AnotherProcessList.collapseState = true;\r\n\r\n checkForCameraImages(answer.AnotherProcessList, false);\r\n\r\n if (answer.AnotherProcessList.show) {\r\n processList.show = true;\r\n question.show = true;\r\n answer.show = true;\r\n }\r\n }\r\n\r\n // check for horizontal another\r\n\r\n if (answer.AnotherHorizontalProcessList) {\r\n answer.AnotherHorizontalProcessList.collapseState = true;\r\n\r\n checkForCameraImages(answer.AnotherHorizontalProcessList, true);\r\n\r\n if (answer.AnotherHorizontalProcessList.show) {\r\n processList.show = true;\r\n answer.show = true;\r\n }\r\n\r\n }\r\n\r\n });\r\n });\r\n\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Include the given images in report and save them on backend\r\n * @param {any} excludedImages\r\n * @param {any} includedImages\r\n */\r\n function includeImagesInReport(excludedImages, includedImages) {\r\n if (!excludedImages || excludedImages.length == 0)\r\n return;\r\n\r\n angular.forEach(excludedImages, function (image) {\r\n\r\n // skip the current image if it's a fake image\r\n if (image.id === -1) {\r\n return;\r\n }\r\n\r\n image.IncludeInReport = true;\r\n\r\n //put the image back if not exists\r\n\r\n var existingImage = $filter('filter')(includedImages, function (i) { return i.id == image.id })[0];\r\n\r\n if (!existingImage)\r\n includedImages.push(image);\r\n else//set the include in report false\r\n existingImage.IncludeInReport = true;\r\n\r\n });\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n saveImages(includedImages);\r\n }\r\n\r\n /**\r\n * Exclude the given images from report\r\n * @param {any} includedImages\r\n * @param {any} excludedImages\r\n */\r\n function exludeImagesFromReport(includedImages, excludedImages) {\r\n\r\n if (!includedImages || includedImages.length == 0)\r\n return;\r\n\r\n angular.forEach(includedImages, function (image) {\r\n\r\n // skip the current image if it's a fake image\r\n if (image.id === -1) {\r\n return;\r\n }\r\n\r\n image.IncludeInReport = false;\r\n //put the image back if not exists\r\n var existingImage = $filter('filter')(excludedImages, function (i) { return i.id == image.id })[0];\r\n if (!existingImage)\r\n excludedImages.push(image);\r\n else//set the include in report false\r\n existingImage.IncludeInReport = false;\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Get the main order\r\n * @param {any} orders\r\n */\r\n function extractMainOrder(orders) {\r\n\r\n if (!orders || orders.length === 0)\r\n return [];\r\n\r\n return $filter(\"filter\")(cameraImage.orders, function (order) {\r\n return !order.ParentId;\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Get suborders\r\n * @param {any} orders\r\n */\r\n function extractSubOrders(orders) {\r\n\r\n if (!orders || orders.length === 0)\r\n return [];\r\n\r\n return $filter(\"filter\")(orders, function (order) {\r\n\r\n return order.ParentId;\r\n\r\n });\r\n\r\n }\r\n\r\n function collapseOtherOrders(currentExpandedOrderId, subOrders, mainOrder) {\r\n\r\n if (!currentExpandedOrderId || !subOrders || subOrders.length === 0 || !mainOrder)\r\n return;\r\n\r\n for (var index = 0; index < subOrders.length; index++) {\r\n\r\n var currentSubOrder = subOrders[index];\r\n\r\n if (currentSubOrder.id !== currentExpandedOrderId) {\r\n currentSubOrder.collapse = true;\r\n currentSubOrder.ProcessList.show = false;\r\n }\r\n\r\n }\r\n\r\n if (mainOrder.length > 0 && mainOrder[0].id !== currentExpandedOrderId) {\r\n mainOrder[0].collapse = true;\r\n mainOrder[0].ProcessList.show = false;\r\n }\r\n\r\n }\r\n\r\n function init() {\r\n //if collapsed property is undefined => first time the user clicks the tab. init the collapsed to false\r\n if ($filter('filter')(cameraImage.orderCameraImage.orders, function (order) { return order.collapse == undefined }).length > 0) {\r\n //make the list simplier and collapse them\r\n cameraImage.orders = cameraImage.orderCameraImage.orders.map(function (order) {\r\n return {\r\n id: order.id,\r\n ProcessList: {\r\n Name: order.ProcessList.Name\r\n },\r\n imageAlign: 'left',\r\n ParentId: order.ParentId,\r\n collapse: true,\r\n Building: order.Building,\r\n InitiatedProcessListId: order.InitiatedProcessListId,\r\n IncludeInReport: order.IncludeInReport,\r\n ReportBuilderSortNumber: order.ReportBuilderSortNumber,\r\n Organization: order.Organization,\r\n OrderNumber: order.OrderNumber\r\n }\r\n });\r\n\r\n cameraImage.mainOrder = extractMainOrder(cameraImage.orders);\r\n\r\n cameraImage.orders = $filter(\"orderBy\")(extractSubOrders(cameraImage.orders), \"ReportBuilderSortNumber\");\r\n\r\n // fix for ui-tree\r\n addEntityType(\"BOT_ORDER\", cameraImage.orders);\r\n }\r\n };\r\n\r\n cameraImage.getOrderDetails = function (order) {\r\n return order.id + (order.OrderNumber ? ' (' + order.OrderNumber + ')' : '') + ' - ' + order.ProcessList.Name;\r\n };\r\n\r\n function generateFakeImagesForQuestions(questions) {\r\n\r\n questions.forEach(function (question) {\r\n\r\n ReportBuilderService.generateFakeImages(question.IncludedCameraImages, question.CameraImages);\r\n\r\n if (question.Answers) {\r\n // generate fake images for answers\r\n question.Answers.forEach(function (answer) {\r\n ReportBuilderService.generateFakeImages(answer.IncludedCameraImages, answer.CameraImages);\r\n });\r\n }\r\n });\r\n }\r\n\r\n function generateFakeImagesForHorizontalItemFields(horizontalItems) {\r\n\r\n horizontalItems.forEach(function (item) {\r\n\r\n ReportBuilderService.generateFakeImages(item.IncludedCameraImages, item.CameraImages);\r\n });\r\n }\r\n\r\n function generateFakeImagesForOrder(order) {\r\n\r\n if (!order) {\r\n return;\r\n }\r\n\r\n if (order.ProcessListImage && order.ProcessListImage.Questions) {\r\n generateFakeImagesForQuestions(order.ProcessListImage.Questions);\r\n }\r\n\r\n if (order.HorizontalProcessListImage && order.HorizontalProcessListImage.ItemsImages) {\r\n generateFakeImagesForHorizontalItemFields(order.HorizontalProcessListImage.ItemsImages);\r\n }\r\n }\r\n\r\n /**\r\n * Collapses/Expands the given order\r\n * If the order is expanded => get the images\r\n * @param {} order \r\n * @returns {} \r\n */\r\n cameraImage.collapseOrder = function (order) {\r\n if (order.collapse && !order.ProcessList.show) { //if the order is collapsed => get the images\r\n cameraImage.orderCameraImage.getCameraImages(order.id)\r\n .then(function (orders) {\r\n\r\n var existingOrder = null;\r\n if (orders && orders.length > 0) {\r\n var orderReturned = orders[0];\r\n currentExpandedOrderId = orderReturned.OrderId;\r\n collapseOtherOrders(currentExpandedOrderId, cameraImage.orders, cameraImage.mainOrder);\r\n //set the baseurl and check if the order has any images\r\n\r\n // for vertical/management if exists\r\n if (orderReturned.ProcessListImage) {\r\n\r\n setBaseUrl(orderReturned.ProcessListImage, false);\r\n\r\n checkForCameraImages(orderReturned.ProcessListImage, false);\r\n\r\n generateFakeImagesForOrder(orderReturned);\r\n }\r\n\r\n // for horizontal if exists\r\n\r\n if (orderReturned.HorizontalProcessListImage) {\r\n\r\n setBaseUrl(orderReturned.HorizontalProcessListImage, true);\r\n\r\n checkForCameraImages(orderReturned.HorizontalProcessListImage, true);\r\n\r\n generateFakeImagesForOrder(orderReturned);\r\n }\r\n\r\n //set it in the existing list of orders\r\n existingOrder = $filter('filter')(cameraImage.orders, function (order) { return order.id === orderReturned.OrderId })[0];\r\n\r\n if (!existingOrder)\r\n existingOrder = $filter('filter')(cameraImage.mainOrder, function (order) { return order.id === orderReturned.OrderId })[0];\r\n\r\n // this case happens when the main order is deactivated\r\n if (!existingOrder)\r\n return;\r\n\r\n existingOrder.ProcessListImage = orderReturned.ProcessListImage;\r\n existingOrder.HorizontalProcessListImage = orderReturned.HorizontalProcessListImage;\r\n existingOrder.IncludeInReport = orderReturned.IncludeInReport;\r\n //wait for digest to finish\r\n $timeout(function () {\r\n existingOrder.collapse = false;\r\n\r\n existingOrder.loaded = true;\r\n });\r\n } else {\r\n existingOrder = $filter('filter')(cameraImage.orders, function (o) { return o.id == order.id })[0];\r\n existingOrder.ProcessListImage.show = false;\r\n existingOrder.HorizontalProcessListImage.show = false;\r\n existingOrder.collapse = false;\r\n }\r\n });\r\n }\r\n else\r\n order.collapse = !order.collapse;\r\n };\r\n\r\n /**\r\n * Open the given image\r\n * @param {} image \r\n * @returns {} \r\n */\r\n cameraImage.openImage = function (image) {\r\n cameraImage.selectedImage = image;\r\n\r\n $uibModal.open({\r\n scope: $scope,\r\n templateUrl: 'template/orderCameraImage.html',\r\n size: 'lg'\r\n }).result.finally(function () {\r\n cameraImage.selectedImage = null;\r\n });\r\n };\r\n\r\n cameraImage.downloadImage = function (image) {\r\n var url = image.CameraImageOriginal.URL;\r\n DownloadService.download(url);\r\n };\r\n\r\n function saveImages(images) {\r\n return ExecutionFactory.saveCameraImages(images)\r\n .then(function () {\r\n infoService.changeInfo($filter('translate')('txtImageSaved'));\r\n });\r\n };\r\n //options for normal camera images\r\n cameraImage.cameraImagesTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n // if a fake image is dragged, don't accept it\r\n var imageDragged = sourceNodeScope.$modelValue;\r\n if (ReportBuilderService.isFakeImage(imageDragged)) {\r\n return false;\r\n }\r\n\r\n var sourceQuestion = sourceNodeScope.$treeScope.$parent.$parent.$parent.question;\r\n var destQuestion = destNodesScope.$treeScope.$parent.$parent.$parent.question;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n var image = UiTreeHelper.extractDroppedImage(event);\r\n // since we are moving an image from excluded section to included section\r\n // we need to remove one fake image from included section and add one fake\r\n // image to excluded section\r\n var includedImagesList = event.dest.nodesScope.$modelValue;\r\n ReportBuilderService.removeOneFakeImageFromList(includedImagesList);\r\n\r\n var excludedImagesList = event.source.nodesScope.$modelValue;\r\n\r\n ListService.removeItemFromList(image, excludedImagesList);\r\n excludedImagesList.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(includedImagesList);\r\n\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.$parent.question;\r\n var includedImages = question.IncludedCameraImages;\r\n // image = includedImages[includedImages.indexOf(image)];\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n image.IncludeInReport = true;\r\n\r\n if (!image.Size)\r\n image.Size = \"25%\";\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n };\r\n //options for included camera images\r\n cameraImage.includedCameraImagesTreeOptions = {\r\n\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n // if a fake image is dragged, don't accept it\r\n var imageDragged = sourceNodeScope.$modelValue;\r\n if (ReportBuilderService.isFakeImage(imageDragged)) {\r\n return false;\r\n }\r\n\r\n var sourceQuestion = sourceNodeScope.$treeScope.$parent.$parent.$parent.question;\r\n\r\n var destQuestion = destNodesScope.$treeScope.$parent.$parent.$parent.question;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n\r\n var image = UiTreeHelper.extractDroppedImage(event);\r\n\r\n if (ReportBuilderService.isFakeImage(image)) {\r\n return;\r\n }\r\n\r\n if (event.source.nodesScope.$id != event.dest.nodesScope.$id) {\r\n\r\n // since we move an image from included images section to\r\n // excluded images section, we remove one fake image from\r\n // excluded images section and add it to included images section\r\n var excludedImagesList = event.dest.nodesScope.$modelValue;\r\n ReportBuilderService.removeOneFakeImageFromList(excludedImagesList);\r\n\r\n var includedImagesList = event.source.nodesScope.$modelValue;\r\n ListService.removeItemFromList(image, includedImagesList);\r\n includedImagesList.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(excludedImagesList);\r\n\r\n image.IncludeInReport = false;\r\n saveImages([image]);\r\n\r\n } else {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.$parent.question;\r\n var includedImages = question.IncludedCameraImages;\r\n\r\n if (image.SortNumber == includedImages.indexOf(image))\r\n return;\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n\r\n }\r\n };\r\n //options for camera images on answers\r\n cameraImage.answerCameraImageTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n var draggedImage = sourceNodeScope.$modelValue;\r\n\r\n if (ReportBuilderService.isFakeImage(draggedImage)) {\r\n return false;\r\n }\r\n\r\n var sourceAnswer = sourceNodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var destAnswer = destNodesScope.$treeScope.$parent.$parent.$parent.answer;\r\n\r\n //accept only those that came from the same question\r\n if (sourceAnswer.key == destAnswer.key)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n\r\n var image = UiTreeHelper.extractDroppedImage(event);\r\n // since we drag & drop an image from excluded section to included section\r\n // we need to remove a fake image from included section and add it to excluded\r\n // section\r\n var includedImagesList = event.dest.nodesScope.$modelValue;\r\n var excludedImagesList = event.source.nodesScope.$modelValue;\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(includedImagesList);\r\n ListService.removeItemFromList(image, excludedImagesList);\r\n excludedImagesList.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(includedImagesList);\r\n\r\n var answer = event.source.nodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var includedImages = answer.IncludedCameraImages;\r\n // image = includedImages[includedImages.indexOf(image)];\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n image.IncludeInReport = true;\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n };\r\n //options for included images on answers\r\n cameraImage.includedAnswerCameraImagesTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n var imageDragged = sourceNodeScope.$modelValue;\r\n\r\n if (ReportBuilderService.isFakeImage(imageDragged)) {\r\n return false;\r\n }\r\n\r\n var sourceAnswer = sourceNodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var destAnswer = destNodesScope.$treeScope.$parent.$parent.$parent.answer;\r\n\r\n //accept only those that came from the same question\r\n if (sourceAnswer.key == destAnswer.key)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n\r\n var image = UiTreeHelper.extractDroppedImage(event);\r\n\r\n if (event.source.nodesScope.$id != event.dest.nodesScope.$id) {\r\n\r\n // since we move an image from included section to excluded section\r\n // we remove a fake image from excluded section and add it to the\r\n // included section\r\n var excludedImagesList = event.dest.nodesScope.$modelValue;\r\n var includedImagesList = event.source.nodesScope.$modelValue;\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(excludedImagesList);\r\n ListService.removeItemFromList(image, includedImagesList);\r\n includedImagesList.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(excludedImagesList);\r\n\r\n image.IncludeInReport = false;\r\n saveImages([image]);\r\n } else {\r\n var answer = event.source.nodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var includedImages = answer.IncludedCameraImages;\r\n\r\n if (image.SortNumber == includedImages.indexOf(image))\r\n return;\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n }\r\n };\r\n //options for camera images on horizontal lists\r\n cameraImage.horizontalCameraImagesTreeOptions = {\r\n\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n var draggedImage = sourceNodeScope.$modelValue;\r\n\r\n // if the image that is dragging is fake, don't accept it\r\n if (ReportBuilderService.isFakeImage(draggedImage)) {\r\n return false;\r\n }\r\n\r\n var sourceHorizontalItemField = sourceNodeScope.$treeScope.$parent.$parent.itemImages;\r\n\r\n var destHorizontalItemField = destNodesScope.$treeScope.$parent.$parent.itemImages;\r\n\r\n //accept only those that came from the same question\r\n if (sourceHorizontalItemField.InitiatedId == destHorizontalItemField.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n\r\n var image = UiTreeHelper.extractDroppedImage(event);\r\n // since we drag&drop an image from not included section to included section\r\n // we must remove one fake image from included section and add one to not\r\n // included section\r\n\r\n var includedItemsList = event.dest.nodesScope.$modelValue;\r\n var excludedItemsList = event.source.nodesScope.$modelValue;\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(includedItemsList);\r\n ListService.removeItemFromList(image, excludedItemsList);\r\n excludedItemsList.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(includedItemsList);\r\n\r\n var horizontalItemField = event.source.nodeScope.$treeScope.$parent.$parent.itemImages;\r\n\r\n var includedImages = horizontalItemField.IncludedCameraImages;\r\n\r\n // image = includedImages[includedImages.indexOf(image)];\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n image.IncludeInReport = true;\r\n\r\n if (!image.Size)\r\n image.Size = \"25%\";\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n }\r\n //options for included images on horizontal lists\r\n cameraImage.includedHorizontalItemImages = {\r\n\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n var draggedImage = sourceNodeScope.$modelValue;\r\n\r\n // if a fake image is dragging, don't accept it\r\n if (ReportBuilderService.isFakeImage(draggedImage)) {\r\n return false;\r\n }\r\n\r\n var sourceHorizontalItemField = sourceNodeScope.$treeScope.$parent.$parent.itemImages;\r\n\r\n var destHorizontalItemField = destNodesScope.$treeScope.$parent.$parent.itemImages;\r\n\r\n //accept only those that came from the same question\r\n if (sourceHorizontalItemField.InitiatedId == destHorizontalItemField.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n\r\n var image = UiTreeHelper.extractDroppedImage(event);\r\n\r\n if (event.source.nodesScope.$id != event.dest.nodesScope.$id) {\r\n\r\n // since we drag&drop an image from included section to not included section\r\n // we must remove one fake image from not included section and add one fake\r\n // image to included section\r\n\r\n var excludedItemsList = event.dest.nodesScope.$modelValue;\r\n var includedItemsList = event.source.nodesScope.$modelValue;\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(excludedItemsList);\r\n ListService.removeItemFromList(image, includedItemsList);\r\n includedItemsList.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(excludedItemsList);\r\n\r\n image.IncludeInReport = false;\r\n saveImages([image]);\r\n\r\n } else {\r\n\r\n var horizontalItemField = event.source.nodeScope.$treeScope.$parent.$parent.itemImages;\r\n\r\n var includedImages = horizontalItemField.IncludedCameraImages;\r\n\r\n if (image.SortNumber == includedImages.indexOf(image))\r\n return;\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Function that is called when the image is dropped on the included images list\r\n * Image is sorted based on the index at which is dropped\r\n * @param {any} event\r\n * @param {any} droppedImage\r\n * @param {any} entity\r\n */\r\n function onIncludedCameraImagesNodeDropped(event, droppedImage, entity) {\r\n\r\n if (event.source.nodesScope.$id != event.dest.nodesScope.$id) {\r\n droppedImage.IncludeInReport = false;\r\n saveImages([droppedImage]);\r\n } else {\r\n\r\n var includedImages = entity.IncludedCameraImages;\r\n\r\n if (droppedImage.SortNumber == includedImages.indexOf(droppedImage))\r\n return;\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Function that is called when the image is dropped on the images list\r\n * Image is sorted based on where it's dropped\r\n * Image size is set to default 25%\r\n * @param {any} event\r\n * @param {any} droppedImage\r\n * @param {any} entity\r\n */\r\n function onCameraImagesNodeDropped(event, droppedImage, entity) {\r\n\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n\r\n var includedImages = entity.IncludedCameraImages;\r\n // image = includedImages[includedImages.indexOf(image)];\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n droppedImage.IncludeInReport = true;\r\n\r\n if (!droppedImage.Size)\r\n droppedImage.Size = \"25%\";\r\n\r\n var imagesToSave = angular.copy(includedImages);\r\n ReportBuilderService.removeFakeImagesFromList(imagesToSave);\r\n\r\n saveImages(imagesToSave);\r\n\r\n }\r\n //options for drag and drop for the big tree\r\n cameraImage.treeOptions = {\r\n\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n\r\n // order dragging \r\n if (UiTreeHelper.isDraggingOrder(sourceNodeScope)) {\r\n return true;\r\n } else {\r\n\r\n // dragging images\r\n\r\n // check if the dragging image is an question image (processlist item image)\r\n\r\n if (UiTreeHelper.isDraggingQuestionImage(sourceNodeScope, destNodesScope)) {\r\n console.log(\"question image dragged\");\r\n\r\n // if a fake image is dragging (image id < 0), don't accept it\r\n if (UiTreeHelper.isDefaultImageDragging(sourceNodeScope))\r\n return false;\r\n\r\n return true;\r\n\r\n } // check if the dragging image is an answer image (Camera action)\r\n else if (UiTreeHelper.isDraggingAnswerImage(sourceNodeScope, destNodesScope)) {\r\n\r\n console.log(\"answer image dragged\");\r\n\r\n // if a fake image is dragging (image id < 0), don't accept it\r\n if (UiTreeHelper.isDefaultImageDragging(sourceNodeScope))\r\n return false;\r\n\r\n return true;\r\n\r\n } // check if the dragging image is item field image (for horizontal PL)\r\n else if (UiTreeHelper.isDraggingItemFieldImage(sourceNodeScope, destNodesScope)) {\r\n\r\n console.log(\"item field image dragged\");\r\n\r\n // if a fake image is dragging (image id < 0), don't accept it\r\n if (UiTreeHelper.isDefaultImageDragging(sourceNodeScope))\r\n return false;\r\n\r\n return true;\r\n\r\n }\r\n\r\n }\r\n\r\n return false;\r\n\r\n },\r\n dropped: function (event) {\r\n\r\n if (UiTreeHelper.isOrderDropped(event)) {\r\n\r\n if (!UiTreeHelper.hasNodeChangedIndex(event))\r\n return;\r\n\r\n for (var index = 0; index < cameraImage.orders.length; index++) {\r\n\r\n var currentOrder = cameraImage.orders[index];\r\n\r\n currentOrder.ReportBuilderSortNumber = index;\r\n\r\n }\r\n\r\n OrderFactory.saveOrdersReportBuilderSortNumber(cameraImage.orders);\r\n\r\n } else if (UiTreeHelper.isImageDropped(event)) {\r\n\r\n var droppedImage = UiTreeHelper.extractDroppedImage(event);\r\n\r\n if (droppedImage && droppedImage.id > 0) {\r\n\r\n // if the value its true, it means the dragging node/image comes from an IncludedCameraImages list\r\n if (droppedImage.IncludeInReport) {\r\n\r\n if (droppedImage.associatedEntityType === \"BOT_QUESTION\") {\r\n\r\n var sourceQuestion = UiTreeHelper.extractQuestion(event, true);\r\n var destQuestion = UiTreeHelper.extractQuestion(event, false);\r\n\r\n // this if checks if the drag&drop occurs between included and not included \r\n // sections of the same question\r\n if (sourceQuestion.InitiatedId === destQuestion.InitiatedId &&\r\n event.source.nodesScope.$modelValue !== event.dest.nodesScope.$modelValue) {\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(destQuestion.CameraImages);\r\n\r\n ListService.removeItemFromList(droppedImage, sourceQuestion.IncludedCameraImages);\r\n // add one fake image to included images list\r\n sourceQuestion.IncludedCameraImages.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(destQuestion.CameraImages);\r\n }\r\n\r\n onIncludedCameraImagesNodeDropped(event, droppedImage, sourceQuestion);\r\n\r\n } else if (droppedImage.associatedEntityType === \"BOT_ANSWER\") {\r\n\r\n var sourceAnswer = UiTreeHelper.extractAnswer(event, true);\r\n var destAnswer = UiTreeHelper.extractAnswer(event, false);\r\n\r\n // this if checks if the drag&drop occurs between included and not included sections of the\r\n // same answer\r\n if (sourceAnswer.key === destAnswer.key &&\r\n event.source.nodesScope.$modelValue !== event.dest.nodesScope.$modelValue) {\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(destAnswer.CameraImages);\r\n\r\n ListService.removeItemFromList(droppedImage, sourceAnswer.IncludedCameraImages);\r\n // add one fake image to included images list\r\n sourceAnswer.IncludedCameraImages.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(destAnswer.CameraImages);\r\n }\r\n\r\n onIncludedCameraImagesNodeDropped(event, droppedImage, sourceAnswer);\r\n\r\n } else if (droppedImage.associatedEntityType === \"BOT_HORIZONTAL_PROCESSLIST_FIELD\") {\r\n\r\n var sourceHorizontalItemField = UiTreeHelper.extractItemField(event, true);\r\n var destHorizontalItemField = UiTreeHelper.extractItemField(event, false);\r\n\r\n // this if checks if the drag&drop occurs between included and not included sections of the\r\n // same item\r\n\r\n if (sourceHorizontalItemField.InitiatedId === destHorizontalItemField.InitiatedId &&\r\n event.source.nodesScope.$modelValue !== event.dest.nodesScope.$modelValue) {\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(destHorizontalItemField.CameraImages);\r\n ListService.removeItemFromList(droppedImage,\r\n sourceHorizontalItemField.IncludedCameraImages);\r\n // add one fake image to included images list\r\n sourceHorizontalItemField.IncludedCameraImages.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(destHorizontalItemField.CameraImages);\r\n }\r\n\r\n onIncludedCameraImagesNodeDropped(event, droppedImage, sourceHorizontalItemField);\r\n }\r\n\r\n } else {\r\n\r\n if (droppedImage.associatedEntityType === \"BOT_QUESTION\") {\r\n\r\n var sourceQuestion = UiTreeHelper.extractQuestion(event, true);\r\n var destQuestion = UiTreeHelper.extractQuestion(event, false);\r\n\r\n // this if checks if the drag&drop occurs between included and not included \r\n // sections of the same question\r\n if (sourceQuestion.InitiatedId === destQuestion.InitiatedId &&\r\n event.source.nodesScope.$modelValue !== event.dest.nodesScope.$modelValue) {\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(destQuestion.IncludedCameraImages);\r\n\r\n ListService.removeItemFromList(droppedImage, sourceQuestion.CameraImages);\r\n // add one fake image to not included images list\r\n sourceQuestion.CameraImages.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(destQuestion.IncludedCameraImages);\r\n }\r\n\r\n onCameraImagesNodeDropped(event, droppedImage, sourceQuestion);\r\n\r\n } else if (droppedImage.associatedEntityType === \"BOT_ANSWER\") {\r\n\r\n var sourceAnswer = UiTreeHelper.extractAnswer(event, true);\r\n var destAnswer = UiTreeHelper.extractAnswer(event, false);\r\n\r\n // this if checks if the drag&drop occurs between the included and not included\r\n // sections of the same answer\r\n if (sourceAnswer.key === destAnswer.key &&\r\n event.source.nodesScope.$modelValue !== event.dest.nodesScope.$modelValue) {\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(destAnswer.IncludedCameraImages);\r\n\r\n ListService.removeItemFromList(droppedImage, sourceAnswer.CameraImages);\r\n // add one fake image to not included images list\r\n sourceAnswer.CameraImages.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(destAnswer.IncludedCameraImages);\r\n }\r\n\r\n onCameraImagesNodeDropped(event, droppedImage, sourceAnswer);\r\n\r\n } else if (droppedImage.associatedEntityType === \"BOT_HORIZONTAL_PROCESSLIST_FIELD\") {\r\n\r\n var sourceHorizontalItemField = UiTreeHelper.extractItemField(event, true);\r\n var destHorizontalItemField = UiTreeHelper.extractItemField(event, false);\r\n\r\n // this if checks if the image is dragged and dropped between not included\r\n // and included section of the same item\r\n if (sourceHorizontalItemField.InitiatedId === destHorizontalItemField.InitiatedId &&\r\n event.source.nodesScope.$modelValue !== event.dest.nodesScope.$modelValue) {\r\n\r\n ReportBuilderService.removeOneFakeImageFromList(destHorizontalItemField.IncludedCameraImages);\r\n ListService.removeItemFromList(droppedImage,\r\n sourceHorizontalItemField.CameraImages);\r\n // add one fake image to not included images list\r\n sourceHorizontalItemField.CameraImages.push(ReportBuilderService.getFakeImage());\r\n\r\n ReportBuilderService.moveFakeImagesToTheEnd(destHorizontalItemField.IncludedCameraImages);\r\n }\r\n\r\n onCameraImagesNodeDropped(event, droppedImage, sourceHorizontalItemField);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Change the page break value for question provided\r\n * @param {} question \r\n * @returns {} \r\n */\r\n $scope.changePageBreakValue = function (question) {\r\n var pageBreak = ExecutionFactory.changePageBreakValue(question.InitiatedId, question.HasPageBreak);\r\n pageBreak.then(function () {\r\n\r\n }, function () {\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Excluded all images from report\r\n * @param {} question \r\n * @param {} horizontalItemImages \r\n * @returns {} \r\n */\r\n cameraImage.excludeAllImagesFromReport = function (question, horizontalItemImages) {\r\n\r\n var imagesToUpdate = [];\r\n\r\n if (horizontalItemImages) {\r\n\r\n exludeImagesFromReport(horizontalItemImages.IncludedCameraImages, horizontalItemImages.CameraImages);\r\n\r\n ReportBuilderService.removeFakeImagesFromList(horizontalItemImages.CameraImages);\r\n\r\n horizontalItemImages.IncludedCameraImages = [];\r\n\r\n ReportBuilderService.generateFakeImagesForImagesIncludedInReport(horizontalItemImages.IncludedCameraImages,\r\n horizontalItemImages.CameraImages);\r\n\r\n imagesToUpdate = horizontalItemImages.CameraImages;\r\n\r\n //sort all excluded images based on lastupdatedate\r\n horizontalItemImages.CameraImages = _.orderBy(horizontalItemImages.CameraImages, function (i) { return parseInt(i.CameraImageOriginal.LastUpdatedDate); }, ['asc']);\r\n }\r\n else {\r\n\r\n exludeImagesFromReport(question.IncludedCameraImages, question.CameraImages);\r\n\r\n ReportBuilderService.removeFakeImagesFromList(question.CameraImages);\r\n\r\n question.IncludedCameraImages = [];\r\n ReportBuilderService.generateFakeImagesForImagesIncludedInReport(question.IncludedCameraImages,\r\n question.CameraImages);\r\n\r\n imagesToUpdate = question.CameraImages;\r\n\r\n //sort all excluded images based on lastupdatedate\r\n question.CameraImages = _.orderBy(question.CameraImages, function (i) { return parseInt(i.CameraImageOriginal.LastUpdatedDate); }, ['asc']);\r\n }\r\n\r\n saveImages(imagesToUpdate);\r\n };\r\n\r\n /**\r\n * Include all images in report\r\n * @param {} question \r\n * @param {} horizontalItemImages \r\n * @returns {} \r\n */\r\n cameraImage.includeAllImagesInReport = function (question, horizontalItemImages) {\r\n\r\n if (horizontalItemImages) {\r\n\r\n includeImagesInReport(horizontalItemImages.CameraImages, horizontalItemImages.IncludedCameraImages);\r\n\r\n ReportBuilderService.removeFakeImagesFromList(horizontalItemImages.IncludedCameraImages);\r\n\r\n //sort all included images based on lastupdatedate\r\n horizontalItemImages.IncludedCameraImages = _.orderBy(horizontalItemImages.IncludedCameraImages, function (i) { return parseInt(i.CameraImageOriginal.LastUpdatedDate); }, ['asc']);\r\n\r\n horizontalItemImages.CameraImages = [];\r\n\r\n ReportBuilderService.generateFakeImagesForImagesExcludedFromReport(horizontalItemImages.CameraImages,\r\n horizontalItemImages.IncludedCameraImages);\r\n\r\n } else {\r\n\r\n includeImagesInReport(question.CameraImages, question.IncludedCameraImages);\r\n\r\n ReportBuilderService.removeFakeImagesFromList(question.IncludedCameraImages);\r\n\r\n question.CameraImages = [];\r\n ReportBuilderService.generateFakeImagesForImagesExcludedFromReport(question.CameraImages,\r\n question.IncludedCameraImages);\r\n\r\n //sort all included images based on lastupdatedate\r\n question.IncludedCameraImages = _.orderBy(question.IncludedCameraImages, function (i) { return parseInt(i.CameraImageOriginal.LastUpdatedDate); }, ['asc']);\r\n }\r\n };\r\n\r\n cameraImage.imageHoverIn = function (image) {\r\n image.hover = true;\r\n };\r\n\r\n cameraImage.imageHoverOut = function (image) {\r\n image.hover = false;\r\n };\r\n\r\n cameraImage.makeImageFullSize = function (image) {\r\n image.OriginalSize = !image.OriginalSize;\r\n saveImages([image]);\r\n };\r\n\r\n /**\r\n * Preview how the image will look in the end report\r\n * Value is approximate\r\n * @param {} image \r\n * @param {} size \r\n * @returns {} \r\n */\r\n cameraImage.previewImageSize = function (image, size) {\r\n cameraImage.selectedImage = angular.copy(image);\r\n cameraImage.selectedImage.Size = size;\r\n $uibModal.open({\r\n scope: $scope,\r\n template: '
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
',\r\n size: 'lg'\r\n });\r\n };\r\n\r\n cameraImage.setImageSize = function (image, size) {\r\n image.Size = size;\r\n\r\n saveImages([image]);\r\n };\r\n\r\n /**\r\n * Checks whether the upload image button should be shown\r\n * @param {} question \r\n * @param {} horizontalItemImages \r\n * @returns {} \r\n */\r\n cameraImage.showUploadPictureOnAllPointsButton = function (question, horizontalItemImages) {\r\n\r\n if (horizontalItemImages && horizontalItemImages.CameraImages && horizontalItemImages.IncludedCameraImages) {\r\n\r\n if (horizontalItemImages.CameraImages.length > 0 || horizontalItemImages.IncludedCameraImages.length > 0) {\r\n return false;\r\n }\r\n\r\n } else if (question) {\r\n if (question.CameraImages && question.IncludedCameraImages)\r\n if (question.CameraImages.length > 0 || question.IncludedCameraImages.length > 0)\r\n return false;\r\n }\r\n\r\n\r\n return true;\r\n };\r\n\r\n cameraImage.onOrderIncludeReportChange = function (order) {\r\n OrderFactory.setIncludeInReportStatus(order);\r\n };\r\n\r\n cameraImage.saveImage = function (image) {\r\n ExecutionFactory.saveCameraImage(image).$promise.then(function () {\r\n infoService.changeInfo($filter('translate')('txtImageSaved'));\r\n });\r\n };\r\n\r\n cameraImage.disableButton = function (images) {\r\n return !images || (images.length === 0 || (images.length === 1 && images[0].id === -1));\r\n };\r\n\r\n cameraImage.toggleVisibilityForProcessList = function (processList, parentAnswer, order) {\r\n\r\n if (!processList) {\r\n return;\r\n }\r\n\r\n if (_.isNil(processList.collapseState)) {\r\n processList.collapseState = true;\r\n } else {\r\n // get the checklist from the server\r\n var isHorizontal = !!parentAnswer.AnotherHorizontalProcessList;\r\n var checkList = parentAnswer.AnotherProcessList || parentAnswer.AnotherHorizontalProcessList;\r\n\r\n order = cameraImage.currentOrder || order;\r\n\r\n cameraImage.orderCameraImage.getCameraImages(order.id, checkList.InitiatedProcessListId)\r\n .then(function (result) {\r\n if (result == null || result.length == 0)\r\n return;\r\n\r\n if (!isHorizontal) {\r\n parentAnswer.AnotherProcessList = result[0].ProcessListImage;\r\n setBaseUrl(parentAnswer.AnotherProcessList, false);\r\n checkForCameraImages(parentAnswer.AnotherProcessList, false);\r\n\r\n if (parentAnswer.AnotherProcessList.Questions) {\r\n generateFakeImagesForQuestions(parentAnswer.AnotherProcessList.Questions);\r\n }\r\n\r\n } else {\r\n parentAnswer.AnotherHorizontalProcessList = result[0].HorizontalProcessListImage;\r\n setBaseUrl(parentAnswer.AnotherHorizontalProcessList, true);\r\n checkForCameraImages(parentAnswer.AnotherHorizontalProcessList, true);\r\n\r\n if (parentAnswer.AnotherHorizontalProcessList.ItemsImages) {\r\n generateFakeImagesForHorizontalItemFields(parentAnswer.AnotherHorizontalProcessList.ItemsImages);\r\n }\r\n }\r\n processList.collapseState = !processList.collapseState;\r\n });\r\n }\r\n };\r\n\r\n cameraImage.canOptionBeDisplayedForQuestion = function (question) {\r\n\r\n return ReportBuilderService.canOptionBeDisplayedForQuestion(question);\r\n };\r\n\r\n /**\r\n * Listens for 'on-attachment-upload' events from directive.\r\n * @param {any} item - Represents the item (question, answer, horizontal item field)\r\n * on which the attachment was uploaded\r\n */\r\n function onAttachmentUploadedInIncludedSection(item) {\r\n\r\n if (!item) {\r\n return;\r\n }\r\n\r\n if (!item.CameraImages) {\r\n item.CameraImages = [];\r\n }\r\n\r\n // add one fake image to CameraImages list (not included images)\r\n item.CameraImages.push(ReportBuilderService.getFakeImage());\r\n }\r\n\r\n /**\r\n * Listens for 'on-attachment-upload' events from directive.\r\n * @param {any} item - Represents the item (question, answer, horizontal item field)\r\n * on which the attachment was uploaded\r\n */\r\n function onAttachmentUploadedInNotIncludedSection(item) {\r\n\r\n if (!item) {\r\n return;\r\n }\r\n\r\n if (!item.IncludedCameraImages) {\r\n item.IncludedCameraImages = [];\r\n }\r\n\r\n // add one fake image to IncludedCameraImages list (included images)\r\n item.IncludedCameraImages.push(ReportBuilderService.getFakeImage());\r\n }\r\n\r\n //listen for images uploaded event and make sure everything is handled correctly\r\n $scope.$on(\"onImagesUploaded\", function (event, args) {\r\n\r\n\r\n\r\n });\r\n\r\n };\r\n\r\n})();\r\n\r\n\r\n","(function () {\r\n\r\n angular.module(\"order\")\r\n .factory(\"UiTreeHelper\", UiTreeHelper);\r\n\r\n //TODO: Refactor this\r\n function UiTreeHelper() {\r\n \r\n // service API\r\n /**\r\n * Checks whether the default image is dragged\r\n * @param {any} sourceNodeScope\r\n */\r\n function isDefaultImageDragging(sourceNodeScope) {\r\n\r\n if (sourceNodeScope.image.id < 0)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks whether the user is dragging an image from a question\r\n * @param {any} sourceNodeScope\r\n * @param {any} destNodesScope\r\n */\r\n function isDraggingQuestionImage(sourceNodeScope, destNodesScope) {\r\n \r\n if (sourceNodeScope.$parentNodesScope &&\r\n sourceNodeScope.$parentNodesScope.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.question &&\r\n sourceNodeScope.$modelValue.associatedEntityType === \"BOT_QUESTION\" &&\r\n destNodesScope.$parent &&\r\n destNodesScope.$parent.question) {\r\n\r\n var sourceQuestion = sourceNodeScope.$parentNodesScope.$parent.question;\r\n var destQuestion = destNodesScope.$parent.question;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n }\r\n\r\n return false;\r\n\r\n }\r\n\r\n /**\r\n * Checks whether the user is dragging an image from an answer\r\n * @param {any} sourceNodeScope\r\n * @param {any} destNodesScope\r\n */\r\n function isDraggingAnswerImage(sourceNodeScope, destNodesScope) {\r\n\r\n if (sourceNodeScope.$parentNodesScope &&\r\n sourceNodeScope.$parentNodesScope.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent.$parent.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent.$parent.$parent.answer &&\r\n sourceNodeScope.$modelValue.associatedEntityType === \"BOT_ANSWER\" && \r\n destNodesScope.$parent &&\r\n destNodesScope.$parent.$parent &&\r\n destNodesScope.$parent.$parent.$parent &&\r\n destNodesScope.$parent.$parent.$parent.$parent &&\r\n destNodesScope.$parent.$parent.$parent.$parent.answer) {\r\n\r\n var sourceAnswer = sourceNodeScope.$parentNodesScope.$parent.$parent.$parent.answer;\r\n var destAnswer = destNodesScope.$parent.$parent.$parent.answer;\r\n\r\n //accept only those that came from the same question\r\n if (sourceAnswer.key == destAnswer.key)\r\n return true;\r\n\r\n }\r\n\r\n return false;\r\n\r\n }\r\n\r\n /**\r\n * Checks whether the user is dragging an image from horizontal list\r\n * @param {any} sourceNodeScope\r\n * @param {any} destNodesScope\r\n */\r\n function isDraggingItemFieldImage(sourceNodeScope, destNodesScope) {\r\n\r\n if (sourceNodeScope.$parentNodesScope &&\r\n sourceNodeScope.$parentNodesScope.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent.$parent.$parent &&\r\n sourceNodeScope.$parentNodesScope.$parent.$parent.$parent.$parent.itemImages &&\r\n sourceNodeScope.$modelValue.associatedEntityType === \"BOT_HORIZONTAL_PROCESSLIST_FIELD\" &&\r\n destNodesScope.$parent &&\r\n destNodesScope.$parent.$parent &&\r\n destNodesScope.$parent.$parent.$parent &&\r\n destNodesScope.$parent.$parent.$parent.$parent &&\r\n destNodesScope.$parent.$parent.$parent.$parent.itemImages) {\r\n\r\n var sourceHorizontalItemField = sourceNodeScope.$parentNodesScope.$parent.$parent.itemImages;\r\n var destHorizontalItemField = destNodesScope.$parent.$parent.itemImages;\r\n\r\n //accept only those that came from the same item field\r\n if (sourceHorizontalItemField.InitiatedId == destHorizontalItemField.InitiatedId)\r\n return true;\r\n\r\n }\r\n\r\n return false;\r\n\r\n }\r\n\r\n /**\r\n * Checks whether the user is dragging an order\r\n * @param {any} sourceNodeScope\r\n */\r\n function isDraggingOrder(sourceNodeScope) {\r\n return sourceNodeScope.$modelValue.associatedEntityType === \"BOT_ORDER\";\r\n }\r\n\r\n /**\r\n * Check whether the order is dropped\r\n * @param {any} event\r\n */\r\n function isOrderDropped(event) {\r\n return event.source.nodeScope.$modelValue.associatedEntityType === \"BOT_ORDER\";\r\n }\r\n\r\n /**\r\n * Check whether the image is dropped\r\n * @param {any} event\r\n */\r\n function isImageDropped(event) {\r\n return event.source.nodeScope.image &&\r\n (event.source.nodeScope.$modelValue.associatedEntityType === \"BOT_QUESTION\" ||\r\n event.source.nodeScope.$modelValue.associatedEntityType === \"BOT_ANSWER\" ||\r\n event.source.nodeScope.$modelValue.associatedEntityType === \"BOT_HORIZONTAL_PROCESSLIST_FIELD\")\r\n }\r\n\r\n /**\r\n * Get the dropped image\r\n * @param {any} event\r\n */\r\n function extractDroppedImage(event) {\r\n return event.source.nodeScope.$modelValue;\r\n }\r\n\r\n /**\r\n * Get the question from event\r\n * @param {any} event\r\n * @param {any} isSource\r\n */\r\n function extractQuestion(event, isSource) {\r\n return (isSource) ? event.source.nodeScope.$parentNodesScope.$parent.question\r\n : event.dest.nodesScope.$parent.question;\r\n }\r\n\r\n /**\r\n * Get the answer from event\r\n * @param {any} event\r\n * @param {any} isSource\r\n */\r\n function extractAnswer(event, isSource) {\r\n return (isSource) ? event.source.nodeScope.$parentNodesScope.$parent.$parent.$parent.$parent.answer\r\n : event.dest.nodesScope.$parent.$parent.$parent.$parent.answer;\r\n }\r\n\r\n /**\r\n * Get the horizontal item field from event\r\n * @param {any} event\r\n * @param {any} isSource\r\n */\r\n function extractItemField(event, isSource) {\r\n return (isSource) ? event.source.nodeScope.$parentNodesScope.$parent.$parent.$parent.$parent.itemImages\r\n : event.dest.nodesScope.$parent.$parent.$parent.$parent.itemImages;\r\n }\r\n \r\n function hasNodeChangedIndex(event) {\r\n return event.source.index !== event.dest.index;\r\n }\r\n\r\n\r\n return {\r\n isDefaultImageDragging: isDefaultImageDragging,\r\n isDraggingQuestionImage: isDraggingQuestionImage,\r\n isDraggingAnswerImage: isDraggingAnswerImage,\r\n isDraggingItemFieldImage: isDraggingItemFieldImage,\r\n isDraggingOrder: isDraggingOrder,\r\n isOrderDropped: isOrderDropped,\r\n isImageDropped: isImageDropped,\r\n extractDroppedImage: extractDroppedImage,\r\n extractQuestion: extractQuestion,\r\n extractAnswer: extractAnswer,\r\n extractItemField: extractItemField,\r\n hasNodeChangedIndex: hasNodeChangedIndex\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('order')\r\n .component('vbCordelSendGet',\r\n {\r\n templateUrl: 'Scripts/order/cordel-send-get/cordel-send-get.component.html',\r\n controller: 'CordelSendGetController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n order: ' 0 ? $scope.orders.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allOrders.length ? allOrders.length : last + nrOfRowsToLoad;\r\n\r\n $scope.orders = allOrders.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (allOrders.length > nrOfRowsToLoadAtStart) {\r\n $scope.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n //search by dates functions\r\n $scope.showErrDate = function (searchDate) {\r\n if (searchDate) {\r\n var checkDate = new Date(searchDate);\r\n if (!isNaN(checkDate.getTime()))\r\n return false;\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Set a given order as completed\r\n * @param order\r\n */\r\n $scope.setOrderFullyDone = function (order) {\r\n if (!$scope.hasRight('NEW_EDIT_ORDER')) {\r\n order.FullyDone = !order.FullyDone;\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n order.Organization = { id: $scope.loggedUser.Organization.id };\r\n OrderFactory.setOrderFullyDone(order);\r\n }\r\n\r\n $scope.showErrDateToPastFrom = function (fromDate, toDate) {\r\n if (fromDate && toDate) {\r\n var validFromDate = new Date(fromDate).getTime();\r\n var validToDate = new Date(toDate).getTime();\r\n\r\n if (validFromDate <= validToDate)\r\n return false;\r\n return true;\r\n }\r\n else if (!fromDate && toDate) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n $scope.newOrder = function () {\r\n if (sessionInformationService.hasAccess('NEW_EDIT_ORDER'))\r\n $scope.go('/order');\r\n else\r\n errorService.setNoRightError();\r\n };\r\n\r\n /**\r\n * Function that performs a GET request and tries to fetch an order by its external id\r\n * @param orderExternalId\r\n */\r\n $scope.syncNewOrder = function (orderExternalId) {\r\n var organizationId;\r\n if ($scope.loggedUser.Organization.Central) {\r\n organizationId = OrganizationUtilService.getOrganizationId();\r\n } else {\r\n organizationId = $scope.loggedUser.Organization.id;\r\n }\r\n\r\n var newOrderSync = OrderFactory.syncNewOrderToCordel(orderExternalId, organizationId);\r\n newOrderSync.$promise.then(function () {\r\n $scope.cordelNewOrderExternalId = '';\r\n $scope.getOrders($scope.search.text, OrganizationUtilService.getOrganizationId(), $scope.search.fromDate, $scope.search.toDate, $scope.search.Participant.id);\r\n },\r\n function () {\r\n $scope.cordelNewOrderExternalId = '';\r\n });\r\n };\r\n\r\n $scope.hideNewOrderSync = function () {\r\n $scope.cordelSyncAnim = false;\r\n $timeout(function () {\r\n $scope.showCordelSync = false;\r\n }, 700, true);\r\n };\r\n\r\n $scope.showNewOrderSync = function () {\r\n $scope.showCordelSync = true;\r\n $scope.cordelSyncAnim = true;\r\n };\r\n\r\n /**\r\n * Gets a list of users from a given organization\r\n * @param {number} organizationId\r\n */\r\n $scope.getUsers = function (organizationId) {\r\n UserFactory.getUsersByOrganizationId(organizationId)\r\n .$promise\r\n .then(function (userList) {\r\n if (!userList || userList.length === 0)\r\n $scope.users = [];\r\n else\r\n $scope.users = userList;\r\n\r\n // add a default empty element if not exists\r\n if (_.findIndex($scope.users, function (element) { return element.id === defaultParticipant.id }) === -1)\r\n $scope.users.unshift(defaultParticipant);\r\n });\r\n };\r\n\r\n /**\r\n * Helper function that returns the full name for a given user\r\n * @param {User} user\r\n */\r\n $scope.getUserFullName = function (user) {\r\n\r\n var userWithFullName = Object.assign(new UserFactory.User(), user);\r\n\r\n return userWithFullName.FullName;\r\n };\r\n\r\n $scope.cacheSelectedParticipant = function (selectedParticipant) {\r\n\r\n if (!selectedParticipant)\r\n return;\r\n\r\n UserFactory.selectedParticipant = selectedParticipant;\r\n };\r\n\r\n $scope.clearCachedParticipant = function () {\r\n UserFactory.selectedParticipant = null;\r\n $scope.search.Participant = defaultParticipant;\r\n };\r\n\r\n /**\r\n * Helper function that checks if the order meets a specific condition to be displayed\r\n * @param {Order} order\r\n */\r\n $scope.canDisplayOrder = function (order) {\r\n\r\n if (!order)\r\n return false;\r\n\r\n // if the order is completed and deactivated,\r\n // display it only if the two checkboxes are checked\r\n if (order.FullyDone && !order.Active) {\r\n\r\n if ($scope.includeCompletedItems && $scope.includeDeactivatedItems)\r\n return true;\r\n else\r\n return false;\r\n\r\n } else {\r\n\r\n // display the order if is not completed and is active\r\n if (!order.FullyDone && order.Active)\r\n return true;\r\n\r\n // if the order is completed, display it only\r\n // if the 'Included completed' checkbox is checked\r\n if (order.FullyDone && $scope.includeCompletedItems)\r\n return true;\r\n\r\n // if the order is deactivated, display it only \r\n // if the 'Include deactivated and billed' checkbox is checked\r\n if (!order.Active && $scope.includeDeactivatedItems)\r\n return true;\r\n\r\n }\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks if a search parameter was completed before the request\r\n */\r\n function wasSearchParameterSent() {\r\n return $scope.search.freeText || $scope.search.fromDate || $scope.search.toDate || $scope.search.Participant.id !== -1;\r\n };\r\n\r\n /**\r\n * Checks if in the order list exists at least one completed order and at least one deactivated order\r\n */\r\n function existsCompletedAndDeactivatedOrders() {\r\n\r\n var indexOfTheFirstCompletedOrder = -1;\r\n var indexOfTheFirstInactiveOrder = -1;\r\n\r\n // if at least one search parameter was sent with the request and both \r\n // 'Included completed' and 'Include deactivated and billed' are unchecked\r\n // then find out if in the response exists completed and deactivated orders\r\n if (wasSearchParameterSent() && !$scope.includeCompletedItems && !$scope.includeDeactivatedItems) {\r\n indexOfTheFirstCompletedOrder = _.findIndex(allOrders, function (order) { return order.FullyDone; });\r\n indexOfTheFirstInactiveOrder = _.findIndex(allOrders, function (order) { return !order.Active; });\r\n }\r\n\r\n return (indexOfTheFirstCompletedOrder !== -1 && indexOfTheFirstInactiveOrder !== -1);\r\n };\r\n\r\n /**\r\n * Checks if in the order list exists at least one completed order\r\n */\r\n function existsCompletedOrders() {\r\n\r\n var indexOfTheFirstCompletedOrder = -1;\r\n var indexOfTheFirstInactiveOrder = -1;\r\n\r\n // if at least one search parameter was sent with the request and 'Included completed'\r\n // checkbox is unchecked then find out if in the response exists orders that are set\r\n // as completed\r\n if (wasSearchParameterSent() && !$scope.includeCompletedItems) {\r\n indexOfTheFirstCompletedOrder = _.findIndex(allOrders, function (order) { return order.FullyDone; });\r\n indexOfTheFirstInactiveOrder = _.findIndex(allOrders, function (order) { return !order.Active; });\r\n }\r\n\r\n return (indexOfTheFirstCompletedOrder !== -1 && indexOfTheFirstInactiveOrder === -1) ||\r\n (indexOfTheFirstCompletedOrder !== -1 && $scope.includeDeactivatedItems);\r\n };\r\n\r\n /**\r\n * Checks if in the order list exists at least one deactivated order\r\n */\r\n function existsDeactivatedOrders() {\r\n\r\n var indexOfTheFirstCompletedOrder = -1;\r\n var indexOfTheFirstInactiveOrder = -1;\r\n\r\n // if at least one search parameter was sent with the request and 'Include deactivated and billed'\r\n // checkbox is unchecked then find out if in the response exists orders that are set as inactive\r\n if (wasSearchParameterSent() && !$scope.includeDeactivatedItems) {\r\n indexOfTheFirstCompletedOrder = _.findIndex(allOrders, function (order) { return order.FullyDone; });\r\n indexOfTheFirstInactiveOrder = _.findIndex(allOrders, function (order) { return !order.Active; });\r\n }\r\n\r\n return (indexOfTheFirstCompletedOrder === -1 && indexOfTheFirstInactiveOrder !== -1) ||\r\n ($scope.includeCompletedItems && indexOfTheFirstInactiveOrder !== -1);\r\n };\r\n\r\n /**\r\n * Checks if a information message related to orders can be displayed\r\n */\r\n $scope.canDisplayMessageRelatedToOrders = function (subject) {\r\n\r\n switch (subject) {\r\n case 'COMPLETED_AND_DEACTIVATED':\r\n return existsCompletedAndDeactivatedOrders();\r\n case 'COMPLETED':\r\n return existsCompletedOrders();\r\n case 'DEACTIVATED':\r\n return existsDeactivatedOrders();\r\n default:\r\n return false;\r\n }\r\n };\r\n\r\n /**\r\n * Changes state to true for a given checkbox\r\n * @param {string} checkboxFilter\r\n */\r\n $scope.toggleOrderCheckboxFilters = function (checkboxFilter) {\r\n\r\n if (!checkboxFilter)\r\n return;\r\n\r\n if (checkboxFilter === 'COMPLETED')\r\n $scope.includeCompletedItems = true;\r\n else if (checkboxFilter === 'DEACTIVATED')\r\n $scope.includeDeactivatedItems = true;\r\n else {\r\n $scope.includeCompletedItems = true;\r\n $scope.includeDeactivatedItems = true;\r\n }\r\n };\r\n\r\n // TO-DO : Seriously refactor this\r\n /**\r\n * Fetches all the active order types\r\n */\r\n function getOrderTypes() {\r\n return OrderFactory.getOrderTypes().$promise.then(function (result) {\r\n $scope.orderListTypes = $filter('orderBy')(result, '-ProgId');\r\n\r\n if ($scope.orderListTypes != null && $scope.orderListTypes.length > 0) {\r\n if (!$scope.search.currentTabId)\r\n $scope.search.currentTabId = $scope.orderListTypes[0].id;\r\n else {\r\n $filter('filter')($scope.orderListTypes, function (orderType) {\r\n if ($scope.search.currentTabId == orderType.id)\r\n orderType.ActiveTab = true;\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n $scope.onOrganizationChange = function (organization) {\r\n getOrderTypes()\r\n .then(function () {\r\n $scope.search.Organization = organization;\r\n $scope.getOrders($scope.search.text, organization.id, $scope.search.fromDate, $scope.search.toDate, $scope.search.Participant.id);\r\n $scope.getUsers($scope.search.Organization.id);\r\n })\r\n };\r\n\r\n $scope.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n OrderFactory.selectedOrderId = null;\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('order')\r\n .component('vbOrderProgressBar',\r\n {\r\n templateUrl: 'Scripts/order/order-progress-bar/order-progress-bar.component.html',\r\n controller: 'OrderProgressBarController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n order: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n orderProgressBarController.$inject = [\r\n 'OrderProgressBarService'\r\n ];\r\n\r\n function orderProgressBarController(\r\n OrderProgressBarService\r\n ) {\r\n\r\n var vm = this;\r\n var _orderProgress;\r\n\r\n vm.$onInit = onInit;\r\n vm.$onChanges = onChanges;\r\n vm.getOrderProgress = getOrderProgress;\r\n\r\n function onInit() {\r\n _orderProgress = OrderProgressBarService.computeOrderProgress(vm.order);\r\n }\r\n\r\n function onChanges(changes) {\r\n\r\n var order = changes.order;\r\n\r\n // skip first call to $onChanges\r\n if (!order.previousValue.id) {\r\n return;\r\n }\r\n\r\n // re-compute the progress after the order updates\r\n _orderProgress = OrderProgressBarService.computeOrderProgress(vm.order);\r\n }\r\n\r\n function getOrderProgress() {\r\n return _orderProgress;\r\n }\r\n }\r\n\r\n angular\r\n .module('order')\r\n .controller('OrderProgressBarController', orderProgressBarController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('order')\r\n .component('vbOrderStatus',\r\n {\r\n templateUrl: 'Scripts/order/order-status/order-status.component.html',\r\n controller: 'VBOrderStatusController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n order: '' + $translate.instant('txtPeriodiseringDeactivatedInfo') + '
' + $translate.instant('txtPeriodiseringDeactivatedDescription') + '

' +\r\n '
' + $translate.instant('txtPeriodiseringActivatedInfo') + '
' + $translate.instant('txtPeriodiseringActivatedDescription') + '
'\r\n );\r\n }\r\n\r\n function getTasksBetweenOrderDates() {\r\n if (!$scope.order.StartDate || !$scope.order.EndDate)\r\n return $q.when();\r\n\r\n if (_.isNil($scope.users) || _.isEmpty($scope.users))\r\n return $q.when();\r\n\r\n return ResourcePlannerFactory.getTasksForUsersBetweenDates(_.join(_.map($scope.users, function (u) { return u.id; }), '|'), moment($scope.order.StartDate).toDate(), moment($scope.order.EndDate).toDate())\r\n .then(function (result) {\r\n tasks = result;\r\n });\r\n };\r\n\r\n function initFunctionDelegates() {\r\n $scope.resourcePlanner.toggleOldPersonnel = toggleOldPersonnel;\r\n };\r\n\r\n /**\r\n * Get the list of users for the given organization id\r\n * @returns {} \r\n */\r\n $scope.getUsers = function () {\r\n if (_.isNil($scope.users) || _.isEmpty($scope.users))\r\n return UserFactory.getUsers(null, null, $scope.order.Organization.id)\r\n .$promise\r\n .then(function (result) {\r\n $scope.users = _.map(result, function (u) { return Object.assign(new UserFactory.User(), u) });\r\n });\r\n\r\n return $q.when();\r\n };\r\n\r\n /**\r\n * Go to old view of participants\r\n */\r\n function toggleOldPersonnel() {\r\n var promise = null;\r\n\r\n\r\n if ($scope.resourcePlanner.oldPersonnel) {\r\n if (!!$scope.projectObject)\r\n promise = $scope.projectObject.saveProject(true)\r\n .then(function () {\r\n return $scope.projectObject.reloadProject();\r\n });\r\n else\r\n promise = $scope.saveOrder(true)\r\n .then(function () {\r\n return $scope.init();\r\n });\r\n } else\r\n promise = new Promise(function (resolve) {\r\n if (!!$scope.projectObject)\r\n $scope.projectObject.reload();\r\n else\r\n $scope.reload();\r\n resolve();\r\n });\r\n\r\n promise.then(function () {\r\n $timeout(function () {\r\n $scope.resourcePlanner.oldPersonnel = !$scope.resourcePlanner.oldPersonnel;\r\n if ($scope.resourcePlanner.oldPersonnel)\r\n $scope.getUsers();\r\n else\r\n OrderFactory.useOldPersonnel = false;\r\n });\r\n });\r\n\r\n\r\n };\r\n\r\n /**\r\n * Adds a given user to the list participants\r\n * Checks whether the user has access to this action\r\n * @param {} user \r\n * @returns {} \r\n */\r\n $scope.addParticipant = function (user) {\r\n if (!$scope.hasRight('ASSIGN_ORDER')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n var moreThan1Participant = false;\r\n\r\n if (!$scope.order.Participants)\r\n $scope.order.Participants = [];\r\n\r\n var existingParticipant = _.find($scope.order.Participants, function (p) { return p.User.id == user.id });\r\n\r\n if (existingParticipant && existingParticipant.Change == applicationChange.DELETE)\r\n existingParticipant.Change = applicationChange.Edit;\r\n else if (!existingParticipant) {\r\n if (!_.isEmpty($scope.order.Participants))\r\n moreThan1Participant = true;\r\n\r\n $scope.order.Participants.push({ User: user, Active: true, Change: applicationChange.CREATE, isExpanded: true });\r\n }\r\n\r\n // if periodization is off\r\n if ($scope.order.ConnectWithPlanner) {\r\n getTasksBetweenOrderDates();\r\n } else {\r\n // if periodization is on\r\n\r\n // get the added participant\r\n var newParticipant = $scope.order.Participants.find(function (participant) {\r\n return !participant.id;\r\n });\r\n\r\n getTasksBetweenMinAndMaxDatesOfParticipantDates(newParticipant.Dates, newParticipant);\r\n }\r\n\r\n // if we have more than 1 participants\r\n // and the order is connected to the planner\r\n if ($scope.order.ConnectWithPlanner && !addParticipantMessageShown && moreThan1Participant) {\r\n addParticipantMessageShown = true;\r\n askUserToConfirmRemoveConnectWithPlanner('txtConfirmRemoveConnectToPlannerAddParticipant');\r\n }\r\n\r\n };\r\n\r\n function askUserToConfirmRemoveConnectWithPlanner(message) {\r\n if (!$scope.order.ConnectWithPlanner)\r\n return;\r\n\r\n dialogService.showConfirmDialog('COMMON.CONFIRM', message, null, true)\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK) {\r\n return;\r\n }\r\n\r\n $scope.order.ConnectWithPlanner = false;\r\n });\r\n };\r\n\r\n function participantExists(id, participants) {\r\n for (var i = 0; i < participants.length; i++)\r\n if (participants[i].User.id == id)\r\n return true;\r\n return false;\r\n };\r\n\r\n $scope.toggleParticipantDropdown = function () {\r\n $timeout(function () {\r\n $scope.intellisense.isParticipantOpen = !$scope.intellisense.isParticipantOpen;\r\n });\r\n };\r\n\r\n /**\r\n * Toggles the main responsability\r\n * Only one user may have main responsability\r\n * @param {} participant \r\n * @returns {} \r\n */\r\n $scope.switchMainResponsibility = function (participant) {\r\n if (!$scope.hasRight('ASSIGN_ORDER')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n $scope.existMainResponsibility = false;\r\n if (participant.MainResponsibility == false) {\r\n for (var i = 0; i < $scope.currentOrder.Participants.length; i++) {\r\n if ($scope.currentOrder.Participants[i].MainResponsibility == true) {\r\n $scope.existMainResponsibility = true;\r\n break;\r\n }\r\n }\r\n if ($scope.existMainResponsibility == false) {\r\n participant.MainResponsibility = true;\r\n }\r\n } else {\r\n participant.MainResponsibility = false;\r\n }\r\n\r\n participant.Change = applicationChange.EDIT;\r\n };\r\n\r\n /**\r\n * Toggles the finished property\r\n * @param {} participant \r\n * @returns {} \r\n */\r\n $scope.switchParticipantFinished = function (participant) {\r\n if (!$scope.hasRight('ASSIGN_ORDER')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n participant.Finished = !participant.Finished;\r\n participant.Change = applicationChange.EDIT;\r\n };\r\n\r\n /**\r\n * Removes participant by userid\r\n * @param {} userId \r\n * @returns {} \r\n */\r\n $scope.removeParticipant = function (participant) {\r\n if (!$scope.hasRight('ASSIGN_ORDER')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n\r\n $scope.userBusyError = '';\r\n //var index = participantIndex(userId);\r\n //if (index != null)\r\n // $scope.order.Participants.splice(index, 1);\r\n\r\n participant.Change = applicationChange.DELETE;\r\n\r\n\r\n if ($scope.order.Participants.length == 0)\r\n $scope.tasks = [];\r\n\r\n if ($scope.order && $scope.order.id)\r\n ResourcePlannerFactory.unassingUser(participant.User.id, $scope.order.id, true);\r\n //else\r\n };\r\n\r\n $scope.getParticipantsForDisplay = function () {\r\n return _.filter($scope.order.Participants, function (p) { return p.Change != applicationChange.DELETE });\r\n };\r\n\r\n function participantIndex(id) {\r\n for (var i = 0; i < $scope.order.Participants.length; i++)\r\n if ($scope.order.Participants[i].User.id == id)\r\n return i;\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the irrelevant status for any given participant\r\n * @param {} participant \r\n * @returns {} \r\n */\r\n $scope.setIrrelevantStatus = function (participant) {\r\n if (!$scope.hasRight('ASSIGN_ORDER')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n if (!participant.id)//the irrelevant status can be modified only if the participant was saved before\r\n return;\r\n\r\n participant.IsIrrelevant = !participant.IsIrrelevant;\r\n OrderFactory.setIrrelevantStatus(participant, $scope.order.id);\r\n };\r\n\r\n /**\r\n * Sets the active status for any given participant\r\n * @param {} participant \r\n * @returns {} \r\n */\r\n $scope.setActiveStatus = function (participant) {\r\n if (!$scope.hasRight('ASSIGN_ORDER')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n participant.Active = !participant.Active;\r\n\r\n //only if the participant was saved before we can change the active status on server as well\r\n if (!participant.id)\r\n return;\r\n\r\n ParticipantFactory.setActiveStatusForParticipant(participant, $scope.order.id);\r\n }\r\n\r\n $scope.showBusyHeader = function () {\r\n\r\n // if periodization is on, use participants tasks\r\n if (!$scope.order.ConnectWithPlanner) {\r\n tasks = concatParticipantsTasks();\r\n }\r\n\r\n if (!tasks)\r\n return false;\r\n\r\n for (var i = 0; i < tasks.length; i++)\r\n if (tasks[i].Tasks.length > 0) {\r\n\r\n // if all the tasks of the current user are associated with the order\r\n // means the user doesn't have other tasks in this period so it's not busy\r\n if ($scope.order.id && areTasksAssociatedWithTheOrder(tasks[i].Tasks)) {\r\n continue;\r\n }\r\n\r\n $scope.userBusyError = 'has-error';\r\n return true;\r\n }\r\n $scope.userBusyError = '';\r\n return false;\r\n };\r\n\r\n function areTasksAssociatedWithTheOrder(tasks) {\r\n\r\n var totalTasks = tasks.length;\r\n var nrOfTasksAssociatedWithOrder = tasks.filter(function (task) {\r\n return task.ForeignKey === $scope.order.id &&\r\n task.Table === TableResources.OrderTable;\r\n }).length;\r\n\r\n return totalTasks === nrOfTasksAssociatedWithOrder;\r\n }\r\n\r\n function concatParticipantsTasks() {\r\n\r\n if (!$scope.order.Participants || $scope.order.Participants.length === 0) {\r\n return null;\r\n }\r\n\r\n var participantsTasks = [];\r\n\r\n $scope.order.Participants.forEach(function (participant) {\r\n\r\n if (!participant.Tasks) {\r\n return;\r\n }\r\n\r\n participantsTasks = participantsTasks.concat(participant.Tasks);\r\n });\r\n\r\n return participantsTasks;\r\n }\r\n\r\n function checkIfUserIsBusy(userId, tasks) {\r\n if (!tasks)\r\n return false;\r\n\r\n if (tasks.length == 0)\r\n return false;\r\n\r\n var user = _.find(tasks, function (u) { return u.id == userId });\r\n\r\n if (_.isNil(user))\r\n return false;\r\n\r\n if ($scope.order.id && user && user.Tasks.length > 0 && areTasksAssociatedWithTheOrder(user.Tasks))\r\n return false;\r\n\r\n if (user && user.Tasks.length > 0)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n $scope.isUserBusy = function (participant) {\r\n\r\n var userId = participant.User.id;\r\n\r\n // if periodization is off\r\n if ($scope.order.ConnectWithPlanner) {\r\n return checkIfUserIsBusy(userId, tasks);\r\n } else {\r\n // periodization is on\r\n return checkIfUserIsBusy(userId, participant.Tasks);\r\n }\r\n };\r\n\r\n function getTasksBetweenDatesForParticipant(startDate, endDate, participant) {\r\n\r\n if (!startDate || !endDate) {\r\n return $q.when([]);\r\n }\r\n\r\n return ResourcePlannerFactory.getTasksForUsersBetweenDates(\r\n participant.User.id,\r\n moment(startDate).toDate(),\r\n moment(endDate).toDate()\r\n ).then(function (result) {\r\n participant.Tasks = result;\r\n });\r\n }\r\n\r\n function expandParticipant(participant) {\r\n ParticipantService.expandParticipant(participant);\r\n }\r\n\r\n function getParticipantDatesListForParticipant(participant) {\r\n\r\n // if the participant dates exists we don't make the request\r\n //if (!_.isNil(participant.Dates) && !_.isEmpty(participant.Dates)) {\r\n // expandParticipant(participant);\r\n // return;\r\n //}\r\n\r\n ParticipantDatesFactory.getParticipantDatesListForParticipant(participant.id)\r\n .then(function (participantDates) {\r\n\r\n participant.Dates = participantDates;\r\n\r\n expandParticipant(participant);\r\n });\r\n }\r\n\r\n function markParticipantAsEdited(participant) {\r\n participant.Change = OrderFactory.applicationChange.EDIT;\r\n }\r\n\r\n function onParticipantDatesDelete(participant) {\r\n\r\n // refresh the dates list for the participant\r\n ParticipantDatesFactory.getParticipantDatesListForParticipant(participant.id)\r\n .then(function (participantDates) {\r\n\r\n participant.Dates = participantDates;\r\n $scope.onParticipantDatesChange(participant);\r\n });\r\n }\r\n\r\n $scope.onParticipantDatesChange = function (participant, skipPeriodiseringAlert) {\r\n markParticipantAsEdited(participant);\r\n\r\n getTasksBetweenMinAndMaxDatesOfParticipantDates(participant.Dates, participant);\r\n\r\n if (!!changeDateMessageShown)\r\n return;\r\n\r\n if (!skipPeriodiseringAlert) {\r\n changeDateMessageShown = true;\r\n askUserToConfirmRemoveConnectWithPlanner('txtConfirmRemoveConnectToPlannerAddParticipantDate');\r\n }\r\n };\r\n\r\n $scope.onConnectToPlannerChange = function () {\r\n if (!$scope.order.ConnectWithPlanner)\r\n return dialogService.showConfirmDialog('COMMON.CONFIRM', 'txtWarningRemoveConnectToPlanner', null, true)\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK) {\r\n // cancel the periodization switch\r\n $scope.order.ConnectWithPlanner = true;\r\n getTasksBetweenOrderDates();\r\n return;\r\n }\r\n\r\n // periodization is on\r\n $scope.order.ConnectWithPlanner = false;\r\n\r\n if ($scope.order.Participants) {\r\n $scope.order.Participants.forEach(function (participant) {\r\n getTasksBetweenMinAndMaxDatesOfParticipantDates(participant.Dates, participant);\r\n });\r\n }\r\n });\r\n\r\n return dialogService.showConfirmDialog('COMMON.CONFIRM', 'txtWarningConnectToPlanner', null, true)\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK) {\r\n $scope.order.ConnectWithPlanner = false;\r\n return;\r\n }\r\n\r\n // periodization is off\r\n $scope.order.ConnectWithPlanner = true;\r\n\r\n for (var i = 0; i < $scope.order.Participants.length; i++) {\r\n if ($scope.order.Participants[i].Change != OrderFactory.applicationChange.DELETE)\r\n markParticipantAsEdited($scope.order.Participants[i]);\r\n }\r\n\r\n // when periodization is switched off, get the tasks between order start and end date\r\n getTasksBetweenOrderDates();\r\n });\r\n };\r\n\r\n function getTasksBetweenMinAndMaxDatesOfParticipantDates(dates, participant) {\r\n\r\n var minAndMaxDates\r\n = ParticipantDatesService.getMinAndMaxDatesFromParticipantDates(dates);\r\n\r\n if (!minAndMaxDates) {\r\n return;\r\n }\r\n\r\n getTasksBetweenDatesForParticipant(minAndMaxDates.minStartDate, minAndMaxDates.maxEndDate, participant);\r\n }\r\n\r\n function onParticipantDatesRetrieve(data) {\r\n\r\n var participant = data.participant;\r\n var dates = data.dates;\r\n\r\n getTasksBetweenMinAndMaxDatesOfParticipantDates(dates, participant);\r\n }\r\n\r\n function onNewParticipantDatesDelete(participant) {\r\n getTasksBetweenMinAndMaxDatesOfParticipantDates(participant.Dates, participant);\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ParticipantFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular\r\n .module('order')\r\n .factory('ParticipantFactory', ParticipantFactory);\r\n\r\n function ParticipantFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var SetActiveStatusApi = $resource(baseUrlService.getBaseUrl() + 'REST/ParticipantModify.svc/SetActiveStatus');\r\n\r\n var ParticipantsRetrieveApi = $resource(api + 'REST/GenericParticipantRetrieve.svc/GenericParticipant');\r\n var ParticipantsModifyApi = $resource(api + 'REST/GenericParticipantModify.svc/GenericParticipant');\r\n\r\n /**\r\n * Sets the active status for the given participant on the given order\r\n * @param {} participant \r\n * @param {} orderId \r\n * @returns {} \r\n */\r\n this.setActiveStatusForParticipant = function (participant, orderId) {\r\n var activeStatusApiObject = new SetActiveStatusApi();\r\n\r\n activeStatusApiObject.participant = participant;\r\n activeStatusApiObject.orderId = orderId;\r\n\r\n return activeStatusApiObject.$save();\r\n };\r\n\r\n /**\r\n * Gets a list of participants for the given tables and foreignkeys\r\n * @param {} table \r\n * @param {} foreignKey \r\n * @param {} secondTable \r\n * @param {} secondForeignKey \r\n * @returns {} \r\n */\r\n this.getParticipants = function (table, foreignKey, secondTable, secondForeignKey) {\r\n if (!table || !foreignKey)\r\n return $q.when();\r\n\r\n return ParticipantsRetrieveApi.query({\r\n table: table,\r\n foreignKey: foreignKey,\r\n secondTable: secondTable,\r\n secondForeignKey: secondForeignKey\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Posts the given participants\r\n * @param {} participants \r\n * @returns {} \r\n */\r\n this.saveParticipants = function (participants) {\r\n var participantsApiObject = new ParticipantsModifyApi();\r\n\r\n participantsApiObject.participants = participants;\r\n\r\n return participantsApiObject.$save();\r\n };\r\n\r\n\r\n return this;\r\n };\r\n})();","(function() {\r\n 'use strict';\r\n\r\n participantService.$inject = [\r\n '_',\r\n 'ParticipantDatesService'\r\n ];\r\n\r\n function participantService(\r\n _,\r\n ParticipantDatesService\r\n ) {\r\n\r\n function expandParticipant(participant) {\r\n\r\n if (_.isNil(participant)) {\r\n return;\r\n }\r\n\r\n // if the property 'isExpanded' is null or undefined, we treat it as false\r\n if (_.isNil(participant.isExpanded)) {\r\n participant.isExpanded = true;\r\n return;\r\n }\r\n\r\n participant.isExpanded = !participant.isExpanded;\r\n }\r\n\r\n function convertParticipantDatesToMillisecondsForParticipants(participants) {\r\n\r\n if (_.isNil(participants) || _.isEmpty(participants)) {\r\n return;\r\n }\r\n\r\n \r\n for (var index = 0; index < participants.length; index++) {\r\n\r\n var currentParticipant = participants[index];\r\n\r\n if (_.isNil(currentParticipant.Dates) || _.isEmpty(currentParticipant.Dates)) {\r\n continue;\r\n }\r\n\r\n ParticipantDatesService.convertParticipantDatesListToMilliseconds(currentParticipant.Dates);\r\n }\r\n }\r\n\r\n return {\r\n expandParticipant: expandParticipant,\r\n convertParticipantDatesToMillisecondsForParticipants: convertParticipantDatesToMillisecondsForParticipants\r\n };\r\n }\r\n\r\n angular\r\n .module('participant')\r\n .service('ParticipantService', participantService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('order')\r\n .component('vbOrderReportBuilder',\r\n {\r\n templateUrl: 'scripts/order/report-builder/order-report-builder.component.html',\r\n controller: 'OrderReportBuilderController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n orderCameraImage: '=',\r\n currentOrder: '=',\r\n mainOrder : '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n OrderReportBuilderController.$inject = [\r\n 'OrderFactory'\r\n ];\r\n\r\n function OrderReportBuilderController(\r\n OrderFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.toggleRiskAnalysisVisibilityInReport = toggleRiskAnalysisVisibilityInReport;\r\n\r\n /**\r\n * Sets if the risk analysis for a given order will be included in its end-report or not\r\n * @param {any} mainOrder\r\n */\r\n function toggleRiskAnalysisVisibilityInReport(mainOrder) {\r\n OrderFactory.toggleRiskAnalysisVisibilityInReport(mainOrder);\r\n }\r\n }\r\n\r\n angular\r\n .module('order')\r\n .controller('OrderReportBuilderController', OrderReportBuilderController);\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n ParticipantResourcePlannerController.$inject = [\r\n '$timeout',\r\n 'UserFactory',\r\n 'sessionInformationService',\r\n '$filter',\r\n 'snapService',\r\n '$scope',\r\n 'ResourcePlannerFactory',\r\n 'loadingService',\r\n 'ResourcePlannerService',\r\n '$q',\r\n 'ParticipantResourcePlannerPanelService',\r\n 'TaskListFactory',\r\n 'dialogService',\r\n 'OrderFactory',\r\n 'DateUtilService',\r\n 'errorService',\r\n '_',\r\n '$uibModal',\r\n 'ResourcePlannerSettingsFactory',\r\n 'ResourcePlannerContextOptionsService'\r\n //Part of 10572 task\r\n //'OrganizationSettingFactory',\r\n //'OrganizationUtilService'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ParticipantResourcePlannerController', ParticipantResourcePlannerController)\r\n .directive('participantResourcePlanner', function () {\r\n return {\r\n restrict: 'AE',\r\n controller: 'ParticipantResourcePlannerController as participant',\r\n bindToController: true,\r\n templateUrl: 'Scripts/order/resourcePlanner/participantResourcePlanner.html',\r\n scope: {\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n function ParticipantResourcePlannerController(\r\n $timeout,\r\n UserFactory,\r\n sessionInformationService,\r\n $filter,\r\n snapService,\r\n $scope,\r\n ResourcePlannerFactory,\r\n loadingService,\r\n ResourcePlannerService,\r\n $q,\r\n ParticipantResourcePlannerPanelService,\r\n TaskListFactory,\r\n dialogService,\r\n OrderFactory,\r\n DateUtilService,\r\n errorService,\r\n _,\r\n $uibModal,\r\n ResourcePlannerSettingsFactory,\r\n ResourcePlannerContextOptionsService\r\n //Part of 10572 task\r\n //OrganizationSettingFactory,\r\n //OrganizationUtilService\r\n ) {\r\n var participant = this;\r\n //var organizationId = participant.resourcePlanner.mainOrder.Organization.id; //sessionInformationService.getUser().Organization.id;\r\n participant.navigation = { day: false, workingDays: false, week: false, month: false };\r\n //user list collapsed property\r\n participant.userListCollapsed = false;\r\n\r\n var rightMenuActions = {\r\n CUT: 0,\r\n COPY: 1\r\n },\r\n currentRightClickAction = null,\r\n userSettings,\r\n settingsTable = \"BOT_PARTICIPANT_RESOURCE_PLANNER\";\r\n\r\n //Part of 10572 task\r\n ///**\r\n // * Gets the settings for the selected organization\r\n // */\r\n //function getSelectedOrganizationSettings() {\r\n // OrganizationSettingFactory\r\n // .getOrganizationSettingsByOrganizationId(\r\n // OrganizationUtilService.getOrganizationIdForLoggedUser(sessionInformationService.getUser()))\r\n // .then(function (settings) {\r\n // participant.organizationSettings = settings;\r\n // });\r\n //}\r\n\r\n participant.$onInit = function () {\r\n initDelegateFunctions();\r\n //get the user settings and apply them\r\n //processUserSettings(true);\r\n participant.resourcePlanner.initParticipantResourcePlanner()\r\n .then(function () {\r\n\r\n //Part of 10572 task\r\n //getSelectedOrganizationSettings();\r\n\r\n participant.resourcePlanner.deleteTask = deleteTask;\r\n participant.resourcePlanner.deleteDay = deleteDay;\r\n participant.resourcePlanner.deleteHour = deleteHour;\r\n participant.resourcePlanner.navigationMode = participant.navigation;\r\n participant.resourcePlanner.unassignUserFromOrder = unassignUserFromOrder;\r\n participant.resourcePlanner.split = split;\r\n\r\n //options for right click menu for when the user click on task\r\n participant.resourcePlanner.taskContextOptions = [\r\n ResourcePlannerContextOptionsService.getOptionsForUnnasign(),\r\n null,//divider\r\n ResourcePlannerContextOptionsService.getOptionsForCut(),\r\n ResourcePlannerContextOptionsService.getOptionsForCopy(),\r\n null,\r\n ResourcePlannerContextOptionsService.getOptionsForDelete(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteAllAndRemoveParticipant(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteAll(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteDay(),\r\n ResourcePlannerContextOptionsService.getOptionsForDeleteHour(),\r\n ResourcePlannerContextOptionsService.getOptionsForSplit()\r\n ];\r\n });\r\n\r\n ResourcePlannerContextOptionsService.setResourcePlannerInstance(participant.resourcePlanner);\r\n };\r\n\r\n /**\r\n * Gets the users settings and applies them to the planner\r\n * @param {any} firstTime\r\n */\r\n function processUserSettings(firstTime) {\r\n getUserSettings()\r\n .then(function () {\r\n if (participant.resourcePlanner.cancelCurrentDateInterval)\r\n //cancel the current date interval\r\n participant.resourcePlanner.cancelCurrentDateInterval();\r\n setOverviewValue();\r\n set24HFormatValue(firstTime);\r\n setUserGroupValue(firstTime);\r\n });\r\n };\r\n\r\n /**\r\n * Sets the initial value of the 24H format\r\n */\r\n function set24HFormatValue(firstTime) {\r\n //if we have settings, use the value from there\r\n if (userSettings && (!_.isNil(userSettings.Use24H) || userSettings.Use24H == true))\r\n participant.resourcePlanner.fullDayFormat = userSettings.Use24H;\r\n else\r\n participant.resourcePlanner.fullDayFormat = false;\r\n //set the hours\r\n setStartAndEndHours(firstTime);\r\n };\r\n\r\n /**\r\n * Sets the initial value of the overview\r\n */\r\n function setOverviewValue() {\r\n //if we have settings, use the value selected there\r\n if (userSettings && userSettings.Overview && userSettings.Overview.ProgId)\r\n participant.setNavigationMode(userSettings.Overview.ProgId);\r\n else\r\n participant.setNavigationMode('WEEK');\r\n };\r\n\r\n /**\r\n * Sets the initial value of the user group\r\n */\r\n function setUserGroupValue(firstTime) {\r\n //if we have settings, use the value selected there\r\n if (userSettings && userSettings.GroupView && userSettings.GroupView.id)\r\n participant.resourcePlanner.userGroupId = userSettings.GroupView.id;\r\n else\r\n participant.resourcePlanner.userGroupId = null;\r\n\r\n // this is a fix for when below function gets called before init function from resourcePlannerView\r\n $timeout(function () {\r\n participant.resourcePlanner.getUsersView();\r\n });\r\n };\r\n\r\n function initDelegateFunctions() {\r\n\r\n participant.resourcePlanner.fullDayFormat = false;\r\n //default start and end hours\r\n participant.resourcePlanner.startHour = 7;\r\n participant.resourcePlanner.endHour = 17;\r\n //default date\r\n participant.resourcePlanner.Date = new Date();\r\n //loader\r\n participant.resourcePlanner.loading = true;\r\n participant.resourcePlanner.panelLoading = false;\r\n //user list \r\n participant.resourcePlanner.users = [];\r\n //statuses\r\n participant.resourcePlanner.resourcePlannerStatuses = { NOT_INITIATED: 0, INITIATED: 1 };\r\n participant.resourcePlanner.resourcePlannerStatus = participant.resourcePlanner.resourcePlannerStatuses.NOT_INITIATED;\r\n //order list panel\r\n participant.resourcePlanner.orderListPanel = false;\r\n //user list panel\r\n participant.resourcePlanner.userListPanel = false;\r\n //task details panel\r\n participant.resourcePlanner.taskDetailsPanel = false;\r\n\r\n /**\r\n * Adds the given user as participant\r\n * @param user\r\n */\r\n participant.resourcePlanner.addUserAsParticipant = function (user) {\r\n if (!user.IsAssignedToOrder)\r\n return;\r\n\r\n participant.resourcePlanner.loading = true;\r\n\r\n //init some properties to avoid unwanted errors;\r\n user.Tasks = [];\r\n user.Checked = true;\r\n\r\n participant.resourcePlanner.assignUserToOrder(user, participant.resourcePlanner.mainOrder, new Date());\r\n };\r\n\r\n participant.resourcePlanner.checkUser = function (user, notGetTasks, orderId) {\r\n participant.checkUser(user, notGetTasks, orderId);\r\n };\r\n\r\n /**\r\n * Inits the resource planner and week is set as default view\r\n */\r\n participant.resourcePlanner.initParticipantResourcePlanner = function () {\r\n participant.resourcePlanner.loading = true;\r\n if (participant.resourcePlanner.resourcePlannerStatus == participant.resourcePlanner.resourcePlannerStatuses.NOT_INITIATED) {\r\n //set todays date\r\n setTodaysDate();\r\n\r\n //get the users\r\n return getUsers()\r\n .then(function () {\r\n return processUserSettings(true);\r\n })\r\n .then(function () {\r\n //init default view\r\n // setOverviewValue();\r\n participant.resourcePlanner.resourcePlannerStatus = participant.resourcePlanner.resourcePlannerStatuses.INITIATED;\r\n\r\n listenToSnap();\r\n });\r\n } else {\r\n participant.resourcePlanner.loading = false;\r\n return $q.when();\r\n }\r\n };\r\n\r\n /**\r\n * Returns a list of tasks for a given list of users\r\n * @returns\r\n */\r\n participant.resourcePlanner.getTasksForSelectedUsers = function () {\r\n loadingService.noLoader = true;\r\n participant.resourcePlanner.loading = true;\r\n\r\n var userIds = participant.resourcePlanner.users.map(function (user) { return user.id });\r\n //first remove all tasks so that the ng-repeat is triggered again after the request\r\n removeAllTasks();\r\n\r\n if (userIds && userIds.length > 0) {\r\n //hide the loader\r\n return ResourcePlannerFactory.getTasksForUsersBetweenDates(userIds.join('|'), participant.resourcePlanner.startDate, participant.resourcePlanner.endDate)\r\n .then(function (result) {\r\n for (var i = 0; i < result.length; i++) {\r\n result[i].Checked = true;\r\n setUser(result[i]);\r\n associateCurrentOrderWithTasks(result[i]);\r\n }\r\n //check if there are tasks\r\n if (!areThereTasks(participant.resourcePlanner.users)) {\r\n collapseAllUsers();\r\n }\r\n\r\n // get the participants for this order\r\n return ResourcePlannerFactory.getParticipantsForOrder(participant.resourcePlanner.mainOrder.id);\r\n\r\n })\r\n .then(function (participants) {\r\n\r\n if (!!participants && participants.length > 0) {\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++) {\r\n var user = participant.resourcePlanner.users[i];\r\n\r\n if (_.some(participants, function (p) { return p.User.id === user.id })) {\r\n user.IsAssignedToOrder = true;\r\n } else\r\n user.IsAssignedToOrder = false;\r\n }\r\n } else\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++)\r\n participant.resourcePlanner.users[i].IsAssignedToOrder = false;\r\n\r\n //show the loader\r\n\r\n participant.resourcePlanner.loading = false;\r\n loadingService.noLoader = false;\r\n });\r\n } else {\r\n participant.resourcePlanner.loading = false;\r\n return $q.when();\r\n }\r\n };\r\n\r\n //limit function execution\r\n participant.resourcePlanner.getTasksForSelectedUsers = _.throttle(participant.resourcePlanner.getTasksForSelectedUsers, 250, { leading: false, trailing: true });\r\n\r\n /**\r\n * Returns a list of users assigned to the given order id\r\n * @param orderId\r\n * @returns\r\n */\r\n participant.resourcePlanner.getParticipantsForOrder = function (orderId) {\r\n return ResourcePlannerFactory.getParticipantsForOrder(orderId);\r\n };\r\n\r\n /**\r\n * Checks whether the user is assigned to order\r\n * @param userId\r\n * @param orderId\r\n */\r\n participant.resourcePlanner.isUserAssignedToOrder = function (userId, orderId) {\r\n loadingService.noLoader = true;\r\n return $q(function (resolve, reject) {\r\n ResourcePlannerFactory.isUserAssignedToOrder(userId, orderId)\r\n .then(function (result) {\r\n loadingService.noLoader = false;\r\n resolve(result);\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Saves the given task \r\n * @param task\r\n */\r\n participant.resourcePlanner.saveTask = function (task) {\r\n loadingService.noLoader = true;\r\n if (!task.id) {\r\n return ResourcePlannerFactory.createOrderTask(task).then(function () {\r\n loadingService.noLoader = false;\r\n });\r\n }\r\n return TaskListFactory.updateTaskListWithoutEmail(task).then(function () {\r\n loadingService.noLoader = false;\r\n });\r\n };\r\n\r\n participant.resourcePlanner.assignUser = function (tasks) {\r\n return ResourcePlannerFactory.assignUser(tasks);\r\n };\r\n\r\n /**\r\n * Returns the lowest start date of the order and the greates end date of the order\r\n * The task for this order may have been splitted so we need to get the extremities \r\n * @param orderIds\r\n * @returns\r\n */\r\n participant.resourcePlanner.getDatesExtremities = function (orderIds) {\r\n return ResourcePlannerFactory.getDatesExtremities(orderIds);\r\n };\r\n\r\n /**\r\n * Gets the user views\r\n * @returns\r\n */\r\n participant.resourcePlanner.getResourcePlannerDropdownViews = function () {\r\n var organizationId = participant.resourcePlanner.mainOrder && participant.resourcePlanner.mainOrder.id\r\n ? participant.resourcePlanner.mainOrder.Organization.id\r\n : sessionInformationService.getUser().Organization.id;\r\n\r\n return ResourcePlannerFactory.getResourcePlannerDropdownViews(organizationId);\r\n };\r\n\r\n /**\r\n * Gets the users for the given view id\r\n * @param id\r\n * @returns\r\n */\r\n participant.resourcePlanner.getResourcePlannerViewUsers = function (id) {\r\n return ResourcePlannerFactory.getResourcePlannerViewUsers(id);\r\n };\r\n\r\n /**\r\n * Gets the selected organization id\r\n * @returns\r\n */\r\n participant.resourcePlanner.getSelectedOrganizationId = function () {\r\n var organizationId = participant.resourcePlanner.mainOrder && participant.resourcePlanner.mainOrder.id\r\n ? participant.resourcePlanner.mainOrder.Organization.id\r\n : sessionInformationService.getUser().Organization.id;\r\n return organizationId;\r\n };\r\n\r\n /**\r\n * Deselects all the users except the logged user\r\n */\r\n participant.resourcePlanner.deselectAllExceptLoggedUser = function () {\r\n var loggedUser = sessionInformationService.getUser();\r\n var atLeastOneUnchecked = false;\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++)\r\n if (!participant.resourcePlanner.users[i].Checked) {\r\n atLeastOneUnchecked = true;\r\n break;\r\n }\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++)\r\n if (participant.resourcePlanner.users[i].id != loggedUser.id && !atLeastOneUnchecked)\r\n participant.resourcePlanner.users[i].Checked = false;\r\n else\r\n participant.resourcePlanner.users[i].Checked = true;\r\n\r\n participant.resourcePlanner.loading = true;\r\n participant.resourcePlanner.getTasksForSelectedUsers();\r\n };\r\n\r\n /**\r\n * Collapses all the users\r\n */\r\n participant.resourcePlanner.collapseAllUsers = function () {\r\n //check if at least one user is not collapsed\r\n var atLeastOneNotCollapsed = false;\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++) {\r\n if (participant.resourcePlanner.users[i].Checked && participant.resourcePlanner.users[i].Tasks && participant.resourcePlanner.users[i].Tasks.length > 0 && participant.resourcePlanner.users[i].Collapsed == false) {\r\n participant.resourcePlanner.users[i].Collapsed = true;\r\n atLeastOneNotCollapsed = true;\r\n }\r\n }\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++)\r\n if (participant.resourcePlanner.users[i].Checked && participant.resourcePlanner.users[i].Tasks && participant.resourcePlanner.users[i].Tasks.length > 0) {\r\n if (!atLeastOneNotCollapsed)\r\n participant.resourcePlanner.users[i].Collapsed = false;\r\n participant.resourcePlanner.collapseUser(participant.resourcePlanner.users[i]);\r\n }\r\n };\r\n\r\n /**\r\n * Gets all the users\r\n * @returns\r\n */\r\n participant.resourcePlanner.getUsers = function () {\r\n return getUsers();\r\n };\r\n\r\n /**\r\n * Gets all the tasks for selected users\r\n * @returns\r\n */\r\n participant.resourcePlanner.getTasks = function () {\r\n return participant.resourcePlanner.getTasksForSelectedUsers();\r\n };\r\n\r\n participant.resourcePlanner.getFullName = function (user) {\r\n return (user.FirstName ? user.FirstName.trim() + ' ' : '') + (user.LastName ? user.LastName.trim() : '');\r\n }\r\n\r\n /**\r\n * Saves the user view\r\n * @param view\r\n * @returns\r\n */\r\n participant.resourcePlanner.saveResourcePlannerView = function (view) {\r\n return ResourcePlannerFactory.saveResourcePlannerView(view);\r\n };\r\n\r\n /**\r\n * Gets the color setting for given table and foreignkey\r\n * @param foreignKey\r\n * @param table\r\n * @returns\r\n */\r\n participant.resourcePlanner.getColorSetting = function (foreignKey, table) {\r\n return ResourcePlannerFactory.getColorSetting(foreignKey, table);\r\n };\r\n\r\n /**\r\n * Gets the types for tasks for the current selected organization\r\n * @returns\r\n */\r\n participant.resourcePlanner.getTypesForTask = function () {\r\n var organizationId = participant.resourcePlanner.mainOrder && participant.resourcePlanner.mainOrder.id\r\n ? participant.resourcePlanner.mainOrder.Organization.id\r\n : sessionInformationService.getUser().Organization.id;\r\n return ResourcePlannerFactory.getTypesForTask(organizationId);\r\n };\r\n\r\n /**\r\n * Gets the customers based on the search criteria\r\n * @param freeText\r\n * @returns\r\n */\r\n participant.resourcePlanner.getResourcePlannerCustomers = function (freeText) {\r\n var organizationId = participant.resourcePlanner.mainOrder && participant.resourcePlanner.mainOrder.id\r\n ? participant.resourcePlanner.mainOrder.Organization.id\r\n : sessionInformationService.getUser().Organization.id;\r\n return ResourcePlannerFactory.getResourcePlannerCustomers(organizationId, freeText, false);\r\n };\r\n\r\n /**\r\n * Gets the users based on search criteria\r\n * @param freeText\r\n * @returns\r\n */\r\n participant.resourcePlanner.getResourcePlannerUsers = function (freeText) {\r\n var organizationId = participant.resourcePlanner.mainOrder && participant.resourcePlanner.mainOrder.id\r\n ? participant.resourcePlanner.mainOrder.Organization.id\r\n : sessionInformationService.getUser().Organization.id;\r\n return UserFactory.getUsersByOrganizationId(organizationId, freeText).$promise;\r\n };\r\n\r\n /**\r\n * Gets the statuses for tasks\r\n * @returns\r\n */\r\n participant.resourcePlanner.getStatusesForTask = function () {\r\n return ResourcePlannerFactory.getStatusesForTask();\r\n };\r\n\r\n /**\r\n * Gets the child tasks based on the given id\r\n * @param parentId\r\n * @returns\r\n */\r\n participant.resourcePlanner.getChildTasks = function (parentId) {\r\n return ResourcePlannerFactory.getChildTasks(parentId);\r\n };\r\n\r\n /**\r\n * Saves the child tasks\r\n * @param childTasks\r\n * @returns\r\n */\r\n participant.resourcePlanner.saveChildTasks = function (childTasks) {\r\n return ResourcePlannerFactory.saveChildTasks(childTasks);\r\n };\r\n\r\n /**\r\n * Saves the type\r\n * @param type\r\n * @returns\r\n */\r\n participant.resourcePlanner.saveTaskType = function (type) {\r\n return ResourcePlannerFactory.saveTaskType(type);\r\n };\r\n\r\n /**\r\n * Saves the color setting\r\n * @param color\r\n * @returns\r\n */\r\n participant.resourcePlanner.saveColorSetting = function (color) {\r\n return OrderFactory.saveColorSetting(color);\r\n };\r\n\r\n /**\r\n * Gets the tasks for the given user\r\n * @param userId\r\n * @param startDate\r\n * @param endDate\r\n * @returns\r\n */\r\n participant.resourcePlanner.getTasksForUser = function (userId, startDate, endDate) {\r\n return ResourcePlannerFactory.getTasksForUsersBetweenDates(userId, startDate, endDate);\r\n };\r\n\r\n /**\r\n * Updates the task without sending an email\r\n * @param task\r\n * @returns\r\n */\r\n participant.resourcePlanner.updateTaskListWithoutEmail = function (task) {\r\n return participant.resourcePlanner.saveTask(task);\r\n };\r\n\r\n /**\r\n * Gets a task by id\r\n * @param taskId\r\n * @returns\r\n */\r\n participant.resourcePlanner.getTaskById = function (taskId) {\r\n return ResourcePlannerFactory.getTaskById(taskId);\r\n };\r\n\r\n participant.resourcePlanner.toggleOrdersPanel = participant.toggleOrdersPanel;\r\n\r\n participant.resourcePlanner.toggleUserListPanel = participant.toggleUserListPanel;\r\n\r\n /**\r\n * Toggles the task detail panel\r\n * @param task\r\n */\r\n participant.resourcePlanner.toggleTaskDetailsPanel = function (task) {\r\n //present the loader\r\n participant.resourcePlanner.panelLoading = true;\r\n\r\n //if other panel are open, toggle them\r\n if (participant.resourcePlanner.orderListPanel)\r\n participant.resourcePlanner.toggleOrdersPanel();\r\n\r\n if (participant.resourcePlanner.userListPanel)\r\n participant.resourcePlanner.toggleUserListPanel();\r\n\r\n if (!participant.resourcePlanner.taskDetailsPanel) {\r\n participant.resourcePlanner.taskDetailsPanel = true;\r\n prepareTaskForDetails(task);\r\n } else {\r\n participant.resourcePlanner.taskDetailsPanel = false;\r\n $timeout(function () {\r\n prepareTaskForDetails(task);\r\n participant.resourcePlanner.taskDetailsPanel = true;\r\n }, 100);\r\n }\r\n\r\n if (ParticipantResourcePlannerPanelService.getCurrentState() == ParticipantResourcePlannerPanelService.getStates().CLOSED)\r\n ParticipantResourcePlannerPanelService.open();\r\n };\r\n\r\n /**\r\n * Processes the dates for the order\r\n * Cordel does not offer UTC dates so we need to fix the timezone\r\n * @param tasks\r\n */\r\n participant.resourcePlanner.processDatesForOrder = function (tasks) {\r\n //var orderIds = getOrderIdsFromTask(tasks);\r\n\r\n //if (!orderIds || orderIds.length == 0)\r\n // return;\r\n\r\n //participant.resourcePlanner.getDatesExtremities(orderIds)\r\n // .then(function (returnedTasks) {\r\n // if (!returnedTasks || returnedTasks == 0)\r\n // return;\r\n\r\n // var orders = participant.resourcePlanner.getOrderList();\r\n\r\n // for (var i = 0; i < returnedTasks.length; i++) {\r\n // var task = returnedTasks[i];\r\n\r\n // var order = $filter('filter')(orders, function (o) { return o.id == task.ForeignKey })[0];\r\n\r\n // order.StartDate = task.StartDate;\r\n // order.EndDate = task.EndDate;\r\n\r\n // participant.resourcePlanner.fixTimezone(order);\r\n // }\r\n // });\r\n };\r\n\r\n\r\n\r\n //options for right click menu for the when the user clicks on the user row\r\n //participant.resourcePlanner.userContextOptions = [\r\n // [function () {\r\n // return $filter('translate')('txtPaste');\r\n // }, function ($itemScope, $event) {\r\n // if (!participant.resourcePlanner.taskCopied)\r\n // return;\r\n\r\n // var userElement = ResourcePlannerService.getUserElementsFromCoordinates($event.pageX, $event.pageY);\r\n // var user = angular.element(userElement).scope().user;\r\n\r\n // if (!user)\r\n // return;\r\n\r\n // var taskToSave = angular.copy(participant.resourcePlanner.taskCopied);\r\n\r\n // if (taskToSave.Table == 'BOT_ORDER') {\r\n // participant.resourcePlanner.isUserAssignedToOrder(user.id, taskToSave.ForeignKey)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // participant.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // return;\r\n // }\r\n // participant.resourcePlanner.loading = true;\r\n // if (currentRightClickAction == rightMenuActions.COPY)\r\n // taskToSave.id = null;\r\n\r\n // taskToSave.User = user;\r\n\r\n // if (!user.Checked)\r\n // participant.resourcePlanner.checkUser(user);\r\n\r\n // participant.resourcePlanner.saveTask(taskToSave)\r\n // .then(function () {\r\n // participant.resourcePlanner.taskCopied = null;\r\n // currentRightClickAction = null;\r\n // participant.resourcePlanner.getTasksForSelectedUsers();\r\n // });\r\n // });\r\n // } else {\r\n // participant.resourcePlanner.loading = true;\r\n // if (currentRightClickAction == rightMenuActions.COPY)\r\n // taskToSave.id = null;\r\n\r\n // taskToSave.User = user;\r\n\r\n // if (!user.Checked)\r\n // participant.resourcePlanner.checkUser(user);\r\n\r\n // participant.resourcePlanner.saveTask(taskToSave)\r\n // .then(function () {\r\n // participant.resourcePlanner.taskCopied = null;\r\n // currentRightClickAction = null;\r\n // participant.resourcePlanner.getTasksForSelectedUsers();\r\n // });\r\n // }\r\n // }, function () {\r\n // return !!participant.resourcePlanner.taskCopied;\r\n // }]\r\n //];\r\n\r\n participant.resourcePlanner.getParticipantsForCurrentOrder = getParticipantsForOrder;\r\n\r\n participant.resourcePlanner.setActiveStatusForUser = setActiveStatusForUser;\r\n\r\n participant.resourcePlanner.resetCursor = function () {\r\n document.getElementsByTagName('html')[0].style.cursor = '';\r\n $timeout(function () {\r\n document.getElementsByTagName('html')[0].style.cursor = '';\r\n }, 100);\r\n };\r\n };\r\n\r\n /**\r\n * Gets the user settings saved on server\r\n */\r\n function getUserSettings() {\r\n return ResourcePlannerSettingsFactory.getResourcePlannerSettings(settingsTable)\r\n .then(function (result) {\r\n userSettings = result;\r\n });\r\n };\r\n\r\n /**\r\n * Unnasigns the user from the selected order\r\n * If the order is the main, the active status is set to false\r\n * @param {any} $itemScope\r\n * @param {any} $event\r\n */\r\n function unassignUserFromOrder($itemScope, $event) {\r\n //get the task\r\n var task = $itemScope.$parent.task;\r\n //remove the user from the order\r\n ResourcePlannerFactory.unassingUser(task.User.id, task.ForeignKey, false, false)\r\n .then(function () {\r\n //get the tasks\r\n return participant.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n\r\n /**\r\n * Gets the participants for the order\r\n * @returns\r\n */\r\n function getParticipantsForOrder() {\r\n if (participant.resourcePlanner.mainOrder.Participants && participant.resourcePlanner.mainOrder.Participants.length > 0)\r\n return participant.resourcePlanner.mainOrder.Participants;\r\n return [];\r\n };\r\n\r\n /**\r\n * Assigns the user to the order\r\n * @param user\r\n */\r\n function addUserAsParticipantToOrder(user) {\r\n if (!participant.resourcePlanner.mainOrder.Participants)\r\n participant.resourcePlanner.mainOrder.Participants = [];\r\n\r\n var existingUser = _.find(participant.resourcePlanner.mainOrder.Participants,\r\n function (p) { return p.User.id == user.id });\r\n //if the user does not exist-> add it\r\n if (!existingUser)\r\n participant.resourcePlanner.mainOrder.Participants.push({ User: user, Active: user.ParticipantActive });\r\n };\r\n\r\n /**\r\n * Sets the active status for the given user\r\n * @param {any} user\r\n */\r\n function setActiveStatusForUser(user, active) {\r\n var existingUser = _.find(participant.resourcePlanner.mainOrder.Participants,\r\n function (p) { return p.User.id == user.id });\r\n\r\n if (!existingUser)\r\n addUserAsParticipant(user);\r\n else\r\n existingUser.Active = active;\r\n };\r\n\r\n /**\r\n * Removes the user from participant list\r\n * @param user\r\n */\r\n function removeUserFromParticipants(user) {\r\n if (!participant.resourcePlanner.mainOrder.Participants) {\r\n participant.resourcePlanner.mainOrder.Participants = [];\r\n return;\r\n }\r\n\r\n participant.resourcePlanner.mainOrder.Participants.removeIf(function (participant) {\r\n return participant.User.id == user.id;\r\n });\r\n };\r\n\r\n function unassignUser(user) {\r\n ResourcePlannerFactory.unassingUser(user.id, participant.resourcePlanner.mainOrder.id, true, true);\r\n };\r\n\r\n /**\r\n * Returns the users for the current selected organization\r\n * @returns\r\n */\r\n function getUsers() {\r\n var organizationId = participant.resourcePlanner.mainOrder && participant.resourcePlanner.mainOrder.id\r\n ? participant.resourcePlanner.mainOrder.Organization.id\r\n : sessionInformationService.getUser().Organization.id;\r\n return UserFactory.getUsersByOrganizationId(organizationId, null).$promise\r\n .then(function (result) {\r\n if (result && result.length > 0) {\r\n //this is used for user views\r\n participant.resourcePlanner.allUsers = angular.copy(result);\r\n participant.resourcePlanner.users = $filter('orderBy')(angular.copy(result), 'FirstName');\r\n\r\n\r\n //loop through each one user and see if it's a participant\r\n\r\n\r\n ////init the task list to avoid errors\r\n angular.forEach(participant.resourcePlanner.users, function (user) {\r\n user.Tasks = [];\r\n });\r\n\r\n //wait for $digest and set the Collapsed status for user to true\r\n if (participant.resourcePlanner.users.length > 0)\r\n $timeout(function () {\r\n ResourcePlannerService.resetCollapsedUsersHeight(participant.resourcePlanner.users);\r\n });\r\n\r\n }\r\n });\r\n };\r\n\r\n function setTodaysDate() {\r\n $timeout(function () {\r\n participant.resourcePlanner.Date = new Date();\r\n });\r\n };\r\n\r\n function setStartAndEndHours(isInit) {\r\n if (participant.resourcePlanner.fullDayFormat) {\r\n participant.resourcePlanner.startHour = 0;\r\n participant.resourcePlanner.endHour = 24;\r\n } else {\r\n participant.resourcePlanner.startHour = 7;\r\n participant.resourcePlanner.endHour = 17;\r\n }\r\n //resize the grid\r\n if (!isInit)\r\n $timeout(function () { participant.resourcePlanner.resizeFullDayFormat(); });\r\n };\r\n\r\n participant.getFullName = function (user) {\r\n return (user.FirstName ? user.FirstName.trim() + ' ' : '') + (user.LastName ? user.LastName.trim() : '');\r\n };\r\n\r\n /**\r\n * Checks the user\r\n * @param user\r\n * @param notGetTasks\r\n */\r\n participant.checkUser = function (user, notGetTasks, orderId) {\r\n //if (!!orderId && participant.resourcePlanner.mainOrder.id !== orderId)\r\n // return;\r\n\r\n //user.IsAssignedToOrder = !user.IsAssignedToOrder;\r\n\r\n //if (user.IsAssignedToOrder)\r\n // addUserAsParticipantToOrder(user);\r\n //else {\r\n // removeUserFromParticipants(user);\r\n // //collapse the user\r\n // user.Collapsed = true;\r\n // participant.resourcePlanner.collapseUser(user);\r\n // //deactivate tasks that are related to this order\r\n // unassignUser(user);\r\n\r\n // participant.resourcePlanner.loading = true;\r\n // $timeout(function () {\r\n // participant.resourcePlanner.getTasksForSelectedUsers()\r\n // .then(function () {\r\n // //participant.resourcePlanner.loading = false;\r\n // });\r\n // });\r\n //}\r\n\r\n };\r\n\r\n function collapseAllUsers() {\r\n $timeout(function () {\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++) {\r\n participant.resourcePlanner.users[i].Collapsed = true;\r\n if (participant.resourcePlanner.users[i].Collapsed)\r\n ResourcePlannerService.collapseUserTasks(participant.resourcePlanner.users[i]);\r\n else\r\n participant.resourcePlanner.users[i].Lines = ResourcePlannerService.expandUserTasks(participant.resourcePlanner.users[i]);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sets the current overview\r\n * @param mode\r\n */\r\n participant.setNavigationMode = function (mode) {\r\n switch (mode) {\r\n case 'DAY':\r\n if (!participant.navigation.day) {\r\n participant.navigation = { day: true, workingDays: false, week: false, month: false };\r\n //setTodaysDate();\r\n }\r\n break;\r\n case 'WORKING_DAYS':\r\n if (!participant.navigation.workingDays)\r\n participant.navigation = { day: false, workingDays: true, week: false, month: false };\r\n break;\r\n case 'WEEK':\r\n if (!participant.navigation.week)\r\n participant.navigation = { day: false, workingDays: false, week: true, month: false };\r\n break;\r\n case 'MONTH':\r\n if (!participant.navigation.month)\r\n participant.navigation = { day: false, workingDays: false, week: false, month: true };\r\n break;\r\n default:\r\n participant.navigation = { day: true, workingDays: false, week: false, month: false };\r\n }\r\n //when changing overviews, set the scroll to top to avoid ui scroll bug\r\n if (participant.resourcePlanner && participant.resourcePlanner.resetScroll)\r\n participant.resourcePlanner.resetScroll();\r\n\r\n $timeout(function () {\r\n //when changing overview, collapse all the users to avoid undefined errors\r\n collapseAllUsers();\r\n });\r\n };\r\n\r\n /**\r\n * Toggles between 24h format and normal work hours\r\n */\r\n participant.toggleFullDayFormat = function () {\r\n participant.resourcePlanner.fullDayFormat = !participant.resourcePlanner.fullDayFormat;\r\n setStartAndEndHours();\r\n };\r\n\r\n participant.setToday = function () {\r\n setTodaysDate();\r\n participant.resourcePlanner.onDateChange();\r\n };\r\n\r\n function removeAllTasks() {\r\n for (var i = 0; i < participant.resourcePlanner.users.length; i++) {\r\n participant.resourcePlanner.users[i].Tasks = [];\r\n participant.resourcePlanner.users[i].IsAssignedToOrder = false;\r\n }\r\n };\r\n\r\n function setUser(user) {\r\n //get the user from the list\r\n var participantUser = _.find(participant.resourcePlanner.users, function (u) { return u.id == user.id });\r\n if (_.isNil(participantUser))\r\n return;\r\n\r\n var collapsed = participantUser.Collapsed;\r\n var lines = participantUser.Lines;\r\n\r\n participantUser = user;\r\n participantUser.Lines = lines;\r\n participantUser.Collapsed = collapsed;\r\n //check if the user is assigned to the current order\r\n if (_.find(getParticipantsForOrder(), function (p) { return p.User.id == participantUser.id }))\r\n participantUser.IsAssignedToOrder = true;\r\n //need to rewrite the object because somehow it looses reference :|\r\n participant.resourcePlanner.users[_.findIndex(participant.resourcePlanner.users,\r\n function (p) { return p.id == participantUser.id })] = participantUser;\r\n };\r\n\r\n /**\r\n * Checks whether the user has tasks\r\n * @param users\r\n * @returns\r\n */\r\n function areThereTasks(users) {\r\n if (!users || users.length == 0)\r\n return false;\r\n for (var i = 0; i < users.length; i++) {\r\n if (users[i].Tasks && users[i].Tasks.length > 0)\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Goes through all tasks and the tasks taht are associated to the current order are highlighted\r\n * @param user\r\n */\r\n function associateCurrentOrderWithTasks(user) {\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n return;\r\n\r\n var orders = participant.resourcePlanner.getOrderList();\r\n for (var i = 0; i < user.Tasks.length; i++) {\r\n var task = user.Tasks[i];\r\n\r\n if ($filter('filter')(orders, function (order) { return order.id == task.ForeignKey }).length > 0)\r\n task.currentOrder = true;\r\n }\r\n\r\n };\r\n\r\n participant.showCollapsedButton = function (user) {\r\n return ResourcePlannerService.showCollapseButton(user);\r\n };\r\n\r\n /**\r\n * Switches to the old way of adding personnel\r\n */\r\n participant.useOldPersonnel = function () {\r\n if (participant.resourcePlanner.createActionTimeline)\r\n participant.resourcePlanner.createActionTimeline = false;\r\n\r\n participant.navigation = { day: false, workingDays: false, week: false, month: false };\r\n participant.resourcePlanner.toggleOldPersonnel();\r\n OrderFactory.useOldPersonnel = true;\r\n };\r\n\r\n participant.collapseUser = function (user) {\r\n user.Collapsed = !user.Collapsed;\r\n participant.resourcePlanner.collapseUser(user);\r\n };\r\n\r\n /**\r\n * Toggles the order panel\r\n */\r\n participant.toggleOrdersPanel = function () {\r\n if (participant.resourcePlanner.createActionTimeline && !participant.resourcePlanner.selectOrdersForTimeline)\r\n return;\r\n\r\n participant.resourcePlanner.panelLoading = true;\r\n\r\n if (participant.resourcePlanner.taskDetailsPanel)\r\n participant.resourcePlanner.taskDetailsPanel = false;\r\n\r\n\r\n if (participant.resourcePlanner.userListPanel)\r\n participant.toggleUserListPanel();\r\n\r\n if (!participant.resourcePlanner.orderListPanel)\r\n participant.resourcePlanner.orderListPanel = true;\r\n else\r\n //$timeout(function () {\r\n participant.resourcePlanner.orderListPanel = false;\r\n //}, 500);\r\n\r\n if (ParticipantResourcePlannerPanelService.getCurrentState() == ParticipantResourcePlannerPanelService.getStates().CLOSED)\r\n ParticipantResourcePlannerPanelService.open();\r\n else if (!participant.resourcePlanner.orderListPanel)\r\n ParticipantResourcePlannerPanelService.close();\r\n\r\n $timeout(function () {\r\n participant.resourcePlanner.panelLoading = false;\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Toggles the user list panel\r\n */\r\n participant.toggleUserListPanel = function () {\r\n participant.resourcePlanner.panelLoading = true;\r\n\r\n if (participant.resourcePlanner.orderListPanel)\r\n participant.toggleOrdersPanel();\r\n\r\n if (!participant.resourcePlanner.userListPanel)\r\n participant.resourcePlanner.userListPanel = true;\r\n else\r\n //$timeout(function () {\r\n participant.resourcePlanner.userListPanel = false;\r\n //}, 500);\r\n\r\n if (ParticipantResourcePlannerPanelService.getCurrentState() == ParticipantResourcePlannerPanelService.getStates().CLOSED)\r\n ParticipantResourcePlannerPanelService.open();\r\n else\r\n ParticipantResourcePlannerPanelService.close();\r\n\r\n $timeout(function () {\r\n participant.resourcePlanner.panelLoading = false;\r\n }, 500);\r\n };\r\n\r\n function prepareTaskForDetails(task) {\r\n participant.resourcePlanner.task = angular.copy(task);\r\n participant.resourcePlanner.task.StartDate = DateUtilService.getLongWithoutOffset(participant.resourcePlanner.task.StartDate);\r\n participant.resourcePlanner.task.EndDate = DateUtilService.getLongWithoutOffset(participant.resourcePlanner.task.EndDate);\r\n };\r\n\r\n /**\r\n * Collapses the user list\r\n */\r\n participant.collpaseUserList = function () {\r\n participant.resourcePlanner.loading = true;\r\n var userListCollapsed = angular.copy(participant.userListCollapsed);\r\n userListCollapsed = !userListCollapsed;\r\n\r\n var userListElement = angular.element('.participant-resource-planner-user-list');\r\n var userFullNameElement = angular.element('.participant-resource-planner-user-name');\r\n var overviewGrid = angular.element('.participant-resource-planner-grid');\r\n\r\n if (userListCollapsed) {\r\n userListElement.css('width', '100px');\r\n userListElement.css('transition', 'all 0.3s ease-in');\r\n userFullNameElement.css('opacity', '0');\r\n userFullNameElement.css('transition', 'all 0.2s ease-in');\r\n\r\n $timeout(function () {\r\n participant.userListCollapsed = userListCollapsed;\r\n overviewGrid.css('width', 'calc(100% - 100px');\r\n userListElement.css('transition', 'all 0.3s ease-in');\r\n participant.resourcePlanner.resizeOverviewToFit();\r\n participant.resourcePlanner.loading = false;\r\n }, 250);\r\n } else {\r\n userListElement.css('width', '');\r\n userFullNameElement.css('opacity', '1');\r\n overviewGrid.css('width', '');\r\n $timeout(function () {\r\n participant.userListCollapsed = userListCollapsed;\r\n $timeout(function () {\r\n participant.resourcePlanner.resizeOverviewToFit();\r\n participant.resourcePlanner.loading = false;\r\n }, 150);\r\n }, 100);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Listen to when the snap is toggle for the view to be resized\r\n */\r\n function listenToSnap() {\r\n $scope.$watch(function () {\r\n return snapService.getSnap();\r\n }, function (data) {\r\n if (participant.resourcePlanner && participant.resourcePlanner.resizeFullDayFormat) {\r\n $timeout(function () {\r\n participant.resourcePlanner.resizeFullDayFormat();\r\n }, 100);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Get the order ids from the given tasks\r\n * @param tasks\r\n * @returns\r\n */\r\n function getOrderIdsFromTask(tasks) {\r\n if (!tasks || tasks.length == 0)\r\n return [];\r\n\r\n var orders = participant.resourcePlanner.getOrderList();\r\n var orderIds = [];\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n if ($filter('filter')(tasks, function (task) { return task.ForeignKey == order.id }).length > 0)\r\n orderIds.push(order.id);\r\n }\r\n\r\n return orderIds;\r\n };\r\n\r\n /**\r\n * Deletes the hour from the given task\r\n * @param task\r\n * @param hourToDelete\r\n */\r\n function deleteHour(task, hourToDelete) {\r\n var dayStart = DateUtilService.setDate(hourToDelete, hourToDelete.getHours(), 0, 0);\r\n var dayEnd = DateUtilService.setDate(hourToDelete, hourToDelete.getHours() + 1, 0, 0);\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n // var parentTask = task.Parent && task.Parent.id ? angular.copy(task.Parent) : angular.copy(task);\r\n task.Active = true;\r\n\r\n if (taskStartDate < dayStart && taskEndDate > dayEnd) {\r\n var newTasks = [];\r\n\r\n var firstTask = angular.copy(task);\r\n //if (!task.Parent || !task.Parent.id)\r\n // firstTask.id = null;\r\n // firstTask.StartDate = task.Parent && task.Parent.id ? task.StartDate : parentTask.StartDate;\r\n firstTask.EndDate = DateUtilService.getLongWithOffset(dayStart);\r\n // firstTask.Parent = parentTask;\r\n firstTask.Active = true;\r\n\r\n var secondTask = angular.copy(task);\r\n secondTask.id = null;\r\n secondTask.StartDate = DateUtilService.getLongWithOffset(dayEnd);\r\n // secondTask.EndDate = task.Parent && task.Parent.id ? task.EndDate : parentTask.EndDate;\r\n // secondTask.Parent = parentTask;\r\n secondTask.Active = true;\r\n\r\n newTasks = [firstTask, secondTask];\r\n $q.all([\r\n participant.resourcePlanner.saveTask(newTasks[0]),\r\n participant.resourcePlanner.saveTask(newTasks[1])\r\n ]).then(function () {\r\n participant.resourcePlanner.getTasksForSelectedUsers();\r\n\r\n if (firstTask.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(firstTask.ForeignKey);\r\n });\r\n } else {\r\n if (taskStartDate < dayStart && taskEndDate <= dayEnd)\r\n task.EndDate = DateUtilService.getLongWithOffset(dayStart);\r\n\r\n if (taskStartDate >= dayStart && taskEndDate > dayEnd)\r\n task.StartDate = DateUtilService.getLongWithOffset(dayEnd);\r\n\r\n if (taskStartDate >= dayStart && taskEndDate <= dayEnd) {\r\n task.Active = false;\r\n }\r\n participant.resourcePlanner.saveTask(task)\r\n .then(function () {\r\n participant.resourcePlanner.getTasksForSelectedUsers();\r\n\r\n if (task.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(task.ForeignKey);\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Deletes the day from the given task\r\n * @param task\r\n * @param dayToDelete\r\n */\r\n function deleteDay(task, dayToDelete) {\r\n var dayStart = angular.copy(dayToDelete);\r\n dayStart = DateUtilService.setDate(dayStart, 0, 0, 0);\r\n\r\n var dayEnd = angular.copy(dayToDelete);\r\n dayEnd = DateUtilService.setDate(dayEnd, 23, 59, 59);\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n //var parentTask = task.Parent && task.Parent.id ? angular.copy(task.Parent) : angular.copy(task);\r\n task.Active = true;\r\n\r\n if (taskStartDate < dayStart && taskEndDate > dayEnd) {\r\n var newTasks = [];\r\n\r\n var firstTask = angular.copy(task);\r\n // if (!task.Parent || !task.Parent.id)\r\n // firstTask.id = null;\r\n //firstTask.StartDate = task.Parent && task.Parent.id ? task.StartDate : parentTask.StartDate;\r\n firstTask.EndDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayStart, -1), 23, 59, 59));\r\n // firstTask.Parent = parentTask;\r\n firstTask.Active = true;\r\n\r\n var secondTask = angular.copy(task);\r\n secondTask.id = null;\r\n secondTask.StartDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayEnd, 1), 0, 0, 0));\r\n //secondTask.EndDate = task.Parent && task.Parent.id ? task.EndDate : parentTask.EndDate;\r\n //secondTask.Parent = parentTask;\r\n secondTask.Active = true;\r\n\r\n newTasks = [firstTask, secondTask];\r\n $q.all([\r\n participant.resourcePlanner.saveTask(newTasks[0]),\r\n participant.resourcePlanner.saveTask(newTasks[1])\r\n ]).then(function () {\r\n participant.resourcePlanner.getTasksForSelectedUsers();\r\n if (firstTask.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(firstTask.ForeignKey);\r\n });\r\n } else {\r\n if (taskStartDate < dayStart && taskEndDate <= dayEnd)\r\n task.EndDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayStart, -1), 23, 59, 59));\r\n\r\n if (taskStartDate >= dayStart && taskEndDate > dayEnd)\r\n task.StartDate = DateUtilService.getLongWithOffset(DateUtilService.setDate(DateUtilService.addDaysToDate(dayEnd, 1), 0, 0, 0));\r\n\r\n if (taskStartDate >= dayStart && taskEndDate <= dayEnd) {\r\n task.Active = false;\r\n }\r\n participant.resourcePlanner.saveTask(task)\r\n .then(function () {\r\n if (task.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(task.ForeignKey);\r\n\r\n participant.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n };\r\n\r\n\r\n function split(task, date) {\r\n var splitDate = DateUtilService.setDate(date, date.getHours(), date.getMinutes(), date.getSeconds());\r\n\r\n var firstTask = angular.copy(task);\r\n firstTask.EndDate = DateUtilService.getLongWithOffset(splitDate);\r\n\r\n var secondTask = angular.copy(task);\r\n secondTask.id = null;\r\n secondTask.StartDate = DateUtilService.getLongWithOffset(splitDate);\r\n\r\n return Promise.all([participant.resourcePlanner.updateTaskListWithoutEmail(firstTask), participant.resourcePlanner.updateTaskListWithoutEmail(secondTask)])\r\n .then(function () {\r\n return participant.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n /**\r\n * Deletes the given task\r\n * @param task\r\n */\r\n function deleteTask(task) {\r\n task.Active = false;\r\n participant.resourcePlanner.saveTask(task)\r\n .then(function () {\r\n participant.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n };\r\n\r\n /**\r\n * Opens the user settings for participant resource planner\r\n * @returns {} \r\n */\r\n participant.openSettings = function () {\r\n if (participant.resourcePlanner.createActionTimeline)\r\n participant.resourcePlanner.createActionTimeline = false;\r\n\r\n participant.settingsTable = settingsTable;\r\n participant.modalSettingsInstance = $uibModal.open({\r\n template: '',\r\n scope: $scope,\r\n size: 'lg'\r\n });\r\n\r\n //get the settings again after the modal has been closed\r\n participant.modalSettingsInstance.result.finally(function () {\r\n processUserSettings();\r\n });\r\n };\r\n\r\n participant.toggleCreateOrderTimeline = function () {\r\n participant.resourcePlanner.createActionTimeline = !participant.resourcePlanner.createActionTimeline;\r\n\r\n if (participant.resourcePlanner.createActionTimeline)\r\n participant.resourcePlanner.currentRightClickAction = ResourcePlannerService.rightMenuActions.CREATE_ORDER;\r\n };\r\n\r\n /**\r\n * Destroy handler\r\n */\r\n $scope.$on('$destroy', function () {\r\n //show the loader\r\n loadingService.noLoader = false;\r\n participant.resourcePlanner.orderListPanel = false;\r\n participant.resourcePlanner.userListPanel = false;\r\n participant.resourcePlanner = null;\r\n });\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('order')\r\n .component('vbOrderRiskAnalysis',\r\n {\r\n templateUrl: 'scripts/order/risk-analysis/order-risk-analysis.component.html',\r\n controller: 'OrderRiskAnalysisController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n order : '<'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrderRiskAnalysisController.$inject = [\r\n 'RiskAnalysisFactory',\r\n '$uibModal',\r\n '$scope',\r\n '$route'\r\n ];\r\n\r\n function OrderRiskAnalysisController(\r\n RiskAnalysisFactory,\r\n $uibModal,\r\n $scope,\r\n $route\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.riskHeads = [];\r\n vm.createNewRiskHead = createNewRiskHead;\r\n vm.goToRiskHeadDetails = goToRiskHeadDetails;\r\n\r\n vm.$onInit = function () {\r\n }\r\n\r\n vm.$onChanges = function (simpleChanges) {\r\n if (!simpleChanges || !simpleChanges.order)\r\n return;\r\n\r\n if (_.isEqual(simpleChanges.order.currentValue, simpleChanges.order.previousValue))\r\n return;\r\n\r\n var orderId = _.get(simpleChanges.order.currentValue, 'id');\r\n\r\n if (!orderId)\r\n return;\r\n\r\n getRiskHeadsForOrder(orderId);\r\n }\r\n\r\n /**\r\n * Gets a list of risk heads for a given order\r\n * @param {any} orderId\r\n */\r\n function getRiskHeadsForOrder(orderId) {\r\n\r\n RiskAnalysisFactory.getRiskHeadsForOrder(orderId)\r\n .then(function (riskHeads) {\r\n\r\n vm.riskHeads = riskHeads;\r\n\r\n // if there is only one element returned and has no id clear the array\r\n if (vm.riskHeads.length === 1 && !vm.riskHeads[0].id)\r\n vm.riskHeads = [];\r\n // set risk head count to display in tab heading\r\n vm.order.RiskCount = vm.riskHeads.length;\r\n });\r\n }\r\n\r\n /**\r\n * Opens a modal containing risk head details\r\n * @param {any} selectedRiskHeadId\r\n */\r\n function openRiskHeadModal(selectedRiskHeadId) {\r\n\r\n // attach on scope the needed data\r\n $scope.orderId = vm.order.id;\r\n $scope.selectedRiskHeadId = selectedRiskHeadId;\r\n\r\n $uibModal.open({\r\n template: '',\r\n scope: $scope,\r\n size: 'lg',\r\n keyboard: false,\r\n backdrop: 'static'\r\n })\r\n .result\r\n .then(function () {\r\n $route.reload();\r\n });\r\n\r\n }\r\n\r\n function createNewRiskHead() {\r\n openRiskHeadModal();\r\n }\r\n\r\n function goToRiskHeadDetails(riskHeadId) {\r\n openRiskHeadModal(riskHeadId);\r\n }\r\n }\r\n\r\n angular\r\n .module('order')\r\n .controller('OrderRiskAnalysisController', OrderRiskAnalysisController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrderTripController.$inject = [\r\n '$scope',\r\n 'OrderFactory',\r\n 'errorService',\r\n '_',\r\n '$uibModal',\r\n 'AutomileFactory',\r\n '$filter'\r\n ];\r\n\r\n angular\r\n .module('order')\r\n .controller('OrderTripController', OrderTripController);\r\n\r\n function OrderTripController(\r\n $scope,\r\n OrderFactory,\r\n errorService,\r\n _,\r\n $uibModal,\r\n AutomileFactory,\r\n $filter\r\n ) {\r\n\r\n var applicationChange = OrderFactory.applicationChange;\r\n\r\n this.$onInit = function () {\r\n $scope.trip.getTrips = $scope.getTrips;\r\n\r\n };\r\n\r\n $scope.getTrips = function () {\r\n if ($scope.currentOrder.id > 0 && !$scope.currentOrder.orderTrips) {\r\n var trips = OrderFactory.getTrips($scope.currentOrder.id);\r\n trips.$promise.then(function (result) {\r\n $scope.currentOrder.OrderTrips = result;\r\n });\r\n }\r\n };\r\n\r\n $scope.calcDuration = function (firstDate, secondDate) {\r\n var diff = Math.abs(new Date(firstDate) - new Date(secondDate));\r\n var totalMinutes = Math.floor((diff / 1000) / 60);\r\n\r\n return totalMinutes;\r\n }\r\n\r\n $scope.getHours = function (firstDate, secondDate) {\r\n var totalMinutes = $scope.calcDuration(firstDate, secondDate);\r\n var hours = Math.floor(totalMinutes / 60);\r\n var minutes = totalMinutes % 60;\r\n\r\n return (hours < 10 ? \"0\" + hours : hours) + \":\" + (minutes < 10 ? \"0\" + minutes : minutes);\r\n }\r\n\r\n $scope.unassignTrip = function (trip) {\r\n trip.Change = applicationChange.DELETE;\r\n\r\n if ($scope.currentOrder && $scope.currentOrder.id)\r\n OrderFactory.unassignTrip(trip.id, $scope.currentOrder.id, trip.Driver.UserId);\r\n };\r\n\r\n $scope.getTripsForDisplay = function () {\r\n return _.filter($scope.currentOrder.OrderTrips, function (p) { return p.Change != applicationChange.DELETE });\r\n };\r\n\r\n $scope.addNewTrip = function () {\r\n $uibModal.open({\r\n templateUrl: 'Scripts/order/trip/new-trip.modal.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n };\r\n\r\n\r\n $scope.getAllTrips = function (freeText) {\r\n var tripList = AutomileFactory.getTrips(freeText);\r\n tripList.$promise.then(function (result) {\r\n $scope.trips = _.differenceBy(result, $scope.currentOrder.OrderTrips, 'id');\r\n for (var index = 0; index < $scope.trips.length; index++) {\r\n $scope.trips[index].id = parseInt($scope.trips[index].id);\r\n $scope.trips[index].TripId = parseInt($scope.trips[index].TripId);\r\n }\r\n\r\n });\r\n\r\n };\r\n\r\n $scope.setTrip = function (trip) {\r\n $scope.freeText = '';\r\n $scope.freeText = trip.TripId + ' - ' + $filter('date')(trip.TripStartDateTimeLong, 'dd.MM.yyyy HH:mm');\r\n $scope.trip = trip;\r\n\r\n $scope.trip.IncludeTollPassesIntoHours = true;\r\n }\r\n\r\n $scope.clearTrip = function () {\r\n $scope.freeText = '';\r\n $scope.trip = null;\r\n }\r\n\r\n\r\n $scope.saveNewTrip = function () {\r\n var savedTrip = OrderFactory.saveOrderTrip($scope.trip, $scope.currentOrder.id);\r\n savedTrip.then(function () {\r\n $scope.getTrips();\r\n $scope.clearTrip();\r\n });\r\n\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrderWorkingHourController.$inject = [\r\n '$scope',\r\n 'OrderFactory',\r\n '$uibModal',\r\n 'sessionInformationService',\r\n '_'\r\n ];\r\n\r\n angular\r\n .module('order')\r\n .controller('OrderWorkingHourController', OrderWorkingHourController);\r\n\r\n function OrderWorkingHourController(\r\n $scope,\r\n OrderFactory,\r\n $uibModal,\r\n sessionInformationService,\r\n _\r\n ) {\r\n\r\n $scope.decreaseQuantity = decreaseQuantity;\r\n $scope.increaseQuantity = increaseQuantity;\r\n\r\n this.$onInit = function () {\r\n $scope.workingHour.getWorkingHours = $scope.getWorkingHours;\r\n\r\n getUsersForWorkingHour()\r\n .then();\r\n };\r\n\r\n function getUsersForWorkingHour() {\r\n if (!$scope.workingHourUsers)\r\n return OrderFactory.getUsersForOrder($scope.order.id, $scope.order.Organization.id)\r\n .$promise\r\n .then(function (result) {\r\n $scope.workingHourUsers = result;\r\n });\r\n\r\n return Promise.resolve();\r\n };\r\n\r\n function filterHoursBasedOnUsers() {\r\n if (_.isNil($scope.currentOrder.orderWorkingHours) || _.isEmpty($scope.currentOrder.orderWorkingHours))\r\n return Promise.resolve();\r\n\r\n $scope.currentOrder.orderWorkingHours = _.intersectionBy($scope.currentOrder.orderWorkingHours, $scope.workingHourUsers, 'id');\r\n };\r\n\r\n /**\r\n * Gets the hours for the current selected orders\r\n * @returns {} \r\n */\r\n $scope.getWorkingHours = function () {\r\n if ($scope.currentOrder.id > 0 && !$scope.currentOrder.orderWorkingHours) {\r\n var workingHours = OrderFactory.getWorkingHours($scope.currentOrder.id);\r\n workingHours.$promise.then(function (result) {\r\n $scope.currentOrder.orderWorkingHours = result;\r\n //filterHoursBasedOnUsers();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Prepares new hour to be added and opens a modal with the hour form\r\n * @param {} user \r\n * @param {} workingHour \r\n * @returns {} \r\n */\r\n $scope.addNewWorkingHour = function (user, workingHour) {\r\n //open modal\r\n if (user && workingHour) {\r\n $scope.isNewWorkingHour = false;\r\n $scope.newWorkingHour = angular.copy(workingHour);\r\n $scope.newWorkingHour.OrderWorkingHour.Quantity = 0;\r\n $scope.newWorkingHour.OrderWorkingHour.Note = '';\r\n $scope.newWorkingHour.OrderWorkingHour.InternalNote = '';\r\n $scope.newWorkingHour.OrderWorkingHour.IsTotal = false;\r\n $scope.newWorkingHour.User = user;\r\n //changesMade = true;\r\n } else {\r\n $scope.isNewWorkingHour = true;\r\n\r\n $scope.newWorkingHour = {\r\n };\r\n\r\n if (!$scope.workingHourCategories) {\r\n OrderFactory.getWorkingHourCategories($scope.order.id).$promise.then(function (result) {\r\n $scope.workingHourCategories = result;\r\n });\r\n }\r\n }\r\n\r\n $uibModal.open({\r\n templateUrl: 'Scripts/order/working-hour/new-working-hour.modal.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n };\r\n\r\n /**\r\n * Display a message informing the user when he can add hours\r\n * @returns {} \r\n */\r\n $scope.showNewWorkingHourRestriction = function () {\r\n if (!$scope.currentOrder.WorkingHoursStartDate || !$scope.currentOrder.WorkingHoursEndDate)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the save button is disabled\r\n * @param {} isWorkingHourFormInvalid\r\n * @returns {} \r\n */\r\n $scope.newWorkingHourDisabled = function (isWorkingHourFormInvalid) {\r\n if (!$scope.newWorkingHour.OrderWorkingHour)\r\n return true;\r\n\r\n if ($scope.newWorkingHourDateIsInvalid())\r\n return true;\r\n\r\n if (isWorkingHourFormInvalid)\r\n return true;\r\n\r\n if ($scope.newWorkingHour.OrderWorkingHour.Quantity == 0)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Saves the new working hour \r\n * @param {} workingHour \r\n * @returns {} \r\n */\r\n $scope.saveNewWorkingHour = function (workingHour) {\r\n //changesMade = true;\r\n\r\n if (!$scope.currentOrder.WorkingHours)\r\n $scope.currentOrder.WorkingHours = [];\r\n\r\n if (!$scope.currentOrder.orderWorkingHours)\r\n $scope.currentOrder.orderWorkingHours = [];\r\n\r\n var userExists = false;\r\n\r\n if (!$scope.isNewWorkingHour) {\r\n for (var i = 0; i < $scope.currentOrder.orderWorkingHours.length; i++) {\r\n if ($scope.currentOrder.orderWorkingHours[i].id == workingHour.User.id) {\r\n userExists = true;\r\n if (!$scope.currentOrder.orderWorkingHours[i].WorkingHourCategory)\r\n $scope.currentOrder.orderWorkingHours[i].WorkingHourCategory = [];\r\n\r\n\r\n $scope.currentOrder.orderWorkingHours[i].WorkingHourCategory.push(angular.copy(workingHour));\r\n\r\n //add for save\r\n var newUser = angular.copy(workingHour.User);\r\n workingHour.OrderWorkingHour.Date = workingHour.OrderWorkingHour.Date.getTime(); //transform date in long\r\n newUser.WorkingHourCategory = [];\r\n workingHour.OrderWorkingHour.Date = new Date(workingHour.OrderWorkingHour.Date).getTime();\r\n newUser.WorkingHourCategory.push(angular.copy(workingHour));\r\n $scope.currentOrder.WorkingHours.push(newUser);\r\n\r\n //calculate total\r\n $scope.currentOrder.orderWorkingHours[i].WorkingHourCategory.forEach(function (wh) {\r\n if (wh.id == workingHour.id && wh.OrderWorkingHour.IsTotal) {\r\n wh.OrderWorkingHour.Quantity = parseFloat(wh.OrderWorkingHour.Quantity) + parseFloat(workingHour.OrderWorkingHour.Quantity);\r\n wh.OrderWorkingHour.Quantity = wh.OrderWorkingHour.Quantity.toFixed(2);\r\n }\r\n });\r\n\r\n break;\r\n }\r\n }\r\n } else {\r\n var newUser = angular.copy(workingHour.User);\r\n newUser.WorkingHourCategory = [];\r\n var newWorkingHour = angular.copy(workingHour.WorkingHourCategory);\r\n newWorkingHour.OrderWorkingHour = angular.copy(workingHour.OrderWorkingHour);\r\n newWorkingHour.OrderWorkingHour.OrderId = $scope.currentOrder.IsTask ? OrderFactory.getParentOrderIdThatIsNotTask($scope.currentOrder.ParentId, $scope.order) : $scope.currentOrder.id;\r\n newWorkingHour.OrderWorkingHour.TaskId = $scope.currentOrder.IsTask ? $scope.currentOrder.id : null;\r\n newWorkingHour.OrderWorkingHour.IsTotal = false;\r\n\r\n newWorkingHour.OrderWorkingHour.Date = newWorkingHour.OrderWorkingHour.Date.getTime(); //transform date in long\r\n\r\n newUser.WorkingHourCategory.push(newWorkingHour);\r\n //add for save\r\n $scope.currentOrder.WorkingHours.push(newUser);\r\n\r\n\r\n //create total and add in the grid\r\n var totalRow = angular.copy(newWorkingHour);\r\n totalRow.OrderWorkingHour.IsTotal = true;\r\n totalRow.OrderWorkingHour.Note = null;\r\n totalRow.OrderWorkingHour.Date = null;\r\n totalRow.OrderWorkingHour.InternalNote = null;\r\n var userTotalRow = angular.copy(newUser);\r\n userTotalRow.WorkingHourCategory.push(totalRow);\r\n\r\n $scope.currentOrder.orderWorkingHours.push(userTotalRow);\r\n }\r\n\r\n };\r\n\r\n var dateInRange = function (date, startDate, endDate) {\r\n return (new Date(date).getTime() > new Date(startDate).getTime() &&\r\n new Date(date).getTime() < new Date(endDate).getTime())\r\n ? true\r\n : false;\r\n };\r\n\r\n /**\r\n * Checks whether the hour date is valid or not\r\n * @returns {} \r\n */\r\n $scope.newWorkingHourDateIsInvalid = function () {\r\n if (!$scope.newWorkingHour.OrderWorkingHour.Date || !$scope.currentOrder.WorkingHoursStartDate || !$scope.currentOrder.WorkingHoursEndDate)\r\n return false;\r\n\r\n var startDate = moment($scope.currentOrder.WorkingHoursStartDate).set({ hour: 0, minute: 0, second: 0 });\r\n var endDate = moment($scope.currentOrder.WorkingHoursEndDate).set({ hour: 23, minute: 59, second: 59 });\r\n\r\n var actualDate = moment($scope.newWorkingHour.OrderWorkingHour.Date);\r\n\r\n if (actualDate.isBefore(startDate) || actualDate.isAfter(endDate))\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n function decreaseQuantity(quantity) {\r\n\r\n var parsedQuantity = parseFloat($scope.newWorkingHour.OrderWorkingHour.Quantity);\r\n\r\n if (isNaN(parsedQuantity)) {\r\n return;\r\n }\r\n\r\n $scope.newWorkingHour.OrderWorkingHour.Quantity = parsedQuantity - quantity;\r\n }\r\n\r\n function increaseQuantity(quantity) {\r\n\r\n var parsedQuantity = parseFloat($scope.newWorkingHour.OrderWorkingHour.Quantity);\r\n\r\n if (isNaN(parsedQuantity)) {\r\n return;\r\n }\r\n\r\n $scope.newWorkingHour.OrderWorkingHour.Quantity = parsedQuantity + quantity;\r\n }\r\n };\r\n})();","(function () {\r\n\r\n angular\r\n .module(\"organization\")\r\n .component(\"vbCompanyInfo\", {\r\n templateUrl: \"Scripts/organization/company-info/company-info.component.html\",\r\n controller: \"CompanyInfoController\",\r\n controllerAs : \"vm\",\r\n bindings: {\r\n organization: \"
' + template + '
' + '
',\r\n scope: $scope,\r\n size: 'lg',\r\n windowClass: 'gdpr-customer-notification-preview'\r\n });\r\n });\r\n };\r\n\r\n function toggleCustomersWithoutOrdersTableVisibility() {\r\n\r\n vm.customersWithoutOrdersTableVisibility = !vm.customersWithoutOrdersTableVisibility;\r\n\r\n if (vm.customersWithoutOrdersTableVisibility) {\r\n getCustomersWithoutOrders();\r\n } else {\r\n vm.customersWithoutOrders = [];\r\n }\r\n }\r\n\r\n function getCustomersWithoutOrders() {\r\n GdprFactory.getCustomersWithoutOrders(vm.organizationId)\r\n .then(function (customers) {\r\n vm.customersWithoutOrders = customers;\r\n });\r\n }\r\n\r\n function isLoggedUserOrganization() {\r\n return sessionInformationService.isLoggedUserOrganization(vm.organizationId);\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DepartmentController.$inject = [\r\n '$scope',\r\n '$uibModal',\r\n 'OrganizationFactory',\r\n ];\r\n\r\n angular.module('organization').controller('DepartmentController', DepartmentController);\r\n\r\n function DepartmentController(\r\n $scope,\r\n $uibModal,\r\n OrganizationFactory\r\n ) {\r\n\r\n $scope.departmentPredicate = 'Name';\r\n $scope.departmentReverse = false;\r\n\r\n $scope.getDepartments = getDepartments;\r\n //Must use object; Doesn't work otherwise\r\n $scope.includeDeactivated = {value: false};\r\n\r\n var departmentModal;\r\n var organizationId = $scope.organization.id;\r\n\r\n /**\r\n * Gets the departments for the organization provided\r\n */\r\n function getDepartments() {\r\n OrganizationFactory.getDepartments(organizationId, $scope.includeDeactivated.value).$promise.then(function (result) {\r\n $scope.departments = result;\r\n });\r\n };\r\n\r\n /**\r\n * Changes the sort based on predicate that is given\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n $scope.changeDepartmentSorting = function (orderBy) {\r\n if (orderBy != $scope.departmentPredicate) {\r\n $scope.departmentPredicate = orderBy;\r\n } else {\r\n $scope.departmentReverse = !$scope.departmentReverse;\r\n }\r\n };\r\n\r\n /**\r\n * Open a modal with info about the given department\r\n * @param {} department \r\n * @returns {} \r\n */\r\n $scope.openDepartmentModal = function (department) {\r\n $scope.department = department;\r\n\r\n departmentModal = $uibModal.open({\r\n templateUrl: 'Scripts/organization/department/modalDepartmentPartial.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n };\r\n\r\n /**\r\n * Closes the department modal\r\n * @returns {} \r\n */\r\n $scope.closeDepartmentModal = function () {\r\n departmentModal.dismiss('cancel');\r\n };\r\n\r\n /**\r\n * Saves te given department\r\n * @param {} department \r\n * @returns {} \r\n */\r\n $scope.saveDepartment = function (department) {\r\n if (!department.id)\r\n department.Active = true;\r\n\r\n OrganizationFactory.saveDepartment(department, organizationId)\r\n .then(function () {\r\n getDepartments();\r\n $scope.closeDepartmentModal();\r\n });\r\n };\r\n \r\n getDepartments();\r\n\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbDidacUserMapping', {\r\n templateUrl: 'Scripts/organization/didac-user-mapping/didac-user-mapping.component.html',\r\n controller: 'DidacUserMappingController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n close: '&?',\r\n dismiss: '&?'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DidacUserMappingController.$inject = [\r\n 'OrganizationFactory',\r\n 'UserFactory'\r\n ];\r\n\r\n angular\r\n .module('organization')\r\n .controller('DidacUserMappingController', DidacUserMappingController);\r\n\r\n function DidacUserMappingController(\r\n OrganizationFactory,\r\n UserFactory\r\n ) {\r\n var vm = this;\r\n\r\n vm.unmappedUsers = [];\r\n vm.companies = [];\r\n\r\n vm.$onInit = function () {\r\n getUnmappedUsers();\r\n getCompanies();\r\n };\r\n\r\n vm.getUsers = function (didacUser) {\r\n var orgId = didacUser.Organization.id;\r\n\r\n UserFactory.getUsers(null, false, orgId).$promise\r\n .then(function (result) {\r\n didacUser.Users = result;\r\n });\r\n }\r\n\r\n vm.mapUser = function (didacUser) {\r\n OrganizationFactory.mapDidacUser(didacUser)\r\n .then(function () {\r\n vm.unmappedUsers = [];\r\n return getUnmappedUsers();\r\n });\r\n }\r\n\r\n function getUnmappedUsers() {\r\n OrganizationFactory.getUnmappedDidacUsers()\r\n .then(function (result) {\r\n vm.unmappedUsers = result;\r\n });\r\n };\r\n\r\n function getCompanies() {\r\n OrganizationFactory.getOrganizationsDropdown()\r\n .$promise\r\n .then(function (result) {\r\n vm.companies = result;\r\n })\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationChart', {\r\n templateUrl: 'Scripts/organization/organization-chart/organization-chart.component.html',\r\n controller: 'OrganizationChartController',\r\n controllerAs: 'vm',\r\n bindings: {}\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationChartController.$inject = [\r\n 'sessionInformationService',\r\n '$timeout',\r\n 'OrganizationFactory',\r\n '$rootScope',\r\n '$location'\r\n ];\r\n\r\n angular.module('organization').controller('OrganizationChartController', OrganizationChartController);\r\n\r\n function OrganizationChartController(\r\n sessionInformationService,\r\n $timeout,\r\n OrganizationFactory,\r\n $rootScope,\r\n $location\r\n ) {\r\n var vm = this;\r\n\r\n var userEditedSubscription = null;\r\n var organizationEditedSubscription = null;\r\n\r\n vm.organization = null;\r\n vm.showChart = false;\r\n\r\n vm.$onInit = function () {\r\n addBroadcastListeners();\r\n var user = sessionInformationService.getUser();\r\n\r\n vm.organization = user.Organization;\r\n };\r\n\r\n vm.checkLocation = function () {\r\n return $location.path();\r\n };\r\n\r\n vm.onOrganizationChartReady = function () {\r\n $timeout(function () {\r\n var node = document.getElementById('orgChartReport');\r\n\r\n\r\n html2canvas(node, { backgroundColor: null })\r\n .then(function (canvas) {\r\n\r\n var base64 = canvas.toDataURL();\r\n\r\n return OrganizationFactory.saveOrganizationChartBase64(vm.organization.id, base64);\r\n }).then(function () {\r\n vm.showChart = false;\r\n }).catch(function () {\r\n vm.showChart = false;\r\n });\r\n }, 500);\r\n };\r\n\r\n function addBroadcastListeners() {\r\n userEditedSubscription = $rootScope.$on('chart:user-edited', function (event, data) {\r\n vm.organization = { id: data.id };\r\n vm.showChart = true;\r\n });\r\n\r\n organizationEditedSubscription = $rootScope.$on('chart:organization-edited', function (event, data) {\r\n vm.organization = { id: data.id };\r\n vm.showChart = true;\r\n });\r\n };\r\n\r\n vm.$onDestroy = function () {\r\n userEditedSubscription();\r\n organizationEditedSubscription();\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('organizationPermanentDelete', {\r\n templateUrl: 'Scripts/organization/organization-delete/organization-delete.html',\r\n controller: 'OrganizationPermanentDeleteController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organizationId: '<',\r\n name: '<',\r\n onDelete: '&'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationPermanentDeleteController.$inject = [\r\n '$uibModal',\r\n '$scope',\r\n 'OrganizationFactory'\r\n ];\r\n\r\n angular\r\n .module('organization')\r\n .controller('OrganizationPermanentDeleteController', OrganizationPermanentDeleteController);\r\n\r\n /**\r\n * Controller that handles the logic for organization delete\r\n */\r\n function OrganizationPermanentDeleteController(\r\n $uibModal,\r\n $scope,\r\n OrganizationFactory\r\n ) {\r\n var vm = this;\r\n\r\n var modalInstance = null;//store the modal instance for further use\r\n\r\n //set up necessary variables\r\n vm.showPasswordInput = false;\r\n vm.deletePassword = '';\r\n\r\n //set up function delegates\r\n vm.deleteOrganization = deleteOrganization;\r\n vm.askForPassword = askForPassword;\r\n vm.confirmDelete = confirmDelete;\r\n vm.isConfirmDisabled = isConfirmDisabled;\r\n vm.getOrganizationName = getOrganizationName;\r\n\r\n /**\r\n * Gets called when the user clicks the delete button\r\n * Opens a modal where the user must confirm his action\r\n */\r\n function deleteOrganization() {\r\n modalInstance = $uibModal.open({\r\n templateUrl: 'Scripts/organization/organization-delete/confirm-organization-delete.modal.html',\r\n scope: $scope\r\n });\r\n\r\n modalInstance.result.finally(function () {\r\n //clear data after the modal closes\r\n vm.showPasswordInput = false;\r\n vm.deletePassword = '';\r\n });\r\n };\r\n\r\n /**\r\n * Displays the password input\r\n */\r\n function askForPassword() {\r\n vm.showPasswordInput = true;\r\n };\r\n\r\n /**\r\n * Closes the modal and checks if the password is correct\r\n * The organization will be set to be deleted if the password is correct\r\n */\r\n function confirmDelete() {\r\n OrganizationFactory.deleteOrganization(vm.organizationId, vm.deletePassword)\r\n .then(function () {\r\n modalInstance.close();\r\n vm.onDelete();\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the password input is disabled\r\n */\r\n function isConfirmDisabled() {\r\n return !vm.deletePassword;\r\n };\r\n\r\n /**\r\n * Gets the organization name for the translation\r\n */\r\n function getOrganizationName() {\r\n return {\r\n organizationName: vm.name\r\n };\r\n };\r\n };\r\n})();","(function(){\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationDropdown', {\r\n templateUrl: 'Scripts/organization/organization-dropdown/organization-dropdown.component.html',\r\n controller: 'OrganizationDropdownController',\r\n controllerAs: 'vm',\r\n transclude: true,\r\n bindings: {\r\n onChange: '&',\r\n hideDropdown: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationDropdownController.$inject = [\r\n 'sessionInformationService',\r\n 'OrganizationFactory',\r\n '_',\r\n 'OrganizationUtilService',\r\n 'dialogService',\r\n 'infoService',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('organization')\r\n .controller('OrganizationDropdownController', OrganizationDropdownController);\r\n\r\n /**\r\n * Controller that handles the organization dropdown for central company\r\n */\r\n function OrganizationDropdownController(\r\n sessionInformationService,\r\n OrganizationFactory,\r\n _,\r\n OrganizationUtilService,\r\n dialogService,\r\n infoService,\r\n $q\r\n ) {\r\n var vm = this;\r\n\r\n vm.organizations = [];\r\n vm.selectedOrganization = null;\r\n vm.searchText = null;\r\n vm.contentLoaded = false;\r\n\r\n vm.$onInit = onInit;\r\n vm.selectOrganization = selectOrganization;\r\n vm.showDropdown = showDropdown;\r\n vm.showNotAllowedMessage = showNotAllowedMessage;\r\n vm.reqestAccessForCompany = reqestAccessForCompany;\r\n\r\n function onInit() {\r\n var loggedUser = sessionInformationService.getUser();\r\n //if the user is from central and it's admin we're getting all companies\r\n if (loggedUser.Organization.Central && loggedUser.Group.ProgId == 'ADMIN') {\r\n if (!OrganizationUtilService.getOrganizationId()) {\r\n OrganizationUtilService.setOrganizationId(loggedUser.Organization.id);\r\n OrganizationUtilService.setOrganizationHasCordel(loggedUser.Organization.IntegrationType.ProgId == \"CORDEL\");\r\n }\r\n\r\n getOrganizations();\r\n } else {\r\n selectOrganization(loggedUser.Organization, true);//set his current company\r\n }\r\n };\r\n\r\n /**\r\n * Gets a list of available companies\r\n */\r\n function getOrganizations() {\r\n var loggedUser = sessionInformationService.getUser();\r\n return OrganizationFactory.getOrganizationsDropdown()\r\n .$promise\r\n .then(function (result) {\r\n if (_.isNil(result) || _.isEmpty(result)) {\r\n vm.organizations = [];\r\n vm.selectedOrganization = loggedUser.Organization;\r\n }\r\n else {\r\n vm.organizations = result;\r\n //set the selected one\r\n vm.selectedOrganization = _.find(vm.organizations, function (o) { return o.id == OrganizationUtilService.getOrganizationId() });\r\n }\r\n\r\n vm.onChange()(vm.selectedOrganization, true);\r\n\r\n vm.contentLoaded = true;\r\n });\r\n };\r\n\r\n /**\r\n * Triggered when the user selects a company\r\n * @param {any} organization\r\n * @param {any} firstTime\r\n */\r\n function selectOrganization(organization, firstTime) {\r\n vm.contentLoaded = false;\r\n vm.selectedOrganization = organization;\r\n\r\n\r\n if (vm.selectedOrganization.Settings && !vm.selectedOrganization.Settings.IsCentralAllowedToView)\r\n return;\r\n OrganizationUtilService.setOrganizationId(vm.selectedOrganization.id);\r\n \r\n vm.onChange()(organization, firstTime);\r\n\r\n vm.searchText = '';\r\n\r\n vm.contentLoaded = true;\r\n };\r\n\r\n /**\r\n * Checks whether the dropdown should show\r\n */\r\n function showDropdown() {\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (!loggedUser || !loggedUser.Organization)\r\n return false;\r\n\r\n return loggedUser.Organization.Central && loggedUser.Group.ProgId == 'ADMIN';\r\n };\r\n\r\n /**\r\n * Checks whether to show the \"You're not allowed to see\" info\r\n */\r\n function showNotAllowedMessage() {\r\n if (!vm.selectedOrganization)\r\n return false;\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (!loggedUser || !loggedUser.Organization)\r\n return false;\r\n\r\n if (loggedUser.Organization.id == vm.selectedOrganization.id)\r\n return false;\r\n\r\n return !vm.selectedOrganization.Settings.IsCentralAllowedToView;\r\n }\r\n\r\n /**\r\n * Toggled when the admin requires to see the company data\r\n */\r\n function reqestAccessForCompany() {\r\n dialogService.showConfirmDialog('COMMON.CONFIRM', 'ORGANIZATION_MODEL.ASKING_FOR_ACCESS')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(false);\r\n\r\n return OrganizationFactory.requestOrganizationViewDataAccess(vm.selectedOrganization.id);\r\n }).then(function(result) {\r\n if (result == false)\r\n return;\r\n\r\n infoService.changeInfo('ORGANIZATION_MODEL.SUCCESS_EMAIL_SENT_REQUEST');\r\n });\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationList', {\r\n templateUrl: 'Scripts/organization/organization-list/organization-list.component.html',\r\n controller: 'OrganizationsController'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationsController.$inject = [\r\n '$scope',\r\n '$filter',\r\n 'titleService',\r\n 'searchService',\r\n 'OrganizationFactory',\r\n '$uibModal',\r\n 'PingService',\r\n '$q',\r\n 'sessionInformationService',\r\n '$location'\r\n ];\r\n\r\n angular.module('organization').controller('OrganizationsController', OrganizationsController);\r\n\r\n function OrganizationsController(\r\n $scope,\r\n $filter,\r\n titleService,\r\n searchService,\r\n OrganizationFactory,\r\n $uibModal,\r\n PingService,\r\n $q,\r\n sessionInformationService,\r\n $location\r\n ) {\r\n titleService.changeTitle($filter('translate')('Organizations'));\r\n\r\n $scope.reverse = OrganizationFactory.reverseOrganizations;\r\n $scope.predicate = OrganizationFactory.predicateOrganizations;\r\n\r\n var allOrganizations = [];\r\n var nrOfRowsToLoadAtStart = 70;\r\n var nrOfRowsToLoad = 10;\r\n\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 30;\r\n $scope.numPages = 1;\r\n\r\n $scope.search = searchService.getSearch();\r\n $scope.loggedUser = sessionInformationService.getUser();\r\n\r\n /**\r\n * Changes the order based on the given predicate\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n $scope.changeOrder = function (orderBy) {\r\n $scope.organizations = [];\r\n if (orderBy != $scope.predicate) {\r\n $scope.predicate = orderBy;\r\n OrganizationFactory.predicateOrganizations = orderBy;\r\n } else {\r\n $scope.reverse = !$scope.reverse;\r\n OrganizationFactory.reverseOrganizations = $scope.reverse;\r\n }\r\n\r\n allOrganizations = $filter('orderBy')(allOrganizations, OrganizationFactory.predicateOrganizations, OrganizationFactory.reverseOrganizations);\r\n\r\n $scope.organizations = allOrganizations.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Sets the color of the api status whether it's up or not\r\n * @param {any} organization\r\n */\r\n var setCordelApiColor = function (organization) {\r\n var deferred = $q.defer();\r\n\r\n var endpoint = organization.ApiURL + '/api/' + organization.ApiKey + '/version';\r\n\r\n organization.cordelApiColor = 'darkgray';\r\n organization.api = 0;\r\n\r\n if (organization.id &&\r\n organization.Active &&\r\n organization.ApiURL &&\r\n organization.ApiKey &&\r\n organization.IntegrationType &&\r\n organization.IntegrationType.ProgId == 'CORDEL') {\r\n\r\n PingService.ping(endpoint).then(function () {\r\n organization.cordelApiColor = '#7fa145';//TODO: use constant\r\n organization.api = 2;\r\n deferred.resolve();\r\n },\r\n function () {\r\n organization.cordelApiColor = '#f95c30';//TODO: use constant\r\n organization.api = 1;\r\n deferred.reject();\r\n });\r\n } else {\r\n deferred.resolve();\r\n }\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the company list based on the given search criteria\r\n * @param {} freeText \r\n * @returns {} \r\n */\r\n $scope.getOrganizations = function (freeText) {\r\n if (freeText != undefined) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n searchService.setSearch(freeText);\r\n\r\n var organization = OrganizationFactory.getOrganizations(freeText);\r\n organization.$promise.then(function (result) {\r\n allOrganizations = result;\r\n for (var index = 0; index < allOrganizations.length; index++) {\r\n allOrganizations[index].id = parseInt(allOrganizations[index].id);\r\n setCordelApiColor(allOrganizations[index]);\r\n }\r\n\r\n allOrganizations = $filter('orderBy')(allOrganizations, OrganizationFactory.predicateOrganizations, OrganizationFactory.reverseOrganizations);\r\n\r\n if ($scope.isXs) {\r\n $scope.organizations = allOrganizations;\r\n $scope.numPages = Math.ceil(allOrganizations.length / $scope.itemsPerPage);\r\n } else\r\n $scope.organizations = allOrganizations.slice(0, nrOfRowsToLoadAtStart);\r\n });\r\n };\r\n\r\n /**\r\n * Opens a modal with the process list category settings\r\n * @returns {} \r\n */\r\n $scope.openCategorySettingsModal = function () {\r\n $uibModal.open({\r\n templateUrl: 'Scripts/organization/processListCategorySettings/categorySettingsPartial.html',\r\n controller: 'CategorySettingsController as categoryCtrl',\r\n size: 'lg'\r\n });\r\n };\r\n\r\n $scope.reachedEndOfList = false;\r\n /**\r\n * Loads more items for infinite scroll when the list reaches the end\r\n * @returns {} \r\n */\r\n $scope.loadMore = function () {\r\n if ($scope.organizations && $scope.organizations.length < allOrganizations.length) {\r\n var last = $scope.organizations.length > 0 ? $scope.organizations.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allOrganizations.length ? allOrganizations.length : last + nrOfRowsToLoad;\r\n\r\n $scope.organizations = allOrganizations.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (allOrganizations.length > nrOfRowsToLoadAtStart) {\r\n $scope.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n $scope.openDataDetailsAttachmentOptions = function () {\r\n $uibModal.open({\r\n template: ''\r\n });\r\n };\r\n\r\n $scope.selectOrganization = function (organization) {\r\n if (organization.Settings && !organization.Settings.IsCentralAllowedToView)\r\n return;\r\n\r\n $scope.go('/organization/' + organization.id);\r\n }\r\n\r\n $scope.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n $scope.openDidacUserModal = function () {\r\n $uibModal.open({\r\n component: 'vbDidacUserMapping',\r\n size:'lg'\r\n });\r\n }\r\n\r\n $scope.go = function (path) {\r\n $location.path(path);\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationNotificationTemplate', {\r\n templateUrl: 'Scripts/organization/organization-notification-template/organization-notification-template.component.html',\r\n controller: 'OrganizationNotificationTemplateController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n template: '=vbTemplate'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationNotificationTemplateController.$inject = [\r\n '$sce',\r\n '$timeout',\r\n 'textAngularManager'\r\n ];\r\n\r\n angular.module('organization').controller('OrganizationNotificationTemplateController', OrganizationNotificationTemplateController);\r\n\r\n function OrganizationNotificationTemplateController(\r\n $sce,\r\n $timeout,\r\n textAngularManager\r\n ) {\r\n var vm = this;\r\n\r\n vm.headerOpen = false;\r\n vm.footerOpen = false;\r\n\r\n vm.$onInit = function () {\r\n if (!vm.template)\r\n vm.template = {};\r\n }\r\n\r\n vm.trustText = function (text) { return $sce.trustAsHtml(text); };\r\n\r\n vm.toggleHeader = function () {\r\n vm.headerOpen = !vm.headerOpen;\r\n\r\n if (!!vm.headerOpen)\r\n focusEditor('organizationNotificationHeaderEditor');\r\n }\r\n\r\n vm.toggleFooter = function () {\r\n vm.footerOpen = !vm.footerOpen;\r\n\r\n if (!!vm.footerOpen)\r\n focusEditor('organizationNotificationFooterEditor');\r\n }\r\n\r\n function focusEditor(editorName) {\r\n $timeout(function () {\r\n var footerEditor = textAngularManager.retrieveEditor(editorName).scope;\r\n\r\n if (!footerEditor)\r\n return;\r\n\r\n footerEditor.displayElements.text.trigger('focus');\r\n });\r\n }\r\n };\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n PackingSlipMappingController.$inject = [\r\n 'OrganizationFactory',\r\n '$filter',\r\n 'titleService',\r\n '$window',\r\n '$q',\r\n '$timeout',\r\n '$location'\r\n ];\r\n\r\n angular.module('organization').controller('PackingSlipMappingController', PackingSlipMappingController);\r\n\r\n function PackingSlipMappingController(\r\n OrganizationFactory,\r\n $filter,\r\n titleService,\r\n $window,\r\n $q,\r\n $timeout,\r\n $location\r\n ) {\r\n var packingSlipCtrl = this;\r\n\r\n packingSlipCtrl.packingSlips = [];\r\n packingSlipCtrl.organizations = [];\r\n packingSlipCtrl.suppliers = [];\r\n packingSlipCtrl.supplier = null;\r\n packingSlipCtrl.searchText = null;\r\n packingSlipCtrl.receivedDate = null;\r\n\r\n\r\n titleService.changeTitle($filter('translate')('txtPackingSlips'));\r\n\r\n /**\r\n * Gets the packing slips suppliers\r\n */\r\n function getPackingSlipSuppliers() {\r\n return OrganizationFactory.getPackingSlipSuppliers().then(function (result) {\r\n packingSlipCtrl.suppliers = result;\r\n packingSlipCtrl.supplier = result[0];\r\n });\r\n };\r\n\r\n /**\r\n * Gets the unmapped packing slips\r\n * Unmapped packing slips are those that don't have organization set\r\n */\r\n function getUnmappedPackingSlips() {\r\n if (!packingSlipCtrl.supplier || !packingSlipCtrl.supplier.id)\r\n return $q.when();\r\n return OrganizationFactory.getUnmappedPackingSlips(\r\n packingSlipCtrl.supplier.id,\r\n packingSlipCtrl.searchText,\r\n packingSlipCtrl.receivedDate\r\n ).then(function (result) {\r\n if (result && result.length > 0)\r\n packingSlipCtrl.packingSlips = result;\r\n else\r\n packingSlipCtrl.packingSlips = [];\r\n });\r\n };\r\n\r\n /**\r\n * Gets the list of companies\r\n */\r\n function getOrganizationsDropdown() {\r\n return OrganizationFactory.getOrganizationsDropdown().$promise.then(function (result) {\r\n packingSlipCtrl.organizations = result;\r\n });\r\n };\r\n\r\n function init() {\r\n packingSlipCtrl.receivedDate = new Date();\r\n $q.all([getPackingSlipSuppliers(), getOrganizationsDropdown()]).then(function () {\r\n return getUnmappedPackingSlips();\r\n });\r\n };\r\n\r\n /**\r\n * Saves the packing slip mapping\r\n * Creates a relation between the customer number and organization\r\n * @param {} supplierId \r\n * @param {} customerNumber \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n packingSlipCtrl.saveMapping = function (supplierId, customerNumber, organizationId) {\r\n OrganizationFactory.savePackingSlipMapping(supplierId, customerNumber, organizationId).then(function () {\r\n return getUnmappedPackingSlips();\r\n });\r\n };\r\n\r\n /**\r\n * On some packing slips the organization name is in the DeliveryRecipient of the packing slip\r\n * @param {} customerNumber \r\n * @param {} supplierId \r\n * @returns {} \r\n */\r\n packingSlipCtrl.getDeliveryRecipientByCustomerNumber = function (customerNumber, supplierId) {\r\n if (!packingSlipCtrl.unmappedPackingSlips || packingSlipCtrl.unmappedPackingSlips.length == 0)\r\n return '';\r\n\r\n var supplier = $filter('filter')(packingSlipCtrl.unmappedPackingSlips, function (s) { return s.id == supplierId })[0];\r\n\r\n var packingSlip = $filter('filter')(supplier.PackingSlips, function (p) { return p.Advice.OrderReference.CustomerNumber == customerNumber })[0];\r\n\r\n if (packingSlip)\r\n return packingSlip.Advice.OrderReference.DeliveryRecipient ? packingSlip.Advice.OrderReference.DeliveryRecipient : packingSlip.Advice.OrderReference.DespatchAdviceRecipient;\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * When the supplier changes, get the packing slips again\r\n * @returns {} \r\n */\r\n packingSlipCtrl.onPackingSlipSupplierChange = function () {\r\n packingSlipCtrl.packingSlips = [];\r\n getUnmappedPackingSlips();\r\n };\r\n\r\n packingSlipCtrl.onSearchSubmit = getUnmappedPackingSlips;\r\n\r\n packingSlipCtrl.close = function() {\r\n $location.path('/organizations');\r\n }\r\n\r\n $timeout(init);\r\n \r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CategorySettingsController.$inject = [\r\n 'OrganizationFactory',\r\n 'ProcessListFactory',\r\n '$filter'\r\n ];\r\n\r\n angular.module('organization')\r\n .controller('CategorySettingsController', CategorySettingsController);\r\n\r\n function CategorySettingsController(\r\n OrganizationFactory,\r\n ProcessListFactory,\r\n $filter\r\n ) {\r\n var categoryCtrl = this;\r\n\r\n categoryCtrl.categorySettings = [];\r\n categoryCtrl.categories = [];\r\n categoryCtrl.filterText = '';\r\n\r\n categoryCtrl.toggleSearchInput = function (setting) {\r\n setting.showSearchInput = !setting.showSearchInput;\r\n };\r\n\r\n categoryCtrl.toggleCategorySetting = function (setting) {\r\n setting.collapsed = !setting.collapsed;\r\n };\r\n\r\n /**\r\n * Adds a given category to the specified setting\r\n * @param {} category \r\n * @param {} setting \r\n * @returns {} \r\n */\r\n categoryCtrl.addCategory = function (category, setting) {\r\n if (!setting)\r\n return;\r\n\r\n if (!setting.Categories)\r\n setting.Categories = [];\r\n\r\n setting.Categories.push(category);\r\n };\r\n\r\n /**\r\n * Removes the category from the specified setting at the given index\r\n * @param {} index \r\n * @param {} setting \r\n * @returns {} \r\n */\r\n categoryCtrl.removeCategory = function (index, setting) {\r\n if (setting.Categories.length == 0)\r\n return;\r\n\r\n setting.Categories.splice(index, 1);\r\n };\r\n\r\n /**\r\n * Filter the categories based on the setting that is provided\r\n * @param {} setting \r\n * @returns {} \r\n */\r\n categoryCtrl.filterCategories = function (setting) {\r\n return function (category) {\r\n if (!setting.Categories || setting.Categories.length == 0)\r\n return category.Name.toLowerCase().indexOf(setting.filterText.toLowerCase()) !== -1;\r\n\r\n if ($filter('filter')(setting.Categories, { id: category.id }).length > 0)\r\n return false;\r\n\r\n return category.Name.toLowerCase().indexOf(setting.filterText.toLowerCase()) !== -1;\r\n };\r\n };\r\n\r\n /**\r\n * Saves the current category setting\r\n * @returns {} \r\n */\r\n categoryCtrl.saveCategories = function () {\r\n OrganizationFactory.saveCategorySettings(categoryCtrl.categorySettings);\r\n };\r\n\r\n /**\r\n * Gets the stored category settings\r\n */\r\n function getCategorySettings() {\r\n return OrganizationFactory.getCategorySettings().then(function (categorySettings) {\r\n if (!categorySettings || categorySettings.length == 0)\r\n return;\r\n\r\n categoryCtrl.categorySettings = categorySettings;\r\n angular.forEach(categoryCtrl.categorySettings, function (setting) {\r\n setting.collapsed = true;\r\n setting.showSearchInput = false;\r\n setting.filterText = '';\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Gets the first level process list categories\r\n */\r\n function getFirstLevelCategories() {\r\n return ProcessListFactory.getFirstLevelCategories().then(function (categories) {\r\n if (!categories || categories.length == 0)\r\n return;\r\n\r\n categoryCtrl.categories = categories;\r\n });\r\n }\r\n\r\n function init() {\r\n getCategorySettings();\r\n getFirstLevelCategories();\r\n };\r\n\r\n init();\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationSettings',\r\n {\r\n templateUrl: 'Scripts/organization/settings/organization-settings.component.html',\r\n controller: 'OrganizationSettingsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organization: '='\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n OrganizationSettingsController.$inject = [\r\n 'sessionInformationService',\r\n '$filter',\r\n 'dialogService',\r\n 'OrganizationSettingFactory'\r\n ];\r\n\r\n angular\r\n .module('organization')\r\n .controller('OrganizationSettingsController', OrganizationSettingsController);\r\n\r\n function OrganizationSettingsController(\r\n sessionInformationService,\r\n $filter,\r\n dialogService,\r\n OrganizationSettingFactory\r\n\r\n ) {\r\n var vm = this;\r\n\r\n vm.activeTab = 'COMPANY_SETTINGS';\r\n vm.selectTab = selectTab;\r\n\r\n vm.$onInit = onInit;\r\n vm.isLoggedUserOrganization = isLoggedUserOrganization;\r\n\r\n function selectTab(tabName) {\r\n vm.activeTab = tabName;\r\n }\r\n\r\n vm.loggedUser = sessionInformationService.getUser();\r\n\r\n vm.getLoggedUserLanguage = function () {\r\n return vm.loggedUser.Language;\r\n }\r\n\r\n function onInit() {\r\n\r\n if (!vm.organization.MandatoryNotificationTypesList) {\r\n vm.organization.MandatoryNotificationTypesList = [];\r\n }\r\n\r\n //if we have setting and the customer notification is not set or is zero -> set it to default 2\r\n if (vm.organization.Settings && (!vm.organization.Settings.NumberOfYearsForCustomerGdprNotification || vm.organization.Settings.NumberOfYearsForCustomerGdprNotification == 0))\r\n vm.organization.Settings.NumberOfYearsForCustomerGdprNotification = 2;\r\n\r\n if (!vm.organization.Settings)\r\n vm.organization.Settings = {\r\n IsCentralAllowedToView: true,\r\n AllowImpersonate: true,\r\n IsAutomileEnabled: false,\r\n NumberOfYearsForCustomerGdprNotification: 2\r\n };\r\n };\r\n\r\n function isLoggedUserOrganization() {\r\n return sessionInformationService.isLoggedUserOrganization(vm.organization.id);\r\n };\r\n };\r\n})();","(function () {\r\n\r\n OrganizationSettingFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n /**\r\n * Simple factory that handles company settings requests\r\n * @param {any} $resource\r\n * @param {any} baseUrlService\r\n */\r\n function OrganizationSettingFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var OrganizationSettings = $resource(api + 'REST/OrganizationSetting.svc/OrganizationSettings/:organizationId');\r\n var OrganizationSettingTypes = $resource(api + 'REST/OrganizationSetting.svc/OrganizationSettingsTypes');\r\n\r\n function getOrganizationSettingsByOrganizationId(organizationId) {\r\n return OrganizationSettings.get({ organizationId: organizationId }).$promise;\r\n };\r\n\r\n function saveOrganizationSettings(organizationSettings) {\r\n var organizationSettingsApiObject = Object.assign(new OrganizationSettings(), organizationSettings);\r\n\r\n return organizationSettingsApiObject.$save();\r\n };\r\n\r\n function saveOrganizationSettingTypes(isVbOrganization, isVBCustomer, organizationId) {\r\n var organizationSettingTypesApiObject = new OrganizationSettingTypes();\r\n\r\n organizationSettingTypesApiObject.OrganizationId = organizationId;\r\n organizationSettingTypesApiObject.IsVBOrganization = isVbOrganization;\r\n organizationSettingTypesApiObject.IsVBCustomer = isVBCustomer;\r\n\r\n return organizationSettingTypesApiObject.$save();\r\n };\r\n\r\n return {\r\n getOrganizationSettingsByOrganizationId: getOrganizationSettingsByOrganizationId,\r\n saveOrganizationSettings: saveOrganizationSettings,\r\n saveOrganizationSettingTypes: saveOrganizationSettingTypes\r\n };\r\n }\r\n\r\n angular\r\n .module('organization')\r\n .factory('OrganizationSettingFactory', OrganizationSettingFactory);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CentralApprovalItemService.$inject = [\r\n '$filter'\r\n ];\r\n\r\n angular\r\n .module('processList')\r\n .service('CentralApprovalItemService', CentralApprovalItemService);\r\n\r\n /**\r\n * Simple service that returns default answers for the central approval list\r\n */\r\n function CentralApprovalItemService(\r\n $filter\r\n ) {\r\n var centralApprovalItemService = {};\r\n\r\n centralApprovalItemService.getLayoutForCompanyInfoDetailed = function (actionTypes) {\r\n var i = 0;\r\n return [\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Firmaopplysninger',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Informasjon om selskapet',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Bedfritens navn',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$CompanyName$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Organisasjonsnummer',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$CompanyNumber$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Kommune',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$City$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Besøksadresse',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$VisitingAddress$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Postnr/Poststed',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$VisitingPostalNumber/PostalCode$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Postadresse',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$PostalAddress$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Postnr/Poststed',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$PostalNumber/PostalCode$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Telefon',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Phone$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Mobil',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Mobil$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Faks',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Fax$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'E-post',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Email$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Web page',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Homepage$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Bankgiro',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$BankTransfer$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Postgiro',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Postgiro$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Administrasjonssjef',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$CEO$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Eier/eiere',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Owner$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Antall ansatte',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$NumberOfEmployees$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Etableringsdato',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$EstablishedDate$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Ledelsen',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Daglig leder',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Manager$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Adresse',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Address$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Postnr/posted',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$ManagerPostalNumber/PostalCode$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Bursdag',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$Birthday$' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Selskapsform',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{Name : '$CompanyForm$'}]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Selskapet er registrert i',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: '$CompanyRegisteredIn$' }]\r\n }\r\n } \r\n ];\r\n };\r\n\r\n centralApprovalItemService.getLayoutForDesiredApprovalAreas = function (actionTypes) {\r\n var i = 0;\r\n return [\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Godkjenningsområder for søker',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Søker'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Godkjenningsområder for prosjekterende',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Overordnet ansvar for prosjektering (bygning, anlegg eller konstuksjon, tekniske installasjoner)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Arkitekturprosjektering'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av utearealer og landskapsutforming'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Oppmålingsteknisk prosjektering'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av brannkonsept'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av geoteknikk'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av konstruksjonssikkerhet'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av bygningsfysikk'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av sanitær-, varme- og slukkeinstallasjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av ventilasjon - og klimainstallasjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av vannforsynings-, avløpsanlegg og fjernvarme'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av løfteinnretninger'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av lydforhold og vibrasjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av miljøsanering'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Prosjektering av brannalarm, nødlys og ledesystem'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Godkjenningsområder for utførende',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Overordnet ansvar for utførelse (bygning, anlegg eller konstruksjon, tekniske installasjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av innmåling og utstikking av tiltak'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av grunnarbeid og landskapsutforming'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av plasstøpte betongkonstruksjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av tømrerarbeid og montering av trekonstruksjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av murarbeid'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av montering av bærende metall- eller betongkonstruksjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av montering av glasskonstruksjoner og fasadekledning'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av taktekkingsarbeid'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av arbeid på bevaringsverdige byggverk'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Installasjon av brannalarm, nødlys og ledesystem'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av sanitær-, varme- og slukkeinstallasjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av ventilasjon og klimainstallasjoner'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av løfteinnretninger'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Utførelse av riving og miljøsanering'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Samlet godkjenningsområde for søker, prosjekterende og utførende:',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Våtromsarbeider (i tiltaksklasse 1)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Godkjenningsområder for uavhengig kontrollerende: ',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0],\r\n DefaultAnswers: [{ Name: 'Kontrollfunksjonen (uavhengig kontroll) innebærer kontroll av arbeider andre aktører har prosjektert/utført.' }]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Sentral godkjenning for ansvarsrett kan gis for funksjonen uavhengig kontrollerende i fagområdene og tiltaksklassene om angitt under:',\r\n ProcessListAction: {\r\n Type: $filter('filter')(actionTypes, function (a) { return a.ProgId == 'TEXT_FIELD' })[0]\r\n }\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Overordnet ansvar for kontroll (i tiltaksklasse 1, 2 og 3)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Våtrom (i boliger) (i tiltaksklasse 1)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Lufttetthet (i tiltaksklasse 1)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Bygningsfysikk (i tiltaksklasse 2 og 3)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Konstruksjonssikkerhet (i tiltaksklasse 2 og 3)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Geoteknikk (i tiltaksklasse 2 og 3)'\r\n },\r\n {\r\n Active: true,\r\n Order: i++,\r\n Text: 'Brannsikkerhet (i tiltaksklasse 2 og 3)'\r\n }\r\n ];\r\n };\r\n\r\n return centralApprovalItemService;\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CentralApprovalItemTypeDropdownController.$inject = [\r\n '$filter',\r\n '$timeout',\r\n '$scope'\r\n ];\r\n\r\n angular.module('processList')\r\n .controller('CentralApprovalItemTypeDropdownController', CentralApprovalItemTypeDropdownController)\r\n .directive('centralApprovalItemType', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'CentralApprovalItemTypeDropdownController as itemTypeCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/processList/centralApprovalItemType/centralApprovalItemTypeDropdownPartial.html',\r\n scope: {\r\n model: '=',\r\n sharedObject: '='\r\n }\r\n };\r\n });\r\n\r\n /**\r\n * Controller used for setting variables for central approval list\r\n */\r\n function CentralApprovalItemTypeDropdownController(\r\n $filter,\r\n $timeout,\r\n $scope\r\n ) {\r\n var itemTypeCtrl = this;\r\n\r\n //init default variables\r\n itemTypeCtrl.variables = [\r\n {\r\n Name: '##UsernameAndPassword##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.USERNAME_AND_PASSWORD')\r\n },\r\n {\r\n Name: '##CompanyInfo##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.COMPANY_INFO')\r\n },\r\n {\r\n Name: '##CompanyPrimaryContact##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.COMPANY_PRIMARY_CONTACT')\r\n },\r\n {\r\n Name: '##ControlSystem##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.CONTROL_SYSTEM')\r\n },\r\n {\r\n Name: '##UsersInfo##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.USERS_INFO')\r\n },\r\n {\r\n Name: '##DesiredApprovalAreas##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.DESIRED_APPROVAL_AREAS')\r\n },\r\n {\r\n Name: '##ProjectReferences##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.PROJECT_REFERENCES')\r\n },\r\n {\r\n Name: '##QualityHandbookLists##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.QUALITY_HANDBOOK_LISTS')\r\n },\r\n {\r\n Name: '##OrganizationChart##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.ORGANIZATION_CHART')\r\n },\r\n {\r\n Name: '##CompanyInfoDetailed##',\r\n ProgId: $filter('translate')('CENTRAL_APPROVAL.COMPANY_INFO_DETAILED')\r\n }\r\n ];\r\n\r\n function init() {\r\n if (!itemTypeCtrl.model)\r\n return;\r\n\r\n itemTypeCtrl.model = $filter('filter')(itemTypeCtrl.variables, function (v) { return v.Name == itemTypeCtrl.model })[0];\r\n };\r\n\r\n /**\r\n * Set the given variable\r\n * @param {} variable \r\n * @returns {} \r\n */\r\n itemTypeCtrl.onVariableClick = function (variable) {\r\n itemTypeCtrl.model = variable;\r\n\r\n itemTypeCtrl.sharedObject.onVariableSelect(variable);\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationTemplateController.$inject = [\r\n '$filter',\r\n '$timeout',\r\n '$uibModalInstance',\r\n 'deviation',\r\n 'processListElement',\r\n 'currentProcessListItemIndex',\r\n '$q',\r\n 'DeviationFactory'\r\n ];\r\n\r\n angular.module('deviation')\r\n .controller('DeviationTemplateController', DeviationTemplateController)\r\n\r\n function DeviationTemplateController(\r\n $filter,\r\n $timeout,\r\n $uibModalInstance,\r\n deviation,\r\n processListElement,\r\n currentProcessListItemIndex,\r\n $q,\r\n DeviationFactory\r\n ) {\r\n var deviationTemplateCtrl = this;\r\n deviationTemplateCtrl.deviation = deviation;\r\n deviationTemplateCtrl.processList = processListElement;\r\n deviationTemplateCtrl.currentProcessListItemIndex = currentProcessListItemIndex;\r\n deviationTemplateCtrl.statuses = [];\r\n deviationTemplateCtrl.types = [];\r\n deviationTemplateCtrl.typeOfCauses = [];\r\n\r\n deviationTemplateCtrl.showKeepAndUpdateButton = true;\r\n\r\n /**\r\n * Gets the deviation statuses\r\n */\r\n function getDeviationStatuses() {\r\n return DeviationFactory.getDeviationStatuses().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n deviationTemplateCtrl.statuses = $filter('orderBy')(result, 'SortNumber');\r\n });\r\n };\r\n\r\n /**\r\n * Gets the deviation types\r\n */\r\n function getDeviationTypes() {\r\n return DeviationFactory.getDeviationTypes().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n deviationTemplateCtrl.types = $filter('orderBy')(result, 'SortNumber');\r\n });\r\n };\r\n\r\n /**\r\n * Gets the deviation type of causes\r\n */\r\n function getTypeOfCauses() {\r\n return DeviationFactory.getTypeOfCauses().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n deviationTemplateCtrl.typeOfCauses = $filter('orderBy')(result, 'SortNumber');\r\n });\r\n };\r\n\r\n /**\r\n * Checks wheter an item before the current one has keep and update checked\r\n */\r\n function processKeepAndUpdateButton() {\r\n //go through each process list item item until the current one\r\n //and check if a deviation already has KeepAndUpdate property set to true\r\n for (var i = 0; i < deviationTemplateCtrl.processList.ProcessListItems.length; i++) {\r\n if (i == deviationTemplateCtrl.currentProcessListItemIndex)\r\n return;\r\n\r\n var processListItem = deviationTemplateCtrl.processList.ProcessListItems[i];\r\n if (!processListItem.Option)\r\n continue;\r\n\r\n if (!processListItem.Option.Items || processListItem.Option.Items.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < processListItem.Option.Items.length; j++) {\r\n var item = processListItem.Option.Items[j];\r\n if (item.ProcessListAction && item.ProcessListAction.Type.ProgId == 'DEVIATION')\r\n //if it has KeepAndUpdate set to true, hide the checkbox\r\n if (item.ProcessListAction.DeviationTemplate.KeepAndUpdate) {\r\n deviationTemplateCtrl.showKeepAndUpdateButton = false;\r\n return;\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Goes through all items below the current item and sets the keep and update to false\r\n * @returns {} \r\n */\r\n deviationTemplateCtrl.onKeepAndUpdateChange = function () {\r\n //set KeepAndUpdate property to false for all deviations that are under this point\r\n for (var i = deviationTemplateCtrl.currentProcessListItemIndex + 1; i < deviationTemplateCtrl.processList.ProcessListItems.length; i++) {\r\n var processListItem = deviationTemplateCtrl.processList.ProcessListItems[i];\r\n if (!processListItem.Option)\r\n continue;\r\n\r\n if (!processListItem.Option.Items || processListItem.Option.Items.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < processListItem.Option.Items.length; j++) {\r\n var item = processListItem.Option.Items[j];\r\n if (item.ProcessListAction && item.ProcessListAction.Type.ProgId == 'DEVIATION')\r\n item.ProcessListAction.DeviationTemplate.KeepAndUpdate = false;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Closes the deviation template resolved with the current deviation template\r\n * @returns {} \r\n */\r\n deviationTemplateCtrl.saveDeviationTemplate = function () {\r\n $uibModalInstance.close(deviationTemplateCtrl.deviation);\r\n };\r\n\r\n function init() {\r\n $q.all([\r\n getDeviationStatuses(),\r\n getDeviationTypes(),\r\n getTypeOfCauses()\r\n ]).then(function () {\r\n if (!deviationTemplateCtrl.deviation.Status || !deviationTemplateCtrl.deviation.Status.id)\r\n deviationTemplateCtrl.deviation.Status = deviationTemplateCtrl.statuses[0];\r\n\r\n if (!deviationTemplateCtrl.deviation.Type || !deviationTemplateCtrl.deviation.Type.id)\r\n deviationTemplateCtrl.deviation.Type = deviationTemplateCtrl.types[0];\r\n\r\n processKeepAndUpdateButton();\r\n });\r\n };\r\n\r\n init();\r\n };\r\n\r\n})();\r\n//TODO: move to a different file\r\n(function () {\r\n\r\n angular.module('deviation')\r\n .controller('DeviationDropdownVariableController', DeviationDropdownVariableController)\r\n .directive('deviationDropdownVariable', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'DeviationDropdownVariableController as deviationDropdownCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/processList/deviationTemplate/deviationDropdownVariablePartial.html',\r\n scope: {\r\n model: '=',\r\n processList: '=',\r\n currentItemIndex: '='\r\n }\r\n };\r\n });\r\n\r\n function DeviationDropdownVariableController() {\r\n var deviationDropdownCtrl = this;\r\n deviationDropdownCtrl.showBackButton = false;\r\n\r\n function setProcessListVariables() {\r\n deviationDropdownCtrl.variables = [\r\n { Name: '#ProcessListName#', ProgId: 'txtProcessListName' },\r\n { Name: '#ResponsibleUser#', ProgId: 'txtResponsibleUser' }\r\n ];\r\n };\r\n\r\n /**\r\n * Set the default question and answer variables\r\n */\r\n function setProcessListItemsVariables() {\r\n var previousProcessListItems = [];\r\n for (var i = 0; i < deviationDropdownCtrl.processList.ProcessListItems.length; i++) {\r\n var item = deviationDropdownCtrl.processList.ProcessListItems[i];\r\n if (item.ReportingCode) {\r\n previousProcessListItems.push(item);\r\n }\r\n }\r\n\r\n if (previousProcessListItems.length == 0)\r\n return false;\r\n\r\n deviationDropdownCtrl.variables = [];\r\n\r\n angular.forEach(previousProcessListItems, function (item) {\r\n var variableToAdd = {\r\n Name: '$' + item.ReportingCode + '$.#ProcessListItemQuestion#',\r\n ProgId: item.Question.Name,\r\n ReportingCode: item.ReportingCode,\r\n HideVariable: true,\r\n SubVariables: [{ Name: '$' + item.ReportingCode + '$.#ProcessListItemAnswer#', ProgId: 'txtAnswer', HideVariable: true }]\r\n };\r\n\r\n deviationDropdownCtrl.variables.push(variableToAdd);\r\n });\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Set the default used variables\r\n */\r\n function setDefaultVariables() {\r\n deviationDropdownCtrl.variables = [\r\n {\r\n Name: '',\r\n ProgId: 'ProcessList',\r\n HideVariable: true,\r\n HasNavigation: true\r\n },\r\n {\r\n Name: '',\r\n ProgId: 'txtItems',\r\n HideVariable: true,\r\n HasNavigation: true\r\n },\r\n {\r\n Name: '#OrderId#',\r\n ProgId: 'txtOrderId'\r\n },\r\n {\r\n Name: '#OrderExtId#',\r\n ProgId: 'txtOrderExternalId'\r\n },\r\n {\r\n Name: '#CustomerId#',\r\n ProgId: 'txtCustomerId'\r\n },\r\n {\r\n Name: '#CustomerName#',\r\n ProgId: 'txtCustomerName'\r\n },\r\n {\r\n Name: '#LoggedUserId#',\r\n ProgId: 'varCurrentUserId'\r\n },\r\n {\r\n Name: '#LoggedUserName#',\r\n ProgId: 'varCurrentUserName'\r\n },\r\n {\r\n Name: '#ProjectId#',\r\n ProgId: 'txtProjectId'\r\n },\r\n {\r\n Name: '#ProjectName#',\r\n ProgId: 'txtProjectName'\r\n },\r\n {\r\n Name: '#ProjectNumber#',\r\n ProgId: 'txtProjectNumber'\r\n }\r\n ];\r\n };\r\n\r\n /**\r\n * Sets the given variable\r\n * @param {} variable \r\n * @returns {} \r\n */\r\n deviationDropdownCtrl.onVariableClick = function(variable) {\r\n if (variable.ProgId == 'ProcessList') {\r\n setProcessListVariables();\r\n deviationDropdownCtrl.showBackButton = true;\r\n return;\r\n }\r\n\r\n if (variable.ProgId == 'txtItems') {\r\n var result = setProcessListItemsVariables();\r\n if (result) //only show the back button if we have any item with reporting code\r\n deviationDropdownCtrl.showBackButton = true;\r\n return;\r\n }\r\n\r\n if (!deviationDropdownCtrl.model)\r\n deviationDropdownCtrl.model = '';\r\n\r\n if (deviationDropdownCtrl.model.indexOf(variable.Name) < 0)\r\n deviationDropdownCtrl.model += ' ' + variable.Name;\r\n\r\n setDefaultVariables();\r\n deviationDropdownCtrl.showBackButton = false;\r\n };\r\n\r\n deviationDropdownCtrl.goBack = function () {\r\n setDefaultVariables();\r\n deviationDropdownCtrl.showBackButton = false;\r\n };\r\n\r\n setDefaultVariables();\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n optionItemService.$inject = [\r\n 'ProcessListActions'\r\n ];\r\n\r\n function optionItemService(\r\n ProcessListActions\r\n ) {\r\n\r\n function doesOptionItemGeneratesAnotherProcessList(optionItem) {\r\n\r\n if (!optionItem) {\r\n return false;\r\n }\r\n\r\n if (!optionItem.ProcessListAction ||\r\n !optionItem.ProcessListAction.Type ||\r\n optionItem.ProcessListAction.Type.ProgId !== ProcessListActions.AnotherProcessList) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return {\r\n doesOptionItemGeneratesAnotherProcessList: doesOptionItemGeneratesAnotherProcessList\r\n };\r\n }\r\n\r\n angular\r\n .module('processList')\r\n .service('OptionItemService', optionItemService);\r\n\r\n})();","(function () {\r\n\r\n ProcessListController.$inject = [\r\n '$scope',\r\n '$filter',\r\n '$timeout',\r\n 'titleService',\r\n 'searchService',\r\n 'ProcessListFactory',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular.module('processList').controller('ProcessListController', ProcessListController);\r\n\r\n function ProcessListController(\r\n $scope,\r\n $filter,\r\n $timeout,\r\n titleService,\r\n searchService,\r\n ProcessListFactory,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n sessionInformationService\r\n ) {\r\n\r\n titleService.changeTitle($filter('translate')('Process list'));\r\n\r\n $scope.includeDeactivatedItems = ProcessListFactory.includeDeactivatedItems;\r\n $scope.reverse = ProcessListFactory.reverseProcessList;\r\n $scope.predicate = ProcessListFactory.predicateProcessList;\r\n \r\n var allProcessLists = [];\r\n var nrOfRowsToLoadAtStart = 70;\r\n var nrOfRowsToLoad = 10;\r\n var categoryFilteredProcessList = [];\r\n\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 30;\r\n $scope.numPages = 1;\r\n\r\n $scope.categories = [];\r\n $scope.categoryHierarchy = [];\r\n $scope.navigationMode = ProcessListFactory.navigationMode;\r\n $scope.hideNavigation = false;\r\n\r\n $scope.organizations = [];\r\n $scope.selectedOrganization = null;\r\n $scope.search = searchService.getSearch();\r\n\r\n /**\r\n * Filter the lists by the selected category\r\n */\r\n function filterByCategory() {\r\n if (!$scope.categoryFilter.category\r\n && !$scope.categoryFilter.category2\r\n && !$scope.categoryFilter.category3) {\r\n categoryFilteredProcessList = allProcessLists;\r\n return categoryFilteredProcessList;\r\n }\r\n\r\n categoryFilteredProcessList = [];\r\n\r\n for (var i = 0; i < allProcessLists.length; i++) {\r\n allProcessLists[i].pushToList = false;\r\n if ($scope.categoryFilter.category)\r\n if (($filter('filter')(allProcessLists[i].Categories[0], { id: $scope.categoryFilter.category.id })).length > 0) {\r\n allProcessLists[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n\r\n if ($scope.categoryFilter.category2)\r\n if (($filter('filter')(allProcessLists[i].Categories[1], { id: $scope.categoryFilter.category2.id })).length > 0) {\r\n allProcessLists[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n if ($scope.categoryFilter.category3)\r\n if (($filter('filter')(allProcessLists[i].Categories[2], { id: $scope.categoryFilter.category3.id })).length > 0) {\r\n allProcessLists[i].pushToList = true;\r\n } else {\r\n continue;\r\n }\r\n if (allProcessLists[i].pushToList)\r\n categoryFilteredProcessList.push(allProcessLists[i]);\r\n }\r\n return categoryFilteredProcessList;\r\n };\r\n\r\n /**\r\n * Changes the order of the list based on the given predicate\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n $scope.changeOrder = function (orderBy) {\r\n $scope.processList = [];\r\n if (orderBy != $scope.predicate) {\r\n $scope.predicate = orderBy;\r\n ProcessListFactory.predicateProcessList = orderBy;\r\n } else {\r\n $scope.reverse = !$scope.reverse;\r\n ProcessListFactory.reverseProcessList = $scope.reverse;\r\n }\r\n\r\n allProcessLists = $filter('orderBy')(allProcessLists, ProcessListFactory.predicateProcessList, ProcessListFactory.reverseProcessList);\r\n\r\n $scope.processList = filterByCategory().slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Gets the process list category hierarchy\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n $scope.getProcessListCategoryHierarchy = function (organizationId) {\r\n var categoryHierarchyPromise = ProcessListFactory.getProcessListCategoryHierarchy(organizationId);\r\n categoryHierarchyPromise.$promise.then(function (result) {\r\n $scope.categoryHierarchy = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the lists again when the navigation mode changes\r\n * @returns {} \r\n */\r\n $scope.onNavigationModeChange = function () {\r\n $scope.getProcessList(null, $scope.search.Organization.id);\r\n categoryFilteredProcessList = [];\r\n $scope.categoryFilter = { category: null, category2: null, category3: null };\r\n searchService.setCategoryFilter($scope.categoryFilter);\r\n ProcessListFactory.navigationMode = $scope.navigationMode;\r\n };\r\n\r\n // used in category boxes\r\n $scope.selectCategory = function (level, category) {\r\n switch (level) {\r\n case 0:\r\n $scope.categoryFilter.category = $scope.categoryFilter.category == category ? null : category;\r\n $scope.categoryFilter.category2 = null;\r\n $scope.categoryFilter.category3 = null;\r\n break;\r\n case 1:\r\n $scope.categoryFilter.category2 = $scope.categoryFilter.category2 == category ? null : category;\r\n $scope.categoryFilter.category3 = null;\r\n break;\r\n case 2:\r\n $scope.categoryFilter.category3 = $scope.categoryFilter.category3 == category ? null : category;\r\n break;\r\n };\r\n\r\n\r\n searchService.setCategoryFilter($scope.categoryFilter);\r\n $scope.processList = filterByCategory().slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n $scope.clearCategoryLevel = function (level) {\r\n if (!$scope.categoryFilter)\r\n $scope.categoryFilter = {};\r\n switch (level) {\r\n case 0:\r\n $scope.categoryFilter.category = $scope.categoryFilter.category2 = $scope.categoryFilter.category3 = null;\r\n break;\r\n case 1:\r\n $scope.categoryFilter.category2 = $scope.categoryFilter.category3 = null;\r\n break;\r\n case 2:\r\n $scope.categoryFilter.category3 = null;\r\n break;\r\n default:\r\n break;\r\n }\r\n searchService.setCategoryFilter($scope.categoryFilter);\r\n $scope.processList = filterByCategory().slice(0, nrOfRowsToLoadAtStart);\r\n }\r\n\r\n /**\r\n * Gets the class name based on the category level\r\n * @param {} level \r\n * @param {} category \r\n * @returns {} \r\n */\r\n $scope.getCategoryBoxClass = function (level, category) {\r\n var className = \"category-box-\";\r\n className += (level + 1) + \"-\";\r\n switch (level) {\r\n case 0:\r\n className += category == $scope.categoryFilter.category ? \"selected\" : \"normal\";\r\n break;\r\n case 1:\r\n className += category == $scope.categoryFilter.category2 ? \"selected\" : \"normal\";\r\n break;\r\n case 2:\r\n className += category == $scope.categoryFilter.category3 ? \"selected\" : \"normal\";\r\n break;\r\n }\r\n return className;\r\n };\r\n\r\n $scope.init = function () {\r\n $scope.categoryFilter = searchService.getCategoryFilter();\r\n };\r\n\r\n $scope.onOrganizationChange = function (organization, firstTime) {\r\n $scope.search.Organization = organization;\r\n $scope.getProcessList($scope.search.text, organization.id);\r\n $scope.getProcessListCategoryHierarchy(organization.id);\r\n };\r\n\r\n /**\r\n * Goes to selected process list\r\n * @param {} item \r\n * @returns {} \r\n */\r\n $scope.goToProcesslist = function (item) {\r\n if (!item.CanBeEdited) {\r\n $scope.go('/processListElementReadOnly/' + item.id);\r\n }\r\n else {\r\n $scope.go('/processListElement/' + item.id);\r\n }\r\n };\r\n\r\n /**\r\n * Gets the list of process lists\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n $scope.getProcessList = function (freeText, organizationId) {\r\n var includeManagement = $scope.loggedUser.Organization.id == organizationId && $scope.loggedUser.Organization.Central ? true : false;\r\n if (OrganizationUtilService.getOrganizationId() && organizationId && OrganizationUtilService.getOrganizationId() != organizationId) {\r\n $scope.clearCategoryLevel(0);\r\n }\r\n\r\n OrganizationUtilService.setOrganizationId(organizationId ? organizationId : null);\r\n ProcessListFactory.includeDeactivatedItems = $scope.includeDeactivatedItems;\r\n\r\n if (freeText != undefined) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n searchService.setSearch(freeText);\r\n\r\n var processList = ProcessListFactory.getProcessList(freeText, null, $scope.includeDeactivatedItems, includeManagement, organizationId);\r\n processList.$promise.then(function (result) {\r\n allProcessLists = result;\r\n for (var index = 0; index < allProcessLists.length; index++) {\r\n allProcessLists[index].id = parseInt(allProcessLists[index].id);\r\n allProcessLists[index].ProcessListType.Name = $filter('translate')(allProcessLists[index].ProcessListType.ProgId);\r\n }\r\n allProcessLists = $filter('orderBy')(allProcessLists, ProcessListFactory.predicateProcessList, ProcessListFactory.reverseProcessList);\r\n\r\n if ($scope.isXs) {\r\n $scope.processList = allProcessLists;\r\n $scope.numPages = Math.ceil(allProcessLists.length / $scope.itemsPerPage);\r\n } else {\r\n $scope.processList = filterByCategory().slice(0, nrOfRowsToLoadAtStart);\r\n }\r\n });\r\n };\r\n\r\n $scope.reachedEndOfList = false;\r\n /**\r\n * Loads more lists when the user reaches the end of list\r\n * @returns {} \r\n */\r\n $scope.loadMore = function () {\r\n //var list = categoryFilteredProcessList.length > 0 ? categoryFilteredProcessList : allProcessLists;\r\n var list = categoryFilteredProcessList;\r\n\r\n if ($scope.processList && $scope.processList.length < list.length) {\r\n var last = $scope.processList.length > 0 ? $scope.processList.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > list.length ? list.length : last + nrOfRowsToLoad;\r\n\r\n $scope.processList = list.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (list.length > nrOfRowsToLoadAtStart) {\r\n $scope.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the process list type\r\n * @param {} type \r\n * @returns {} \r\n */\r\n $scope.changeProcessListType = function (type) {\r\n ProcessListFactory.ProcessListType = type;\r\n };\r\n\r\n var removeClass = function (idToFind, className) {\r\n var itemToAnimate = document.getElementById(idToFind);\r\n\r\n if (itemToAnimate.classList.contains(className))\r\n itemToAnimate.classList.remove(className);\r\n };\r\n\r\n var addClass = function (idToFind, className) {\r\n var itemToAnimate = document.getElementById(idToFind);\r\n\r\n if (itemToAnimate.classList.contains(className))\r\n itemToAnimate.classList.remove(className);\r\n\r\n itemToAnimate.className += ' ' + className;\r\n };\r\n\r\n $scope.canShowManagementButton = function () {\r\n return $scope.loggedUser && $scope.loggedUser.Organization.Central && ($scope.loggedUser.Group.ProgId == 'ADMIN' || $scope.loggedUser.Group.ProgId == 'MANAGER');\r\n };\r\n\r\n // new button stage animations\r\n $scope.hideNewButton = function () {\r\n // hide new button\r\n addClass('newButton', 'hideAnimation');\r\n $timeout(function () {\r\n $scope.newButtonHidden = true;\r\n removeClass('newButton', 'hideAnimation');\r\n }, 250);\r\n\r\n $timeout(function () {\r\n // show h button\r\n $scope.hButtonVisible = true;\r\n addClass('hButton', 'showAnimation');\r\n $timeout(function () {\r\n removeClass('hButton', 'showAnimation');\r\n }, 250);\r\n\r\n // show v button\r\n $scope.vButtonVisible = true;\r\n addClass('vButton', 'showAnimation');\r\n $timeout(function () {\r\n removeClass('vButton', 'showAnimation');\r\n }, 250);\r\n\r\n // show m button\r\n $scope.mButtonVisible = true;\r\n addClass('mButton', 'showAnimation');\r\n $timeout(function () {\r\n removeClass('mButton', 'showAnimation');\r\n }, 250);\r\n\r\n // show close button\r\n $scope.closeButtonVisible = true;\r\n addClass('closeButton', 'showAnimation');\r\n $timeout(function () {\r\n removeClass('closeButton', 'showAnimation');\r\n }, 250);\r\n }, 250);\r\n\r\n };\r\n\r\n $scope.showNewButton = function () {\r\n // hide h button \r\n addClass('hButton', 'hideAnimation');\r\n $timeout(function () {\r\n $scope.hButtonVisible = false;\r\n removeClass('hButton', 'hideAnimation');\r\n }, 250);\r\n\r\n // hide v button \r\n addClass('vButton', 'hideAnimation');\r\n $timeout(function () {\r\n $scope.vButtonVisible = false;\r\n removeClass('vButton', 'hideAnimation');\r\n }, 250);\r\n\r\n // hide m button \r\n addClass('mButton', 'hideAnimation');\r\n $timeout(function () {\r\n $scope.mButtonVisible = false;\r\n removeClass('mButton', 'hideAnimation');\r\n }, 250);\r\n\r\n // hide close button \r\n addClass('closeButton', 'hideAnimation');\r\n $timeout(function () {\r\n $scope.closeButtonVisible = false;\r\n removeClass('closeButton', 'hideAnimation');\r\n }, 250);\r\n\r\n $timeout(function () {\r\n // show new button\r\n $scope.newButtonHidden = false;\r\n addClass('newButton', 'showAnimation');\r\n $timeout(function () {\r\n removeClass('newButton', 'showAnimation');\r\n }, 250);\r\n }, 250);\r\n };\r\n\r\n $scope.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('processList')\r\n .component('vbPublicOrganizations',\r\n {\r\n templateUrl: 'Scripts/processList/public-organizations-exception/public-organizations-exception.component.html',\r\n controller: 'PublicOrganizationsExceptionController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n modalInstance: '=vbModalInstance',\r\n organizations: '\"\r\n + \"Startdato : \" + $filter(\"date\")(currentOrder.StartDate, \"dd.MM.yyyy\") + \"
\"\r\n + \"Sluttdato : \" + $filter(\"date\")(currentOrder.EndDate, \"dd.MM.yyyy\") + \"

\";\r\n\r\n\r\n }\r\n\r\n return content;\r\n\r\n }\r\n\r\n /**\r\n * Gets all the orders with the start date equal with the provided date\r\n * @param {*} date \r\n * @param {*} projectOrders \r\n */\r\n function getAllOrdersWithThisStartDate(date, projectOrders) {\r\n\r\n if (!projectOrders || projectOrders.length === 0)\r\n return null;\r\n\r\n var ordersToReturn = [];\r\n\r\n for (var index = 0; index < projectOrders.length; index++) {\r\n\r\n var currentOrder = projectOrders[index];\r\n\r\n if ($filter(\"date\")(currentOrder.StartDate, \"yyyy-MM-dd\") === $filter(\"date\")(date, \"yyyy-MM-dd\"))\r\n ordersToReturn.push(currentOrder);\r\n\r\n }\r\n\r\n return ordersToReturn;\r\n\r\n }\r\n\r\n /**\r\n * Gets only the neccessary data from orders\r\n * @param {*} projectOrders \r\n */\r\n function extractNecessaryData(projectOrders) {\r\n\r\n if (!projectOrders || projectOrders.length === 0)\r\n return null;\r\n\r\n var projectData = [];\r\n\r\n var oldStartDate;\r\n\r\n for (var index = 0; index < projectOrders.length; index++) {\r\n\r\n var currentOrder = projectOrders[index];\r\n\r\n if (currentOrder.StartDate === oldStartDate)\r\n continue;\r\n\r\n var orders = getAllOrdersWithThisStartDate(currentOrder.StartDate, projectOrders);\r\n\r\n if (!orders) {\r\n oldStartDate = currentOrder.StartDate;\r\n continue;\r\n }\r\n\r\n projectData.push({\r\n date: $filter(\"date\")(currentOrder.StartDate, \"yyyy-MM-dd\"),\r\n content: createContent(orders)\r\n });\r\n\r\n oldStartDate = currentOrder.StartDate;\r\n\r\n }\r\n\r\n return projectData;\r\n\r\n }\r\n\r\n // function for returning the year which will dictate the\r\n // interval for the timeline\r\n function parseSelectedProjectStartDate(projectStartDate) {\r\n\r\n if (!projectStartDate)\r\n return null;\r\n\r\n var year = projectStartDate.substring(0, projectStartDate.indexOf(\" \"))\r\n .substring(projectStartDate.lastIndexOf(\"/\") + 1);\r\n\r\n\r\n return year;\r\n }\r\n\r\n return {\r\n restrict: \"A\",\r\n scope: {\r\n startDate: \"=\"\r\n },\r\n template: \" \\\r\n \\\r\n \",\r\n controller: ['$scope', function ($scope) {\r\n\r\n function init() {\r\n\r\n var projectYear = parseSelectedProjectStartDate($scope.startDate);\r\n\r\n $scope.selectedProjectStartDate = projectYear + \"-01-01\";\r\n $scope.selectedProjectEndDate = projectYear + \"-12-31\";\r\n $scope.selectedProjectData = [];\r\n\r\n }\r\n\r\n init();\r\n\r\n }],\r\n link: function (scope, element, attrs) {\r\n\r\n scope.$on(\"onDataReadyFor\" + element.attr(\"id\"), function (event, args) {\r\n\r\n if (!args || args.length === 0)\r\n return;\r\n\r\n var projectNecessaryData = extractNecessaryData(args);\r\n\r\n scope.selectedProjectData = projectNecessaryData ? projectNecessaryData : [];\r\n\r\n });\r\n\r\n }\r\n\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectProgressPlanController.$inject = [\r\n '$scope',\r\n 'ProgressPlanFactory',\r\n 'sessionInformationService',\r\n '$routeParams',\r\n 'titleService',\r\n '$filter',\r\n 'OrganizationUtilService'\r\n ];\r\n\r\n angular.module(\"project\")\r\n .controller(\"ProjectProgressPlanController\", ProjectProgressPlanController);\r\n\r\n function ProjectProgressPlanController(\r\n $scope,\r\n ProgressPlanFactory,\r\n sessionInformationService,\r\n $routeParams,\r\n titleService,\r\n $filter,\r\n OrganizationUtilService\r\n ) {\r\n\r\n /**\r\n * Saves the plan report\r\n * @param {*} organizationId \r\n * @param {*} reportSource \r\n */\r\n $scope.saveProgressPlanReport = function (organizationId, reportSource) {\r\n\r\n if (!$scope.selectedProgressPlan || !$scope.selectedProgressPlan.id)\r\n ProgressPlanFactory.saveProgressPlan(organizationId, reportSource)\r\n .then(function (response) {\r\n\r\n if (response && response.SaveProgressPlanResult && response.SaveProgressPlanResult.id)\r\n $scope.go(\"/progressPlan/\" + response.SaveProgressPlanResult.id);\r\n\r\n });\r\n\r\n\r\n };\r\n\r\n $scope.onProgressPlanActiveChanged = function (progressPlan) {\r\n\r\n if (!progressPlan || progressPlan.Active === undefined)\r\n return;\r\n\r\n ProgressPlanFactory.updateProgressPlanState(progressPlan.id, progressPlan.Active)\r\n .then(function () {\r\n\r\n getProgressPlanById(progressPlan.id);\r\n\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Gets the progress plan by the given id\r\n * @param {*} progressPlanId \r\n */\r\n function getProgressPlanById(progressPlanId) {\r\n\r\n if (!progressPlanId)\r\n return;\r\n\r\n ProgressPlanFactory.getProgressPlanById(progressPlanId)\r\n .then(function (response) {\r\n\r\n if (response) {\r\n $scope.selectedProgressPlan = response;\r\n titleService.changeTitle(($filter('translate')(\"PROGRESS_PLAN.PROGRESS_PLAN\")) + \" Rev.\" + $scope.selectedProgressPlan.Revision);\r\n }\r\n\r\n\r\n });\r\n\r\n }\r\n\r\n function getOrganizationId() {\r\n\r\n return OrganizationUtilService.getOrganizationIdForLoggedUser(sessionInformationService.getUser());\r\n\r\n }\r\n\r\n function init() {\r\n\r\n $scope.organizationId = getOrganizationId();\r\n\r\n var progressPlanId = $routeParams.progressPlanId;\r\n\r\n if (progressPlanId) {\r\n\r\n getProgressPlanById(progressPlanId);\r\n\r\n } else {\r\n titleService.changeTitle($filter('translate')(\"PROGRESS_PLAN.PROGRESS_PLAN\"));\r\n }\r\n\r\n };\r\n\r\n init();\r\n\r\n };\r\n\r\n})();","(function () {\r\n\r\n ProgressPlanFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module(\"project\")\r\n .factory(\"ProgressPlanFactory\", ProgressPlanFactory);\r\n\r\n function ProgressPlanFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n\r\n var ProgressPlans = $resource(baseUrlService.getBaseUrl() + \"REST/ProgressPlan.svc/ProgressPlans\");\r\n var ProgressPlanModify = $resource(baseUrlService.getBaseUrl() + \"REST/ProgressPlan.svc/ProgressPlan\");\r\n var ProgressPlanRetrieve = $resource(baseUrlService.getBaseUrl() + \"REST/ProgressPlan.svc/ProgressPlan/:progressPlanId\");\r\n var ProgressPlanState = $resource(baseUrlService.getBaseUrl() + \"REST/ProgressPlan.svc/ProgressPlanState\");\r\n\r\n /**\r\n * Gets the list of progress plans\r\n * @param {*} organizationId \r\n * @param {*} includeDeactivated \r\n */\r\n var getProgressPlanList = function (organizationId, includeDeactivated) {\r\n return ProgressPlans.query({\r\n organizationId: organizationId,\r\n includeDeactivated: includeDeactivated\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Saves any given progress plan\r\n * @param {*} organizationId \r\n * @param {*} reportSource \r\n */\r\n var saveProgressPlan = function (organizationId, reportSource) {\r\n return ProgressPlanModify.save({\r\n organizationId: organizationId,\r\n reportSource: reportSource\r\n }).$promise;\r\n };\r\n\r\n /**\r\n * Gets the progress plan by id\r\n * @param {*} progressPlanId \r\n */\r\n var getProgressPlanById = function (progressPlanId) {\r\n return ProgressPlanRetrieve.get({ progressPlanId: progressPlanId }).$promise;\r\n };\r\n\r\n /**\r\n * Updates the progress plan active state\r\n * @param {*} progressPlanId \r\n * @param {*} isActive \r\n */\r\n var updateProgressPlanState = function (progressPlanId, isActive) {\r\n return ProgressPlanState.save({\r\n progressPlanId: progressPlanId,\r\n isActive: isActive\r\n }).$promise;\r\n };\r\n\r\n return {\r\n getProgressPlanList: getProgressPlanList,\r\n saveProgressPlan: saveProgressPlan,\r\n getProgressPlanById: getProgressPlanById,\r\n updateProgressPlanState: updateProgressPlanState\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n progressPlanMainRow.$inject = [\r\n 'OrderFactory'\r\n ];\r\n\r\n angular.module(\"project\")\r\n .directive(\"progressPlanMainRow\", progressPlanMainRow);\r\n\r\n function progressPlanMainRow(\r\n OrderFactory\r\n ) {\r\n\r\n var registerClickEventListenerFn;\r\n\r\n return {\r\n restrict: \"A\",\r\n scope: {},\r\n controller: ['$scope', function ($scope) {\r\n\r\n $scope.rowCollapsed = true;\r\n\r\n /**\r\n * Helper function to display the correct chevron icon based on the collapsed state\r\n * @param {*} element \r\n */\r\n function toggleChevron(element) {\r\n\r\n var iconElement = element.find(\"i\");\r\n\r\n if ($scope.rowCollapsed) {\r\n\r\n if (iconElement.hasClass(\"fa-chevron-down\"))\r\n iconElement.removeClass(\"fa-chevron-down\");\r\n\r\n if (iconElement.hasClass(\"fa-chevron-right\"))\r\n iconElement.removeClass(\"fa-chevron-right\");\r\n\r\n iconElement.addClass(\"fa-chevron-right\");\r\n\r\n } else {\r\n\r\n if (iconElement.hasClass(\"fa-chevron-right\"))\r\n iconElement.removeClass(\"fa-chevron-right\");\r\n\r\n if (iconElement.hasClass(\"fa-chevron-down\"))\r\n iconElement.removeClass(\"fa-chevron-down\");\r\n\r\n iconElement.addClass(\"fa-chevron-down\");\r\n\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Helper function that sets the correct class based on the collapsed status\r\n * @param {*} rowElement \r\n */\r\n function toggleRow(rowElement) {\r\n\r\n if ($scope.rowCollapsed) {\r\n\r\n if (rowElement.hasClass(\"expanded-progress-plan-row\"))\r\n rowElement.removeClass(\"expanded-progress-plan-row\");\r\n\r\n if (rowElement.hasClass(\"collapsed-progress-plan-row\"))\r\n rowElement.removeClass(\"collapsed-progress-plan-row\");\r\n\r\n rowElement.addClass(\"expanded-progress-plan-row\");\r\n\r\n } else {\r\n\r\n if (rowElement.hasClass(\"collapsed-progress-plan-row\"))\r\n rowElement.removeClass(\"collapsed-progress-plan-row\");\r\n\r\n if (rowElement.hasClass(\"expanded-progress-plan-row\"))\r\n rowElement.removeClass(\"expanded-progress-plan-row\");\r\n\r\n rowElement.addClass(\"collapsed-progress-plan-row\");\r\n\r\n }\r\n\r\n $scope.rowCollapsed = !$scope.rowCollapsed;\r\n\r\n }\r\n\r\n function parseRowId(rowId) {\r\n\r\n if (!rowId)\r\n return null;\r\n\r\n return rowId.substring(0, rowId.indexOf(\"-\"));\r\n\r\n }\r\n\r\n /**\r\n * Registers click event for the given element\r\n * Gets the project orders for the selected row\r\n * @param {*} element \r\n */\r\n function registerClickEventListener(element) {\r\n\r\n element.on(\"click\", function () {\r\n\r\n var selectedRowId = parseRowId(element.attr(\"id\"));\r\n\r\n if (!selectedRowId)\r\n return;\r\n\r\n var rowWithTheSameId = getRowWithTheSameId(selectedRowId, element[0].parentElement.children);\r\n\r\n if (!rowWithTheSameId)\r\n return;\r\n\r\n OrderFactory.getProjectOrdersByProjectId(selectedRowId)\r\n .then(function (response) {\r\n\r\n var projectOrders;\r\n\r\n if (!response)\r\n projectOrders = [];\r\n else\r\n projectOrders = response;\r\n\r\n\r\n $scope.$parent.$broadcast(\"onDataReadyFor\" + selectedRowId, projectOrders);\r\n\r\n // expand if its collapsed, collapse if its expanded\r\n\r\n toggleRow(rowWithTheSameId);\r\n toggleChevron(element);\r\n\r\n\r\n });\r\n\r\n });\r\n\r\n }\r\n\r\n function getRowWithTheSameId(rowId, rowList) {\r\n\r\n if (!rowId || !rowList || rowList.length === 0)\r\n return null;\r\n\r\n for (var index = 0; index < rowList.length; index++) {\r\n\r\n var currentRowElement = angular.element(rowList[index]);\r\n\r\n if (currentRowElement.attr(\"id\") === rowId) {\r\n return currentRowElement;\r\n }\r\n\r\n }\r\n\r\n return null;\r\n\r\n }\r\n\r\n registerClickEventListenerFn = registerClickEventListener;\r\n\r\n }],\r\n link: function (scope, element, attrs) {\r\n\r\n if (registerClickEventListenerFn && typeof (registerClickEventListenerFn) === \"function\")\r\n registerClickEventListenerFn(element);\r\n\r\n }\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectProgressPlanListController.$inject = [\r\n '$scope',\r\n 'ProgressPlanFactory',\r\n 'titleService',\r\n '$filter',\r\n 'OrganizationUtilService',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular.module(\"project\")\r\n .controller(\"ProjectProgressPlanListController\", ProjectProgressPlanListController);\r\n\r\n function ProjectProgressPlanListController(\r\n $scope,\r\n ProgressPlanFactory,\r\n titleService,\r\n $filter,\r\n OrganizationUtilService,\r\n sessionInformationService\r\n ) {\r\n\r\n /**\r\n * Gets the project plan lists\r\n * @param {*} organizationId \r\n * @param {*} includeDeactivated \r\n */\r\n $scope.getProgressPlanList = function (organizationId, includeDeactivated) {\r\n\r\n ProgressPlanFactory.getProgressPlanList(organizationId, includeDeactivated)\r\n .then(function (response) {\r\n\r\n if (response)\r\n $scope.progressPlans = response;\r\n else\r\n $scope.progressPlans = [];\r\n\r\n });\r\n\r\n }\r\n\r\n $scope.getOrganizationId = function () {\r\n\r\n return OrganizationUtilService.getOrganizationIdForLoggedUser(sessionInformationService.getUser());\r\n\r\n }\r\n\r\n function init() {\r\n\r\n titleService.changeTitle($filter(\"translate\")(\"PROGRESS_PLAN.REVISIONS\"));\r\n $scope.includeDeactivated = false;\r\n\r\n var organizationId = $scope.getOrganizationId();\r\n $scope.getProgressPlanList(organizationId, false);\r\n\r\n }\r\n\r\n init();\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('project')\r\n .component('vbProjectChart', {\r\n templateUrl: 'Scripts/project/project-chart/project-chart.component.html',\r\n controller: 'ProjectChartController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n projectUsers: '=vbUsers',\r\n sharedObject: '=',\r\n onlyRender: '=vbOnlyRender'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectChartController.$inject = [\r\n '_',\r\n '$timeout',\r\n '$scope',\r\n '$rootScope',\r\n 'OrderFactory'\r\n ];\r\n\r\n angular\r\n .module('project')\r\n .controller('ProjectChartController', ProjectChartController);\r\n\r\n function ProjectChartController(\r\n _,\r\n $timeout,\r\n $scope,\r\n $rootScope,\r\n OrderFactory\r\n ) {\r\n var vm = this;\r\n\r\n var ceoTypeProgId = 'BUSINESSROLE_CEO';\r\n var managerTypeProgId = 'BUSINESSROLE_MANAGER';\r\n var middleManagerTypeProgId = 'BUSINESSROLE_MIDDLE_MANAGER';\r\n var userTypeProgId = 'BUSINESSROLE_USER';\r\n\r\n var onRefreshAndSnapshot;\r\n\r\n vm.uniqueId = '';\r\n vm.ceos = [];\r\n vm.users = [];\r\n var applicationChange = OrderFactory.applicationChange;\r\n\r\n vm.$onInit = onInit;\r\n vm.existsPreviousUser = existsPreviousUser;\r\n vm.existsNextUser = existsNextUser;\r\n\r\n function onInit() {\r\n if (vm.onlyRender)\r\n vm.uniqueId = 'ahftisl';\r\n\r\n vm.sharedObject.refresh = refresh;\r\n vm.sharedObject.snapshotChart = snapshotChart;\r\n\r\n onRefreshAndSnapshot = $rootScope.$on('projectChart:refreshAndSnapshot', function (event, data) {\r\n if (!vm.onlyRender)\r\n refresh();\r\n });\r\n\r\n\r\n refresh();\r\n\r\n if (vm.onlyRender) {\r\n snapshotChart();\r\n }\r\n };\r\n\r\n vm.$onDestroy = function () {\r\n if (!!onRefreshAndSnapshot)\r\n onRefreshAndSnapshot();\r\n }\r\n\r\n /**\r\n * Takes a 'picture' of the project chart. The snapshot data will be\r\n * sent to the server in order to be included in the project documentation.\r\n */\r\n function snapshotChart() {\r\n $timeout(function () {\r\n $scope.$apply();\r\n\r\n var projectChartContainer = document.getElementById('projectChartElement' + vm.uniqueId);\r\n html2canvas(projectChartContainer, {\r\n scrollX: 0,\r\n scrollY: 0\r\n })\r\n .then(function (canvas) {\r\n\r\n // if the projectUsers list is empty or doesn't exists\r\n // means no users are displayed in the chart\r\n if (!vm.projectUsers || vm.projectUsers.length === 0) {\r\n vm.sharedObject.chartData = null;\r\n } else {\r\n vm.sharedObject.chartData = '\"' + canvas.toDataURL() + '\"';\r\n }\r\n\r\n if (vm.onlyRender)\r\n $rootScope.$emit('onChartLoaded');\r\n });\r\n }, 250);\r\n }\r\n\r\n function refresh() {\r\n splitUsers();\r\n };\r\n\r\n function splitUsers() {\r\n if (_.isNil(vm.projectUsers) || _.isEmpty(vm.projectUsers))\r\n return;\r\n\r\n var users = _.map(_.filter(vm.projectUsers, function (p) { return p.Change !== applicationChange.DELETE }), function (p) { return p.User });\r\n\r\n if (_.isEmpty(users))\r\n return;\r\n\r\n //ceos\r\n vm.ceos = _.remove(users, function (u) { return u.BusinessRole && u.BusinessRole.Parent && u.BusinessRole.Parent.ProgId == ceoTypeProgId });\r\n\r\n if (_.isEmpty(vm.ceos))\r\n //go down a level\r\n vm.ceos = _.remove(users, function (u) {\r\n return u.BusinessRole\r\n && u.BusinessRole.Parent\r\n && (u.BusinessRole.Parent.ProgId == managerTypeProgId || u.BusinessRole.Parent.ProgId == middleManagerTypeProgId)\r\n && !_.some(users, function (uu) { return u.Manager && u.Manager.id === uu.id })\r\n });\r\n\r\n if (_.isEmpty(vm.ceos))\r\n //go down to the last level\r\n vm.ceos = _.remove(users, function (u) { return u.BusinessRole && u.BusinessRole.Parent && u.BusinessRole.Parent.ProgId == userTypeProgId });\r\n\r\n for (var i = 0; i < vm.ceos.length; i++) {\r\n var ceo = vm.ceos[i];\r\n //set the managers\r\n ceo.Managers = _.remove(users, function (u) { return u.Manager && u.Manager.id == ceo.id });\r\n\r\n for (var j = 0; j < ceo.Managers.length; j++) {\r\n var manager = ceo.Managers[j];\r\n\r\n manager.Users = _.remove(users, function (u) { return u.Manager && u.Manager.id == manager.id });\r\n\r\n for (var k = 0; k < manager.Users.length; k++) {\r\n var user = manager.Users[k];\r\n\r\n user.Users = _.remove(users, function (u) { return u.Manager && u.Manager.id == user.id });\r\n }\r\n }\r\n }\r\n\r\n //for (var i = users.length - 1; i > 0; i--) {\r\n // var user = users[i];\r\n\r\n // user.Users = _.remove(users, function (u) { return u.Manager && u.Manager.id == user.id });\r\n //}\r\n if (vm.ceos.length > 0) {\r\n Array.prototype.push.apply(vm.ceos[0].Managers, users);\r\n }\r\n\r\n vm.users = [];\r\n }\r\n\r\n function existsPreviousUser(users, currentUserIndex) {\r\n\r\n if (!users || users.length === 0)\r\n return false;\r\n\r\n if (_.isNil(currentUserIndex))\r\n return false;\r\n\r\n var previousUserIndex = currentUserIndex - 1;\r\n var previousUser = users[previousUserIndex];\r\n\r\n return previousUser && previousUser.id;\r\n }\r\n\r\n function existsNextUser(users, currentUserIndex) {\r\n\r\n if (!users || users.length === 0)\r\n return false;\r\n\r\n if (_.isNil(currentUserIndex))\r\n return false;\r\n\r\n var nextUserIndex = currentUserIndex + 1;\r\n var nextUser = users[nextUserIndex];\r\n\r\n return nextUser && nextUser.id;\r\n }\r\n };\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('project')\r\n .component('vbProjectRiskAnalysis',\r\n {\r\n templateUrl: 'Scripts/project/project-risk-analysis/project-risk-analysis.component.html',\r\n controller: 'ProjectRiskAnalysisController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n projectId: '<',\r\n project: '=vbProject'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n projectRiskAnalysisController.$inject = [\r\n 'RiskAnalysisFactory',\r\n '$scope',\r\n 'TableResources',\r\n 'RiskAnalysisUtilsFactory'\r\n ];\r\n\r\n function projectRiskAnalysisController(\r\n RiskAnalysisFactory,\r\n $scope,\r\n TableResources,\r\n RiskAnalysisUtilsFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.riskHeads = [];\r\n vm.$onInit = onInit;\r\n vm.goToRiskHeadDetails = goToRiskHeadDetails;\r\n vm.createNewRiskHead = createNewRiskHead;\r\n\r\n function onInit() {\r\n\r\n getRiskHeadsForProject();\r\n }\r\n\r\n function getRiskHeadsForProject() {\r\n\r\n RiskAnalysisFactory.getRiskHeadsForProject(vm.projectId)\r\n .then(function (riskHeads) {\r\n\r\n vm.riskHeads = riskHeads;\r\n\r\n vm.project.RiskCount = !!vm.riskHeads ? vm.riskHeads.length : 0;\r\n });\r\n }\r\n\r\n function goToRiskHeadDetails(riskHead) {\r\n\r\n // attach on scope the needed data\r\n $scope.foreignKey = riskHead.ForeignKey;\r\n $scope.table = riskHead.Table;\r\n $scope.riskHeadId = riskHead.id;\r\n\r\n openRiskHeadModal($scope);\r\n }\r\n\r\n function createNewRiskHead() {\r\n\r\n // attach on scope the needed data\r\n $scope.foreignKey = vm.projectId;\r\n $scope.table = TableResources.ProjectTable;\r\n $scope.riskHeadId = null;\r\n\r\n openRiskHeadModal($scope);\r\n }\r\n\r\n function openRiskHeadModal(scope) {\r\n\r\n RiskAnalysisUtilsFactory.openRiskHeadModal(scope)\r\n .then(function () {\r\n\r\n // refresh the list\r\n getRiskHeadsForProject();\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('project')\r\n .controller('ProjectRiskAnalysisController', projectRiskAnalysisController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectDocumentationController.$inject = [\r\n 'OrderFactory',\r\n 'ProjectFactory',\r\n '$filter',\r\n 'UserFactory',\r\n 'sessionInformationService',\r\n 'CustomerFactory',\r\n 'DateUtilService',\r\n '$q',\r\n 'OrganizationUtilService',\r\n '_',\r\n '$rootScope',\r\n 'ProjectService'\r\n ];\r\n\r\n angular.module('project')\r\n .controller('ProjectDocumentationController', ProjectDocumentationController)\r\n .directive('projectDocumentation', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProjectDocumentationController as projectDocCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/project/projectDocumentation/projectDocumentationPartial.html',\r\n scope: {\r\n projectObject: '=',\r\n onProjectRetrieve: '&?'\r\n }\r\n };\r\n });\r\n\r\n function ProjectDocumentationController(\r\n OrderFactory,\r\n ProjectFactory,\r\n $filter,\r\n UserFactory,\r\n sessionInformationService,\r\n CustomerFactory,\r\n DateUtilService,\r\n $q,\r\n OrganizationUtilService,\r\n _,\r\n $rootScope,\r\n ProjectService\r\n ) {\r\n var projectDocCtrl = this;\r\n\r\n projectDocCtrl.project = ProjectFactory.getProjectToSave();\r\n setProjectOrganization(projectDocCtrl.project);\r\n projectDocCtrl.project.Order = {\r\n Name: ''\r\n };\r\n projectDocCtrl.projectStatuses = [[]];\r\n projectDocCtrl.users = [];\r\n projectDocCtrl.participantFilter = '';\r\n projectDocCtrl.mainOrders = [];\r\n projectDocCtrl.intellisense = { mainOrder: false };\r\n projectDocCtrl.customers = [];\r\n var applicationChange = OrderFactory.applicationChange;\r\n\r\n var orderTypes = [];\r\n\r\n projectDocCtrl.$onInit = function () {\r\n initDelegateFunctions();\r\n ProjectService.promiseLeftMenuCategories.then(function () {\r\n init();\r\n });\r\n };\r\n\r\n /**\r\n * Sets the organization based on the given project\r\n * @param {*} project \r\n */\r\n function setProjectOrganization(project) {\r\n if (!project)\r\n return;\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (loggedUser.Group.ProgId === 'ADMIN' && loggedUser.Organization.Central) {\r\n\r\n if (!OrganizationUtilService.getOrganizationId()) {\r\n project.Organization = loggedUser.Organization;\r\n } else {\r\n project.Organization = { id: OrganizationUtilService.getOrganizationId() };\r\n }\r\n\r\n } else\r\n project.Organization = loggedUser.Organization;\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Shared function that gets the project\r\n */\r\n projectDocCtrl.projectObject.getProject = function (forSave) {\r\n formatDatesForSave(projectDocCtrl.project, projectDocCtrl.project.Order, forSave);\r\n return projectDocCtrl.project;\r\n };\r\n\r\n /**\r\n * Checks whether the project can be saved\r\n */\r\n projectDocCtrl.projectObject.canSaveProject = function () {\r\n if (!projectDocCtrl.project.Order || !projectDocCtrl.project.Order.id)\r\n return false;\r\n\r\n if (projectDocCtrl.project.id && !projectDocCtrl.project.ProjectNumber)\r\n return false;\r\n\r\n if (!projectDocCtrl.project.Name)\r\n return false;\r\n\r\n if (!projectDocCtrl.project.Order.StartDate && projectDocCtrl.project.Order.EndDate)\r\n return false;\r\n\r\n if (projectDocCtrl.project.Order.StartDate && !projectDocCtrl.project.Order.EndDate)\r\n return false;\r\n\r\n if (projectDocCtrl.project.Order.StartDate && projectDocCtrl.project.Order.EndDate && projectDocCtrl.project.Order.StartDate > projectDocCtrl.project.Order.EndDate)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Order description must be synched with the project description\r\n */\r\n projectDocCtrl.projectObject.syncOrderDescriptionWithProject = function (order) {\r\n\r\n if (!order || !order.Description)\r\n return;\r\n\r\n if (projectDocCtrl.project && projectDocCtrl.project.Description !== undefined) {\r\n projectDocCtrl.project.Description = order.Description;\r\n }\r\n\r\n };\r\n\r\n projectDocCtrl.projectObject.reloadProject = function () {\r\n return init(true);\r\n }\r\n };\r\n\r\n function getFullName(object) {\r\n return (object.FirstName ? object.FirstName + ' ' : '') + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n /**\r\n * Gets the order types\r\n */\r\n function getOrderTypes() {\r\n return OrderFactory.getOrderTypes().$promise.then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n orderTypes = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the project statuses\r\n */\r\n function getProjectStatuses() {\r\n return ProjectFactory.getProjectStatuses().then(function (result) {\r\n //projectDocCtrl.projectStatuses = result.GetProjectStatusesResult;\r\n for (var i = 0; i < result.GetProjectStatusesResult[0].length; i++) {\r\n if (result.GetProjectStatusesResult[0][i].ProgId != 'UNASSIGNED' && result.GetProjectStatusesResult[0][i].ProgId != 'NOT_COMPLETED')\r\n projectDocCtrl.projectStatuses[0].push(result.GetProjectStatusesResult[0][i]);\r\n }\r\n projectDocCtrl.projectStatuses[1] = result.GetProjectStatusesResult[1];\r\n\r\n //set the first status\r\n projectDocCtrl.setStatus(projectDocCtrl.projectStatuses[0][0]);\r\n });\r\n };\r\n\r\n /**\r\n * Gets the users\r\n */\r\n function getUsers() {\r\n var organizationId = OrganizationUtilService.getOrganizationId();\r\n UserFactory.getUsersByOrganizationId(organizationId).$promise.then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n projectDocCtrl.users = result;\r\n angular.forEach(projectDocCtrl.users, function (user) {\r\n user.FullName = getFullName(user);\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Order description must be in sync with project description\r\n * @param {*} order \r\n */\r\n function syncDescriptionWithMainOrder(order) {\r\n if (!order)\r\n return;\r\n\r\n if (!order.ParentId && projectDocCtrl.project && projectDocCtrl.project.Description)\r\n order.Description = projectDocCtrl.project.Description;\r\n };\r\n\r\n /**\r\n * Gets the project orders to be associated with the newly project\r\n * @param {*} freeText \r\n */\r\n function getMainProjectOrders(freeText) {\r\n var organizationId = projectDocCtrl.project.Organization.id;\r\n var projectOrderType = $filter('filter')(orderTypes, function (orderType) { return orderType.ProgId == 'PROSJEKT'; })[0];\r\n\r\n return OrderFactory.getProjectOrders(freeText, organizationId).then(function (result) {\r\n if (!result || result.length == 0) {\r\n projectDocCtrl.mainOrders = [];\r\n projectDocCtrl.intellisense.mainOrder = true;\r\n return;\r\n }\r\n\r\n projectDocCtrl.mainOrders = result;\r\n //set the name to display\r\n angular.forEach(projectDocCtrl.mainOrders, function (order) {\r\n if (order.OrderNumber)\r\n order.Name = 'EXT. ID ' + order.OrderNumber;\r\n else\r\n order.Name = 'ID ' + order.id;\r\n });\r\n\r\n projectDocCtrl.intellisense.mainOrder = true;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the customers\r\n * @param {*} freeText \r\n */\r\n function getCustomers(freeText) {\r\n\r\n var organizationId = projectDocCtrl.project.Organization.id;\r\n\r\n return OrderFactory.getCustomersForOrder(null, organizationId, freeText, false).$promise.then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n angular.forEach(result, function (customer) {\r\n customer.FullName = getFullName(customer);\r\n });\r\n\r\n projectDocCtrl.customers = result;\r\n });\r\n };\r\n\r\n /**\r\n * Cordel dates aren't UTC so we have to fix the timezone manually\r\n * @param {*} project \r\n * @param {*} order \r\n */\r\n function formatDatesForSave(project, order, forSave) {\r\n if (project) {\r\n if (project.OfferDate) {\r\n var offerDate = new Date(project.OfferDate);\r\n offerDate.setHours(0, 0, 0, 0);\r\n project.OfferDate = DateUtilService.getLongWithOffset(offerDate);\r\n }\r\n if (project.ContractSigned) {\r\n var contractSigned = new Date(project.ContractSigned);\r\n contractSigned.setHours(0, 0, 0, 0);\r\n project.ContractSigned = DateUtilService.getLongWithOffset(contractSigned);\r\n }\r\n if (project.PaymentDeadline) {\r\n var paymentDeadline = new Date(project.PaymentDeadline);\r\n paymentDeadline.setHours(0, 0, 0, 0);\r\n project.PaymentDeadline = DateUtilService.getLongWithOffset(paymentDeadline);\r\n }\r\n }\r\n if (order && forSave) {\r\n if (order.OrderDate) {\r\n var orderDate = new Date(order.OrderDate);\r\n orderDate.setHours(0, 0, 0, 0);\r\n order.OrderDate = DateUtilService.getLongWithOffset(orderDate);\r\n }\r\n if (order.StartDate)\r\n order.StartDate = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n if (order.EndDate)\r\n order.EndDate = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n\r\n if (order.SubOrders && order.SubOrders.length > 0)\r\n for (var i = 0; i < order.SubOrders.length; i++)\r\n formatDatesForSave(null, order.SubOrders[i], forSave);\r\n }\r\n };\r\n\r\n function setDisplayNameForOrder(order) {\r\n if (order.OrderNumber)\r\n order.Name = 'EXT. ID ' + order.OrderNumber;\r\n else\r\n order.Name = 'ID ' + order.id;\r\n };\r\n\r\n /**\r\n * Processes the participants\r\n * If the project manager is one of the participants, move it to first place\r\n * @param {*} order \r\n */\r\n function processOrderParticipants(order) {\r\n if (!order.Participants)\r\n order.Participants = [];\r\n\r\n if (!projectDocCtrl.project.ProjectManager || !projectDocCtrl.project.ProjectManager.id)\r\n return;\r\n\r\n //if the manage is in the list, move it to first place\r\n var existingParticipant = $filter('filter')(order.Participants, function (p) { return p.User.id == projectDocCtrl.project.ProjectManager.id; });\r\n if (!existingParticipant || existingParticipant.length == 0)\r\n return;\r\n\r\n order.Participants.splice(0, 0, order.Participants.splice(order.Participants.indexOf(existingParticipant[0]), 1)[0]);\r\n };\r\n\r\n /**\r\n * Gets the project by the given id\r\n * @param {*} projectId \r\n */\r\n function getProject(projectId) {\r\n return ProjectFactory.getProject(projectId).$promise.then(function (result) {\r\n projectDocCtrl.project = result;\r\n setDisplayNameForOrder(projectDocCtrl.project.Order);\r\n\r\n projectDocCtrl.setStatus(projectDocCtrl.project.Status);\r\n\r\n if (projectDocCtrl.project.Order.Customer)\r\n projectDocCtrl.project.Order.Customer.FullName = getFullName(projectDocCtrl.project.Order.Customer);\r\n\r\n if (projectDocCtrl.project.Order.InvoiceCustomer)\r\n projectDocCtrl.project.Order.InvoiceCustomer.FullName = getFullName(projectDocCtrl.project.Order.InvoiceCustomer);\r\n\r\n if (projectDocCtrl.project.ProjectManager && projectDocCtrl.project.ProjectManager.id)\r\n projectDocCtrl.project.ProjectManager.FullName = getFullName(projectDocCtrl.project.ProjectManager);\r\n\r\n projectDocCtrl.projectObject.setOrder(projectDocCtrl.project.Order);\r\n projectDocCtrl.projectObject.isOrderExecutionDisabled = false;\r\n\r\n if (projectDocCtrl.project.Name)\r\n projectDocCtrl.project.Name = projectDocCtrl.project.Name.trim();\r\n\r\n //init participants and project manager\r\n processOrderParticipants(projectDocCtrl.project.Order);\r\n\r\n return ProjectFactory.leftMenuCategoriesDeffer.promise;\r\n }).then(function () {\r\n if (projectDocCtrl.project.ExecutionList && projectDocCtrl.project.ExecutionList.length > 0)\r\n //make SortNumber integer\r\n angular.forEach(projectDocCtrl.project.ExecutionList, function (executionItem) {\r\n if (executionItem.SortNumber)\r\n executionItem.SortNumber = parseInt(executionItem.SortNumber);\r\n });\r\n ProjectFactory.initProjectManagementCategories(projectDocCtrl.project.ExecutionList);\r\n\r\n if (projectDocCtrl.project.Attachments && projectDocCtrl.project.Attachments.length > 0) {\r\n ProjectFactory.initProjectCategoriesAttachments(projectDocCtrl.project.Attachments);\r\n ProjectFactory.initProjectAttachments(projectDocCtrl.project);\r\n projectDocCtrl.projectObject.projectAttachments = projectDocCtrl.project.Attachments;\r\n }\r\n\r\n projectDocCtrl.projectObject.project = projectDocCtrl.project;\r\n\r\n // notify the parent that the project was retrieved\r\n if (projectDocCtrl.onProjectRetrieve && typeof projectDocCtrl.onProjectRetrieve === 'function') {\r\n projectDocCtrl.onProjectRetrieve();\r\n }\r\n });\r\n };\r\n\r\n projectDocCtrl.setStatus = function (status) {\r\n projectDocCtrl.project.Status = angular.copy(status);\r\n };\r\n\r\n projectDocCtrl.clearStatus = function () {\r\n projectDocCtrl.project.Status = {};\r\n };\r\n\r\n /**\r\n * Sets the project manager\r\n * It also adds/removes the manager from participant list\r\n * @param {*} user \r\n */\r\n projectDocCtrl.setProjectManager = function (user) {\r\n projectDocCtrl.project.ProjectManager = angular.copy(user);\r\n //add it to participants as well, first in list\r\n //if (!projectDocCtrl.project.Participants)\r\n // projectDocCtrl.project.Participants = [];\r\n\r\n //if ($filter('filter')(projectDocCtrl.project.Participants, function (p) { return p.User.id == user.id }).length == 0)\r\n // projectDocCtrl.project.Participants.unshift({ User: angular.copy(user) });\r\n //else\r\n // processOrderParticipants(projectDocCtrl.project.Order);\r\n };\r\n\r\n projectDocCtrl.clearProjectManager = function () {\r\n //remove it from personnel if exists\r\n if (projectDocCtrl.project.Participants && projectDocCtrl.project.Participants) {\r\n projectDocCtrl.project.Participants.removeIf(function (participant) {\r\n return participant.User.id == projectDocCtrl.project.ProjectManager.id;\r\n });\r\n }\r\n\r\n projectDocCtrl.project.ProjectManager = {};\r\n };\r\n\r\n projectDocCtrl.getMainProjectOrders = function () {\r\n if (projectDocCtrl.project.id)\r\n return;\r\n\r\n getMainProjectOrders(projectDocCtrl.project.Order.Name);\r\n };\r\n\r\n /**\r\n * Associates the project with the order\r\n * @param {*} order \r\n */\r\n projectDocCtrl.setMainProjectOrder = function (order) {\r\n\r\n ProjectFactory.getProjectOrderDetails(order.id).$promise.then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n projectDocCtrl.project.Order = result;\r\n setDisplayNameForOrder(projectDocCtrl.project.Order);\r\n\r\n // sync description with the main order\r\n\r\n syncDescriptionWithMainOrder(projectDocCtrl.project.Order);\r\n\r\n if (projectDocCtrl.project.Order.Customer)\r\n projectDocCtrl.project.Order.Customer.FullName = getFullName(projectDocCtrl.project.Order.Customer);\r\n\r\n if (projectDocCtrl.project.Order.InvoiceCustomer)\r\n projectDocCtrl.project.Order.InvoiceCustomer.FullName = getFullName(projectDocCtrl.project.Order.InvoiceCustomer);\r\n\r\n projectDocCtrl.projectObject.setOrder(projectDocCtrl.project.Order);\r\n projectDocCtrl.projectObject.isOrderExecutionDisabled = false;\r\n });\r\n };\r\n\r\n projectDocCtrl.clearMainProjectOrder = function () {\r\n projectDocCtrl.project.Order = {};\r\n ProjectFactory.mainProjectOrder = null;\r\n projectDocCtrl.projectObject.isOrderExecutionDisabled = true;\r\n };\r\n\r\n projectDocCtrl.getCustomers = function (freeText) {\r\n getCustomers(freeText);\r\n };\r\n\r\n projectDocCtrl.setInvoiceCustomer = function (customer) {\r\n projectDocCtrl.project.Order.InvoiceCustomer = customer;\r\n projectDocCtrl.project.Order.InvoiceCustomer.FullName = getFullName(projectDocCtrl.project.Order.InvoiceCustomer);\r\n };\r\n\r\n projectDocCtrl.clearInvoiceCustomer = function () {\r\n projectDocCtrl.project.Order.InvoiceCustomer = {}\r\n };\r\n\r\n /**\r\n * Adds the given user as participant\r\n * @param {*} user \r\n */\r\n projectDocCtrl.addParticipant = function (user) {\r\n\r\n if (!projectDocCtrl.project.Participants)\r\n projectDocCtrl.project.Participants = [];\r\n\r\n if ($filter('filter')(projectDocCtrl.project.Participants, function (p) { return p.User.id == user.id }).length == 0)\r\n projectDocCtrl.project.Participants.push({ User: user, Change: applicationChange.CREATE });\r\n\r\n projectDocCtrl.participantFilter = '';\r\n\r\n projectDocCtrl.projectObject.toggleRenderChart();\r\n $rootScope.$broadcast('projectChart:refreshAndSnapshot');\r\n };\r\n\r\n projectDocCtrl.removeParticipant = function (participant) {\r\n //if participant is also project manager, remove him from there as well\r\n //if (projectDocCtrl.project.ProjectManager && projectDocCtrl.project.ProjectManager.id && participant.User.id == projectDocCtrl.project.ProjectManager.id) {\r\n // projectDocCtrl.clearProjectManager();\r\n // return;\r\n //}\r\n\r\n participant.Change = applicationChange.DELETE;\r\n\r\n projectDocCtrl.projectObject.toggleRenderChart();\r\n\r\n $rootScope.$broadcast('projectChart:refreshAndSnapshot');\r\n };\r\n\r\n projectDocCtrl.syncDescriptionWithOrder = function (order) {\r\n syncDescriptionWithMainOrder(order);\r\n };\r\n\r\n function getUsersFromParticipants() {\r\n if (!projectDocCtrl.project)\r\n return null;\r\n\r\n if (!projectDocCtrl.project.Order)\r\n return null;\r\n\r\n if (!projectDocCtrl.project.Participants)\r\n return null;\r\n\r\n return projectDocCtrl.project.Participants;\r\n };\r\n\r\n function init(skipBroadcast) {\r\n return $q.all([\r\n getOrderTypes(),\r\n getProjectStatuses(),\r\n getUsers()\r\n ]).then(function () {\r\n\r\n projectDocCtrl.projectObject.getUsersFromParticipants = getUsersFromParticipants;\r\n\r\n if (projectDocCtrl.projectObject.projectId)\r\n return getProject(projectDocCtrl.projectObject.projectId);\r\n\r\n return $q.when();\r\n }).then(function () {\r\n if (!skipBroadcast)\r\n $rootScope.$broadcast('project:loaded');\r\n });\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectLeftMenuController.$inject = [\r\n '$element',\r\n 'menuService',\r\n 'ProjectFactory',\r\n '$filter',\r\n '$timeout',\r\n 'OrganizationUtilService',\r\n '$uibModal',\r\n '$scope',\r\n 'DownloadService',\r\n 'OrderFactory',\r\n 'ProjectService'\r\n ];\r\n\r\n angular.module('project')\r\n .controller('ProjectLeftMenuController', ProjectLeftMenuController)\r\n .directive('projectLeftMenu', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProjectLeftMenuController as projectLeftMenuCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/project/projectLeftMenu/projectLeftMenuPartial.html',\r\n link: function (scope, element, attrs, ctrl) {\r\n }\r\n };\r\n });\r\n\r\n function ProjectLeftMenuController(\r\n $element,\r\n menuService,\r\n ProjectFactory,\r\n $filter,\r\n $timeout,\r\n OrganizationUtilService,\r\n $uibModal,\r\n $scope,\r\n DownloadService,\r\n OrderFactory,\r\n ProjectService\r\n ) {\r\n var projectLeftMenuCtrl = this;\r\n var selectedOrganizationId = OrganizationUtilService.getOrganizationId();\r\n\r\n projectLeftMenuCtrl.categories = [];\r\n projectLeftMenuCtrl.registerSearchBoxComponent = registerSearchBoxComponent;\r\n projectLeftMenuCtrl.toggleCategoryMenuItem = toggleCategoryMenuItem;\r\n\r\n /**\r\n * Selects the given process lists and adds it to the current project\r\n * @param {*} processList \r\n * @param {*} category \r\n */\r\n projectLeftMenuCtrl.selectProcessList = function (processList, category) {\r\n ProjectFactory.setCurrentTab('PROJECT_MANAGEMENT');\r\n\r\n if (!ProjectFactory.projectId || ProjectFactory.projectId == 0)\r\n return;\r\n\r\n var categoryToAdd = {\r\n id: category.id,\r\n Name: category.Name,\r\n ProcessList: processList,\r\n SortNumber: category.SortNumber\r\n };\r\n ProjectFactory.addManagementProcessList(categoryToAdd);\r\n };\r\n\r\n /**\r\n * Gets the number of lists that are on project\r\n * @param {*} processListId \r\n * @param {*} categoryId \r\n */\r\n projectLeftMenuCtrl.getNumberOfProcessLists = function (processListId, categoryId) {\r\n var categories = $filter('filter')(ProjectFactory.projectManagementCategories, function (category) { return category.id == categoryId; });\r\n if (!categories || categories.length == 0)\r\n return 0;\r\n\r\n return $filter('filter')(categories[0].ExecutionList, function (projectManagement) { return projectManagement.Execution.InitiatedProcessList.id == processListId }).length;\r\n };\r\n\r\n /**\r\n * Gets the number of processlists that are on the given category\r\n * @param {*} categoryId \r\n */\r\n projectLeftMenuCtrl.getNumberOfProcessListsOnCategory = function (categoryId) {\r\n var categories = $filter('filter')(ProjectFactory.projectManagementCategories, function (category) { return category.id == categoryId; });\r\n if (!categories || categories.length == 0)\r\n return 0;\r\n\r\n return categories[0].ExecutionList.length;\r\n };\r\n\r\n /**\r\n * For laws and regulations and deviation we have tabs that are only shown when the user clicks on them in the left menu\r\n * @param {*} category \r\n */\r\n projectLeftMenuCtrl.showNewTab = function (category) {\r\n switch (category.ProgId) {\r\n case 'BOT_DEVIATION':\r\n ProjectFactory.selectedDeviationStatus = category.Statuses[0];\r\n ProjectFactory.deviationMenuSelected = true;\r\n $timeout(function () {\r\n ProjectFactory.setCurrentTab('PROJECT_DEVIATIONS');\r\n });\r\n break;\r\n case 'BOT_LAWS_AND_REGULATIONS':\r\n ProjectFactory.lawsMenuSelected = true;\r\n $timeout(function () {\r\n ProjectFactory.setCurrentTab('PROJECT_LAWS_AND_REGULATIONS');\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Opens the modal for the user to add attachments on the selected category\r\n * @param {*} category \r\n */\r\n projectLeftMenuCtrl.openAddCategoryAttachmentModal = function (category) {\r\n $scope.selectedCategory = category;\r\n $uibModal.open({\r\n templateUrl: 'Scripts/project/projectLeftMenu/categoryAddAttachment/categoryAddAttachmentModal.html',\r\n controller: 'CategoryAddAttachmentController as categoryAttachmentCtrl',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n };\r\n\r\n projectLeftMenuCtrl.getCategoryAttachments = function (category) {\r\n return category.CategoryAttachments;\r\n };\r\n\r\n projectLeftMenuCtrl.openAttachment = function (attachment, category) {\r\n ProjectFactory.saveCategoryAttachments([attachment], category.id, ProjectFactory.projectId).then(function () {\r\n ProjectFactory.initProjectCategoriesAttachments([angular.copy(attachment)]);\r\n });\r\n };\r\n\r\n function init() {\r\n ProjectService.promiseLeftMenuCategories = \r\n ProjectFactory.getLeftMenuCategories(selectedOrganizationId).then(function (categories) {\r\n if (!categories || categories.length == 0)\r\n return;\r\n\r\n projectLeftMenuCtrl.categories = categories;\r\n\r\n angular.forEach(projectLeftMenuCtrl.categories, function (category) {\r\n category.SortNumber = parseInt(category.SortNumber);\r\n category.collapsed = true;\r\n category.reportCollapse = true;\r\n category.newTab = false;\r\n\r\n //the attachment list is collapsed from the beginning\r\n category.AttachmentsCollapsed = true;\r\n\r\n //init the list of attachments if it does not exist\r\n if (!category.Attachments)\r\n category.Attachments = [];\r\n\r\n //filter the category attachments that only central company can add\r\n category.CategoryAttachments = angular.copy($filter('filter')(category.Attachments, function (a) { return a.Table == 'BOT_CATEGORY' }));\r\n\r\n category.Attachments = [];\r\n\r\n //for each processlist set the category id for easier total calculation\r\n if (category.ProcessLists && category.ProcessLists.length > 0)\r\n angular.forEach(category.ProcessLists, function (processList) {\r\n processList.categoryId = category.id;\r\n });\r\n\r\n });\r\n\r\n ProjectFactory.leftMenuCategories = projectLeftMenuCtrl.categories;\r\n\r\n //TODO get it from menu service\r\n var deviationMenuItem = {\r\n id: -1,\r\n Name: 'BOT_DEVIATION',\r\n newTab: true,\r\n collapsed: true,\r\n ProgId: 'BOT_DEVIATION',\r\n Statuses: []\r\n };\r\n\r\n //add deviation menu item\r\n ProjectFactory.leftMenuCategories.push(deviationMenuItem);\r\n\r\n //add laws and regulations menu item\r\n var lawsMenu = menuService.getMenuByHref(\"/lawsAndRegulations\");\r\n ProjectFactory.leftMenuCategories.push({\r\n id: lawsMenu.id,\r\n Name: lawsMenu.Name,\r\n newTab: true,\r\n collapsed: true,\r\n ProgId: 'BOT_LAWS_AND_REGULATIONS'\r\n });\r\n });\r\n };\r\n\r\n projectLeftMenuCtrl.getSelectedDeviationStatus = function () {\r\n return ProjectFactory.selectedDeviationStatus;\r\n };\r\n\r\n projectLeftMenuCtrl.selectDeviationStatus = function (status) {\r\n ProjectFactory.selectedDeviationStatus = status;\r\n };\r\n\r\n /**\r\n * Sets a reference to 'vb-search-box' component's controller used in the context of the given category\r\n * @param {any} searchBoxCtrl\r\n * @param {any} category\r\n */\r\n function registerSearchBoxComponent(searchBoxCtrl, category) {\r\n\r\n // we use the category object to create an isolated scope for the reference to be set\r\n category.searchBoxCtrl = searchBoxCtrl;\r\n }\r\n\r\n function toggleCategoryMenuItem(category) {\r\n\r\n category.collapsed = !category.collapsed;\r\n\r\n // if the category is collapsed and something was searched in the box\r\n // and no results were found then 'clear' the search box and show all lists\r\n if (category.collapsed &&\r\n category.ProcessLists &&\r\n category.ProcessLists.length === 0 &&\r\n category.searchBoxCtrl.searchText) {\r\n\r\n category.searchBoxCtrl.searchText = '';\r\n\r\n // we clear the search by performing the search operation from the 'vb-search-box' \r\n // component with no search text therefore all the lists will be visible after search\r\n category.searchBoxCtrl.search();\r\n }\r\n }\r\n\r\n init();\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectListController.$inject = [\r\n '$scope',\r\n '$filter',\r\n 'titleService',\r\n 'searchService',\r\n 'ProjectFactory',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular.module('project').controller('ProjectListController', ProjectListController);\r\n\r\n function ProjectListController(\r\n $scope,\r\n $filter,\r\n titleService,\r\n searchService,\r\n ProjectFactory,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n sessionInformationService\r\n ) {\r\n var projectListCtrl = this;\r\n\r\n var allProjects = [];\r\n var nrOfRowsToLoadAtStart = 70;\r\n var nrOfRowsToLoad = 10;\r\n\r\n projectListCtrl.projectStatuses = [[]];\r\n projectListCtrl.organizations = [];\r\n projectListCtrl.projects = [];\r\n projectListCtrl.currentSelectedTab = null;\r\n projectListCtrl.currentSecondLevelSelectedTab = null;\r\n projectListCtrl.includeDeactivated = false;\r\n\r\n projectListCtrl.search = searchService.getSearch();\r\n projectListCtrl.reverse = ProjectFactory.reverseProjects;\r\n projectListCtrl.predicate = ProjectFactory.predicateProjects;\r\n projectListCtrl.reachedEndOfList = false;\r\n projectListCtrl.currentPage = 1;\r\n projectListCtrl.itemsPerPage = 30;\r\n projectListCtrl.numPages = 1;\r\n\r\n projectListCtrl.onOrganizationChange = onOrganizationChange;\r\n\r\n titleService.changeTitle($filter('translate')('Projects'));\r\n\r\n /**\r\n * Get the list of project statuses\r\n */\r\n function getProjectStatuses() {\r\n return ProjectFactory.getProjectStatuses().then(function (result) {\r\n projectListCtrl.projectStatuses = result.GetProjectStatusesResult;\r\n\r\n for (var i = 0; i < projectListCtrl.projectStatuses.length; i++) {\r\n for (var j = 0; j < projectListCtrl.projectStatuses[i].length; j++) {\r\n if (projectListCtrl.search.currentTabId && projectListCtrl.search.currentTabId == projectListCtrl.projectStatuses[i][j].id)\r\n projectListCtrl.onTabChange(projectListCtrl.projectStatuses[i][j]);\r\n if (projectListCtrl.search.currentSecondLevelTabId && projectListCtrl.search.currentSecondLevelTabId == projectListCtrl.projectStatuses[i][j].id)\r\n projectListCtrl.onSecondLevelTablChange(projectListCtrl.projectStatuses[i][j]);\r\n }\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Get projects based on search criteria\r\n * @param {any} freeText\r\n * @param {any} organizationId\r\n * @param {any} selectedStatusId\r\n */\r\n function getProjects(freeText, organizationId, selectedStatusId) {\r\n OrganizationUtilService.setOrganizationId(organizationId ? organizationId : null);\r\n if (freeText != undefined) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n searchService.setSearch(freeText, null, null, projectListCtrl.currentSelectedTab.id, projectListCtrl.currentSecondLevelSelectedTab ? projectListCtrl.currentSecondLevelSelectedTab.id : null);\r\n\r\n ProjectFactory.getProjects(freeText, organizationId, projectListCtrl.includeDeactivated, selectedStatusId).$promise.then(function (result) {\r\n allProjects = result;\r\n\r\n for (var index = 0; index < allProjects.length; index++) {\r\n allProjects[index].id = parseInt(allProjects[index].id);\r\n if (allProjects[index].Order && allProjects[index].Order.id)\r\n allProjects[index].Order.id = parseInt(allProjects[index].Order.id);\r\n }\r\n allProjects = $filter('orderBy')(allProjects, ProjectFactory.predicateProjects, ProjectFactory.reverseProjects);\r\n\r\n\r\n if ($scope.isXs) {\r\n projectListCtrl.projects = allProjects;\r\n projectListCtrl.numPages = Math.ceil(allProjects.length / projectListCtrl.itemsPerPage);\r\n } else\r\n projectListCtrl.projects = allProjects.slice(0, nrOfRowsToLoadAtStart);\r\n });\r\n };\r\n\r\n /**\r\n * Changes sort order based on the given predicate\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n projectListCtrl.changeOrder = function (orderBy) {\r\n projectListCtrl.projects = [];\r\n if (orderBy != projectListCtrl.predicate) {\r\n projectListCtrl.predicate = orderBy;\r\n ProjectFactory.predicateProjects = orderBy;\r\n } else {\r\n projectListCtrl.reverse = !projectListCtrl.reverse;\r\n ProjectFactory.reverseProjects = projectListCtrl.reverse;\r\n }\r\n\r\n allProjects = $filter('orderBy')(allProjects, ProjectFactory.predicateProjects, ProjectFactory.reverseProjects);\r\n\r\n projectListCtrl.projects = allProjects.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Infinite scroll function called when the user reaches the end of the list\r\n * @returns {} \r\n */\r\n projectListCtrl.loadMore = function () {\r\n if (projectListCtrl.projects && projectListCtrl.projects.length < allProjects.length) {\r\n var last = projectListCtrl.projects.length > 0 ? projectListCtrl.projects.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allProjects.length ? allProjects.length : last + nrOfRowsToLoad;\r\n\r\n projectListCtrl.projects = allProjects.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (projectListCtrl.projects == undefined)\r\n return;\r\n if (allProjects.length == projectListCtrl.projects.length) {\r\n projectListCtrl.reachedEndOfList = true;\r\n return;\r\n }\r\n if (allProjects.length > nrOfRowsToLoadAtStart) {\r\n projectListCtrl.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n projectListCtrl.getProjects = function () {\r\n var statusId = projectListCtrl.currentSecondLevelSelectedTab ? projectListCtrl.currentSecondLevelSelectedTab.id : projectListCtrl.currentSelectedTab.id;\r\n getProjects(projectListCtrl.search.text, projectListCtrl.search.Organization.id, statusId);\r\n };\r\n\r\n /**\r\n * When the status tab changes, fetch the projects with that status\r\n * @param {} status \r\n * @returns {} \r\n */\r\n projectListCtrl.onTabChange = function (status) {\r\n if (projectListCtrl.currentSelectedTab && projectListCtrl.currentSelectedTab.id == status.id)\r\n return;\r\n\r\n status.activeTab = true;\r\n\r\n projectListCtrl.currentSelectedTab = status;\r\n projectListCtrl.currentSecondLevelSelectedTab = null;\r\n\r\n if (projectListCtrl.currentSelectedTab.ProgId != 'NOT_COMPLETED')\r\n getProjects(projectListCtrl.search.text, projectListCtrl.search.Organization.id, projectListCtrl.currentSelectedTab.id);\r\n };\r\n\r\n /**\r\n * When the second level of status tabs changes, get the projects with that status\r\n * @param {} status \r\n * @returns {} \r\n */\r\n projectListCtrl.onSecondLevelTablChange = function (status) {//<--- fix typo\r\n if (projectListCtrl.currentSecondLevelSelectedTab && projectListCtrl.currentSecondLevelSelectedTab.id == status.id)\r\n return;\r\n\r\n status.activeTab = true;\r\n\r\n projectListCtrl.currentSecondLevelSelectedTab = status;\r\n\r\n getProjects(projectListCtrl.search.text, projectListCtrl.search.Organization.id, projectListCtrl.currentSecondLevelSelectedTab.id);\r\n };\r\n\r\n function init() {\r\n getProjectStatuses();\r\n ProjectFactory.resetLeftMenuCategoriesDefer();\r\n ProjectFactory.resetLeftMenuCategories();\r\n };\r\n\r\n function onOrganizationChange(organization, firstTime) {\r\n projectListCtrl.search.Organization = organization;\r\n\r\n if (!firstTime)\r\n projectListCtrl.getProjects();\r\n };\r\n\r\n projectListCtrl.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n\r\n init();\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectManagementController.$inject = [\r\n 'ProjectFactory',\r\n '$timeout',\r\n 'OrderFactory',\r\n 'fileReader',\r\n '$scope',\r\n '$q',\r\n 'DownloadService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('project')\r\n .controller('ProjectManagementController', ProjectManagementController)\r\n .directive('projectManagement', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProjectManagementController as projectManagementCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/project/projectManagement/projectManagementPartial.html',\r\n scope: {\r\n projectObject: '='\r\n }\r\n };\r\n });\r\n\r\n function ProjectManagementController(\r\n ProjectFactory,\r\n $timeout,\r\n OrderFactory,\r\n fileReader,\r\n $scope,\r\n $q,\r\n DownloadService,\r\n $filter\r\n ) {\r\n var projectManagementCtrl = this;\r\n var fileUpload = {\r\n file: null,\r\n name: '',\r\n extension: '',\r\n files: []\r\n };\r\n projectManagementCtrl.projectAttachmentsCollapsed = true;\r\n\r\n projectManagementCtrl.$onInit = function () {\r\n initDelegateFunctions();\r\n init();\r\n\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Saves any expanded exections when the user presses the save button on project window\r\n * @returns {} \r\n */\r\n projectManagementCtrl.projectObject.saveAnyOpenExecution = function () {\r\n var availableCategoryExecutions = projectManagementCtrl.getManagementProcessLists();\r\n var promises = [];\r\n var executionsToSave = [];\r\n for (var i = 0; i < availableCategoryExecutions.length; i++) {\r\n var category = availableCategoryExecutions[i];\r\n if (!category.ExecutionList || category.ExecutionList.length == 0)\r\n continue;\r\n Array.prototype.push.apply(executionsToSave, category.ExecutionList);\r\n\r\n }\r\n return saveExecutions(executionsToSave);\r\n };\r\n };\r\n\r\n function init() {\r\n //after the categories were loaded add file upload model\r\n ProjectFactory.leftMenuCategoriesDeffer.promise.then(function () {\r\n var categories = projectManagementCtrl.getLeftMenuCategories();\r\n\r\n angular.forEach(categories, function (category) {\r\n category.fileUpload = angular.copy(fileUpload);\r\n });\r\n });\r\n\r\n //init project attachment file upload\r\n projectManagementCtrl.projectFileUpload = angular.copy(fileUpload);\r\n };\r\n\r\n /**\r\n * Reads the base64 of the given file\r\n * @param {any} file\r\n * @param {any} attachment\r\n */\r\n function readFile(file, attachment) {\r\n return fileReader.readAsDataUrl(file, $scope).then(function (result) {\r\n attachment.AttachmentBytes = result;\r\n return attachment;\r\n });\r\n };\r\n\r\n /**\r\n * Saves the executions one by one\r\n * @param {any} executions\r\n */\r\n function saveExecutions(executions) {\r\n return executions.reduce(function (promise, value) {\r\n return promise.then(function () {\r\n return value.Execution.saveExecution();\r\n });\r\n }, $q.when());\r\n };\r\n\r\n /**\r\n * Saves the attachments one by one\r\n * @param {any} attachments\r\n */\r\n function saveProjectAttachments(attachments) {\r\n var attachmentsSaved = [];\r\n return attachments.reduce(function (promise, value) {\r\n return promise.then(function () {\r\n return value.$save().then(function (result) {\r\n attachmentsSaved.push(result);\r\n });\r\n });\r\n }, $q.when()).then(function () {\r\n return attachmentsSaved;\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether we have any management list\r\n * @returns {} \r\n */\r\n projectManagementCtrl.anyManagementProcessList = function () {\r\n return ProjectFactory.projectManagementCategories.length > 0;\r\n };\r\n\r\n projectManagementCtrl.getManagementProcessLists = function () {\r\n return $filter('orderBy')(ProjectFactory.projectManagementCategories, 'SortNumber');\r\n };\r\n\r\n projectManagementCtrl.removeProcessList = function (index, categoryId, connectId) {\r\n return ProjectFactory.removeManagementProcessList(index, categoryId, connectId);\r\n };\r\n\r\n /**\r\n * Creates the execution for the given list and initiates the list\r\n * @param {} projectManagement \r\n * @returns {} \r\n */\r\n projectManagementCtrl.startExecution = function (projectManagement) {\r\n var execution = {\r\n ForeignKey: projectManagementCtrl.projectObject.projectId,\r\n Table: 'BOT_PROJECT'\r\n };\r\n return ProjectFactory.createProjectExecution(projectManagement.Execution.InitiatedProcessList.id, projectManagement.id, execution).then(function (result) {\r\n return result.CreateManagementExecutionResult;\r\n });\r\n };\r\n\r\n projectManagementCtrl.getLeftMenuCategories = function () {\r\n return $filter('orderBy')(ProjectFactory.leftMenuCategories, 'SortNumber');\r\n };\r\n\r\n projectManagementCtrl.collapseCategoryAttachments = function (category) {\r\n category.AttachmentsCollapsed = !category.AttachmentsCollapsed;\r\n };\r\n\r\n projectManagementCtrl.clearAttachments = function (category) {\r\n category.fileUpload = angular.copy(fileUpload);\r\n };\r\n\r\n projectManagementCtrl.getProjectCategoryAttachments = function (category) {\r\n return category.Attachments;\r\n };\r\n\r\n /**\r\n * Adds the files that the user selected as attachments on the project category\r\n * @param {} category \r\n * @returns {} \r\n */\r\n projectManagementCtrl.addAttachments = function (category) {\r\n if (!category || !category.fileUpload || !category.fileUpload.files || category.fileUpload.files.length == 0)\r\n return;\r\n\r\n var filePromises = [];\r\n for (var i = 0; i < category.fileUpload.files.length; i++) {\r\n var file = category.fileUpload.files[i];\r\n var attachment = OrderFactory.Attachment();\r\n\r\n attachment.AttachmentName = file.fileName + '.' + file.extension;\r\n attachment.Table = 'BOT_CATEGORY_PROJECT';\r\n attachment.ForeignKey = category.id;\r\n\r\n filePromises.push(readFile(file.file, attachment));\r\n }\r\n\r\n $q.all(filePromises).then(function (attachments) {\r\n if (!attachments || attachments.length == 0)\r\n return $q.when([]);\r\n\r\n return ProjectFactory.saveCategoryAttachments(attachments, category.id, projectManagementCtrl.projectObject.projectId);\r\n }).then(function (result) {\r\n if (!category.Attachments)\r\n category.Attachments = [];\r\n\r\n angular.forEach(result, function (attachment) {\r\n attachment.AttachmentBytes = null;\r\n attachment.IsExternalURL = false;\r\n attachment.Active = true;\r\n category.Attachments.push(attachment);\r\n });\r\n\r\n projectManagementCtrl.clearAttachments(category);\r\n });\r\n };\r\n\r\n projectManagementCtrl.openAttachment = function (attachment) {\r\n DownloadService.download(attachment.URL);\r\n };\r\n\r\n projectManagementCtrl.deleteAttachment = function (attachment, category, index) {\r\n\r\n ProjectFactory.deleteCategoryAttachment(attachment.id, category.id, projectManagementCtrl.projectObject.projectId, attachment.Table).then(function () {\r\n category.Attachments.splice(index, 1);\r\n });\r\n };\r\n\r\n projectManagementCtrl.clearAttachmentsForProject = function () {\r\n projectManagementCtrl.projectFileUpload = angular.copy(fileUpload);\r\n };\r\n\r\n projectManagementCtrl.collapseProjectAttachments = function () {\r\n projectManagementCtrl.projectAttachmentsCollapsed = !projectManagementCtrl.projectAttachmentsCollapsed;\r\n };\r\n\r\n /**\r\n * Adds the files that the user has selected to the project\r\n * @returns {} \r\n */\r\n projectManagementCtrl.addAttachmentsForProject = function () {\r\n if (!projectManagementCtrl.projectFileUpload || !projectManagementCtrl.projectFileUpload.files || projectManagementCtrl.projectFileUpload.files.length == 0)\r\n return;\r\n\r\n var filePromises = [];\r\n for (var i = 0; i < projectManagementCtrl.projectFileUpload.files.length; i++) {\r\n var file = projectManagementCtrl.projectFileUpload.files[i];\r\n var attachment = OrderFactory.Attachment();\r\n\r\n attachment.AttachmentName = file.fileName + '.' + file.extension;\r\n attachment.Table = 'BOT_PROJECT';\r\n attachment.ForeignKey = projectManagementCtrl.projectObject.projectId;\r\n\r\n filePromises.push(readFile(file.file, attachment));\r\n }\r\n\r\n $q.all(filePromises).then(function (attachments) {\r\n if (!attachments || attachments.length == 0)\r\n return $q.when([]);\r\n\r\n return saveProjectAttachments(attachments);\r\n }).then(function (result) {\r\n if (!projectManagementCtrl.projectObject.projectAttachments)\r\n projectManagementCtrl.projectObject.projectAttachments = [];\r\n\r\n Array.prototype.push.apply(projectManagementCtrl.projectObject.projectAttachments, result);\r\n\r\n projectManagementCtrl.clearAttachmentsForProject();\r\n });\r\n };\r\n\r\n projectManagementCtrl.deleteProjectAttachment = function (attachment, index) {\r\n return OrderFactory.deleteAttachment(attachment).then(function () {\r\n projectManagementCtrl.projectObject.projectAttachments.splice(index, 1);\r\n });\r\n };\r\n\r\n //options for lists drag and drop\r\n projectManagementCtrl.managementTreeOptions = {\r\n accept: function (sourceNodeScope, destNodeScope) {\r\n //accept only from the same category\r\n if (sourceNodeScope.$treeScope.$parent.category.id != destNodeScope.$treeScope.$parent.category.id)\r\n return false;\r\n\r\n return true;\r\n },\r\n dropped: function (event) {\r\n var category = event.source.nodeScope.$treeScope.$parent.category;\r\n var executionList = category.ExecutionList;\r\n //if for some reason the execution list is null or empty, return\r\n if (!executionList || executionList.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < executionList.length; i++)\r\n executionList[i].SortNumber = i;\r\n\r\n\r\n ProjectFactory.saveManagementProcessListsSorting(executionList.map(function (e) { return { id: e.id, SortNumber: e.SortNumber } }));\r\n }\r\n };\r\n\r\n projectManagementCtrl.getProjectTabs = function () {\r\n return ProjectFactory.tabs;\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectReportBuilderController.$inject = [\r\n 'ProjectFactory'\r\n ];\r\n\r\n angular.module('project')\r\n .controller('ProjectReportBuilderController', ProjectReportBuilderController)\r\n .directive('projectReportBuilder', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProjectReportBuilderController as projectReportCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/project/projectReportBuilder/projectReportBuilderPartial.html',\r\n scope: {\r\n projectObject: '='\r\n }\r\n };\r\n });\r\n\r\n /**\r\n * Controller used for communication only\r\n */\r\n function ProjectReportBuilderController(\r\n ProjectFactory\r\n ) {\r\n var projectReportCtrl = this;\r\n\r\n projectReportCtrl.getManagementProcessLists = function () {\r\n return ProjectFactory.projectManagementCategories;\r\n };\r\n\r\n projectReportCtrl.getLeftMenuCategories = function () {\r\n return ProjectFactory.leftMenuCategories;\r\n };\r\n\r\n projectReportCtrl.isReportTabSelected = function () {\r\n return ProjectFactory.currentTab == 'PROJECT_REPORT_BUILDER';\r\n };\r\n\r\n projectReportCtrl.toggleRiskAnalysisVisibilityInReport = function () {\r\n var project = {\r\n id: projectReportCtrl.projectObject.project.id,\r\n IncludeRiskAnalysisInReport: projectReportCtrl.projectObject.project.IncludeRiskAnalysisInReport\r\n };\r\n\r\n return ProjectFactory.toggleRiskAnalysisVisibilityInReport(project);\r\n };\r\n\r\n }\r\n})();","//TODO: remove unnecessary stuff\r\n(function () {\r\n 'use strict';\r\n\r\n CentralApprovalExecutionController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$sce',\r\n '$filter',\r\n '$document',\r\n '$uibModal',\r\n 'dialogService',\r\n 'menuService',\r\n 'ExecutionFactory',\r\n 'TaskListFactory',\r\n 'fileReader',\r\n '$q',\r\n '$timeout',\r\n 'DateUtilService',\r\n 'UserFactory',\r\n 'errorService',\r\n 'Idle',\r\n 'sessionInformationService',\r\n 'QualityHandbookFactory',\r\n 'OrganizationUtilService'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('CentralApprovalExecutionController', CentralApprovalExecutionController)\r\n .directive('centralApprovalStep', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/centralApprovalExecutionStepPartial.html'\r\n };\r\n });\r\n\r\n function CentralApprovalExecutionController(\r\n $scope,\r\n $routeParams,\r\n $sce,\r\n $filter,\r\n $document,\r\n $uibModal,\r\n dialogService,\r\n menuService,\r\n ExecutionFactory,\r\n TaskListFactory,\r\n fileReader,\r\n $q,\r\n $timeout,\r\n DateUtilService,\r\n UserFactory,\r\n errorService,\r\n Idle,\r\n sessionInformationService,\r\n QualityHandbookFactory,\r\n OrganizationUtilService\r\n ) {\r\n\r\n var mainProcessListDataAbout;\r\n var initiatedProcessListId;\r\n var foreignKey;\r\n var itemIdParam;\r\n var scrollContainer;\r\n var onDestroySubscription = null;\r\n\r\n $scope.processListElement = {};\r\n $scope.executionStarted = false;\r\n $scope.currentItemIndex = -1; // description page\r\n $scope.progressBar = { items: [] };\r\n $scope.processListQueue = [];\r\n\r\n $scope.calendar = { visible: false, datetime: null, date: null, time: null, disabled: false };\r\n $scope.executedFor = null;\r\n\r\n var currentDefaultAnswer = {};\r\n var notificationData = {};\r\n\r\n var notificationEditorModal;\r\n\r\n $scope.hasRight = function (progId) {\r\n return sessionInformationService.hasAccess(progId);\r\n };\r\n\r\n $scope.openNotificationEditorModal = function (processListItem, choice) {\r\n\r\n if ($scope.isNextDisabled($scope.currentItemIndex))\r\n return;\r\n\r\n $scope.currentProcessListItem = processListItem;\r\n\r\n var defaultAnswers, i;\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n currentDefaultAnswer = choice.selectedValue.SelectedDefaultAnswer;\r\n //fill currentDefaultAnswer.Name\r\n defaultAnswers = choice.selectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n for (i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n } else {\r\n currentDefaultAnswer = processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer;\r\n //fill currentDefaultAnswer.Name\r\n defaultAnswers = processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.DefaultAnswers;\r\n for (i = 0; i < defaultAnswers.length; i++) {\r\n if (defaultAnswers[i].InitiatedId == currentDefaultAnswer.InitiatedId)\r\n currentDefaultAnswer.Name = defaultAnswers[i].Name;\r\n }\r\n }\r\n\r\n if (currentDefaultAnswer && currentDefaultAnswer.Notification) {\r\n $scope.currentNotificationData = angular.copy(currentDefaultAnswer.Notification);\r\n } else {\r\n $scope.currentNotificationData = angular.copy(notificationData);\r\n }\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE'\r\n && choice.selectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\") {\r\n $scope.currentNotificationData.isSms = true;\r\n } else {\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE'\r\n && processListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == \"SMS\") {\r\n $scope.currentNotificationData.isSms = true;\r\n }\r\n }\r\n\r\n $scope.currentNotificationData.organizationId = ExecutionFactory.organizationId;\r\n\r\n if (!choice && processListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n $scope.currentNotificationData.readOnly = true;\r\n } else {\r\n if (choice && choice.selectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n $scope.currentNotificationData.readOnly = true;\r\n }\r\n }\r\n\r\n if (currentDefaultAnswer && !$scope.currentNotificationData.TextMessage) {\r\n if (currentDefaultAnswer.ProgId == 'PROG_ANNET') {\r\n $scope.currentNotificationData.TextMessage = currentDefaultAnswer.CommentInput;\r\n } else {\r\n $scope.currentNotificationData.TextMessage = currentDefaultAnswer.Name;\r\n }\r\n }\r\n\r\n notificationEditorModal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalNotificationEditor.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n\r\n };\r\n\r\n\r\n $scope.getNotificationData = function (initiatedProcessListId, dataAbout) {\r\n var notificationPromise = ExecutionFactory.getNotificationData(initiatedProcessListId, dataAbout);\r\n notificationPromise.$promise.then(function (result) {\r\n notificationData = result;\r\n });\r\n };\r\n\r\n $scope.saveItemNotification = function () {\r\n currentDefaultAnswer.Notification = angular.copy($scope.currentNotificationData);\r\n };\r\n\r\n $scope.deleteItemNotification = function () {\r\n currentDefaultAnswer.Notification = null;\r\n };\r\n\r\n\r\n $scope.init = function () {\r\n if (!$scope.isProjectPage && !$scope.isQualityHandbookPage) {\r\n initiatedProcessListId = $routeParams.initiatedProcessListId;\r\n foreignKey = $routeParams.foreignKey;\r\n itemIdParam = !!$routeParams.itemId ? $routeParams.itemId : null;\r\n\r\n if (!initiatedProcessListId || initiatedProcessListId == ':initiatedProcessListId') {\r\n $scope.go('/home');\r\n } else if (!!initiatedProcessListId) {\r\n getInitiatedProcessList();\r\n }\r\n } else {\r\n //initiatedProcessListId and foreignKey are passed throught the directive\r\n initiatedProcessListId = $scope.initiatedProcessListId;\r\n foreignKey = $scope.foreignKey;\r\n getInitiatedProcessList();\r\n }\r\n };\r\n\r\n var scrollToElement = function (index) {\r\n var elemId = \"processlistitem-\" + index;\r\n setTimeout(function () {\r\n var container = document.getElementById('execution-panel-container').getBoundingClientRect();\r\n var element = document.getElementById(elemId);\r\n if (element) {\r\n var elementClientRect = element.getBoundingClientRect();\r\n\r\n if (elementClientRect.top < container.top || elementClientRect.top > container.bottom || (elementClientRect.top + elementClientRect.height) > container.bottom) {\r\n var angularElement = angular.element(document.getElementById(elemId));\r\n scrollContainer.scrollTo(angularElement, 0, 600);\r\n }\r\n\r\n }\r\n\r\n }, 200);\r\n };\r\n\r\n function getWhoIsExecutedFor(initiatedProcessListId, tableProgId) {\r\n var deferred = $q.defer();\r\n\r\n if (tableProgId == 'GOT_USER')\r\n ExecutionFactory.getWhoIsExecutedFor(initiatedProcessListId, tableProgId).$promise.then(function (executedFor) {\r\n $scope.executedFor = executedFor;\r\n\r\n if (!ExecutionFactory.organizationId && $scope.executedFor)\r\n ExecutionFactory.organizationId = $scope.executedFor.Organization.id;\r\n\r\n deferred.resolve();\r\n }, function (err) {\r\n console.error(err);\r\n deferred.reject();\r\n });\r\n else if (tableProgId == 'GOT_ORGANIZATION') {\r\n if ($scope.isProjectPage)\r\n tableProgId = 'BOT_PROJECT';\r\n if ($scope.isQualityHandbookPage)\r\n tableProgId = 'BOT_QUALITY_HANDBOOK';\r\n\r\n ExecutionFactory.getOrganizationExecutedFor(initiatedProcessListId, tableProgId).$promise.then(function (executedFor) {\r\n $scope.executedFor = executedFor;\r\n\r\n if (!ExecutionFactory.organizationId)\r\n ExecutionFactory.organizationId = $scope.executedFor.id;\r\n\r\n deferred.resolve();\r\n }, function (err) {\r\n console.error(err);\r\n deferred.reject();\r\n });\r\n }\r\n return deferred.promise;\r\n };\r\n\r\n var getInitiatedProcessList = function () {\r\n ExecutionFactory.getInitiatedProcessList(initiatedProcessListId).$promise.then(function (result) {\r\n\r\n $scope.processListElement = result;\r\n\r\n mainProcessListDataAbout = $scope.processListElement.DataAbout.ProgId;\r\n\r\n initializeExecution(null);\r\n\r\n $scope.toggleDescription($scope.processListElement.DescriptionHtml, false);\r\n\r\n getWhoIsExecutedFor(initiatedProcessListId, $scope.processListElement.DataAbout.ProgId).then(function () {\r\n getUsersDropdown();\r\n $scope.startExecution();\r\n });\r\n\r\n $scope.getNotificationData($scope.processListElement.InitiatedId, $scope.processListElement.DataAbout.ProgId);\r\n });\r\n };\r\n\r\n function initCentralApprovalVariables(processListItem) {\r\n switch (processListItem.ReportingCode) {\r\n case '##UsernameAndPassword##':\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE') {\r\n processListItem.CentralApproval = JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType);\r\n processListItem.UsernameAndPasswordDisabled = false;\r\n return;\r\n } else {\r\n if (processListItem.InitiatedOption.SelectedValues && processListItem.InitiatedOption.SelectedValues.length > 0) {\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.indexOf('Username') > -1) {\r\n processListItem.CentralApproval = JSON.parse(selectedValue.CustomDataType);\r\n processListItem.UsernameAndPasswordDisabled = false;\r\n return;\r\n }\r\n\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.indexOf('MultipleChoiceComment') > -1) {\r\n selectedValue.MultipleChoiceInput = JSON.parse(selectedValue.CustomDataType).MultipleChoiceComment;\r\n }\r\n };\r\n }\r\n }\r\n processListItem.UsernameAndPasswordDisabled = false;\r\n break;\r\n\r\n case '##ProjectReferences##':\r\n if (processListItem.InitiatedOption.SelectedValue)\r\n processListItem.CentralApproval = { ProjectReferences: JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType) };\r\n processListItem.ProjectReferenceLoaded = true;\r\n break;\r\n case '##CompanyPrimaryContact##':\r\n if (processListItem.InitiatedOption.SelectedValue)\r\n processListItem.CentralApproval = JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType);\r\n processListItem.CompanyPrimaryContactLoaded = true;\r\n break;\r\n case '##CompanyInfo##':\r\n if (processListItem.InitiatedOption.SelectedValues) {\r\n angular.forEach(processListItem.InitiatedOption.SelectedValues, function (selectedValue) {\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.indexOf('MultipleChoiceComment') > -1)\r\n selectedValue.MultipleChoiceInput = JSON.parse(selectedValue.CustomDataType).MultipleChoiceComment;\r\n });\r\n }\r\n break;\r\n\r\n case '##CompanyInfoDetailed##':\r\n default:\r\n if (processListItem.InitiatedOption.SelectedValues && processListItem.InitiatedOption.SelectedValues.length > 0) {\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.indexOf('MultipleChoiceHeaderComment') > -1) {\r\n var item = $filter('filter')(processListItem.InitiatedOption.Items, function (i) { return i.InitiatedId == selectedValue.OptionItem.InitiatedId })[0];\r\n item.MultipleChoiceHeaderComment = JSON.parse(selectedValue.CustomDataType).MultipleChoiceHeaderComment;\r\n }\r\n }\r\n }\r\n processListItem.CompanyInfoDetailedLoaded = true;\r\n break;\r\n }\r\n };\r\n\r\n var initializeExecution = function (currentItemIndex) {\r\n $scope.progressBar = { items: [] };\r\n\r\n // if an index was passed to the initialization (resume execution from another process list)\r\n // set it as the current item index, else go to the description page\r\n $scope.currentItemIndex = !!currentItemIndex ? currentItemIndex : -1;\r\n\r\n if ($scope.processListElement.ProcessListItems && $scope.processListElement.ProcessListItems.length > 0) {\r\n // firt, well go over each item and mark it as DONE if it applies,\r\n // or keep the default status of NOT_DONE\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n\r\n $scope.progressBar.items.push({ status: 'NOT_DONE' });\r\n\r\n // mark progress\r\n switch (item.InitiatedOption.Type.ProgId) {\r\n case 'DROPDOWN':\r\n if (!!item.InitiatedOption.SelectedValue) {\r\n $scope.progressBar.items[i].status = !isProcessListItemNotCompleted(item) ? 'DONE' : 'NOT_DONE';\r\n initiateDateTime(item.InitiatedOption.SelectedValue);\r\n }\r\n break;\r\n case 'MULTIPLE_CHOICE':\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n var choice = item.InitiatedOption.Items[j];\r\n var selectedValueForChoice = getSelectedValueForChoice(choice, item.InitiatedOption);\r\n if (!!selectedValueForChoice) {\r\n choice.isChecked = true;\r\n // assign the selected value as a choice property for easy access\r\n choice.selectedValue = selectedValueForChoice;\r\n initiateDateTime(selectedValueForChoice);\r\n }\r\n }\r\n $scope.progressBar.items[i].status = item.InitiatedOption.SelectedValues.length && !isProcessListItemNotCompleted(item) > 0 ? 'DONE' : 'NOT_DONE';\r\n break;\r\n case 'RADIO_BUTTON':\r\n case 'STANDARD_TEXT':\r\n // check respective radio button based on selected value\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItem) {\r\n item.InitiatedOption.SelectedValue.OptionItem = $filter('filter')(item.InitiatedOption.Items, { InitiatedId: item.InitiatedOption.SelectedValue.OptionItem.InitiatedId })[0];\r\n $scope.progressBar.items[i].status = !isProcessListItemNotCompleted(item) ? 'DONE' : 'NOT_DONE';\r\n\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItemEdited)\r\n item.InitiatedOption.SelectedValue.OptionItem.Text = item.InitiatedOption.SelectedValue.OptionItemEdited;\r\n\r\n initiateDateTime(item.InitiatedOption.SelectedValue);\r\n }\r\n break;\r\n case 'STRING':\r\n case 'NUMERIC':\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.CustomDataType && item.InitiatedOption.SelectedValue.CustomDataType.length > 0) {\r\n $scope.progressBar.items[i].status = 'DONE';\r\n }\r\n break;\r\n default:\r\n $scope.progressBar.items[i].status = 'NOT_DONE';\r\n }\r\n\r\n initCentralApprovalVariables(item);\r\n\r\n }\r\n\r\n // after marking done items as DONE, we can mark the SKIPPED items.\r\n // this is done by iterating backwards and detecting all the NOT_DONE items,\r\n // after the first DONE item encountered, and marking them as SKIPPED.\r\n var doneItemEncoutered = false;\r\n for (var i = $scope.processListElement.ProcessListItems.length - 1; i >= 0; i--) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n if ($scope.progressBar.items[i].status == 'DONE') doneItemEncoutered = true;\r\n\r\n if (doneItemEncoutered && $scope.progressBar.items[i].status == 'NOT_DONE') {\r\n $scope.progressBar.items[i].status = 'SKIPPED';\r\n }\r\n }\r\n\r\n // also, if a DONE item was encoutered, this means that the execution has been resumed from a paused state\r\n if (doneItemEncoutered) $scope.executionResumed = true;\r\n\r\n // last, we'll mark the AVAILABLE item (the item after the last DONE item)\r\n var lastDoneItemIndex = -1;\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n if ($scope.progressBar.items[i].status == 'DONE') lastDoneItemIndex = i;\r\n }\r\n\r\n // only mark it as AVAILABLE if it's not the last item\r\n if (lastDoneItemIndex + 1 < $scope.processListElement.ProcessListItems.length) {\r\n $scope.progressBar.items[lastDoneItemIndex + 1].status = 'AVAILABLE';\r\n }\r\n\r\n // if an item id was passed as a paremter, go to that step\r\n if (!!itemIdParam) {\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n if ($scope.processListElement.ProcessListItems[i].InitiatedId == itemIdParam) {\r\n $scope.goToItem(i);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n };\r\n\r\n $scope.startExecution = function () {\r\n // go to the available item\r\n for (var i = 0; i < $scope.progressBar.items.length; i++) {\r\n if ($scope.progressBar.items[i].status == 'AVAILABLE') {\r\n $scope.currentItemIndex = i;\r\n }\r\n }\r\n\r\n if ($scope.currentItemIndex < 0)\r\n $scope.currentItemIndex = 0;\r\n\r\n $timeout(function () {\r\n scrollContainer = angular.element(document.getElementById('execution-panel-container'));\r\n scrollToElement($scope.currentItemIndex);\r\n }, 100);\r\n };\r\n\r\n $scope.previous = function () {\r\n for (var i = $scope.currentItemIndex - 1; i >= 0; i--) {\r\n if ($scope.progressBar.items[i].status == 'DONE' || $scope.progressBar.items[i].status == 'AVAILABLE') {\r\n $scope.currentItemIndex = i;\r\n break;\r\n }\r\n }\r\n };\r\n\r\n $scope.canShowDescription = function () {\r\n // check if the description is empty or contains only whitespace\r\n if ($scope.processListElement && $scope.processListElement.DescriptionHtml) {\r\n return !($scope.processListElement.DescriptionHtml.length === 0 || !$scope.processListElement.DescriptionHtml.trim());\r\n }\r\n return false;\r\n };\r\n\r\n $scope.goToItem = function (index) {\r\n\r\n if (!$scope.isNextDisabled($scope.currentItemIndex) && $scope.processListElement.FlexibleExecution) {\r\n $scope.currentItemIndex = index;\r\n scrollToElement($scope.currentItemIndex);\r\n return;\r\n }\r\n\r\n if ($scope.progressBar.items[index].status == 'DONE' || $scope.progressBar.items[index].status == 'AVAILABLE') {\r\n $scope.currentItemIndex = index;\r\n }\r\n scrollToElement($scope.currentItemIndex);\r\n };\r\n\r\n var redirectBack = function () {\r\n // after pausing or finishing execution, go back to the user \r\n // or organization that executed this processlist\r\n //if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER') {\r\n // $scope.go('/user/' + foreignKey);\r\n //} else if ($scope.processListElement.DataAbout.ProgId == 'GOT_ORGANIZATION') {\r\n // $scope.go('/organization/' + foreignKey);\r\n //}\r\n if (!$scope.isProjectPage && !$scope.isQualityHandbookPage) {\r\n // after pausing or finishing execution, go back to the user \r\n // or organization that executed this processlist\r\n // $scope.go('/execution');\r\n if (mainProcessListDataAbout === 'GOT_USER') {\r\n $scope.go('/user/' + foreignKey);\r\n } else if (mainProcessListDataAbout === 'GOT_ORGANIZATION') {\r\n $scope.go('/organization/' + foreignKey);\r\n }\r\n } else\r\n $scope.managementObject.collapseExecution();\r\n };\r\n\r\n var finishExecution = function () {\r\n $scope.processListElement.IsCompleted = true;\r\n\r\n // if it's a child process list\r\n if ($scope.processListQueue.length > 0) {\r\n $scope.goToParent();\r\n\r\n } else {\r\n // save the execution\r\n removeCyclicDependencies();\r\n ExecutionFactory.updateProcessList(angular.copy($scope.processListElement)).then(function () {\r\n redirectBack();\r\n\r\n if ($scope.isProjectPage || $scope.isQualityHandbookPage)\r\n $scope.managementObject.finishExecution();\r\n\r\n if ($scope.isQualityHandbookPage) {\r\n ExecutionFactory.notifyQualityHandbookExecutionCreatorAboutUpdate($scope.processListElement);\r\n }\r\n });\r\n }\r\n };\r\n\r\n var isHorizontalDataCompleted = function (data) {\r\n\r\n if (!data && data.length === 0)\r\n return false;\r\n\r\n for (var row = 0; row < data.length; row++) {\r\n for (var col = 0; col < data[row].length; col++) {\r\n\r\n if (!data[row][col].Value.Value) {\r\n return false;\r\n }\r\n\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n var checkIfHorizontalIsCompleted = function (processListElement) {\r\n\r\n if (!processListElement ||\r\n (!processListElement.HeaderFields && !processListElement.TableFields && !processListElement.ListValues) ||\r\n (processListElement.HeaderFields.length === 0 && processListElement.TableFields.length === 0 && processListElement.ListValues.length === 0))\r\n return;\r\n\r\n if (!isHorizontalDataCompleted(processListElement.HeaderFields) ||\r\n !isHorizontalDataCompleted(processListElement.ListValues)) {\r\n return;\r\n }\r\n\r\n processListElement.IsCompleted = true;\r\n\r\n }\r\n\r\n\r\n $scope.goToParent = function () {\r\n\r\n if ($scope.processListElement.ProcessListType.ProgId === \"HORIZONTAL\") {\r\n checkIfHorizontalIsCompleted($scope.processListElement);\r\n }\r\n\r\n // pop the last element in the queue and set it as the current element\r\n $scope.processListElement = $scope.processListQueue.pop();\r\n initializeExecution($scope.processListElement.lastDoneItemIndex);\r\n\r\n $scope.startExecution();\r\n };\r\n\r\n var wasSavedManually = false;\r\n $scope.saveExecution = function (cameFromButton) {\r\n removeCyclicDependencies();\r\n return ExecutionFactory.updateProcessList($scope.processListQueue.length > 0 ? $scope.processListQueue[0] : $scope.processListElement).then(function () {\r\n //redirectBack();\r\n //if ($scope.isProjectPage)\r\n // $scope.managementObject.collapseExecution();\r\n //else {\r\n initializeExecution(null);\r\n $scope.startExecution();\r\n //}\r\n wasSavedManually = cameFromButton;\r\n\r\n if ($scope.isQualityHandbookPage && wasSavedManually) {\r\n ExecutionFactory.notifyQualityHandbookExecutionCreatorAboutUpdate(\r\n $scope.processListQueue.length > 0 ? $scope.processListQueue[0] : $scope.processListElement\r\n );\r\n }\r\n });\r\n };\r\n\r\n if ($scope.isProjectPage || $scope.isQualityHandbookPage)\r\n $scope.managementObject.saveExecution = $scope.saveExecution;\r\n\r\n $scope.closeExecution = function () {\r\n if (!wasSavedManually)\r\n dialogService.showConfirmDialog('txtCloseExecutionTitle', 'txtCloseExecutionMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n redirectBack();\r\n }\r\n });\r\n else\r\n redirectBack();\r\n };\r\n\r\n $scope.getProgresBarItemClass = function (item, index) {\r\n if (index == $scope.currentItemIndex) {\r\n return 'execution-progress-bar-item-current';\r\n } else {\r\n switch (item.status) {\r\n case 'DONE':\r\n return 'execution-progress-bar-item-done';\r\n case 'NOT_DONE':\r\n return 'execution-progress-bar-item-not-done';\r\n case 'SKIPPED':\r\n return 'execution-progress-bar-item-skipped';\r\n case 'AVAILABLE':\r\n return 'execution-progress-bar-item-available';\r\n default:\r\n return 'execution-progress-bar-item-done';\r\n }\r\n }\r\n };\r\n\r\n $scope.descriptionHTML = '';\r\n\r\n $scope.toggleDescription = function (text, all) {\r\n if (all) {\r\n $scope.descriptionHTML = $scope.trustedText(text, null);\r\n } else {\r\n $scope.descriptionHTML = $scope.trustedText(text, 200);\r\n }\r\n };\r\n\r\n $scope.trustedText = function (text, displayedCharacters) {\r\n var displayedText;\r\n if (displayedCharacters)\r\n displayedText = $filter('shortenText')(text, 'true', displayedCharacters, '...');\r\n else {\r\n displayedText = text;\r\n }\r\n return $sce.trustAsHtml(displayedText);\r\n };\r\n\r\n $scope.attachmentNamePattern = function (name) {\r\n if (name) {\r\n //allow characters, digits, norwegian characters, '-', '_', '.' and space \r\n var regexp = /^[\\w\\d\\u00C5\\u00E5\\u00C6\\u00E6\\u00D8\\u00F8\\-\\_\\.\\ ]{1,250}$/;\r\n return regexp.test(name);\r\n } else\r\n return true;\r\n };\r\n\r\n $scope.addAttachment = function (myFile, fileName, item) {\r\n if (!sessionInformationService.hasAccess('UPLOAD_GALLERY')) {\r\n errorService.setNoRightError();\r\n return;\r\n }\r\n\r\n var image = {\r\n };\r\n\r\n image.AttachmentName = $filter('date')(new Date().getTime(), 'yyyyMMddhhmmsss') + '.jpeg';\r\n image.ForeignKey = item.ProcessListAction.InitiatedId;\r\n\r\n var response = fileReader.readAsDataUrl(myFile, $scope);\r\n response.then(function (result) {\r\n image.brandNew = true; // used to mark 'removed' images for deletion\r\n image.AttachmentBytes = result;\r\n\r\n var imageToAdd = {\r\n CameraImageOriginal: image,\r\n IncludeInReport: true,\r\n Size: '25%',\r\n SortNumber: 100\r\n };\r\n\r\n item.ProcessListAction.CameraImages.push(imageToAdd);\r\n });\r\n\r\n myFile.clear();\r\n };\r\n\r\n $scope.selectImage = function (image) {\r\n $scope.selectedImage = image;\r\n $scope.modal = $uibModal.open({\r\n templateUrl: 'Scripts/execution/modalViewImage.html',\r\n size: 'lg',\r\n scope: $scope\r\n });\r\n };\r\n\r\n $scope.removeImage = function (image, selectedValue) {\r\n // if the removed image was loaded from the server, mark it for deletion\r\n if (!image.brandNew) {\r\n if (!selectedValue.OptionItem.ProcessListAction.CameraImagesToDelete) {\r\n selectedValue.OptionItem.ProcessListAction.CameraImagesToDelete = [];\r\n }\r\n selectedValue.OptionItem.ProcessListAction.CameraImagesToDelete.push(image);\r\n }\r\n\r\n var imageIndex = selectedValue.OptionItem.ProcessListAction.CameraImages.indexOf(image);\r\n if (imageIndex > -1) {\r\n selectedValue.OptionItem.ProcessListAction.CameraImages.splice(imageIndex, 1);\r\n }\r\n };\r\n\r\n $scope.resetAttachment = function (myFile) {\r\n if (myFile != null) {\r\n myFile.clear();\r\n }\r\n };\r\n\r\n function onChoiceSelectForVariables(processListItem, isChecked) {\r\n switch (processListItem.ReportingCode) {\r\n case '##UsernameAndPassword##':\r\n processListItem.CentralApproval = {};\r\n processListItem.InitiatedOption.SelectedValues.removeIf(function (s) {\r\n return !!s.CustomDataType;\r\n });\r\n if (!isChecked)\r\n processListItem.UsernameAndPasswordDisabled = false;\r\n else\r\n processListItem.UsernameAndPasswordDisabled = true;\r\n break;\r\n }\r\n };\r\n\r\n $scope.onChoiceCheckedChange = function (choice, selectedValues, processListItem) {\r\n onChoiceSelectForVariables(processListItem, choice.isChecked);\r\n if (choice.isChecked) {\r\n var newSelectedValue = {\r\n OptionItem: angular.copy(choice)\r\n };\r\n // add the option to this initiatedOption list of selected values\r\n selectedValues.push(newSelectedValue);\r\n\r\n // assign the reference to the choice for easy access\r\n choice.selectedValue = newSelectedValue;\r\n\r\n initiateSelectedDefaultAnswer(choice.selectedValue);\r\n\r\n initializeTempDate(choice.selectedValue);\r\n\r\n } else {\r\n var selectedValueIndex = 0;\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n if (selectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n selectedValueIndex = i;\r\n break;\r\n }\r\n }\r\n selectedValues.splice(selectedValueIndex, 1);\r\n\r\n // remove the references so the action items get hidden\r\n choice.selectedValue = undefined;\r\n }\r\n };\r\n\r\n var getSelectedValueForChoice = function (choice, initiatedOption) {\r\n for (var i = 0; i < initiatedOption.SelectedValues.length; i++) {\r\n if (initiatedOption.SelectedValues[i].OptionItem && initiatedOption.SelectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n return initiatedOption.SelectedValues[i];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n var removeCyclicDependencies = function () {\r\n\r\n if ($scope.processListElement.ProcessListItems) {\r\n // each choice was assigned a reference to its selected value that needs to be removed before saving\r\n for (var i = 0; i < $scope.processListElement.ProcessListItems.length; i++) {\r\n var item = $scope.processListElement.ProcessListItems[i];\r\n if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n item.InitiatedOption.Items[j].selectedValue = null;\r\n }\r\n }\r\n }\r\n }\r\n\r\n };\r\n\r\n function processCentralApprovalVariables(processListItem) {\r\n switch (processListItem.ReportingCode) {\r\n case '##UsernameAndPassword##':\r\n if (processListItem.InitiatedOption.SelectedValues && processListItem.InitiatedOption.SelectedValues.length > 0) {\r\n //means that the username and password weren't filled\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n\r\n if (selectedValue.MultipleChoiceInput)\r\n selectedValue.CustomDataType = JSON.stringify({ MultipleChoiceComment: selectedValue.MultipleChoiceInput });\r\n }\r\n } else if (processListItem.CentralApproval && processListItem.CentralApproval.Username && processListItem.CentralApproval.Password)\r\n processListItem.InitiatedOption.SelectedValues = [{ CustomDataType: JSON.stringify(processListItem.CentralApproval) }];\r\n break;\r\n case '##CompanyInfo##':\r\n //company info should be multiple choice\r\n if (processListItem.InitiatedOption && processListItem.InitiatedOption.SelectedValues && processListItem.InitiatedOption.SelectedValues.length > 0) {\r\n angular.forEach(processListItem.InitiatedOption.SelectedValues, function (s) {\r\n s.CustomDataType = JSON.stringify({ MultipleChoiceComment: s.MultipleChoiceInput });\r\n });\r\n\r\n\r\n }\r\n break;\r\n case '##CompanyPrimaryContact##':\r\n if (!processListItem.CentralApproval || !processListItem.CentralApproval.PrimaryContact)\r\n return;\r\n\r\n if (processListItem.CentralApproval.PrimaryContact.FullNameChanged ||\r\n processListItem.CentralApproval.PrimaryContact.PhoneChanged ||\r\n processListItem.CentralApproval.PrimaryContact.EmailChanged)\r\n processListItem.InitiatedOption.SelectedValue = { CustomDataType: JSON.stringify(processListItem.CentralApproval) };\r\n\r\n break;\r\n case '##UsersInfo##':\r\n if (!processListItem.CentralApproval || !processListItem.CentralApproval.Users || processListItem.CentralApproval.Users.length == 0)\r\n break;\r\n\r\n var propertiesToKeep = processListItem.CentralApproval.Users.map(function (u) {\r\n return {\r\n id: u.id,\r\n Experience: u.Experience,\r\n FieldOfStudy: u.FieldOfStudy\r\n };\r\n });\r\n\r\n //usersInfo variable item type should be text\r\n //so we'll save it in the CustomDataType\r\n processListItem.InitiatedOption.SelectedValue = { CustomDataType: JSON.stringify(propertiesToKeep) };\r\n\r\n break;\r\n case '##ProjectReferences##':\r\n if (!processListItem.CentralApproval || !processListItem.CentralApproval.ProjectReferences || processListItem.CentralApproval.ProjectReferences.length == 0)\r\n break;\r\n\r\n var propertiesToKeep = processListItem.CentralApproval.ProjectReferences.map(function (o) {\r\n return {\r\n KindOfBuilding: o.KindOfBuilding,\r\n Completion: o.Completion ? (new Date(o.Completion)).getTime() : null,\r\n Municipality: o.Municipality,\r\n Gnr: o.Gnr,\r\n Bnr: o.Bnr,\r\n Fnr: o.Bnr,\r\n Address: o.Address,\r\n PostalCode: o.PostalCode,\r\n WorkedFor: o.WorkedFor,\r\n WhatDidYouDo: o.WhatDidYouDo,\r\n FieldOfStudy: o.FieldOfStudy,\r\n NameOfTheEmployee: o.NameOfTheEmployee,\r\n NameOfTheCompany: o.NameOfTheCompany,\r\n SeekLiabilityYes: o.SeekLiabilityYes,\r\n SeekLiabilityNo: o.SeekLiabilityNo,\r\n OrderReference: { id: o.OrderReference ? o.OrderReference.id : null, OrderNumber: o.OrderReference ? o.OrderReference.OrderNumber : null }\r\n };\r\n });\r\n\r\n //usersInfo variable item type should be text\r\n //so we'll save it in the CustomDataType\r\n processListItem.InitiatedOption.SelectedValue = { CustomDataType: JSON.stringify(propertiesToKeep) };\r\n break;\r\n\r\n case '##CompanyInfoDetailed##':\r\n default:\r\n if (processListItem.InitiatedOption.Items) {\r\n var comments = [];\r\n\r\n for (var i = 0; i < processListItem.InitiatedOption.Items.length; i++) {\r\n var item = processListItem.InitiatedOption.Items[i];\r\n\r\n if (!item.multipleChoiceHeaderCommentSet && !item.MultipleChoiceHeaderComment)\r\n continue;\r\n\r\n if (!processListItem.InitiatedOption.SelectedValues)\r\n processListItem.InitiatedOption.SelectedValues = [];\r\n\r\n var selectedValue = $filter('filter')(processListItem.InitiatedOption.SelectedValues, function (s) { return s.OptionItem.InitiatedId == item.InitiatedId })[0];\r\n if (!selectedValue && item.MultipleChoiceHeaderComment) {\r\n processListItem.InitiatedOption.SelectedValues.push({ OptionItem: angular.copy(item) });\r\n var lastSelectedValue = processListItem.InitiatedOption.SelectedValues[processListItem.InitiatedOption.SelectedValues.length - 1];\r\n lastSelectedValue.CustomDataType = JSON.stringify({ MultipleChoiceHeaderComment: item.MultipleChoiceHeaderComment });\r\n } else if (selectedValue) {\r\n selectedValue.CustomDataType = JSON.stringify({ MultipleChoiceHeaderComment: item.MultipleChoiceHeaderComment });\r\n }\r\n }\r\n //for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length; i++) {\r\n // var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n\r\n // if (selectedValue.OptionItem.ProcessListAction && selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'TEXT_FIELD' && selectedValue.CustomDataType) {\r\n // comments.push(\r\n // {\r\n // InititatedId: selectedValue.OptionItem.InitiatedId,\r\n // MultipleChoiceHeaderComment: selectedValue.CustomDataType\r\n // }\r\n // );\r\n // }\r\n //}\r\n\r\n //console.log(comments);\r\n\r\n }\r\n break;\r\n }\r\n }\r\n\r\n $scope.continue = function () {\r\n if ($scope.isNextDisabled($scope.currentItemIndex))\r\n return;\r\n var currentProcessListItem = $scope.processListElement.ProcessListItems[$scope.currentItemIndex];\r\n\r\n processCentralApprovalVariables(currentProcessListItem);\r\n // first, cover the input for non-multi-select (STRING / NUMERICAL)\r\n if (currentProcessListItem.InitiatedOption.Type.ProgId == \"NUMERIC\" || currentProcessListItem.InitiatedOption.Type.ProgId == \"STRING\") {\r\n goToNextItem($scope.currentItemIndex);\r\n\r\n // handle the DROPDOWN or RADIO button depending on its select\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"DROPDOWN\" || currentProcessListItem.InitiatedOption.Type.ProgId == \"RADIO_BUTTON\") {\r\n if (currentProcessListItem.InitiatedOption.SelectedValue && currentProcessListItem.InitiatedOption.SelectedValue.OptionItem &&\r\n currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction) {\r\n switch (currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n jumpToStep(currentProcessListItem.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.ProcessListItem.id);\r\n break;\r\n case \"SMS\":\r\n case \"EMAIL\":\r\n if (!currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.InitiatedId) {\r\n goToNextItem($scope.currentItemIndex);\r\n break;\r\n }\r\n if (currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.SendNotification = false;\r\n } else {\r\n currentProcessListItem.InitiatedOption.SelectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n\r\n $scope.processListElement.SendNotification = true;\r\n }\r\n goToNextItem($scope.currentItemIndex);\r\n break;\r\n case \"CAMERA\":\r\n case \"TEXT_FIELD\":\r\n case \"SIGNATURE\":\r\n case \"ANOTHER_PROCESSLIST\":\r\n default:\r\n goToNextItem($scope.currentItemIndex);\r\n break;\r\n\r\n }\r\n } else {\r\n // if there's no action assigned to the process list item option item\r\n goToNextItem($scope.currentItemIndex);\r\n }\r\n // handle multiple choice actions\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"MULTIPLE_CHOICE\") {\r\n // if one of the selected option items has a 'jump to step' action,\r\n // save the process list item id here, to be used after all the other option item actions have been handled\r\n var willJumpToStepAtId = null;\r\n\r\n if (currentProcessListItem.InitiatedOption.SelectedValues) {\r\n for (var i = 0; i < currentProcessListItem.InitiatedOption.SelectedValues.length; i++) {\r\n var selectedValue = currentProcessListItem.InitiatedOption.SelectedValues[i];\r\n if (selectedValue.OptionItem && selectedValue.OptionItem.ProcessListAction) {\r\n switch (selectedValue.OptionItem.ProcessListAction.Type.ProgId) {\r\n case \"JUMP_TO_STEP\":\r\n willJumpToStepAtId = selectedValue.OptionItem.ProcessListAction.ProcessListItem.id;\r\n break;\r\n case \"SMS\":\r\n case \"EMAIL\":\r\n if (!selectedValue.SelectedDefaultAnswer.InitiatedId) {\r\n break;\r\n }\r\n if (selectedValue.SelectedDefaultAnswer.NotificationMessageId > 0) {\r\n selectedValue.SelectedDefaultAnswer.SendNotification = false;\r\n } else {\r\n selectedValue.SelectedDefaultAnswer.SendNotification = true;\r\n $scope.processListElement.SendNotification = true;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!!willJumpToStepAtId) {\r\n jumpToStep(willJumpToStepAtId);\r\n } else {\r\n goToNextItem($scope.currentItemIndex);\r\n }\r\n } else if (currentProcessListItem.InitiatedOption.Type.ProgId == \"STANDARD_TEXT\")\r\n goToNextItem($scope.currentItemIndex);\r\n\r\n };\r\n\r\n // if the action is a default one, go to the next element\r\n var goToNextItem = function (currentIndex) {\r\n // if it's the last item\r\n if (currentIndex >= ($scope.processListElement.ProcessListItems.length - 1)) {\r\n finishExecution();\r\n } else {\r\n moveAndMarkNextItems(currentIndex, currentIndex + 1);\r\n }\r\n };\r\n\r\n // if the action is of jump to step type\r\n var jumpToStep = function (destinationItemId) {\r\n var destinationItemIndex;\r\n //get the index of the destination item by comparing it to the ID\r\n for (destinationItemIndex = 0; destinationItemIndex < $scope.processListElement.ProcessListItems.length; destinationItemIndex++) {\r\n if ($scope.processListElement.ProcessListItems[destinationItemIndex].id == destinationItemId) {\r\n break;\r\n }\r\n }\r\n\r\n moveAndMarkNextItems($scope.currentItemIndex, destinationItemIndex);\r\n };\r\n\r\n $scope.jumpToProcessList = function (destinationProcessList) {\r\n // save the currentItemIndex of the current process list\r\n $scope.processListElement.lastDoneItemIndex = $scope.currentItemIndex;\r\n // push the current process list in the queue;\r\n $scope.processListQueue.push($scope.processListElement);\r\n\r\n // set the current to destination process list and initialize it\r\n $scope.processListElement = destinationProcessList;\r\n\r\n if (destinationProcessList.ProcessListType.ProgId != 'HORIZONTAL') {\r\n initializeExecution(null);\r\n $scope.startExecution();\r\n }\r\n\r\n //resetNextList(0);\r\n //resetPreviousList(0);\r\n };\r\n\r\n $scope.getJumpToStepQuestionName = function (processListItem) {\r\n if (!processListItem)\r\n return '';\r\n for (var destinationItemIndex = 0; destinationItemIndex < $scope.processListElement.ProcessListItems.length; destinationItemIndex++) {\r\n if ($scope.processListElement.ProcessListItems[destinationItemIndex].id == processListItem.id) {\r\n return $scope.processListElement.ProcessListItems[destinationItemIndex].Question.Name;\r\n }\r\n }\r\n return '';\r\n };\r\n\r\n var moveAndMarkNextItems = function (oldIndex, newIndex) {\r\n // mark the previous item as done\r\n $scope.progressBar.items[oldIndex].status = 'DONE';\r\n\r\n // if following this item there's a skipped item, we need to clear the rest first\r\n if ($scope.progressBar.items[$scope.currentItemIndex + 1].status == 'SKIPPED') {\r\n // clear skipped items untill an available item is encountered\r\n for (var i = $scope.currentItemIndex + 1; i < $scope.progressBar.items.length; i++) {\r\n if ($scope.progressBar.items[i].status == 'SKIPPED') {\r\n $scope.progressBar.items[i].status = 'NOT_DONE';\r\n } else if ($scope.progressBar.items[i].status == 'AVAILABLE') {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // mark all skipped items that were jumped\r\n for (var i = oldIndex + 1; i < newIndex; i++) {\r\n $scope.progressBar.items[i].status = 'SKIPPED';\r\n }\r\n\r\n // move forwards\r\n $scope.currentItemIndex = newIndex;\r\n scrollToElement($scope.currentItemIndex);\r\n\r\n // mark current item as available if it's not already done\r\n if ($scope.progressBar.items[$scope.currentItemIndex].status == 'NOT_DONE') {\r\n $scope.progressBar.items[$scope.currentItemIndex].status = 'AVAILABLE';\r\n }\r\n };\r\n\r\n $scope.checkIfAnnet = function (selectedValue) {\r\n if (!selectedValue\r\n || !selectedValue.OptionItem\r\n || !selectedValue.OptionItem.ProcessListAction\r\n || !selectedValue.OptionItem.ProcessListAction.DefaultAnswers)\r\n return false;\r\n\r\n if (selectedValue.SelectedDefaultAnswer && selectedValue.SelectedDefaultAnswer.InitiatedId > 0) {\r\n var filterResult = $filter('filter')(selectedValue.OptionItem.ProcessListAction.DefaultAnswers, {\r\n InitiatedId: selectedValue.SelectedDefaultAnswer.InitiatedId\r\n });\r\n if (filterResult && filterResult.length > 0 && filterResult[0].ProgId == 'PROG_ANNET')\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n // function to check if the button should be disabled \r\n $scope.isNextDisabled = function (index) {\r\n\r\n if (!$scope.processListElement || !$scope.processListElement.ProcessListItems || !$scope.processListElement.ProcessListItems[index])\r\n return false;\r\n\r\n return isProcessListItemNotCompleted($scope.processListElement.ProcessListItems[index]);\r\n };\r\n\r\n var isProcessListItemNotCompleted = function (processListItem) {\r\n return false;\r\n };\r\n //TODO: use download service\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n\r\n $scope.openAttachment = function (attach) {\r\n if (attach.IsExternalURL == false)\r\n downloadFile(attach.URL);\r\n else {\r\n var win = window.open(attach.URL, '_blank');\r\n }\r\n return;\r\n };\r\n\r\n // in order for the datepicker disabled attribute to work, the date has to be set to null\r\n $scope.$watch(function () {\r\n return $scope.calendar.disabled;\r\n }, function () {\r\n $scope.calendar.startDate = $scope.calendar.disabled ? null : new Date();\r\n $scope.calendar.endDate = $scope.calendar.disabled ? null : new Date();\r\n $scope.calendar.startTime = $scope.calendar.disabled ? null : new Date();\r\n $scope.calendar.endTime = $scope.calendar.disabled ? null : new Date();\r\n });\r\n\r\n $scope.putInCalendar = function (calendar) {\r\n dialogService.showConfirmDialog('txtPutInCalendar', ['txtPutInCalendarMessage']).then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n saveTask(calendar).then(function () {\r\n $scope.saveExecution().then(function () {\r\n redirectBack();\r\n });\r\n });\r\n }\r\n });\r\n };\r\n\r\n var initiateDateTime = function (selectedValue) {\r\n // in the UI, the date part and the time part are bound separately,\r\n // so we need to initiate them with the complete date value from db\r\n if (selectedValue &&\r\n selectedValue.OptionItem &&\r\n selectedValue.OptionItem.ProcessListAction &&\r\n (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'PUT_IN_CALENDAR' || selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'DATE_PICKER')) {\r\n selectedValue.tempDate =\r\n new Date(DateUtilService.getLongWithoutOffset(Number(angular.copy(selectedValue.CustomDataType)))).\r\n toString(); //$filter('date')(Number(angular.copy(selectedValue.CustomDataType)), 'dd-MM-yyyy');\r\n selectedValue.tempTime = DateUtilService.getLongWithoutOffset(Number(angular.copy(selectedValue.CustomDataType)));\r\n }\r\n };\r\n\r\n $scope.onDateTimePickerChanged = function (selectedValue) {\r\n var datePart = selectedValue.tempDate;\r\n var timePart = selectedValue.tempTime;\r\n\r\n if (!timePart) {\r\n timePart = new Date();\r\n } else {\r\n timePart = new Date(timePart);\r\n }\r\n\r\n if (!datePart) {\r\n datePart = new Date();\r\n } else {\r\n datePart = new Date(datePart);\r\n }\r\n\r\n var newDate = new Date(datePart.getFullYear(),\r\n datePart.getMonth(),\r\n datePart.getDate(),\r\n timePart.getHours(),\r\n timePart.getMinutes());\r\n\r\n selectedValue.CustomDataType = DateUtilService.getLongWithOffset(newDate);\r\n };\r\n\r\n $scope.onCalendarChanged = function (calendar) {\r\n if (!calendar.startTime) {\r\n calendar.startTime = new Date();\r\n }\r\n\r\n calendar.startDate = new Date(calendar.startDate.getFullYear(),\r\n calendar.startDate.getMonth(),\r\n calendar.startDate.getDate(),\r\n calendar.startTime.getHours(),\r\n calendar.startTime.getMinutes(),\r\n calendar.startTime.getSeconds());\r\n\r\n if (!calendar.endTime)\r\n calendar.endTime = new Date();\r\n\r\n calendar.endDate = new Date(calendar.endDate.getFullYear(),\r\n calendar.endDate.getMonth(),\r\n calendar.endDate.getDate(),\r\n calendar.endTime.getHours(),\r\n calendar.endTime.getMinutes(),\r\n calendar.endTime.getSeconds());\r\n };\r\n\r\n $scope.isEndDateWrong = function (calendar) {\r\n if (calendar.disabled || !calendar.startDate || !calendar.startTime ||\r\n !calendar.endDate || !calendar.endTime)\r\n return false;\r\n\r\n if (calendar.endDate.getFullYear() < calendar.startDate.getFullYear())\r\n return true;\r\n else if (calendar.endDate.getFullYear() == calendar.startDate.getFullYear()) {\r\n if (calendar.endDate.getMonth() < calendar.startDate.getMonth())\r\n return true;\r\n else if (calendar.endDate.getMonth() == calendar.startDate.getMonth()) {\r\n if (calendar.endDate.getDate() < calendar.startDate.getDate())\r\n return true;\r\n else if (calendar.endDate.getDate() == calendar.startDate.getDate()) {\r\n if (calendar.endTime.getHours() < calendar.startTime.getHours())\r\n return true;\r\n else if (calendar.endTime.getHours() == calendar.startTime.getHours()) {\r\n if (calendar.endTime.getMinutes() <= calendar.startTime.getMinutes())\r\n return true;\r\n return false;\r\n }\r\n return false;\r\n }\r\n return false;\r\n }\r\n return false;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n function getUsersDropdown() {\r\n var users = UserFactory.getUsersByOrganizationId(ExecutionFactory.organizationId);\r\n users.$promise.then(function (result) {\r\n $scope.users = result;\r\n });\r\n };\r\n\r\n $scope.saveItemTask = function (processListItem) {\r\n\r\n if (!processListItem.Task) {\r\n processListItem.Task = {\r\n };\r\n }\r\n\r\n\r\n processListItem.Task.ForeignKey = processListItem.InitiatedId;\r\n processListItem.Task.Table = \"BOT_INITIATED_PROCESSLIST_ITEM_CALENDAR\";\r\n processListItem.Task.Execution = {\r\n InitiatedProcessList: { Name: $scope.processListElement.Name }\r\n };\r\n processListItem.Task.Description = processListItem.calendar.description;\r\n processListItem.Task.StartDate = processListItem.calendar.disabled ? null : DateUtilService.getLongWithOffset(processListItem.calendar.startDate);\r\n processListItem.Task.EndDate = processListItem.calendar.disabled ? null : DateUtilService.getLongWithOffset(processListItem.calendar.endDate);\r\n processListItem.Task.Active = true;\r\n processListItem.Task.disabled = processListItem.calendar.disabled;\r\n processListItem.Task.User = processListItem.calendar.user;\r\n\r\n processListItem.calendar.visible = false;\r\n };\r\n\r\n $scope.loadCalendarFromItem = function (processListItem) {\r\n if (!processListItem.Task) {\r\n processListItem.calendar = {\r\n visible: false, datetime: null, date: null, time: null, disabled: false\r\n };\r\n\r\n processListItem.calendar.startDate = processListItem.calendar.disabled ? null : new Date();\r\n processListItem.calendar.endDate = processListItem.calendar.disabled ? null : new Date();\r\n processListItem.calendar.startTime = processListItem.calendar.disabled ? null : new Date();\r\n processListItem.calendar.endTime = processListItem.calendar.disabled ? null : new Date();\r\n } else {\r\n processListItem.calendar = {\r\n visible: false, datetime: null, date: null, time: null, disabled: false\r\n };\r\n\r\n processListItem.calendar.description = processListItem.Task.Description;\r\n processListItem.calendar.startDate = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.StartDate));\r\n processListItem.calendar.startTime = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.StartDate));\r\n processListItem.calendar.endDate = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.EndDate));\r\n processListItem.calendar.endTime = new Date(DateUtilService.getLongWithoutOffset(processListItem.Task.EndDate));\r\n processListItem.calendar.user = processListItem.Task.User;\r\n\r\n if (!(processListItem.Task.StartDate) && !(processListItem.Task.EndDate)) {\r\n processListItem.calendar.disabled = true;\r\n } else {\r\n processListItem.calendar.disabled = processListItem.Task.disabled;\r\n }\r\n\r\n\r\n }\r\n };\r\n\r\n var saveTask = function (calendar) {\r\n var loggedUser = sessionInformationService.getUser();\r\n var taskToSave = TaskListFactory.getTaskToSave(), deferred = $q.defer(), taskToSaveExecutionFor;\r\n\r\n // the foreignkey is the initiatedId of the current execution item\r\n taskToSave.ForeignKey = $scope.processListElement.ProcessListItems[$scope.currentItemIndex].InitiatedId;\r\n taskToSave.Table = \"BOT_INITIATED_PROCESSLIST_ITEM\";\r\n\r\n taskToSave.Execution = {\r\n InitiatedProcessList: { Name: $scope.processListElement.Name }\r\n };\r\n\r\n // save either the user, when the execution is about 'GOT_USER\", \r\n // or the logged user when is about 'GOT_ORGANIZATION'\r\n if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER') {\r\n taskToSave.User = {\r\n id: foreignKey\r\n };\r\n } else if ($scope.processListElement.DataAbout.ProgId == 'GOT_ORGANIZATION') {\r\n taskToSave.User = {\r\n id: loggedUser.id\r\n };\r\n }\r\n\r\n // if the event wasn't triggered by the user\r\n // force trigger it so the date gets built using the pre-selected values\r\n if (calendar && !calendar.disabled && !calendar.datetime) {\r\n $scope.onCalendarChanged(calendar);\r\n }\r\n\r\n taskToSave.StartDate = (calendar.startDate) ? DateUtilService.getLongWithOffset(calendar.startDate) : calendar.startDate;\r\n taskToSave.EndDate = (calendar.endDate) ? DateUtilService.getLongWithOffset(calendar.endDate) : calendar.endDate;\r\n taskToSave.Active = true;\r\n\r\n taskToSave.Description = calendar.description;\r\n\r\n if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER' && loggedUser.id != foreignKey) {\r\n //create the same task but for the user that is executing for\r\n taskToSaveExecutionFor = angular.copy(taskToSave);\r\n taskToSaveExecutionFor.User = {\r\n id: loggedUser.id\r\n };\r\n taskToSaveExecutionFor.Active = true;\r\n }\r\n\r\n TaskListFactory.saveTask(taskToSave).then(function () {\r\n if ($scope.processListElement.DataAbout.ProgId == 'GOT_USER' && taskToSaveExecutionFor)\r\n return TaskListFactory.saveTask(taskToSaveExecutionFor);\r\n else return $q.when();\r\n }).then(function () {\r\n deferred.resolve();\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n var initiateSelectedDefaultAnswer = function (selectedValue) {\r\n if (!!selectedValue.OptionItem\r\n && !!selectedValue.OptionItem.ProcessListAction\r\n && !!selectedValue.OptionItem.ProcessListAction.DefaultAnswers\r\n && selectedValue.OptionItem.ProcessListAction.DefaultAnswers.length > 0) {\r\n selectedValue.SelectedDefaultAnswer = selectedValue.OptionItem.ProcessListAction.DefaultAnswers[0];\r\n }\r\n };\r\n\r\n var initializeTempDate = function (selectedValue) {\r\n\r\n if (selectedValue\r\n && selectedValue.OptionItem\r\n && selectedValue.OptionItem.ProcessListAction\r\n && selectedValue.OptionItem.ProcessListAction.Type\r\n && selectedValue.OptionItem.ProcessListAction.Type.ProgId === \"PUT_IN_CALENDAR\"\r\n && !selectedValue.tempDate) {\r\n\r\n $scope.onDateTimePickerChanged(selectedValue);\r\n\r\n initiateDateTime(selectedValue);\r\n\r\n }\r\n\r\n };\r\n\r\n $scope.onDropdownChange = function (selectedValue) {\r\n\r\n selectedValue.CustomDataType = null;\r\n\r\n initiateSelectedDefaultAnswer(selectedValue);\r\n\r\n initializeTempDate(selectedValue);\r\n };\r\n\r\n $scope.onRadioButtonChange = function (item, initiatedOption) {\r\n if (!!item\r\n && !!initiatedOption.SelectedDefaultAnswer\r\n && !!initiatedOption.SelectedValue\r\n && !(initiatedOption.SelectedDefaultAnswer.NotificationMessageId > 0\r\n || initiatedOption.SelectedValue.OptionItem.ProcessListAction.Signature\r\n || initiatedOption.SelectedValue.OptionItem.ProcessListAction.CameraImages.length > 0)) {\r\n initiatedOption.SelectedValue.OptionItem = item;\r\n }\r\n\r\n if (!!initiatedOption.SelectedValue) {\r\n\r\n initiatedOption.SelectedValue.CustomDataType = null;\r\n\r\n initiateSelectedDefaultAnswer(initiatedOption.SelectedValue);\r\n\r\n initializeTempDate(initiatedOption.SelectedValue);\r\n }\r\n };\r\n\r\n $scope.isAnyStandardAnswerInEdit = function (items) {\r\n if (!items || items.length == 0)\r\n return false;\r\n for (var i = 0; i < items.length; i++)\r\n if (items[i].EditMode)\r\n return true;\r\n return false;\r\n };\r\n\r\n $scope.isItemDisabled = function (index) {\r\n if ($scope.processListElement.FlexibleExecution || $scope.progressBar.items[index] &&\r\n ($scope.progressBar.items[index].status == 'DONE' ||\r\n $scope.progressBar.items[index].status == 'AVAILABLE'))\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n $scope.changeCurrentStep = function (index) {\r\n if (isProcessListItemNotCompleted($scope.processListElement.ProcessListItems[$scope.currentItemIndex]))\r\n return;\r\n\r\n $scope.currentItemIndex = index;\r\n scrollToElement($scope.currentItemIndex);\r\n };\r\n\r\n $scope.shouldShowForCentralApproval = function (processListItem, actionType) {\r\n if (processListItem.ReportingCode == '##UsernameAndPassword##')\r\n return true;\r\n if (processListItem.ReportingCode == '##DesiredApprovalAreas##')\r\n return false;\r\n if (processListItem.ReportingCode == '##CompanyInfoDetailed##')\r\n return false;\r\n if (processListItem.ReportingCode == '##CompanyInfo##')\r\n return true;\r\n if (actionType && actionType == 'TEXT_FIELD')\r\n return false;\r\n return true;\r\n };\r\n\r\n $scope.getRevisionData = function (processListItem) {\r\n QualityHandbookFactory.getCentralApprovalRevisionData().then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n if (result.LastUpdatedBy)\r\n result.LastUpdatedBy.FullName = (result.LastUpdatedBy.FirstName ? result.LastUpdatedBy.FirstName + ' ' : '') + (result.LastUpdatedBy.LastName ? result.LastUpdatedBy.LastName : '');\r\n\r\n processListItem.CentralApproval = { RevisionData: result };\r\n });\r\n };\r\n\r\n function getUserHighestEducationLevels() {\r\n return UserFactory.getEducationLevels().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n $scope.educationLevels = result;\r\n });\r\n };\r\n\r\n $scope.checkIfItHasEducation = function (education, user) {\r\n if (!user.Competences)\r\n return false;\r\n\r\n return $filter('filter')(user.Competences, function (c) {\r\n return c.HighestEducationLevel && c.HighestEducationLevel.id == education.id;\r\n }).length > 0;\r\n };\r\n\r\n $scope.getUsersCompetence = function (processListItem) {\r\n getUserHighestEducationLevels();\r\n QualityHandbookFactory.getCentralApprovalUsers($scope.getOrganizationId()).then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n angular.forEach(result, function (user) {\r\n user.FullName = (user.FirstName ? user.FirstName + ' ' : '') + (user.LastName ? user.LastName : '');\r\n\r\n if (user.Manager)\r\n user.Manager.FullName = (user.Manager.FirstName ? user.Manager.FirstName + ' ' : '') + (user.Manager.LastName ? user.Manager.LastName : '');\r\n\r\n user.FieldOfStudy = 'Rørlegger';\r\n\r\n if (processListItem.InitiatedOption.SelectedValue && processListItem.InitiatedOption.SelectedValue.CustomDataType) {\r\n var properties = JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType);\r\n var customProperties = $filter('filter')(properties, function (p) { return p.id == user.id })[0];\r\n\r\n if (customProperties) {\r\n user.Experience = customProperties.Experience;\r\n user.FieldOfStudy = customProperties.FieldOfStudy;\r\n }\r\n }\r\n\r\n if (user.ExperienceInMilliseconds && !user.Experience) {\r\n var duration = moment.duration(Number(user.ExperienceInMilliseconds));\r\n\r\n user.Experience = {};\r\n user.Experience.Years = duration.years();\r\n user.Experience.Months = duration.months();\r\n user.Experience.Days = duration.days();\r\n }\r\n });\r\n\r\n processListItem.CentralApproval = { Users: result };\r\n });\r\n };\r\n\r\n $scope.getOrganizationId = function () {\r\n return OrganizationUtilService.getOrganizationId() ? OrganizationUtilService.getOrganizationId() : sessionInformationService.getUser().Organization.id;\r\n };\r\n\r\n onDestroySubscription = $scope.$on('$destroy', function() {\r\n $scope.$emit('onCentralApprovalExecutionControllerDestroy');\r\n\r\n if (onDestroySubscription) {\r\n onDestroySubscription();\r\n }\r\n });\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QualityChapterController.$inject = [\r\n '$scope',\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n '$element',\r\n '$rootScope',\r\n 'Fullscreen',\r\n 'ExecutionService',\r\n '$anchorScroll'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('QualityChapterController', QualityChapterController)\r\n .directive('qualityChapter', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/qualityHandbook/qualityChapter/qualityChapterPartial.html',\r\n controller: 'QualityChapterController as qualityChapterCtrl',\r\n bindToController: true,\r\n scope: {\r\n chapter: '=',\r\n qualityHandbookId: '=',\r\n startExecution: '&',\r\n hideProgress: '=',\r\n archivedChapter: '=',\r\n isPersonalHandbook: '=',\r\n qualityHandbookType: '=',\r\n delete: '&',\r\n onChapterUpdate: '&?'\r\n }\r\n };\r\n }).directive('qualityHandbookExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ExecutionManagementController',\r\n templateUrl: 'Scripts/execution/executionManagementPartial.html',\r\n scope: {\r\n initiatedProcessListId: '=',\r\n foreignKey: '=',\r\n isQualityHandbookPage: '=',\r\n managementObject: '='\r\n }\r\n };\r\n }).directive('centralApprovalExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'CentralApprovalExecutionController',\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/centralApprovalExecutionPartial.html',\r\n scope: {\r\n initiatedProcessListId: '=',\r\n foreignKey: '=',\r\n isQualityHandbookPage: '=',\r\n managementObject: '='\r\n }\r\n };\r\n }).directive('horizonalExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ExecutionHorizontalController',\r\n templateUrl: 'Scripts/execution/executionHorizontalPartial.html',\r\n scope: {\r\n initiatedProcessListId: '=',\r\n isQualityHandbookPage: '=',\r\n isProjectPage: '=',\r\n managementObject: '=',\r\n fromExecution: '='\r\n }\r\n };\r\n });\r\n\r\n function QualityChapterController(\r\n $scope,\r\n $timeout,\r\n QualityHandbookFactory,\r\n $element,\r\n $rootScope,\r\n Fullscreen,\r\n ExecutionService,\r\n $anchorScroll\r\n ) {\r\n var qualityChapterCtrl = this;\r\n var onExecutionManagementControllerDestroySubscription = null;\r\n var onCentralApprovalExecutionControllerDestroySubscription = null;\r\n var onExecutionHorizontalControllerDestroySubscription = null;\r\n var onDestroySubscription = null;\r\n\r\n qualityChapterCtrl.isExecutionStarted = false;\r\n qualityChapterCtrl.managementObject = {};\r\n qualityChapterCtrl.fromExecution = true;\r\n qualityChapterCtrl.maximize = false;\r\n qualityChapterCtrl.getChapterInitiatedProcessListId = getChapterInitiatedProcessListId;\r\n\r\n /**\r\n * When the state of the fullscreen changes remove/add neceesary css class\r\n * @param {any} e\r\n * @param {any} isEnabled\r\n */\r\n function onFullScreenChange(e, isEnabled) {\r\n if (isEnabled) {\r\n $element.addClass('list-execution-full-screen');\r\n qualityChapterCtrl.maximize = true;\r\n } else {\r\n $element.removeClass('list-execution-full-screen');\r\n qualityChapterCtrl.maximize = false;\r\n }\r\n };\r\n\r\n function init() {\r\n $rootScope.$on('FBFullscreen.change', onFullScreenChange);\r\n resumeChapterIfNeeded();\r\n };\r\n\r\n function resumeChapterIfNeeded() {\r\n\r\n if (!qualityChapterCtrl.chapter || !qualityChapterCtrl.chapter.InitiatedProcessList)\r\n return;\r\n\r\n var initiatedProcessListId = qualityChapterCtrl.chapter.InitiatedProcessList.InitiatedId;\r\n\r\n var idOfExecutionToOpenFromQualityHandbookPage\r\n = ExecutionService.getIdOfExecutionToOpenFromQualityHandbookPage();\r\n\r\n if (idOfExecutionToOpenFromQualityHandbookPage == initiatedProcessListId) {\r\n qualityChapterCtrl.resumeExecution();\r\n $timeout(function () {\r\n $anchorScroll('execution-content' + initiatedProcessListId);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Gets the current status of the execution and updates the current one\r\n */\r\n function updateExecution() {\r\n return QualityHandbookFactory.getChapter(qualityChapterCtrl.chapter.ConnectId).$promise.then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n var oldStatus = angular.copy(qualityChapterCtrl.chapter.Status);\r\n\r\n qualityChapterCtrl.chapter = result;\r\n\r\n if (oldStatus.ProgId != qualityChapterCtrl.chapter.Status.ProgId)\r\n QualityHandbookFactory.onChapterAdd();\r\n\r\n //weird hack to be able to update the ui\r\n qualityChapterCtrl.chapter.hide = true;\r\n\r\n $timeout(function () {\r\n qualityChapterCtrl.chapter.hide = false;\r\n });\r\n\r\n notifyParentAboutChapterUpdate();\r\n });\r\n };\r\n\r\n function notifyParentAboutChapterUpdate() {\r\n if (qualityChapterCtrl.onChapterUpdate && typeof qualityChapterCtrl.onChapterUpdate === 'function') {\r\n qualityChapterCtrl.onChapterUpdate({\r\n chapter: qualityChapterCtrl.chapter\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Initiates the current list\r\n * @returns {} \r\n */\r\n qualityChapterCtrl.initiateProcessList = function () {\r\n qualityChapterCtrl.startExecution().then(function (result) {\r\n qualityChapterCtrl.chapter = result;\r\n qualityChapterCtrl.resumeExecution();\r\n });\r\n };\r\n\r\n qualityChapterCtrl.resumeExecution = function () {\r\n qualityChapterCtrl.isExecutionStarted = true;\r\n };\r\n\r\n qualityChapterCtrl.managementObject.finishExecution = function () {\r\n if (Fullscreen.isEnabled())\r\n Fullscreen.cancel();\r\n return updateExecution();\r\n };\r\n\r\n qualityChapterCtrl.saveExecution = function () {\r\n return qualityChapterCtrl.managementObject.saveExecution().then(function () {\r\n return updateExecution();\r\n });\r\n };\r\n\r\n /**\r\n * Collapses the current list execution\r\n * @returns {} \r\n */\r\n qualityChapterCtrl.managementObject.collapseExecution = function () {\r\n qualityChapterCtrl.isExecutionStarted = false;\r\n };\r\n\r\n /**\r\n * Switches between full screen and normal\r\n * @returns {} \r\n */\r\n qualityChapterCtrl.toggleMaximize = function () {\r\n qualityChapterCtrl.maximize = !qualityChapterCtrl.maximize;\r\n }\r\n\r\n function getChapterInitiatedProcessListId() {\r\n\r\n if (!qualityChapterCtrl.chapter || !qualityChapterCtrl.chapter.InitiatedProcessList)\r\n return '';\r\n\r\n return qualityChapterCtrl.chapter.InitiatedProcessList.InitiatedId;\r\n }\r\n\r\n onExecutionManagementControllerDestroySubscription\r\n = $scope.$on('onExecutionManagementControllerDestroy', function (event) {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n // update current execution when 'Close' button is clicked\r\n updateExecution();\r\n });\r\n\r\n onCentralApprovalExecutionControllerDestroySubscription\r\n = $scope.$on('onCentralApprovalExecutionControllerDestroy', function (event) {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n // update current execution when 'Close' button is clicked\r\n updateExecution();\r\n });\r\n\r\n onExecutionHorizontalControllerDestroySubscription\r\n = $scope.$on('onExecutionHorizontalControllerDestroy', function (event) {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n // update current execution when 'Close' button is clicked\r\n updateExecution();\r\n });\r\n\r\n onDestroySubscription = $scope.$on('$destroy', function() {\r\n\r\n // unsubscribe\r\n if (onExecutionManagementControllerDestroySubscription) {\r\n onExecutionManagementControllerDestroySubscription();\r\n }\r\n\r\n if (onCentralApprovalExecutionControllerDestroySubscription) {\r\n onCentralApprovalExecutionControllerDestroySubscription();\r\n }\r\n\r\n if (onExecutionHorizontalControllerDestroySubscription) {\r\n onExecutionHorizontalControllerDestroySubscription();\r\n }\r\n\r\n if (onDestroySubscription) {\r\n onDestroySubscription();\r\n }\r\n });\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QualityHandbookArchiveController.$inject = [\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n '$routeParams',\r\n '$scope',\r\n 'ExecutionService'\r\n ];\r\n\r\n angular.module('qualityHandbook').controller('QualityHandbookArchiveController', QualityHandbookArchiveController);\r\n\r\n function QualityHandbookArchiveController(\r\n $timeout,\r\n QualityHandbookFactory,\r\n $routeParams,\r\n $scope,\r\n ExecutionService\r\n ) {\r\n var qualityArchiveCtrl = this;\r\n var archivedQualityHandbookId = $routeParams.qualityHandbookId;\r\n var _onDestroySubscription = null;\r\n\r\n qualityArchiveCtrl.archivedQualityHandbook = null;\r\n\r\n /**\r\n * Get the archived quality handbook\r\n */\r\n function getArchivedQualityHandbook() {\r\n return QualityHandbookFactory.getArchivedQualityHandbook(archivedQualityHandbookId).$promise.then(function (result) {\r\n qualityArchiveCtrl.archivedQualityHandbook = result;\r\n\r\n if (qualityArchiveCtrl.archivedQualityHandbook.RevisionFrequency && qualityArchiveCtrl.archivedQualityHandbook.RevisionFrequency.Frequency)\r\n qualityArchiveCtrl.archivedQualityHandbook.RevisionFrequency.Frequency = parseInt(qualityArchiveCtrl.archivedQualityHandbook.RevisionFrequency.Frequency);\r\n });\r\n };\r\n\r\n function init() {\r\n getArchivedQualityHandbook();\r\n };\r\n\r\n qualityArchiveCtrl.close = function () {\r\n $scope.go('qualityHandbook');\r\n };\r\n\r\n /**\r\n * Approve the quality handbook\r\n * @param {} copyLists - if true the lists with execution will be copied as well\r\n * @returns {} \r\n */\r\n qualityArchiveCtrl.approve = function (copyLists) {\r\n QualityHandbookFactory.approveArchivedQualityHandbook(archivedQualityHandbookId, copyLists).then(function () {\r\n qualityArchiveCtrl.close();\r\n });\r\n };\r\n\r\n _onDestroySubscription = $scope.$on('$destroy', function() {\r\n ExecutionService.setIdOfExecutionToOpenFromQualityHandbookPage(null);\r\n\r\n if (_onDestroySubscription && typeof _onDestroySubscription === 'function')\r\n _onDestroySubscription();\r\n });\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QualityHandbookLeftMenuController.$inject = [\r\n '$scope',\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n '$filter',\r\n 'sessionInformationService',\r\n 'OrganizationUtilService',\r\n '_'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('QualityHandbookLeftMenuController', QualityHandbookLeftMenuController)\r\n .directive('qualityHandbookLeftMenu', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookLeftMenu/qualityHandbookLeftMenuPartial.html',\r\n controller: 'QualityHandbookLeftMenuController as qualityLeftMenuCtrl',\r\n bindToController: true,\r\n scope: {}\r\n };\r\n });\r\n\r\n function QualityHandbookLeftMenuController(\r\n $scope,\r\n $timeout,\r\n QualityHandbookFactory,\r\n $filter,\r\n sessionInformationService,\r\n OrganizationUtilService,\r\n _\r\n ) {\r\n var qualityLeftMenuCtrl = this;\r\n\r\n // variable to control when the organization $watch calls the server for process lists\r\n var oldOrganizationId = OrganizationUtilService.getOrganizationId();\r\n\r\n qualityLeftMenuCtrl.categories = [];\r\n qualityLeftMenuCtrl.registerSearchBoxComponent = registerSearchBoxComponent;\r\n qualityLeftMenuCtrl.toggleCategoryMenuItem = toggleCategoryMenuItem;\r\n\r\n /**\r\n * Get the number of process lists that the current handbook has\r\n * @param {} processListId \r\n * @param {} categoryId \r\n * @returns {} \r\n */\r\n qualityLeftMenuCtrl.getNumberOfProcessLists = function (processListId, categoryId) {\r\n var categories = $filter('filter')(QualityHandbookFactory.chapters, function (category) { return category.id == categoryId; });\r\n if (!categories || categories.length == 0)\r\n return 0;\r\n\r\n return $filter('filter')(categories[0].Executions, function (qualityManagement) { return qualityManagement.InitiatedProcessList.id == processListId }).length;\r\n };\r\n\r\n /**\r\n * Gets the number of process lists that the category has in the current handbook\r\n * @param {} categoryId \r\n * @returns {} \r\n */\r\n qualityLeftMenuCtrl.getNumberOfProcessListsOnCategory = function (categoryId) {\r\n var categories = $filter('filter')(QualityHandbookFactory.chapters, function (category) { return category.id == categoryId; });\r\n if (!categories || categories.length == 0)\r\n return 0;\r\n\r\n return categories[0].Executions.length;\r\n };\r\n\r\n /**\r\n * Gets the process lists for the quality handbook\r\n * @param {any} selectedOrganizationId\r\n */\r\n function getQualityHandbookProcessListsByOrganizationId(selectedOrganizationId) {\r\n\r\n QualityHandbookFactory.getQualityHandbookProcessLists((selectedOrganizationId) ? selectedOrganizationId : sessionInformationService.getUser().Organization.id).then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n qualityLeftMenuCtrl.categories = [].concat.apply([], result.map(function (c) { return c.Children }));\r\n\r\n _.remove(qualityLeftMenuCtrl.categories, function (c) { return !c.ProcessLists || c.ProcessLists.length == 0; });\r\n\r\n angular.forEach(qualityLeftMenuCtrl.categories, function (category) {\r\n category.SortNumber = parseInt(category.SortNumber);\r\n category.collapsed = true;\r\n });\r\n });\r\n\r\n }\r\n\r\n function init() {\r\n getQualityHandbookProcessListsByOrganizationId(OrganizationUtilService.getOrganizationId());\r\n };\r\n\r\n /**\r\n * Sets a reference to 'vb-search-box' component's controller used in the context of the given category\r\n * @param {any} searchBoxCtrl\r\n * @param {any} category\r\n */\r\n function registerSearchBoxComponent(searchBoxCtrl, category) {\r\n\r\n // we use the category object to create an isolated scope for the reference to be set\r\n category.searchBoxCtrl = searchBoxCtrl;\r\n }\r\n\r\n function toggleCategoryMenuItem(category) {\r\n\r\n category.collapsed = !category.collapsed;\r\n\r\n // if the category is collapsed and something was searched in the box\r\n // and no results were found then 'clear' the search box and show all lists\r\n if (category.collapsed &&\r\n category.ProcessLists &&\r\n category.ProcessLists.length === 0 &&\r\n category.searchBoxCtrl &&\r\n category.searchBoxCtrl.searchText) {\r\n\r\n category.searchBoxCtrl.searchText = '';\r\n\r\n // we clear the search by performing the search operation from the 'vb-search-box' \r\n // component with no search text therefore all the lists will be visible after search\r\n category.searchBoxCtrl.search();\r\n }\r\n }\r\n\r\n /**\r\n * Adds the list as a chapter the current quality handbook\r\n * @param {} firstLevelCategory \r\n * @param {} processList \r\n * @returns {} \r\n */\r\n qualityLeftMenuCtrl.addChapter = function (firstLevelCategory, processList) {\r\n QualityHandbookFactory.addChapter(firstLevelCategory, processList);\r\n };\r\n\r\n /**\r\n * When the organization id changes, fetch the processlist as well\r\n */\r\n $scope.$watch(function () {\r\n return OrganizationUtilService.getOrganizationId();\r\n }, function (newValue) {\r\n if (newValue && newValue !== oldOrganizationId) {\r\n\r\n getQualityHandbookProcessListsByOrganizationId(newValue);\r\n oldOrganizationId = newValue;\r\n }\r\n }); \r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QualityHandbookViewController.$inject = [\r\n '$routeParams',\r\n 'sessionInformationService',\r\n 'QualityHandbookFactory',\r\n '$timeout',\r\n '$scope',\r\n '$uibModal',\r\n '$sce',\r\n '$route',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'UserFactory',\r\n '$filter',\r\n '_',\r\n 'QualityHandbookStatuses',\r\n 'QualityHandbookTypes',\r\n 'titleService'\r\n ];\r\n\r\n\r\n angular.module('qualityHandbook').controller('QualityHandbookViewController', QualityHandbookViewController);\r\n\r\n function QualityHandbookViewController(\r\n $routeParams,\r\n sessionInformationService,\r\n QualityHandbookFactory,\r\n $timeout,\r\n $scope,\r\n $uibModal,\r\n $sce,\r\n $route,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n UserFactory,\r\n $filter,\r\n _,\r\n QualityHandbookStatuses,\r\n QualityHandbookTypes,\r\n titleService\r\n ) {\r\n var qualityViewCtrl = this;\r\n var typeId = null;\r\n var chapterModalInstance = null;\r\n var hasUserWhoSignedDataRetrieved = false;\r\n\r\n qualityViewCtrl.getSignature = function () { return null; };\r\n var loggedUser = sessionInformationService.getUser();\r\n var activeQualityHandbookTypeProgId = QualityHandbookTypes.qualityHandbook;\r\n\r\n qualityViewCtrl.selectedChapter = null;\r\n qualityViewCtrl.Organization = {};\r\n qualityViewCtrl.organizations = [];\r\n qualityViewCtrl.User = {};\r\n qualityViewCtrl.intellisense = {\r\n isUserDropdownOpen: false\r\n };\r\n\r\n qualityViewCtrl.centralApprovalSharedObject = {};\r\n\r\n qualityViewCtrl.userChapter = {\r\n SignDate: (new Date()).getTime()\r\n };\r\n qualityViewCtrl.qualityHandbook = {};\r\n qualityViewCtrl.types = [];\r\n qualityViewCtrl.getLastRevisionOfQualityHandbook = getLastRevisionOfQualityHandbook;\r\n qualityViewCtrl.onQualityHandbookTypeSelect = onQualityHandbookTypeSelect;\r\n qualityViewCtrl.getActiveQualityHandbookTypeProgId = getActiveQualityHandbookTypeProgId;\r\n qualityViewCtrl.setActiveQualityHandbookTypeProgId = setActiveQualityHandbookTypeProgId;\r\n qualityViewCtrl.signAllPreviouslyRevised = signAllPreviouslyRevised;\r\n\r\n /**\r\n * Gets the quality handbook for the selected user\r\n */\r\n function getQualityHandbookForUser() {\r\n var userId = qualityViewCtrl.User ? qualityViewCtrl.User.id : null;\r\n return QualityHandbookFactory.getQualityHandbookForUser(typeId, qualityViewCtrl.Organization.id, userId).$promise.then(function (result) {\r\n\r\n qualityViewCtrl.qualityHandbook = result;\r\n\r\n // if (!hasUserWhoSignedDataRetrieved)\r\n getUsersWhoSignedForQualityHandbook(qualityViewCtrl.qualityHandbook.id, qualityViewCtrl.Organization.id);\r\n\r\n });\r\n };\r\n\r\n /**\r\n * Select the organization that is currently default\r\n * @param {any} organizations\r\n */\r\n function selectOrganization(organizations) {\r\n\r\n if (!organizations || organizations.length === 0)\r\n return;\r\n\r\n qualityViewCtrl.Organization = $filter(\"filter\")(organizations, function (organization) {\r\n return organization.id === OrganizationUtilService.getOrganizationId();\r\n })[0];\r\n\r\n\r\n };\r\n\r\n /**\r\n * Select the current logged user or the first user in the list if the company is different from the logged ones\r\n */\r\n function selectUser() {\r\n\r\n if (qualityViewCtrl.Organization.id === loggedUser.Organization.id)\r\n qualityViewCtrl.User = loggedUser;\r\n else\r\n qualityViewCtrl.User = qualityViewCtrl.users[0];\r\n\r\n };\r\n\r\n /**\r\n * Gets the lists of companies\r\n */\r\n function getOrganizationsDropdown() {\r\n return OrganizationFactory.getOrganizationsDropdown().$promise.then(function (result) {\r\n qualityViewCtrl.organizations = result;\r\n selectOrganization(qualityViewCtrl.organizations);\r\n getUsersDropdown().then(function () {\r\n selectUser();\r\n return getQualityHandbookForUser();\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Set up the full name for users\r\n * @param {any} users\r\n */\r\n function addUsersFullName(users) {\r\n\r\n if (!users || users.length === 0)\r\n return;\r\n\r\n for (var index = 0; index < users.length; index++) {\r\n var currentUser = users[index];\r\n currentUser.FullName = qualityViewCtrl.getFullName(currentUser);\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Gets the list of users\r\n */\r\n function getUsersDropdown() {\r\n\r\n if (qualityViewCtrl.User) {\r\n qualityViewCtrl.User.FullName = qualityViewCtrl.getFullName(qualityViewCtrl.User);\r\n }\r\n\r\n return UserFactory.getUsersByOrganizationId(qualityViewCtrl.Organization.id).$promise.then(function (result) {\r\n qualityViewCtrl.users = _.uniqBy(result, function (u) { return u.id });\r\n addUsersFullName(qualityViewCtrl.users);\r\n });\r\n };\r\n\r\n /**\r\n * Check all the users that have signed the quality handbook\r\n * @param {any} organizationUsers\r\n * @param {any} usersWhoSigned\r\n */\r\n function markUsersWhoSignedForQualityHandbook(organizationUsers, usersWhoSigned) {\r\n if (!organizationUsers)\r\n return;\r\n\r\n for (var i = 0; i < organizationUsers.length; i++) {\r\n var user = organizationUsers[i];\r\n\r\n user.hasSigned = _.some(usersWhoSigned, function (u) { return u.id === user.id });\r\n }\r\n\r\n //for (var index = 0; index < usersWhoSigned.length; index++) {\r\n // var currentUserWhoSigned = usersWhoSigned[index];\r\n // for (var position = 0; position < organizationUsers.length; position++) {\r\n // var currentOrganizationUser = organizationUsers[position];\r\n // if (currentOrganizationUser.id === currentUserWhoSigned.id) {\r\n // currentOrganizationUser.hasSigned = true;\r\n // } else\r\n // currentOrganizationUser.hasSigned = false;\r\n\r\n // }\r\n\r\n //}\r\n\r\n };\r\n\r\n /**\r\n * Gets those users that have signed the quality handbook\r\n * @param {any} qualityHandbookId\r\n * @param {any} organizationId\r\n */\r\n function getUsersWhoSignedForQualityHandbook(qualityHandbookId, organizationId) {\r\n return UserFactory.getUsersWhoSignedForQualityHandbook(qualityHandbookId, organizationId)\r\n .then(function (response) {\r\n response = !response || response.length == 0 ? [] : response;\r\n\r\n markUsersWhoSignedForQualityHandbook(qualityViewCtrl.users, response);\r\n hasUserWhoSignedDataRetrieved = true;\r\n\r\n\r\n });\r\n };\r\n\r\n function getLastRevisionOfQualityHandbook() {\r\n\r\n if (!qualityViewCtrl.qualityHandbook.RevisionFrequency ||\r\n !qualityViewCtrl.qualityHandbook.RevisionFrequency.RevisionDate) {\r\n return '';\r\n }\r\n\r\n return $filter('date')(qualityViewCtrl.qualityHandbook.RevisionFrequency.RevisionDate, 'dd-MM-yyyy');\r\n }\r\n\r\n function getQualityHandbookTypes() {\r\n\r\n return QualityHandbookFactory.getQualityHandbookTypes()\r\n .then(function (result) {\r\n\r\n if (!result || result.length === 0) {\r\n return;\r\n }\r\n\r\n qualityViewCtrl.types = $filter('orderBy')(result, 'SortNumber');\r\n\r\n typeId = QualityHandbookFactory.selectedQualityHandbookTab\r\n ? QualityHandbookFactory.selectedQualityHandbookTab.id : qualityViewCtrl.types[0].id;\r\n\r\n // find selected quality handbook type to mark its associated tab as active\r\n var foundType = qualityViewCtrl.types.find(function (type) {\r\n return type.id === typeId;\r\n });\r\n\r\n setActiveQualityHandbookTypeProgId(foundType);\r\n });\r\n }\r\n\r\n function onQualityHandbookTypeSelect(type) {\r\n typeId = type.id;\r\n getQualityHandbookForUser();\r\n }\r\n\r\n function getActiveQualityHandbookTypeProgId() {\r\n return activeQualityHandbookTypeProgId;\r\n }\r\n\r\n function setActiveQualityHandbookTypeProgId(type) {\r\n\r\n activeQualityHandbookTypeProgId = type.ProgId;\r\n\r\n QualityHandbookFactory.selectedQualityHandbookTab = type;\r\n }\r\n\r\n function init() {\r\n titleService.changeTitle($filter('translate')('Quality handbook'));\r\n qualityViewCtrl.User = loggedUser;\r\n\r\n getQualityHandbookTypes()\r\n .then(function () {\r\n if (loggedUser.Organization.Central && loggedUser.Group.ProgId == 'ADMIN') {\r\n if (!OrganizationUtilService.getOrganizationId())\r\n OrganizationUtilService.setOrganizationId(loggedUser.Organization.id);\r\n getOrganizationsDropdown();\r\n } else {\r\n qualityViewCtrl.Organization = loggedUser.Organization;\r\n qualityViewCtrl.User = loggedUser;\r\n getUsersDropdown();\r\n getQualityHandbookForUser();\r\n }\r\n });\r\n };\r\n\r\n qualityViewCtrl.showGoBackToCreatorButton = function () {\r\n return _.some(['ADMIN', 'ADMIN_ALL', 'MANAGER'], function (r) { return r === sessionInformationService.getUser().Group.ProgId });\r\n };\r\n\r\n qualityViewCtrl.showQualityHandbookCreator = function () {\r\n $scope.go('qualityHandbook');\r\n };\r\n\r\n /**\r\n * Views the chapter and gives the user the possibility to sign it\r\n * @param {} chapter \r\n * @returns {} \r\n */\r\n qualityViewCtrl.viewChapter = function (chapter) {\r\n qualityViewCtrl.selectedChapter = chapter;\r\n\r\n chapterModalInstance = $uibModal.open({\r\n template: ' \\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n {{qualityViewCtrl.userChapter.SignDate | date:\\'dd.MMM.yyyy\\'}} \\\r\n
\\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
',\r\n size: 'x-lg',\r\n backdrop: 'static',\r\n scope: $scope\r\n });\r\n\r\n chapterModalInstance.result.finally(function (result) {\r\n qualityViewCtrl.selectedChapter = null;\r\n });\r\n };\r\n\r\n qualityViewCtrl.showSignature = function () {\r\n return qualityViewCtrl.qualityHandbook.Type.ProgId === 'PERSONAL_HANDBOOK';\r\n }\r\n\r\n /**\r\n * Signs the chapter that the user revied\r\n * @returns {} \r\n */\r\n qualityViewCtrl.agreeChapter = function () {\r\n var chapterToSign = angular.copy(qualityViewCtrl.selectedChapter);\r\n chapterToSign.Sign = qualityViewCtrl.userChapter;\r\n\r\n var promise = null;\r\n\r\n if (qualityViewCtrl.qualityHandbook.Type.ProgId === 'PERSONAL_HANDBOOK' && !!qualityViewCtrl.getSignature) {\r\n chapterToSign.Sign.Signature = qualityViewCtrl.getSignature();\r\n\r\n if (!chapterToSign.Sign.Signature)\r\n return;\r\n\r\n promise = QualityHandbookFactory.signPersonalHandbookChapter(qualityViewCtrl.qualityHandbook.id, chapterToSign);\r\n } else\r\n promise = QualityHandbookFactory.signChapter(qualityViewCtrl.qualityHandbook.id, chapterToSign);\r\n\r\n promise.then(function () {\r\n chapterModalInstance.close();\r\n $route.reload();\r\n });\r\n };\r\n\r\n qualityViewCtrl.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n qualityViewCtrl.getFullName = function (object) {\r\n return (object.FirstName ? object.FirstName : '') + ' ' + (object.LastName ? object.LastName : '');\r\n };\r\n\r\n qualityViewCtrl.getQualityHandbook = getQualityHandbookForUser;\r\n\r\n /**\r\n * When the company changes fetch the quality handbook again\r\n * @returns {} \r\n */\r\n qualityViewCtrl.onOrganizationChange = function () {\r\n if (qualityViewCtrl.qualityHandbook.Type.ProgId == 'CENTRAL_APPROVAL') {\r\n //central approval\r\n qualityViewCtrl.centralApprovalSharedObject.reinit();\r\n } else {\r\n getUsersDropdown().then(function () {\r\n qualityViewCtrl.User = qualityViewCtrl.users[0];\r\n return getQualityHandbookForUser();\r\n });\r\n }\r\n };\r\n\r\n qualityViewCtrl.canUserSign = function () {\r\n if (loggedUser.id != qualityViewCtrl.User.id)\r\n return false;\r\n\r\n return true; // qualityViewCtrl.qualityHandbook.Type.ProgId != 'PERSONAL_HANDBOOK';\r\n };\r\n\r\n qualityViewCtrl.openUsersDropdown = function () {\r\n qualityViewCtrl.intellisense.isUserDropdownOpen = true;\r\n };\r\n\r\n qualityViewCtrl.setCurrentUser = function (user) {\r\n qualityViewCtrl.User = user;\r\n qualityViewCtrl.getQualityHandbook();\r\n };\r\n\r\n function signAllPreviouslyRevised() {\r\n var id = qualityViewCtrl.qualityHandbook.id;\r\n\r\n QualityHandbookFactory.signPreviouslyRevised(id)\r\n .then(function () {\r\n return getQualityHandbookForUser();\r\n })\r\n }\r\n\r\n $timeout(init);\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n QualityHandbookTemplateController.$inject = [\r\n '$scope',\r\n '$sce',\r\n 'QualityHandbookFactory',\r\n '$route',\r\n '$routeParams'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('QualityHandbookTemplateController', QualityHandbookTemplateController);\r\n\r\n function QualityHandbookTemplateController(\r\n $scope,\r\n $sce,\r\n QualityHandbookFactory,\r\n $route,\r\n $routeParams\r\n ) {\r\n var qualityTemplateController = this;\r\n var table = $routeParams.table;\r\n\r\n\r\n qualityTemplateController.editMode = {\r\n frontPage: false,\r\n header: false,\r\n footer: false\r\n };\r\n qualityTemplateController.qualityHandbookTemplate = {};\r\n\r\n function init() {\r\n //get the template\r\n QualityHandbookFactory.getQualityHandbookTemplate(table).$promise.then(function (result) {\r\n if (!result.id)\r\n qualityTemplateController.qualityHandbookTemplate = QualityHandbookFactory.getQualityHandbookTemplateForSave();\r\n else\r\n qualityTemplateController.qualityHandbookTemplate = result;\r\n });\r\n };\r\n\r\n /**\r\n * Saves the current template\r\n * @returns {} \r\n */\r\n qualityTemplateController.save = function () {\r\n qualityTemplateController.qualityHandbookTemplate.Table = table;\r\n QualityHandbookFactory.saveQualityHandbookTemplate(qualityTemplateController.qualityHandbookTemplate).then(function () {\r\n $route.reload();\r\n });\r\n };\r\n\r\n qualityTemplateController.close = function () {\r\n $scope.go('/qualityHandbook');\r\n };\r\n\r\n /**\r\n * Toggles between the edit state\r\n * @param {} property \r\n * @returns {} \r\n */\r\n qualityTemplateController.toggleEditMode = function (property) {\r\n qualityTemplateController.editMode[property] = !qualityTemplateController.editMode[property];\r\n };\r\n\r\n qualityTemplateController.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n /**\r\n * Checks whether the save button is disabled\r\n * @returns {} \r\n */\r\n qualityTemplateController.isSaveDisabled = function () {\r\n if (qualityTemplateController.editMode.frontPage)\r\n return true;\r\n if (qualityTemplateController.editMode.header)\r\n return true;\r\n if (qualityTemplateController.editMode.footer)\r\n return true;\r\n return false;\r\n };\r\n\r\n init();\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('session')\r\n .component('vbIntranettLogin', {\r\n templateUrl: 'Scripts/session/intranett-login/intranett-login.component.html',\r\n controller: 'IntranettLoginController',\r\n controllerAs: 'vm',\r\n bindings: {}\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n IntranettLoginController.$inject = [\r\n '$localStorage'\r\n ];\r\n\r\n angular\r\n .module('session')\r\n .controller('IntranettLoginController', IntranettLoginController);\r\n\r\n function IntranettLoginController(\r\n $localStorage\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = function () {\r\n console.log('trying to get auth from intranett');\r\n $localStorage.isLoggingFromIntranett = true;\r\n\r\n oidcIntranett.signinRedirect({ state: 'state data' })\r\n .catch(function (err) {\r\n console.error(err);\r\n });\r\n }\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('session')\r\n .component('sessionExternalConfirm',\r\n {\r\n templateUrl: 'Scripts/session/session-external/session-external.component.html',\r\n controller: 'SessionExternalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n sessionId: '<',\r\n closeExternalModal: '&'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n SessionExternalController.$inject = [\r\n 'SessionFactory',\r\n '$scope'\r\n ];\r\n\r\n angular\r\n .module('session')\r\n .controller('SessionExternalController', SessionExternalController);\r\n\r\n /**\r\n * Controller that handles the password confirmation for any user external sessions\r\n * @param {any} SessionFactory\r\n * @param {any} $scope\r\n */\r\n function SessionExternalController(\r\n SessionFactory,\r\n $scope\r\n ) {\r\n var vm = this;\r\n\r\n vm.password = null;\r\n\r\n vm.$onInit = onInit;\r\n vm.confirm = confirm;\r\n\r\n function onInit() {\r\n };\r\n\r\n /**\r\n * Toggled when the user has entered the password and is ready for login\r\n */\r\n function confirm() {\r\n if (!vm.password)\r\n return Promise.resolve();\r\n\r\n return SessionFactory.loginUsingExternalSession(vm.sessionId, vm.password)\r\n .then(function (createdSession) {\r\n //fill session\r\n $scope.$emit('onShadowLogin', false, createdSession, true);\r\n\r\n setTimeout(function () {\r\n //close modal\r\n if (vm.closeExternalModal)\r\n vm.closeExternalModal()();\r\n }, 500);\r\n });\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('session')\r\n .component('vbIntranetPopup', {\r\n templateUrl: 'Scripts/session/vb-intranet-popup/vb-intranet-popup.component.html',\r\n controller: 'VBIntranetPopupController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n resolve: '<',\r\n close: '&',\r\n dismiss: '&'\r\n }\r\n })\r\n})();","// import { UserManager } from \"oidc-client\";\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n VBIntranetPopupController.$inject = [\r\n '_',\r\n '$localStorage',\r\n '$sce'\r\n ];\r\n\r\n angular\r\n .module('session')\r\n .controller('VBIntranetPopupController', VBIntranetPopupController);\r\n\r\n function VBIntranetPopupController(\r\n _,\r\n $localStorage,\r\n $sce\r\n ) {\r\n var vm = this;\r\n\r\n vm.accessToken = null;\r\n\r\n vm.$onInit = function () {\r\n var intranetSession = $localStorage.intranetSession;\r\n vm.accessToken = _.get(intranetSession, 'access_token');\r\n }\r\n\r\n vm.$onDestroy = function () {\r\n delete $localStorage.intranetSession;\r\n }\r\n\r\n vm.getIntranetUrl = function () {\r\n return $sce.trustAsResourceUrl('https://sso2.test.vb.no?access_token=' + vm.accessToken);\r\n }\r\n };\r\n\r\n\r\n})();","(function () {\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .component('vbMeetingConfirmation', {\r\n template: \"
\",\r\n controller: \"MeetingConfirmationController\",\r\n controllerAs : 'vm'\r\n });\r\n\r\n})();","(function () {\r\n\r\n MeetingConfirmationController.$inject = [\r\n 'ResourcePlannerFactory',\r\n '$routeParams',\r\n '$location',\r\n 'SessionFactory', \r\n 'sessionInformationService',\r\n '$scope', \r\n 'SessionUtils',\r\n '$q',\r\n 'TranslateUtils'\r\n ];\r\n\r\n function MeetingConfirmationController(ResourcePlannerFactory,\r\n $routeParams,\r\n $location,\r\n SessionFactory, \r\n sessionInformationService,\r\n $scope, \r\n SessionUtils,\r\n $q,\r\n TranslateUtils) {\r\n\r\n var vm = this;\r\n var invitationId = $routeParams.invitationId;\r\n var isDeclined = ($routeParams.isDeclined === 'true') ? true : false;\r\n var sessionId = $routeParams.sessionId;\r\n\r\n vm.$onInit = function () {\r\n\r\n if (isDeclined)\r\n declineInvitation(invitationId, sessionId)\r\n .then(function () {\r\n return createLoginSession(invitationId);\r\n })\r\n .then(function (session) {\r\n return initSession(session);\r\n }) \r\n .then(function () {\r\n $location.path('/resourcePlanner');\r\n });\r\n else {\r\n acceptInvitation(invitationId, sessionId)\r\n .then(function () {\r\n return createLoginSession(invitationId);\r\n })\r\n .then(function (session) {\r\n return initSession(session);\r\n }) \r\n .then(function () {\r\n $location.path('/resourcePlanner');\r\n });\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Marks an invitation as accepted\r\n * @param {string} invitationId\r\n * @param {string} sessionId\r\n */\r\n function acceptInvitation(invitationId, sessionId) {\r\n return ResourcePlannerFactory.acceptInvitation(invitationId, sessionId); \r\n }\r\n\r\n /**\r\n * Deletes the user which declined the invitation from the respective meeting\r\n * @param {string} invitationId\r\n * @param {string} sessionId\r\n */\r\n function declineInvitation(invitationId, sessionId) {\r\n return ResourcePlannerFactory.declineInvitation(invitationId, sessionId);\r\n }\r\n\r\n function createLoginSession(invitationId) {\r\n return SessionFactory.createSessionForUserFromInvitation(invitationId);\r\n }\r\n \r\n function initSession(session) {\r\n\r\n if (!session)\r\n $scope.$emit('onLogout');\r\n\r\n SessionUtils.initSession(session); \r\n SessionUtils.storeSessionInCookies(session);\r\n SessionUtils.storeSessionUserInCookies(session);\r\n SessionUtils.storeUserMenus(session.User.Menus);\r\n \r\n $scope.$emit('onSessionCreatedFromRpMeetingInvitation');\r\n\r\n return $q.when();\r\n }\r\n \r\n }\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .controller('MeetingConfirmationController', MeetingConfirmationController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .component('resourcePlannerSettings', {\r\n templateUrl: 'Scripts/resourcePlanner/resource-planner-settings/resource-planner-settings.html',\r\n controller: 'ResourcePlannerSettingsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n table: '<',\r\n modalInstance: '='\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerSettingsController.$inject = [\r\n 'ResourcePlannerSettingsFactory',\r\n '$q',\r\n 'ResourcePlannerFactory',\r\n 'sessionInformationService'\r\n ];\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .controller('ResourcePlannerSettingsController', ResourcePlannerSettingsController);\r\n\r\n function ResourcePlannerSettingsController(\r\n ResourcePlannerSettingsFactory,\r\n $q,\r\n ResourcePlannerFactory,\r\n sessionInformationService\r\n ) {\r\n var vm = this;\r\n\r\n vm.refreshTimes = [];\r\n vm.overviews = [];\r\n vm.groupViews = [];\r\n vm.resourcePlannerSettings = {};\r\n\r\n vm.$onInit = init;\r\n vm.$onDestroy = destroy;\r\n vm.cancel = cancel;\r\n vm.save = save;\r\n\r\n function init() {\r\n $q.all([\r\n getRefreshTimes(),\r\n getOverviews(),\r\n getGroupViews()\r\n ]).then(function () {\r\n return getResourcePlannerSettings();\r\n });\r\n };\r\n\r\n /**\r\n * Gets all the refresh times\r\n */\r\n function getRefreshTimes() {\r\n return ResourcePlannerSettingsFactory.getRefreshTimes()\r\n .then(function (result) {\r\n vm.refreshTimes = result;\r\n makeSortNumberInteger(vm.refreshTimes);\r\n });\r\n }\r\n\r\n /**\r\n * Gets all the overview types\r\n */\r\n function getOverviews() {\r\n return ResourcePlannerSettingsFactory.getOverviews()\r\n .then(function (result) {\r\n vm.overviews = result;\r\n makeSortNumberInteger(vm.overviews);\r\n });\r\n }\r\n\r\n /**\r\n * Gets all the group views\r\n */\r\n function getGroupViews() {\r\n return ResourcePlannerFactory.getResourcePlannerDropdownViews(sessionInformationService.getUser().Organization.id, false)\r\n .then(function (result) {\r\n vm.groupViews = result;\r\n });\r\n }\r\n\r\n /**\r\n * Parese the sort number property into an int type\r\n * @param {any} types\r\n */\r\n function makeSortNumberInteger(types) {\r\n if (!types || types.length == 0)\r\n return;\r\n\r\n //make sortnumber integer\r\n for (var i = 0; i < types.length; i++)\r\n types[i].SortNumber = parseInt(types[i].SortNumber);\r\n };\r\n\r\n /**\r\n * Gets the current existing settings for the logged user\r\n */\r\n function getResourcePlannerSettings() {\r\n return ResourcePlannerSettingsFactory.getResourcePlannerSettings(vm.table)\r\n .then(function (result) {\r\n if (result && result.id)\r\n vm.resourcePlannerSettings = result;\r\n else {//set default values\r\n vm.resourcePlannerSettings.User = sessionInformationService.getUser();\r\n vm.resourcePlannerSettings.Table = vm.table;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Closes the modal\r\n */\r\n function cancel() {\r\n vm.modalInstance.close();\r\n };\r\n\r\n /**\r\n * Saves the current user settings to server\r\n */\r\n function save() {\r\n return ResourcePlannerSettingsFactory.saveResourcePlannerSettings(vm.resourcePlannerSettings)\r\n .then(function () {\r\n cancel();\r\n });\r\n };\r\n\r\n function destroy() {\r\n vm.refreshTimes = null;\r\n vm.overviews = null;\r\n vm.groupViews = null;\r\n vm.resourcePlannerSettings = null;\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerSettingsFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .factory('ResourcePlannerSettingsFactory', ResourcePlannerSettingsFactory);\r\n\r\n /**\r\n * Factory for managing api calls for resource planner settings\r\n */\r\n function ResourcePlannerSettingsFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var resourcePlannerSettingsFactory = {};\r\n\r\n var api = baseUrlService.getBaseUrl();\r\n //set up apis\r\n var RefreshTimesApi = $resource(api + 'REST/ResourcePlannerSettingsRetrieve.svc/RefreshTimeTypes');\r\n var OverviewsApi = $resource(api + 'REST/ResourcePlannerSettingsRetrieve.svc/OverviewTypes');\r\n var ResourcePlannerSettingsModifyApi =\r\n $resource(api + 'REST/ResourcePlannerSettingsModify.svc/ResourcePlannerSettings/:id',\r\n { id: '@id' },\r\n { update: { method: 'PUT' } });\r\n var ResourcePlannerSettingsRetrieveApi =\r\n $resource(api + 'REST/ResourcePlannerSettingsRetrieve.svc/ResourcePlannerSettings/:table', { table: '@table' });\r\n\r\n /**\r\n * Gets all the refresh times available from server\r\n * @returns {} \r\n */\r\n resourcePlannerSettingsFactory.getRefreshTimes = function () {\r\n return RefreshTimesApi.query().$promise;\r\n };\r\n\r\n /**\r\n * Gets all the overviews available from server\r\n * @returns {} \r\n */\r\n resourcePlannerSettingsFactory.getOverviews = function () {\r\n return OverviewsApi.query().$promise;\r\n };\r\n\r\n /**\r\n * Saves a given setting to the server\r\n * @param {} resourcePlannerSettings \r\n * @returns {} \r\n */\r\n resourcePlannerSettingsFactory.saveResourcePlannerSettings = function (resourcePlannerSettings) {\r\n //copy properties over to a new object\r\n resourcePlannerSettings = Object.assign(new ResourcePlannerSettingsModifyApi(), resourcePlannerSettings);\r\n\r\n if (!resourcePlannerSettings.id)\r\n return resourcePlannerSettings.$save();\r\n return resourcePlannerSettings.$update();\r\n };\r\n\r\n resourcePlannerSettingsFactory.getResourcePlannerSettings = function (table) {\r\n return ResourcePlannerSettingsRetrieveApi.get({ table: table }).$promise;\r\n };\r\n\r\n return resourcePlannerSettingsFactory;\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .component('vbTimelineTask',\r\n {\r\n templateUrl: 'Scripts/resourcePlanner/resource-planner-task-timeline/resource-planner-task-timeline.component.html',\r\n controller: 'ResourcePlannerTaskTimelineController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n resourcePlanner: '=',\r\n startHour: '<',\r\n setPositionForTask: '&',\r\n users: '<',\r\n render: '&',\r\n overview: '@',\r\n dayArray: '=',\r\n action: '<',\r\n participantPlanner: '='\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerTaskTimelineController.$inject = [\r\n 'ResourcePlannerService',\r\n '$translate',\r\n '_',\r\n '$timeout',\r\n '$uibModal',\r\n '$scope',\r\n 'UserFactory',\r\n 'ResourcePlannerFactory',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('resourcePlanner')\r\n .controller('ResourcePlannerTaskTimelineController', ResourcePlannerTaskTimelineController);\r\n\r\n function ResourcePlannerTaskTimelineController(\r\n ResourcePlannerService,\r\n $translate,\r\n _,\r\n $timeout,\r\n $uibModal,\r\n $scope,\r\n UserFactory,\r\n ResourcePlannerFactory,\r\n $q\r\n ) {\r\n var vm = this;\r\n\r\n var timelineTask;\r\n var modalInstance = null;\r\n\r\n vm.hasStartedTimeline = false;\r\n vm.usersWithTimelinedTasks = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.onMouseMove = _.throttle(onMouseMove, 50, { leading: false, trailing: true });\r\n vm.onMouseHoldTimeline = onMouseHoldTimeline;\r\n vm.onMouseReleaseTimeline = onMouseReleaseTimeline;\r\n vm.confirm = confirm;\r\n vm.cancel = cancel;\r\n vm.removeTimelinedTask = removeTimelinedTask;\r\n vm.getTaskMainOrderId = getTaskMainOrderId;\r\n vm.saveTasks = saveTasks;\r\n vm.$onDestroy = onDestroy;\r\n vm.isCutAction = isCutAction;\r\n vm.isCreateOrderAction = isCreateOrderAction;\r\n\r\n vm.helperTextCoordinates = { top: 0, left: 0 };\r\n\r\n function onInit() {\r\n //set delegates\r\n vm.resourcePlanner.clearTimelineTask = clearTimelineTask;\r\n listenForKeyboard();\r\n initHelperTextPosition();\r\n };\r\n\r\n function listenForKeyboard() {\r\n document.onkeydown = function (e) {\r\n var originalEvent = e || window.event;\r\n var isEscapeKey = false;\r\n if ('key' in originalEvent)\r\n isEscapeKey = (originalEvent.key == 'Escape' || originalEvent.key == 'Esc');\r\n else\r\n isEscapeKey = originalEvent.keyCode == 27;\r\n\r\n if (isEscapeKey)\r\n cancel();\r\n };\r\n }\r\n\r\n function getTaskToCreate(startHour, endHour, userScope) {\r\n if (!isCreateOrderAction())\r\n return {\r\n Active: true,\r\n id: Math.random(),\r\n StartDate: startHour,\r\n EndDate: endHour,\r\n Table: vm.resourcePlanner.taskCopied.Table,\r\n ForeignKey: getForeignKey(vm.resourcePlanner.taskCopied),\r\n User: { id: userScope.id },\r\n Name: getNameForTask(vm.resourcePlanner.taskCopied),\r\n ColorSetting: vm.resourcePlanner.taskCopied.ColorSetting,\r\n Order: vm.resourcePlanner.taskCopied.Table == 'BOT_ORDER'\r\n ? {\r\n Status: { ProgId: 'PREORDER' },\r\n MainOrderId: vm.resourcePlanner.taskCopied.Table == 'BOT_ORDER' ? vm.resourcePlanner.taskCopied.Order.MainOrderId : null\r\n }\r\n : null,\r\n OriginalOrder: vm.resourcePlanner.taskCopied.Order,\r\n OriginalTask: vm.resourcePlanner.taskCopied,\r\n Execution: {\r\n InitiatedProcessList: {\r\n Status: { ProgId: '' }\r\n }\r\n },\r\n Action: vm.action\r\n };\r\n\r\n return {\r\n Active: true,\r\n id: Math.random(),\r\n StartDate: startHour,\r\n EndDate: endHour,\r\n Table: 'BOT_ORDER',\r\n User: { id: userScope.id },\r\n Name: $translate.instant('COMMON.NEW'),\r\n ColorSetting: _.find(vm.resourcePlanner.colors, function (c) { return c.ForeignKey == vm.resourcePlanner.mainOrder.OrderType.id }),\r\n Order: {},\r\n Execution: {\r\n InitiatedProcessList: {\r\n Status: { ProgId: '' }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a task at the mouse position, long of 1 hour\r\n * This is triggered on mouse hold\r\n * @param {any} event\r\n */\r\n function onMouseHoldTimeline(event) {\r\n //if the timeline already started\r\n //ignore\r\n if (vm.hasStartedTimeline || vm.resourcePlanner.selectOrdersForTimeline)\r\n return;\r\n\r\n //get mouse coordinates\r\n var xCoordinate = event.clientX,\r\n yCoordinate = event.clientY;\r\n \r\n //get user element from coordinates\r\n var userElement = ResourcePlannerService.getHtmlElementsFromCoordinates(xCoordinate, yCoordinate, 'rp-hour-task')[0];\r\n\r\n if (!userElement)\r\n return;\r\n //get relative coordinates and start hour\r\n var startHour = getHour(xCoordinate, event)\r\n .set({ 'minute': 0, 'second': 0, 'millisecond': 0 })\r\n .add(moment().utcOffset(), 'minutes')\r\n .valueOf(),\r\n endHour = moment(startHour)\r\n .add(1, 'hours')\r\n .valueOf(),\r\n userScope = angular.element(userElement).scope().user;\r\n\r\n if (!userScope)\r\n return;\r\n\r\n //create the task\r\n timelineTask = getTaskToCreate(startHour, endHour, userScope);\r\n\r\n if (isCreateOrderAction()) {\r\n vm.resourcePlanner.timelinedTask = timelineTask;\r\n if (!userScope.IsAssignedToOrder)\r\n vm.resourcePlanner.checkUser(timelineTask.User, false, timelineTask.ForeignKey);\r\n }\r\n\r\n if (_.isNil(userScope.Tasks))\r\n userScope.Tasks = [];\r\n\r\n userScope.Tasks.push(timelineTask);\r\n //wait for digest loop\r\n $timeout(function () {\r\n vm.setPositionForTask()(timelineTask);\r\n vm.hasStartedTimeline = true;\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Increases/Decreases the width of the task\r\n * If the mouse is before start hour + 1 hour, the end hour will be start hour + 1 hour\r\n * Triggered when the user moves the mouse\r\n * @param {any} event\r\n */\r\n function onMouseMove(event) {\r\n //if the timeline hasn't started yet\r\n //ignore\r\n if (!vm.hasStartedTimeline || !timelineTask)\r\n return;\r\n\r\n //calculate end hour\r\n var xCoordinate = event.clientX,\r\n endHour = getHour(xCoordinate, event);\r\n\r\n //if the end hour is less that start hour + 1 hour, set the end hour to start hour + 1\r\n if (endHour.isBefore(moment(timelineTask.StartDate).add(1, 'hours').subtract(moment().utcOffset(), 'minutes'))) {\r\n endHour = moment(timelineTask.StartDate)\r\n .add(1, 'hours')\r\n .valueOf();\r\n } else\r\n endHour = endHour\r\n .add(moment().utcOffset(), 'minutes')\r\n .valueOf();\r\n\r\n\r\n timelineTask.EndDate = endHour;\r\n\r\n vm.setPositionForTask()(timelineTask);\r\n };\r\n\r\n /**\r\n * Creates the task with end hour being where the user released the click\r\n * Triggered when the user releases the click button\r\n * @param {any} event\r\n */\r\n function onMouseReleaseTimeline(event) {\r\n //if the timeline hasn't started yet\r\n //ignore\r\n if (!vm.hasStartedTimeline || !timelineTask)\r\n return;\r\n\r\n var xCoordinate = event.clientX,\r\n yCoordinate = event.clientY,\r\n userElement = ResourcePlannerService.getHtmlElementsFromCoordinates(xCoordinate, yCoordinate, 'rp-hour-task')[0], //get user element from coordinates,\r\n endHour = getHour(xCoordinate, event),\r\n userScope = angular.element(userElement).scope().user;\r\n //set end date\r\n if (endHour.isBefore(moment(timelineTask.StartDate).add(1, 'hours').subtract(moment().utcOffset(), 'minutes'))) {\r\n endHour = moment(timelineTask.StartDate)\r\n .add(1, 'hours')\r\n .valueOf();\r\n } else\r\n endHour = endHour\r\n .add(moment().utcOffset(), 'minutes')\r\n .add(1, 'hours')\r\n .set({ 'minute': 0, 'second': 0, 'millisecond': 0 })\r\n .valueOf();\r\n\r\n timelineTask.EndDate = endHour;\r\n //set the position on grid\r\n vm.setPositionForTask()(timelineTask);\r\n //finish timeline\r\n vm.hasStartedTimeline = false;\r\n\r\n //recalculate position\r\n $timeout(function () {\r\n ResourcePlannerService.recalculateCollapsedTasks([userScope]);\r\n });\r\n\r\n //if the action is cut -> do not allow other tasks to be created\r\n if (isCutAction())\r\n confirm();\r\n else if (isCreateOrderAction()) {\r\n //property to know that it came from timeline\r\n vm.resourcePlanner.selectOrdersForTimeline = true;\r\n //open the side panel with the orders so that the user can chose what orders to include\r\n vm.resourcePlanner.toggleOrdersPanel();\r\n }\r\n };\r\n\r\n function clearTimelineTask() {\r\n vm.hasStartedTimeline = false;\r\n timelineTask = null;\r\n };\r\n\r\n /**\r\n * Opens a modal with all created tasks\r\n */\r\n function confirm() {\r\n //get the timelined tasks\r\n for (var i = 0; i < vm.users.length; i++) {\r\n if (_.isNil(vm.users[i].Tasks) || _.isEmpty(vm.users[i].Tasks))\r\n continue;\r\n var timelinedTasks = _.filter(vm.users[i].Tasks, function (t) { return t.id < 1 });\r\n if (!_.isNil(timelinedTasks) && !_.isEmpty(timelinedTasks)) {\r\n var user = _.cloneDeep(vm.users[i]);\r\n //set the timelined tasks\r\n user.Tasks = timelinedTasks;\r\n vm.usersWithTimelinedTasks.push(Object.assign(new UserFactory.User(), user));\r\n }\r\n }\r\n //open modal with created timelined tasks\r\n modalInstance = $uibModal.open({\r\n templateUrl: 'Scripts/resourcePlanner/resource-planner-task-timeline/resource-planner-task-timeline-confirm.modal.html',\r\n scope: $scope\r\n });\r\n\r\n modalInstance.result.finally(function () {\r\n vm.usersWithTimelinedTasks = [];\r\n\r\n //if the action is cut -> cancel creation\r\n if (isCutAction())\r\n cancel();\r\n\r\n\r\n });\r\n\r\n };\r\n\r\n vm.showConfirmButton = function () {\r\n for (var i = 0; i < vm.users.length; i++)\r\n if (_.some(vm.users[i].Tasks, function (t) { return t.id < 1 }))\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Removes all the timelined tasks and closes the timeline container\r\n */\r\n function cancel() {\r\n //remove timelined tasks from users\r\n for (var i = 0; i < vm.users.length; i++) {\r\n if (_.isNil(vm.users[i].Tasks) || _.isEmpty(vm.users[i].Tasks))\r\n continue;\r\n //remove where the id is less that 1\r\n _.remove(vm.users[i].Tasks, function (t) { return t.id < 1 });\r\n }\r\n\r\n clearTimelineTask();\r\n vm.resourcePlanner.createActionTimeline = false;\r\n $timeout(function () {\r\n ResourcePlannerService.recalculateCollapsedTasks(vm.users);\r\n });\r\n };\r\n\r\n /**\r\n * Removes the given task from the given user\r\n * @param {any} user\r\n * @param {any} task\r\n */\r\n function removeTimelinedTask(user, task) {\r\n //remove the task\r\n _.remove(user.Tasks, function (t) { return t.id == task.id });\r\n //if the user does not have any timelined tasks\r\n //remove the user\r\n if (_.isEmpty(user.Tasks))\r\n _.remove(vm.usersWithTimelinedTasks, function (u) { return u.id == user.id });\r\n\r\n //render the tasks again\r\n $timeout(function () {\r\n vm.render()();\r\n });\r\n };\r\n\r\n function saveTasks() {\r\n if (vm.action == ResourcePlannerService.rightMenuActions.COPY) {\r\n var tasksToSave = [].concat.apply([], _.map(vm.usersWithTimelinedTasks, function (u) { return u.Tasks }));\r\n\r\n return ResourcePlannerFactory.saveCopiedTasks(tasksToSave).then(function () {\r\n modalInstance.dismiss();\r\n cancel();\r\n vm.resourcePlanner.getTasks();\r\n ResourcePlannerFactory.markOrderAsEdit();\r\n\r\n var task = _.first(tasksToSave);\r\n if (task.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(task.Order.MainOrderId);\r\n });\r\n } else if (isCutAction()) {\r\n var tasks = [].concat.apply([], _.map(vm.usersWithTimelinedTasks, function (u) { return u.Tasks }));\r\n var taskToSave = _.find(tasks, function (t) { return t.Action == ResourcePlannerService.rightMenuActions.CUT });\r\n\r\n if (!taskToSave)\r\n return $q.when();\r\n\r\n return ResourcePlannerFactory.saveCutTask(taskToSave)\r\n .then(function () {\r\n modalInstance.dismiss();\r\n cancel();\r\n ResourcePlannerFactory.markOrderAsEdit();\r\n $timeout(function () {\r\n if (taskToSave.Table == 'BOT_ORDER')\r\n ResourcePlannerFactory.askForPeriodisering(taskToSave.Order.MainOrderId);\r\n\r\n vm.resourcePlanner.getTasks();\r\n });\r\n\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Checks wheter the current action is the cut one\r\n */\r\n function isCutAction() {\r\n return vm.action == ResourcePlannerService.rightMenuActions.CUT;\r\n };\r\n\r\n function isCreateOrderAction() {\r\n return vm.action == ResourcePlannerService.rightMenuActions.CREATE_ORDER && vm.participantPlanner;\r\n };\r\n\r\n function getTaskMainOrderId(task) {\r\n if (task.Table != 'BOT_ORDER')\r\n return {};\r\n\r\n return {\r\n mainOrderId: task.Order.MainOrderId\r\n };\r\n };\r\n\r\n function getNameForTask(task) {\r\n if (task.Table == 'BOT_ORDER')\r\n return $translate.instant('COMMON.NEW');\r\n\r\n if (task.Table == 'GOT_TYPE')\r\n return task.Name;\r\n\r\n return '';\r\n };\r\n\r\n /**\r\n * Gets the foreign key for when the task is created\r\n * @param {any} task\r\n */\r\n function getForeignKey(task) {\r\n //if it's cut action -> the order will be moved\r\n if (task.Table == 'BOT_ORDER' && !isCutAction())\r\n return null;\r\n\r\n return task.ForeignKey;\r\n }\r\n\r\n /**\r\n * Gets the hours based on the current mouse position and current selected overview\r\n * @param {any} xCoordinate\r\n * @param {any} event\r\n */\r\n function getHour(xCoordinate, event) {\r\n var relativeXCoordinate, startDayIndex, startHourCoordinates;\r\n switch (vm.overview) {\r\n case 'DAY':\r\n relativeXCoordinate = xCoordinate - event.currentTarget.getBoundingClientRect().left;\r\n var hourCoordinate = relativeXCoordinate / vm.resourcePlanner.hourWidth + vm.startHour;\r\n return moment(ResourcePlannerService.pxToHours(hourCoordinate, vm.resourcePlanner.Date));\r\n case 'WORKING_DAYS':\r\n case 'WEEK':\r\n relativeXCoordinate = xCoordinate - event.currentTarget.getBoundingClientRect().left;\r\n startDayIndex = parseInt(relativeXCoordinate / vm.resourcePlanner.dayWidth);\r\n startHourCoordinates = (relativeXCoordinate - (startDayIndex * vm.resourcePlanner.dayWidth)) / vm.resourcePlanner.hourWidth + vm.resourcePlanner.startHour;\r\n return moment(ResourcePlannerService.pxToHours(startHourCoordinates, vm.dayArray[startDayIndex].date));\r\n case 'MONTH':\r\n relativeXCoordinate = xCoordinate - event.currentTarget.getBoundingClientRect().left;\r\n startDayIndex = parseInt(relativeXCoordinate / vm.resourcePlanner.dayWidth);\r\n startHourCoordinates = (relativeXCoordinate - (startDayIndex * vm.resourcePlanner.dayWidth)) / vm.resourcePlanner.hourWidth;\r\n return moment(ResourcePlannerService.pxToHours(startHourCoordinates, vm.dayArray[startDayIndex]));\r\n default:\r\n return 1;\r\n }\r\n };\r\n\r\n function initHelperTextPosition() {\r\n var overview = angular.element('.rp-overview')[0];\r\n if (_.isNil(overview))\r\n overview = angular.element('.resource-planner-overview')[0];\r\n vm.helperTextCoordinates = {\r\n top: overview.clientHeight / 2 - 100,\r\n left: overview.clientWidth / 2 - 100\r\n }\r\n }\r\n\r\n function onDestroy() {\r\n //remove listener for keyboard\r\n document.onkeydown = null;\r\n };\r\n };\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n ResourcePlannerDayController.$inject = [\r\n '$scope',\r\n 'DateUtilService',\r\n '$timeout',\r\n '$uibModal',\r\n '$filter',\r\n 'ResourcePlannerService',\r\n 'errorService',\r\n '$interval',\r\n 'sessionInformationService',\r\n 'dialogService',\r\n '$rootScope',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner').directive('resourcePlannerDay', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ResourcePlannerDayController as vm',\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerOverview/resourcePlannerDay.html',\r\n bindToController: true,\r\n scope: {\r\n startHour: '=',\r\n endHour: '=',\r\n users: '=',\r\n date: '=',\r\n getTasks: '&',\r\n endDate: '=',\r\n startDate: '=',\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n angular.module('resourcePlanner').controller('ResourcePlannerDayController', ResourcePlannerDayController);\r\n\r\n function ResourcePlannerDayController(\r\n $scope,\r\n DateUtilService,\r\n $timeout,\r\n $uibModal,\r\n $filter,\r\n ResourcePlannerService,\r\n errorService,\r\n $interval,\r\n sessionInformationService,\r\n dialogService,\r\n $rootScope,\r\n TaskListService,\r\n $translate\r\n ) {\r\n\r\n var vm = this, lastX, lastY, lastWidth, hourWidth = null, initialHourWidth = null, lastColor = null;\r\n var dataXSet = false, lastInactiveColor = null, lastHtml = null, ySet = false;\r\n vm.hours = [], vm.hoursGrid = [], vm.overlayedTasks = null, vm.overlappingTasks = [];\r\n var startDate = null, endDate = null;\r\n var usersList = document.getElementById('rpUsers');\r\n var usersTasks = document.getElementById('rpUsersTasks');\r\n var resourcePlanner = null;\r\n var currentDatePromise = null;\r\n var currentDateElement = null;\r\n var yesterdayDate = null;\r\n\r\n vm.getContextMenuForTask = getContextMenuForTask;\r\n\r\n vm.$onInit = function () {\r\n //set common unit width\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n resourcePlanner = vm.resourcePlanner;\r\n initDelegateFunctions();\r\n\r\n //start functions\r\n generateHourGrid();\r\n setStartAndEndDate();\r\n resetScrollToTop();\r\n };\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (currentDate > startDate && currentDate < endDate)\r\n currentDateElement.style.left = (ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(startDate)) * hourWidth + 'px';\r\n else {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Generates the hour grid\r\n */\r\n function generateHourGrid() {\r\n vm.hours = [];\r\n vm.hoursGrid = [];\r\n for (var i = vm.startHour; i < vm.endHour; i++) {\r\n vm.hours.push(DateUtilService.setDate(vm.date, i, 0, 0));\r\n\r\n //inserting twice, grid -> half an hour\r\n vm.hoursGrid.push(i);\r\n vm.hoursGrid.push(i);\r\n };\r\n };\r\n\r\n /**\r\n * Renders the tasks on the current overview;\r\n */\r\n function render() {\r\n if (!vm.users || vm.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var user = vm.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the width after zoom\r\n * @returns {} \r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-hour');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = hourWidth + 'px';\r\n }\r\n\r\n var grids = document.getElementsByClassName('rp-hour-line');\r\n for (i = 0; i < grids.length; i++) {\r\n grids[i].style.minWidth = hourWidth + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-hour-tasks');\r\n for (i = 0; i < tasks.length; i++)\r\n tasks[i].style.minWidth = hourWidth * (vm.endHour - vm.startHour) + 'px';\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Zooms in into overview\r\n * @returns {} \r\n */\r\n resourcePlanner.zoomIn = function () {\r\n hourWidth += 1;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n setWidthOfElements();\r\n render();\r\n };\r\n\r\n /**\r\n * Zooms out of the overview\r\n * @returns {} \r\n */\r\n resourcePlanner.zoomOut = function () {\r\n //get the overview element so we can calculate the width of the grid\r\n var resourcePlannerOverviewElement = document.getElementsByClassName('rp-overview')[0];\r\n var minWidth = resourcePlannerOverviewElement.clientWidth / (vm.endHour - vm.startHour);\r\n if (hourWidth <= parseInt(minWidth) + 1)\r\n return;\r\n\r\n hourWidth -= 1;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n setWidthOfElements();\r\n\r\n render();\r\n };\r\n\r\n /**\r\n * Resizes the overview for the 24h format\r\n * @returns {} \r\n */\r\n resourcePlanner.resizeFullDayFormat = function () {\r\n $timeout(function () {\r\n generateHourGrid();//regenerate grid for the new hour format\r\n\r\n hourWidth = (parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / (vm.endHour - vm.startHour)) + 1);\r\n $timeout(function () {\r\n setWidthOfElements();\r\n });\r\n\r\n setStartAndEndDate();\r\n render();\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the collapse button should show\r\n * @param {} user \r\n * @returns {} \r\n */\r\n resourcePlanner.showCollapseButton = function (user) {\r\n return ResourcePlannerService.showCollapseButton(user);\r\n };\r\n\r\n /**\r\n * Collapses the given user\r\n * @param {} user \r\n * @returns {} \r\n */\r\n resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n /**\r\n * Sets the grid height\r\n * @returns {} \r\n */\r\n resourcePlanner.setGridHeight = function () {\r\n $timeout(function () {\r\n var grid = document.getElementsByClassName('rp-hour-grid')[0];\r\n if (grid)\r\n grid.style.height = vm.users.length * 60 + 'px';\r\n });\r\n };\r\n\r\n /**\r\n * Returns the day for which to be deleted from the task\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getDayForDelete = function (event) {\r\n return vm.date;\r\n };\r\n\r\n /**\r\n * Returns the hour for which to be deleted from task\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getHourForDelete = function (event) {\r\n var xCoordinate = event.originalEvent.pageX;//get mouse x coordinate\r\n var position = document.getElementsByClassName('rp-hour-grid')[0].getBoundingClientRect();//get the coordinates for the grid\r\n\r\n var hourStart = (xCoordinate - position.left) / hourWidth + vm.startHour;//find the start hour\r\n\r\n return ResourcePlannerService.pxToHours(hourStart, vm.date);//get the converted hour\r\n };\r\n\r\n /**\r\n * Delegate for setting the position for the given task\r\n */\r\n vm.setPositionForTask = setPositionForTask;\r\n vm.render = render;\r\n };\r\n\r\n /**\r\n * Gets the info for the given task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Checks whether the task is private or not\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.isTaskPrivate = function (task) {\r\n return ResourcePlannerService.isTaskPrivateToCurrentUser(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Returns the y coordinate\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, vm.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n /**\r\n * returns the width of a day\r\n * @returns {} \r\n */\r\n function getFullDayWidth() {\r\n if (vm.resourcePlanner.fullDayFormat)\r\n return 24 * hourWidth;//full day\r\n return (endDate.getHours() - startDate.getHours()) * hourWidth;\r\n };\r\n\r\n /**\r\n * returns the height of the user list\r\n * @returns {} \r\n */\r\n function getUsersHeight() {\r\n return vm.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n /**\r\n * when scrolling users -> scroll the overview\r\n * @returns {} \r\n */\r\n function scrollTaskList() {\r\n usersTasks.scrollTop = usersList.scrollTop;\r\n };\r\n\r\n function resetScrollToTop() {\r\n usersTasks.scrollTop = usersList.scrollTop = 0;\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, vm.endHour - 1, 59, 59);\r\n };\r\n\r\n /**\r\n * Sets the current start and end date\r\n */\r\n function setStartAndEndDate() {\r\n if (resourcePlanner.fullDayFormat) {\r\n startDate = vm.startDate = DateUtilService.setDate(vm.date, vm.startHour, 0, 0);\r\n endDate = vm.endDate = DateUtilService.setDate(vm.date, vm.endHour - 1, 59, 59);//the end date is set to 59 so that it doesn't go to the next day\r\n initYesterdayDate();\r\n } else {\r\n startDate = vm.startDate = DateUtilService.setDate(vm.date, vm.startHour, 0, 0);\r\n endDate = vm.endDate = DateUtilService.setDate(vm.date, vm.endHour, 0, 0);\r\n }\r\n };\r\n\r\n /**\r\n * Goes to next day\r\n * @returns {} \r\n */\r\n vm.nextDay = function () {\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.date), 1);\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * Goes to previous day\r\n * @returns {} \r\n */\r\n vm.lastDay = function () {\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.date), -1);\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * resets a task to its initial position based on lastX, lastY and lastWidth\r\n * @param {} event \r\n * @returns {} \r\n */\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n\r\n //restore\r\n target.style.webkitTransform = target.style.transform = target.style.msTransform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n }\r\n\r\n /**\r\n * checks if the task is out of the grid boundaries\r\n * @param {} event \r\n * @returns {} \r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n\r\n //get top based on user index\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n if (currentX < 0 ||\r\n topY > currentY ||\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getFullDayWidth())\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * gets the position of a task in the grid\r\n * @param {} startHour \r\n * @param {} endHour \r\n * @returns {} \r\n */\r\n function getPosition(startHour, endHour, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startHour, startDate))//same day, check hours\r\n start = ResourcePlannerService.hoursToPx(startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(startHour);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endHour, endDate))//same day, check hours\r\n end = ResourcePlannerService.hoursToPx(endDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(endHour);\r\n\r\n x = (start - ResourcePlannerService.hoursToPx(startDate)) * hourWidth;//where the task begins\r\n width = (end - start) * hourWidth;//the width of the task\r\n\r\n return {\r\n x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10// -10 because of the top/bottom padding\r\n };\r\n };\r\n\r\n /**\r\n * Function that handles the start event\r\n * @param {any} event\r\n */\r\n function onStartEvent(event) {\r\n\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n\r\n };\r\n\r\n /**\r\n * Function that handles the resize event\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Gets the start and end date for the given task after resize/drag\r\n * @param {any} x\r\n * @param {any} taskWidth\r\n */\r\n function getStartAndEndDate(x, taskWidth) {\r\n var hourStartResized = x / hourWidth + vm.startHour;\r\n var hourEndResized = hourStartResized + (taskWidth + 2) / hourWidth;\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStartResized, vm.date));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEndResized, vm.date));\r\n return { StartDate: startDate, EndDate: endDate };\r\n };\r\n\r\n /**\r\n * Saves the given task\r\n * @param {any} task\r\n */\r\n function saveTask(task) {\r\n if (task.Table == 'BOT_ORDER') {\r\n if (DateUtilService.getDateWithoutTimezone(task.EndDate) > DateUtilService.getDateWithoutTimezone(task.Order.EndDate))\r\n dialogService.showConfirmDialog('txtConfirm', 'txtEndDateBiggerThanOrderEndDate')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK) {\r\n vm.getTasks();\r\n return;\r\n }\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n });\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n }\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Handles the end event after drag/resize\r\n * @param {any} event\r\n */\r\n function onEndEvent(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n\r\n if (event.type === 'dragend') //drag and drop will be handled in the dropzone\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), startDate))\r\n task.StartDate = dates.StartDate;\r\n\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n console.log(task.Order ? task.Order.EndDate : '');\r\n saveTask(task);\r\n\r\n };\r\n\r\n /**\r\n * Handles the drag move event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n\r\n var target = event.target;\r\n\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = target.style.msTransform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n\r\n\r\n };\r\n\r\n /**\r\n * Sets the hour width\r\n */\r\n function setHourWidth() {\r\n vm.resourcePlanner.hourWidth = hourWidth = hourWidth ? hourWidth : (parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / (vm.endHour - vm.startHour)) + 1);\r\n initialHourWidth = hourWidth;\r\n };\r\n\r\n /**\r\n * Sets the position on the grid for a given task based on start and end date\r\n * @param {} task \r\n * @returns {} \r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' + position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n //taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n\r\n\r\n return taskElement;\r\n };\r\n\r\n /**\r\n * Opens the side panel with the info for the given task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.openTaskPanel = function (task) {\r\n\r\n if (resourcePlanner.newTaskPanel) //if it's open then close it\r\n resourcePlanner.newTaskPanel = false;\r\n $timeout(function () {\r\n resourcePlanner.newTaskPanel = true;\r\n resourcePlanner.task = angular.copy(task);\r\n resourcePlanner.task.StartDate = DateUtilService.getLongWithoutOffset(resourcePlanner.task.StartDate);\r\n resourcePlanner.task.EndDate = DateUtilService.getLongWithoutOffset(resourcePlanner.task.EndDate);\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideInRight');\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.remove('slideInRight');\r\n }, 500);\r\n });\r\n });\r\n\r\n\r\n };\r\n\r\n /**\r\n * When double clicking a task a panel is opened with a detailed view of the task\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.onDoubleClick = function (event, firstTask) {\r\n firstTask = angular.copy(firstTask);\r\n vm.overlap = {};\r\n var tasks = ResourcePlannerService.getOverlapDropdown(event, firstTask, vm.users);\r\n if (tasks.constructor === Array) {\r\n vm.overlap.overlappingTasks = tasks;\r\n vm.overlap.isOpen = true;\r\n } else if (firstTask.Parent && firstTask.Parent.id) {\r\n vm.resourcePlanner.getTaskById(firstTask.Parent.id)\r\n .then(function (result) {\r\n firstTask.ForeignKey = result.ForeignKey;\r\n firstTask.StartDate = result.StartDate;\r\n firstTask.EndDate = result.EndDate;\r\n vm.openTaskPanel(firstTask);\r\n });\r\n\r\n } else\r\n vm.openTaskPanel(firstTask);\r\n };\r\n\r\n vm.onMouseOver = function (event, firstTask) {\r\n vm.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, firstTask, sessionInformationService.getUser());\r\n };\r\n\r\n vm.getOpacityValue = ResourcePlannerService.getOpacityValue;\r\n\r\n /**\r\n * Checks whether the task can be resized to left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Sets up the given task for drag and drop\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.initElement = function (task) {\r\n //$timeout(function () {\r\n var taskElement = setPositionForTask(task);\r\n\r\n if (!task.warningInfo) {\r\n task.warningInfo = '';\r\n }\r\n\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [\r\n interact.createSnapGrid({\r\n x: (hourWidth / 12),\r\n y: ResourcePlannerService.USER_HEIGHT\r\n })\r\n ]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [\r\n interact.createSnapGrid({\r\n x: (hourWidth / 12),\r\n y: ResourcePlannerService.USER_HEIGHT\r\n })\r\n ]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', onEndEvent)\r\n .on('resizestart', onStartEvent)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onEndEvent)\r\n .on('dragstart', onStartEvent);\r\n //});\r\n };\r\n\r\n /**\r\n * Sets up the user dropzone for highlight\r\n * @param {any} target\r\n */\r\n function setUserDropzone(target) {\r\n target.style.backgroundColor = '#F0F0F0';\r\n target.style.border = '2px dashed lightgray';\r\n };\r\n\r\n /**\r\n * Resets the user dropzone and clears the highlight\r\n * @param {any} target\r\n */\r\n function resetUserDropzone(target) {\r\n target.style.backgroundColor = '#fff';\r\n target.style.border = '';\r\n target.style.borderBottom = '1px solid lightgray';\r\n };\r\n\r\n /**\r\n * Function that handles the drop event and saves the task that is dropped \r\n * @param {any} event\r\n */\r\n function onDropInactiveTaskOnGrid(event) {\r\n var userDroppedScope = angular.element(event.target).scope();\r\n //get the participants so that we don't assign an order that he's already assigned to\r\n //vm.resourcePlanner.isUserAlreadyAssigned(ResourcePlannerService.resourcePlannerTaskDragged.ForeignKey, userDroppedScope.user.id).then(function (result) {\r\n // if (result && ResourcePlannerService.resourcePlannerTaskDragged.StartDate && ResourcePlannerService.resourcePlannerTaskDragged.EndDate) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // //reset the ui \r\n // resetUserDropzone(event.target);\r\n // document.body.removeChild(event.relatedTarget);\r\n // return;\r\n // }\r\n\r\n var xCoordinate = event.relatedTarget.getBoundingClientRect().left;//get mouse x coordinate\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n\r\n var hourStart = (xCoordinate - position.left) / hourWidth + vm.startHour;//find the start hour\r\n\r\n hourStart = ResourcePlannerService.pxToHours(hourStart, vm.date);//get the converted hour\r\n var hourEnd = DateUtilService.addHours(angular.copy(hourStart), 1); //set the end hour = start hour + 1 hour\r\n\r\n //prep the inactive task for save\r\n var inactiveTask = ResourcePlannerService.resourcePlannerTaskDragged;\r\n inactiveTask.StartDate = DateUtilService.getLongWithOffset(hourStart);\r\n inactiveTask.EndDate = DateUtilService.getLongWithOffset(hourEnd);\r\n inactiveTask.Active = true;\r\n inactiveTask.User.id = event.target.id.split('user')[1];\r\n inactiveTask.Status = {};\r\n\r\n //reset the ui \r\n resetUserDropzone(event.target);\r\n\r\n //save the task and remove it from the inactive list;\r\n resourcePlanner.updateTaskListWithoutEmail(inactiveTask).then(function () {\r\n vm.getTasks();\r\n document.body.removeChild(event.relatedTarget);\r\n vm.resourcePlanner.removeInactiveTaskByIndex(event.relatedTarget.id.split('inactiveTask')[1]);\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n // });\r\n\r\n };\r\n\r\n /**\r\n * Function that handles the drop for normal resource planner tasks\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var user = angular.element(event.target).scope().user;\r\n var x = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var taskWidth = event.relatedTarget.clientWidth;\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var datesAfterDrop;\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n\r\n // manage task out of boundaries left drag for 24h format\r\n if (resourcePlanner.fullDayFormat) {\r\n\r\n // if the task is dragged left\r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate \r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference;\r\n\r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n }\r\n }\r\n\r\n // manage task dates after drop for not in range tasks\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n //if (task.User.id != user.id) {\r\n // vm.resourcePlanner.isUserAlreadyAssigned(task.ForeignKey, user.id)\r\n // .then(function (result) {\r\n // if (result) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(event.relatedTarget);\r\n // return;\r\n // }\r\n // task.StartDate = datesAfterDrop.StartDate;\r\n // task.EndDate = datesAfterDrop.EndDate;\r\n // task.User.id = event.target.id.split('user')[1];\r\n // saveTask(task);\r\n // });\r\n //} else {\r\n task.StartDate = datesAfterDrop.StartDate;\r\n task.EndDate = datesAfterDrop.EndDate;\r\n task.User.id = event.target.id.split('user')[1];\r\n saveTask(task);\r\n //}\r\n\r\n };\r\n\r\n /**\r\n * Function that handles the drag enter event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDragEnterInactiveTask(event) {\r\n setUserDropzone(event.target);\r\n\r\n //event.relatedTarget.classList.remove('rp-inactive-task');\r\n //event.relatedTarget.classList.add('rp-day-task');\r\n //event.relatedTarget.children[1].style.display = 'block';\r\n //event.relatedTarget.children[0].style.display = 'none';\r\n\r\n //event.relatedTarget.style.minWidth = hourWidth + 'px';\r\n //if (lastInactiveColor == null)\r\n // lastInactiveColor = angular.copy(event.relatedTarget.style.borderLeft);\r\n\r\n //event.relatedTarget.style.backgroundColor = ResourcePlannerService.resourcePlannerTaskDragged.ColorSetting.Name;\r\n //event.relatedTarget.style.borderLeft = '';\r\n //event.relatedTarget.style.top = 'auto';\r\n //event.relatedTarget.style.left = 'auto';\r\n\r\n //if (!dataXSet) {\r\n // event.relatedTarget.setAttribute('data-x', parseInt(event.relatedTarget.getAttribute('data-x')) + 100);\r\n // dataXSet = true;\r\n //}\r\n };\r\n\r\n function onDragLeaveInactiveTask(event) {\r\n resetUserDropzone(event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the drop deactivate event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDropDeactivateInactiveTask(event) {\r\n //event.relatedTarget.classList.add('rp-inactive-task');\r\n //event.relatedTarget.classList.remove('rp-day-task');\r\n\r\n //event.relatedTarget.children[0].style.display = 'block';\r\n //event.relatedTarget.children[1].style.display = 'none';\r\n //event.relatedTarget.style.backgroundColor = '';\r\n //event.relatedTarget.style.minWidth = '';\r\n //if (lastInactiveColor != null)\r\n // event.relatedTarget.style.borderLeft = lastInactiveColor;\r\n //lastInactiveColor = null;\r\n };\r\n\r\n vm.setOpacityLevel = function (task) {\r\n\r\n if (!task || !task.id)\r\n return;\r\n\r\n ResourcePlannerService.setOpacityLevel(task, ResourcePlannerService.getOpacityValue(task));\r\n\r\n };\r\n\r\n /**\r\n * Sets up the task for drag and drop\r\n */\r\n $timeout(function () {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.rp-inactive-task'],\r\n overlap: 0.5,\r\n ondrop: function (event) {\r\n //check if normal task or inactive\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropInactiveTaskOnGrid(event);\r\n else\r\n onDropNormalTaskOnGrid(event);\r\n\r\n },\r\n ondragenter: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragEnterInactiveTask(event);\r\n },\r\n ondragleave: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragLeaveInactiveTask(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropDeactivateInactiveTask(event);\r\n },\r\n ondropactivate: function (event) {\r\n dataXSet = false;\r\n }\r\n\r\n });\r\n\r\n setHourWidth();\r\n setWidthOfElements();\r\n initCurrentDate();\r\n });\r\n\r\n $scope.$watch('vm.date', function () {\r\n if (vm.users) {\r\n setStartAndEndDate();\r\n $timeout(function () {\r\n vm.getTasks().then(function () {\r\n $rootScope.$broadcast(\"onRpDateIntervalUpdated\");\r\n });\r\n });\r\n }\r\n });\r\n\r\n /**\r\n * When the ui finishes rendering calculate the collapsed height of the overlapping tasks\r\n * @param {} task \r\n * @param {} user \r\n * @returns {} \r\n */\r\n vm.finishedRender = function (task, user) {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = vm.users.length - 1; i >= 0; i--) {\r\n if (vm.users[i].Tasks && vm.users[i].Tasks.length > 0) {\r\n lastTask = vm.users[i].Tasks[vm.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var userLooped = vm.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n vm.initElement(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n\r\n $timeout(function () {\r\n if (!user.Collapsed) {\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }\r\n }, 100);\r\n };\r\n\r\n usersList.addEventListener('scroll', scrollTaskList, false);\r\n usersList.addEventListener('mousewheel', scrollTaskList, false);\r\n usersList.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n window.addEventListener('resize', function () {\r\n resourcePlanner.resizeFullDayFormat();\r\n });\r\n\r\n /**\r\n * Handles the scroll wheel event and the ui is zoomed in/out\r\n * @param {any} event\r\n */\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n vm.resourcePlanner.zoomIn();\r\n else\r\n vm.resourcePlanner.zoomOut();\r\n };\r\n \r\n usersTasks.addEventListener('mousewheel', handleScrollWheel, false);\r\n usersTasks.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return vm.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n var onGetTasksForSelectedUsersResolvedSubscription = $scope.$on('onGetTasksForSelectedUsersResolved', function() {\r\n TaskListService.lockNonInteractableTasks(vm.users);\r\n });\r\n\r\n vm.$onDestroy = function () {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n window.removeEventListener('resize', function () { });\r\n interact('.rp-hour-task').unset();\r\n //de-register subscription\r\n onGetTasksForSelectedUsersResolvedSubscription();\r\n };\r\n };\r\n\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerMonthController.$inject = [\r\n '$scope',\r\n 'DateUtilService',\r\n '$timeout',\r\n 'ResourcePlannerService',\r\n '$filter',\r\n 'errorService',\r\n '$interval',\r\n 'sessionInformationService',\r\n 'dialogService',\r\n '$rootScope',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner').directive('resourcePlannerMonth', function () {\r\n return {\r\n restrict: 'E',\r\n bindToController: true,\r\n controller: 'ResourcePlannerMonthController as vm',\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerOverview/resourcePlannerMonth.html',\r\n scope: {\r\n startHour: '=',\r\n endHour: '=',\r\n users: '=',\r\n date: '=',\r\n startDate: '=',\r\n endDate: '=',\r\n getTasks: '&',\r\n resourcePlanner: '='\r\n // Part of 10572 task\r\n //organizationSettings : '='\r\n }\r\n }\r\n });\r\n\r\n angular.module('resourcePlanner').controller('ResourcePlannerMonthController', ResourcePlannerMonthController);\r\n\r\n function ResourcePlannerMonthController(\r\n $scope,\r\n DateUtilService,\r\n $timeout,\r\n ResourcePlannerService,\r\n $filter,\r\n errorService,\r\n $interval,\r\n sessionInformationService,\r\n dialogService,\r\n $rootScope,\r\n TaskListService,\r\n $translate\r\n ) {\r\n \r\n var vm = this;\r\n var dayWidth = null, hourWidth = null, usersList = document.getElementById('rpUsers'), usersTasks = document.getElementById('rp-tasks-month');\r\n var lastX, lastY, lastWidth, dataXSet, lastInactiveColor;\r\n\r\n vm.month = { days: [] };\r\n var currentDatePromise = null;\r\n var currentDateElement = null;\r\n var yesterdayDate = null;\r\n //Part of 10572 task\r\n //vm.nextMonthDate = moment(vm.date).add(1, 'months').toDate();\r\n\r\n vm.getContextMenuForTask = getContextMenuForTask;\r\n\r\n vm.$onInit = function () {\r\n\r\n initDelegateFunctions();\r\n generateMonthDays();\r\n initOverview();\r\n resetScrollToTop();\r\n \r\n };\r\n\r\n function resetScrollToTop() {\r\n usersTasks.scrollTop = usersList.scrollTop = 0;\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Returns the day for which to be deleted from the task\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getDayForDelete = function (event) {\r\n var mouseCoordinates = { x: event.originalEvent.pageX, y: event.originalEvent.pageY };\r\n var gridElement = document.getElementsByClassName('rp-hour-grid')[0];\r\n var gridPosition = gridElement.getBoundingClientRect();\r\n var xStart = mouseCoordinates.x - gridPosition.left;//get x coordinate start on grid\r\n\r\n var dayIndex = parseInt(xStart / dayWidth);\r\n return vm.month.days[dayIndex];\r\n };\r\n\r\n\r\n\r\n /**\r\n * Gets the hour for delete\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getHourForDelete = function (event) {\r\n return vm.resourcePlanner.getDayForDelete(event);\r\n };\r\n\r\n /**\r\n * Collapses the given user\r\n * @param {} user \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n /**\r\n * Sets the grid height\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.setGridHeight = function () {\r\n $timeout(function () {\r\n var grid = document.getElementsByClassName('rp-hour-grid');\r\n if (!grid || grid.length == 0)\r\n return;\r\n grid[0].style.height = (vm.users.length * 60) + 'px';\r\n });\r\n };\r\n\r\n /**\r\n * Zooms in into overview\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.zoomIn = function () {\r\n dayWidth += 1;\r\n setHourWidth();\r\n setWidthOfElements();\r\n render();\r\n\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n /**\r\n * Zooms out of the overview\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.zoomOut = function () {\r\n\r\n //get the overview element so we can calculate the width of the grid\r\n var resourcePlannerOverviewElement = document.getElementsByClassName('rp-overview')[0];\r\n var minWidth = parseInt(resourcePlannerOverviewElement.clientWidth / (vm.endDate.getDate() - vm.startDate.getDate()));\r\n // Part of 10572 task\r\n //var endDate;\r\n\r\n //// if 'Use salary period' setting is set, compute total number of days displayed\r\n //// and use it as the endDate for below computation to be done correctly\r\n //if (isSalarySettingSet())\r\n // endDate = computeEndDate(vm.organizationSettings.SalaryPeriodFrom);\r\n //else\r\n // endDate = vm.endDate.getDate();\r\n\r\n //var minWidth = parseInt(resourcePlannerOverviewElement.clientWidth / (endDate - vm.startDate.getDate()));\r\n\r\n if (dayWidth <= minWidth + 1)\r\n return;\r\n dayWidth -= 1;\r\n setHourWidth();\r\n setWidthOfElements();\r\n render();\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n /**\r\n * Resizes the overview for the 24h format\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.resizeFullDayFormat = function () {\r\n $timeout(function () {\r\n generateMonthDays();//regenerate grid for the new hour format\r\n\r\n dayWidth = parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / (vm.endDate.getDate() - vm.startDate.getDate())) + 1;\r\n setHourWidth();\r\n $timeout(function () {\r\n setWidthOfElements();\r\n });\r\n\r\n setStartAndEndDate();\r\n render();\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n });\r\n };\r\n /**\r\n * Delegate for setting the position for the given task\r\n */\r\n vm.setPositionForTask = setPositionForTask;\r\n vm.render = render;\r\n };\r\n\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (vm.date.getMonth() != currentDate.getMonth() || vm.date.getFullYear() != currentDate.getFullYear()) {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n currentDateElement.style.left = ((ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(vm.startDate)) * hourWidth) + (getDayNumberInGrid(currentDate, true) * dayWidth) + 'px';\r\n\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(vm.startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, 23, 59, 59);\r\n }\r\n\r\n /**\r\n * Sets the current start and end date\r\n */\r\n function setStartAndEndDate() {\r\n \r\n vm.startDate = DateUtilService.setDate(vm.month.days[0], 0, 0, 0);\r\n vm.endDate = DateUtilService.setDate(vm.month.days[vm.month.days.length - 1], 23, 59, 59);\r\n\r\n initYesterdayDate();\r\n };\r\n\r\n //Part of 10572 task\r\n ///**\r\n // * This function prepares the dates that will be displayed in the resource planner based on the salary period\r\n // * @param {number} salaryPeriodFrom\r\n // */\r\n //function processSalaryPeriod(salaryPeriodFrom) {\r\n // vm.month = ResourcePlannerService.processSalaryPeriod(salaryPeriodFrom, vm.date, vm.nextMonthDate);\r\n //}\r\n\r\n /**\r\n * Generates the days withing the current selected month\r\n */\r\n function generateMonthDays() {\r\n\r\n vm.month.days = [];\r\n\r\n //Part of 10572 task\r\n //if (isSalarySettingSet()) {\r\n\r\n // processSalaryPeriod(vm.organizationSettings.SalaryPeriodFrom);\r\n\r\n //} else {\r\n\r\n var numberOfDays = DateUtilService.getNumberOfDaysInMonth(vm.date);\r\n for (var i = 0; i < numberOfDays; i++) {\r\n vm.month.days.push(DateUtilService.getDateInMonth(vm.date.getFullYear(), vm.date.getMonth(), i + 1));\r\n }\r\n\r\n //}\r\n\r\n setStartAndEndDate();\r\n };\r\n\r\n /**\r\n * Sets the width after zoom\r\n * @returns {} \r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var days = document.getElementsByClassName('rp-month-day-container');\r\n for (i = 0; i < days.length; i++)\r\n days[i].style.minWidth = dayWidth + 'px';\r\n\r\n var dayGridLines = document.getElementsByClassName('rp-day-line');\r\n for (i = 0; i < dayGridLines.length; i++)\r\n dayGridLines[i].style.minWidth = dayWidth + 'px';\r\n\r\n usersTasks.style.minWidth = dayWidth * vm.month.days.length + 'px';\r\n };\r\n\r\n /**\r\n * Goes to the next month\r\n * @returns {} \r\n */\r\n vm.lastMonth = function () {\r\n\r\n //set the date to the first of the month so that navigation is not broken if 30 or 31\r\n vm.date = new Date(vm.date.setDate(1));\r\n vm.date = DateUtilService.addMonthsToDate(angular.copy(vm.date), -1);\r\n\r\n //Part of 10572 task\r\n // if 'Use salary period' setting is set, decrement nextMonthDate with 1 month\r\n //if (isSalarySettingSet()) {\r\n // vm.nextMonthDate = DateUtilService.addMonthsToDate(angular.copy(vm.nextMonthDate), -1);\r\n //}\r\n\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * Goes to the previous month\r\n * @returns {} \r\n */\r\n vm.nextMonth = function () {\r\n //set the date to the first of the month so that navigation is not broken if 30 or 31\r\n vm.date = new Date(vm.date.setDate(1));\r\n vm.date = DateUtilService.addMonthsToDate(angular.copy(vm.date), 1);\r\n\r\n //Part of 10572 task\r\n // if 'Use salary period' setting is set, increment nextMonthDate with 1 month\r\n //if (isSalarySettingSet()) {\r\n // vm.nextMonthDate = DateUtilService.addMonthsToDate(angular.copy(vm.nextMonthDate), 1);\r\n //}\r\n\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n function saveTask(task) {\r\n if (task.Table == 'BOT_ORDER') {\r\n if (DateUtilService.getDateWithoutTimezone(task.EndDate) > DateUtilService.getDateWithoutTimezone(task.Order.EndDate))\r\n dialogService.showConfirmDialog('txtConfirm', 'txtEndDateBiggerThanOrderEndDate')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK) {\r\n vm.getTasks();\r\n return;\r\n }\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n });\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n }\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Gets the day from where the user clicked\r\n * @param {any} date\r\n * @param {any} isStart\r\n */\r\n function getDayNumberInGrid(date, isStart) {\r\n for (var i = 0; i < vm.month.days.length; i++) {\r\n var day = vm.month.days[i];\r\n if (day.getFullYear() != date.getFullYear())\r\n continue;\r\n if (day.getMonth() != date.getMonth())\r\n continue;\r\n if (day.getDate() == date.getDate())\r\n return i;\r\n }\r\n if (isStart)\r\n return 0;\r\n return vm.month.days.length - 1;\r\n };\r\n\r\n /**\r\n * Gets the y coordinate\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, vm.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n //Part of 10572 task\r\n ///**\r\n // * Function that checks if 'Use salary period' setting is set\r\n // */\r\n //function isSalarySettingSet() {\r\n // return vm.organizationSettings &&\r\n // vm.organizationSettings.UseSalaryPeriod &&\r\n // vm.organizationSettings.SalaryPeriodFrom &&\r\n // vm.organizationSettings.SalaryPeriodTo;\r\n //}\r\n\r\n ///**\r\n // * Computes the total number of days of salary (days of salary for the current month + days of salary for the next month)\r\n // * The result will be used for width computation of the resource planner days when the 'Use salary period' setting is set\r\n // * @param {Date} salaryPeriodFrom\r\n // */\r\n //function computeEndDate(salaryPeriodFrom) {\r\n\r\n // if (!salaryPeriodFrom)\r\n // return null;\r\n\r\n // var salaryDate = moment(salaryPeriodFrom).toObject().date;\r\n\r\n // var totalDaysOfCurrentMonth = DateUtilService.getNumberOfDaysInMonth(vm.date);\r\n\r\n // // compute the availables days of salary from selected month + the first days of salary for the next month\r\n // return (totalDaysOfCurrentMonth - salaryDate) + salaryDate;\r\n //}\r\n\r\n /**\r\n * Sets the day width\r\n */\r\n function setDayWidth() {\r\n vm.resourcePlanner.dayWidth = dayWidth = dayWidth ? dayWidth : parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / (vm.endDate.getDate() - vm.startDate.getDate())) + 1;\r\n //Part of 10572 task\r\n //var endDate;\r\n\r\n //// if 'Use salary period' setting is set, compute total number of days displayed\r\n //// and use it as the endDate for below computation to be done correctly\r\n //if (isSalarySettingSet())\r\n // endDate = computeEndDate(vm.organizationSettings.SalaryPeriodFrom);\r\n //else \r\n // endDate = vm.endDate.getDate();\r\n \r\n //vm.resourcePlanner.dayWidth = dayWidth = dayWidth ? dayWidth : parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / (endDate - vm.startDate.getDate())) + 1;\r\n };\r\n\r\n /**\r\n * Sets the hour width\r\n */\r\n function setHourWidth() {\r\n hourWidth = dayWidth / 24;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n };\r\n\r\n /**\r\n * Sets the user height\r\n */\r\n function setUserHeight() {\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n };\r\n\r\n /**\r\n * Gets the height of all users\r\n */\r\n function getUsersHeight() {\r\n return vm.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n /**\r\n * Gets the widht of the current month\r\n */\r\n function getMonthWidth() {\r\n return vm.month.days.length * dayWidth;\r\n };\r\n\r\n /**\r\n * Gets the start and end date\r\n * @param {any} x\r\n * @param {any} taskWidth\r\n */\r\n function getStartAndEndDate(x, taskWidth) {\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var startHour = (x - (startDayIndex * dayWidth)) / hourWidth;\r\n\r\n var endDayIndex = parseInt((x + taskWidth) / dayWidth);\r\n\r\n // fix for out of range tasks\r\n\r\n if (startDayIndex <= 0) {\r\n startDayIndex = 0;\r\n }\r\n\r\n if (endDayIndex >= vm.month.days.length) {\r\n endDayIndex = vm.month.days.length - 1;\r\n }\r\n var endHour = startHour + taskWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(startHour, vm.month.days[startDayIndex]));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(endHour, vm.month.days[endDayIndex]));\r\n return { StartDate: startDate, EndDate: endDate };\r\n };\r\n\r\n /**\r\n * Checks whether the task is out of the overview\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n if (currentX < 0 ||\r\n topY > currentY ||\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getMonthWidth())\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Resets the task to its initial position\r\n * @param {any} target\r\n */\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n target.style.webkitTransform = target.style.transform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n };\r\n\r\n /**\r\n * Function that handles the start event\r\n * @param {any} event\r\n */\r\n function startTask(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that handles the resize event\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Handles the drag move event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Handles the end event after drag/resize\r\n * @param {any} event\r\n */\r\n function endTask(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n \r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n\r\n if (event.type == 'dragend')\r\n return;//drag drop will be handled in the user dropzone;\r\n var taskWidth = event.target.clientWidth;\r\n var x = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var task = ResourcePlannerService.getTaskById(event.target.id.split('task')[1], vm.users);\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), vm.startDate))\r\n task.StartDate = dates.StartDate;\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), vm.endDate))\r\n task.EndDate = dates.EndDate;\r\n saveTask(task);\r\n };\r\n\r\n /**\r\n * Gets the position of the given task in the current view\r\n * @param {any} startDate\r\n * @param {any} endDate\r\n * @param {any} task\r\n */\r\n function getPosition(startDate, endDate, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startDate, vm.startDate))//same day, check hour\r\n start = ResourcePlannerService.hoursToPx(vm.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(startDate);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endDate, vm.endDate))//same day, check hours\r\n end = ResourcePlannerService.hoursToPx(vm.endDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(endDate);\r\n\r\n x = ((start - ResourcePlannerService.hoursToPx(vm.startDate)) * hourWidth) + (getDayNumberInGrid(startDate, true) * dayWidth);\r\n width = (end * hourWidth + getDayNumberInGrid(endDate, false) * dayWidth) - (start * hourWidth + getDayNumberInGrid(startDate, true) * dayWidth);\r\n\r\n return { x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10 };\r\n };\r\n\r\n /**\r\n * Sets the position of the given task in the view\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n setUserHeight();\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' + position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n\r\n //taskElement.style.backgroundColor = ResourcePlannerService.getColorBasedOnUser(task.User.id, vm.users);\r\n\r\n return taskElement;\r\n\r\n };\r\n\r\n /**\r\n * Renders the tasks on the current overview;\r\n */\r\n function render() {\r\n if (!vm.users || vm.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var user = vm.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets up the task for drag and drop\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.initElement = function (task) {\r\n //$timeout(function () {\r\n var taskElement = setPositionForTask(task);\r\n\r\n if (!task.warningInfo) {\r\n task.warningInfo = '';\r\n }\r\n\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', endTask)\r\n .on('resizestart', startTask)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', endTask)\r\n .on('dragstart', startTask);\r\n //});\r\n };\r\n\r\n /**\r\n * Gets the task info\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Checks whether the task is private or not\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.isTaskPrivate = function (task) {\r\n return ResourcePlannerService.isTaskPrivateToCurrentUser(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Opens the side panel with the info for the given task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.openTaskPanel = function (task) {\r\n\r\n if (vm.resourcePlanner.newTaskPanel) //if it's open then close it\r\n vm.resourcePlanner.newTaskPanel = false;\r\n $timeout(function () {\r\n vm.resourcePlanner.task = angular.copy(task);\r\n vm.resourcePlanner.task.StartDate = DateUtilService.getLongWithoutOffset(vm.resourcePlanner.task.StartDate);\r\n vm.resourcePlanner.task.EndDate = DateUtilService.getLongWithoutOffset(vm.resourcePlanner.task.EndDate);\r\n\r\n vm.resourcePlanner.newTaskPanel = true;\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideInRight');\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.remove('slideInRight');\r\n }, 500);\r\n });\r\n });\r\n };\r\n\r\n vm.onMouseOver = function (event, task) {\r\n vm.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, task, sessionInformationService.getUser());\r\n };\r\n\r\n vm.getOpacityValue = ResourcePlannerService.getOpacityValue;\r\n\r\n vm.onDoubleClick = function (event, firstTask) {\r\n firstTask = angular.copy(firstTask);\r\n vm.overlap = {};\r\n var tasks = ResourcePlannerService.getOverlapDropdown(event, firstTask, vm.users);\r\n if (tasks.constructor === Array) {\r\n vm.overlap.overlappingTasks = tasks;\r\n vm.overlap.isOpen = true;\r\n } else if (firstTask.Parent && firstTask.Parent.id) {\r\n vm.resourcePlanner.getTaskById(firstTask.Parent.id)\r\n .then(function (result) {\r\n firstTask.ForeignKey = result.ForeignKey;\r\n firstTask.StartDate = result.StartDate;\r\n firstTask.EndDate = result.EndDate;\r\n vm.openTaskPanel(firstTask);\r\n });\r\n } else\r\n vm.openTaskPanel(firstTask);\r\n\r\n };\r\n\r\n /**\r\n * Sets up the user dropzone for highlight\r\n * @param {any} target\r\n */\r\n function setUserDropzone(target) {\r\n target.style.backgroundColor = '#F0F0F0';\r\n target.style.border = '2px dashed lightgray';\r\n };\r\n\r\n /**\r\n * Resets the user dropzone and clears the highlight\r\n * @param {any} target\r\n */\r\n function resetUserDropzone(target) {\r\n target.style.backgroundColor = '#fff';\r\n target.style.border = '';\r\n target.style.borderBottom = '1px solid lightgray';\r\n };\r\n\r\n /**\r\n * Function that handles the drag enter event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDragEnterInactiveTask(event) {\r\n setUserDropzone(event.target);\r\n\r\n //event.relatedTarget.classList.remove('rp-inactive-task');\r\n //event.relatedTarget.classList.add('rp-day-task');\r\n //event.relatedTarget.children[1].style.display = 'block';\r\n //event.relatedTarget.children[0].style.display = 'none';\r\n\r\n //event.relatedTarget.style.minWidth = hourWidth + 'px';\r\n //if (lastInactiveColor == null)\r\n // lastInactiveColor = angular.copy(event.relatedTarget.style.borderLeft);\r\n\r\n //var scope = angular.element(event.relatedTarget).scope();\r\n //event.relatedTarget.style.backgroundColor = scope.inactiveTask.ColorSetting.Name;\r\n //event.relatedTarget.style.borderLeft = '';\r\n //event.relatedTarget.style.top = 'auto';\r\n //event.relatedTarget.style.left = 'auto';\r\n\r\n //if (!dataXSet) {\r\n // event.relatedTarget.setAttribute('data-x', parseInt(event.relatedTarget.getAttribute('data-x')) + 100);\r\n // dataXSet = true;\r\n //}\r\n };\r\n\r\n /**\r\n * Function that handles the drag leave of the inactive task from the current view\r\n * @param {any} event\r\n */\r\n function onDragLeaveInactiveTask(event) {\r\n resetUserDropzone(event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the drop for normal resource planner tasks\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var user = angular.element(event.target).scope().user;\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var x = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var taskWidth = event.relatedTarget.clientWidth;\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var datesAfterDrop;\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n\r\n // if the task is dragged left\r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(vm.startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate \r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference;\r\n\r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, vm.startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n //if (task.User.id != user.id) {\r\n // vm.resourcePlanner.isUserAlreadyAssigned(task.ForeignKey, user.id)\r\n // .then(function (result) {\r\n // if (result) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(event.relatedTarget);\r\n // return;\r\n // }\r\n // task.StartDate = datesAfterDrop.StartDate;\r\n // task.EndDate = datesAfterDrop.EndDate;\r\n // task.User.id = event.target.id.split('user')[1];\r\n // saveTask(task);\r\n // });\r\n //} else {\r\n task.StartDate = datesAfterDrop.StartDate;\r\n task.EndDate = datesAfterDrop.EndDate;\r\n task.User.id = event.target.id.split('user')[1];\r\n saveTask(task);\r\n // }\r\n };\r\n\r\n /**\r\n * Function that handles the drop event and saves the task that is dropped \r\n * @param {any} event\r\n */\r\n function onDropInactiveTaskOnGrid(event) {\r\n var userDroppedScope = angular.element(event.target).scope();\r\n //get the participants so that we don't assign an order that he's already assigned to\r\n //vm.resourcePlanner.isUserAlreadyAssigned(ResourcePlannerService.resourcePlannerTaskDragged.ForeignKey, userDroppedScope.user.id).then(function (result) {\r\n // if (result && ResourcePlannerService.resourcePlannerTaskDragged.StartDate && ResourcePlannerService.resourcePlannerTaskDragged.EndDate) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // //reset the ui \r\n // resetUserDropzone(event.target);\r\n // document.body.removeChild(event.relatedTarget);\r\n // return;\r\n // }\r\n\r\n var xCoordinate = event.interaction.pointers[0].pageX;//get mouse x coordinate\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n var xStart = xCoordinate - position.left;//get x coordinate start on grid\r\n\r\n var dates = getStartAndEndDate(xStart, 8 * hourWidth);//8 h\r\n var inactiveTask = ResourcePlannerService.resourcePlannerTaskDragged;\r\n inactiveTask.StartDate = dates.StartDate;\r\n inactiveTask.EndDate = dates.EndDate;\r\n inactiveTask.Active = true;\r\n inactiveTask.User.id = event.target.id.split('user')[1];\r\n inactiveTask.Status = {};\r\n\r\n //reset the ui \r\n resetUserDropzone(event.target);\r\n\r\n //save the task and remove it from the inactive list;\r\n vm.resourcePlanner.updateTaskListWithoutEmail(inactiveTask).then(function () {\r\n vm.getTasks();\r\n document.body.removeChild(event.relatedTarget);\r\n vm.resourcePlanner.removeInactiveTaskByIndex(event.relatedTarget.id.split('inactiveTask')[1]);\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n // });\r\n };\r\n\r\n /**\r\n * Function that handles the drop deactivate event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDropDeactivateInactiveTask(event) {\r\n //event.relatedTarget.classList.add('rp-inactive-task');\r\n //event.relatedTarget.classList.remove('rp-day-task');\r\n\r\n //event.relatedTarget.children[0].style.display = 'block';\r\n //event.relatedTarget.children[1].style.display = 'none';\r\n //event.relatedTarget.style.backgroundColor = '';\r\n //event.relatedTarget.style.minWidth = '';\r\n //if (lastInactiveColor != null)\r\n // event.relatedTarget.style.borderLeft = lastInactiveColor;\r\n //lastInactiveColor = null;\r\n };\r\n\r\n /**\r\n * Sets up the user dropzone\r\n */\r\n function initUserDropzone() {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.rp-inactive-task'],\r\n overlap: 0.5,\r\n ondragenter: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragEnterInactiveTask(event);\r\n },\r\n ondragleave: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragLeaveInactiveTask(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropDeactivateInactiveTask(event);\r\n },\r\n ondropactivate: function (event) {\r\n dataXSet = false;\r\n },\r\n ondrop: function (event) {\r\n //check if normal task or inactive\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropInactiveTaskOnGrid(event);\r\n else\r\n onDropNormalTaskOnGrid(event);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Sets up the overview\r\n */\r\n function initOverview() {\r\n $timeout(function () {\r\n setDayWidth();\r\n setHourWidth();\r\n setWidthOfElements();\r\n initUserDropzone();\r\n initCurrentDate();\r\n });\r\n };\r\n\r\n\r\n $scope.$watch('vm.date', function () {\r\n //Part of 10572 task\r\n //vm.nextMonthDate = moment(vm.date).add(1, 'months').toDate();\r\n generateMonthDays();\r\n if (!vm.users || vm.users.length == 0)\r\n return;\r\n $timeout(function () {\r\n vm.getTasks()\r\n .then(function () {\r\n $rootScope.$broadcast(\"onRpDateIntervalUpdated\");\r\n });\r\n setWidthOfElements();\r\n });\r\n });\r\n\r\n vm.finishedRender = function (task, user) {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = vm.users.length - 1; i >= 0; i--) {\r\n if (vm.users[i].Tasks && vm.users[i].Tasks.length > 0) {\r\n lastTask = vm.users[i].Tasks[vm.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var userLooped = vm.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n vm.initElement(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n\r\n //if the user is not collapsed recalculate if added/removed tasks\r\n if (!user.Collapsed) {\r\n $timeout(function () {\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 100);\r\n }\r\n };\r\n\r\n /**\r\n * Sets the opacity level for the given task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.setOpacityLevel = function (task) {\r\n\r\n if (!task || !task.id)\r\n return;\r\n\r\n ResourcePlannerService.setOpacityLevel(task, ResourcePlannerService.getOpacityValue(task));\r\n\r\n };\r\n\r\n function scrollTaskList() {\r\n usersTasks.scrollTop = usersList.scrollTop;\r\n };\r\n\r\n window.addEventListener('resize', function () {\r\n vm.resourcePlanner.resizeFullDayFormat();\r\n });\r\n\r\n usersList.addEventListener('scroll', scrollTaskList, false);\r\n usersList.addEventListener('mousewheel', scrollTaskList, false);\r\n usersList.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n vm.resourcePlanner.zoomIn();\r\n else\r\n vm.resourcePlanner.zoomOut();\r\n };\r\n\r\n usersTasks.addEventListener('mousewheel', handleScrollWheel, false);\r\n usersTasks.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // it the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return vm.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n\r\n\r\n var onGetTasksForSelectedUsersResolvedSubscription = $scope.$on('onGetTasksForSelectedUsersResolved', function() {\r\n TaskListService.lockNonInteractableTasks(vm.users);\r\n });\r\n\r\n vm.$onDestroy = function () {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n window.removeEventListener('resize', function () { });\r\n interact('.rp-hour-task').unset();\r\n // de-register subscription\r\n onGetTasksForSelectedUsersResolvedSubscription();\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerWeekController.$inject = [\r\n '$scope',\r\n 'DateUtilService',\r\n '$timeout',\r\n 'ResourcePlannerService',\r\n '$filter',\r\n 'errorService',\r\n '$interval',\r\n 'sessionInformationService',\r\n 'dialogService',\r\n '$rootScope',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner').directive('resourcePlannerWeek', function () {\r\n return {\r\n restrict: 'E',\r\n bindToController: true,\r\n controller: 'ResourcePlannerWeekController as vm',\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerOverview/resourcePlannerWeek.html',\r\n scope: {\r\n startHour: '=',\r\n endHour: '=',\r\n users: '=',\r\n date: '=',\r\n startDate: '=',\r\n endDate: '=',\r\n getTasks: '&',\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n angular.module('resourcePlanner').controller('ResourcePlannerWeekController', ResourcePlannerWeekController);\r\n\r\n function ResourcePlannerWeekController(\r\n $scope,\r\n DateUtilService,\r\n $timeout,\r\n ResourcePlannerService,\r\n $filter,\r\n errorService,\r\n $interval,\r\n sessionInformationService,\r\n dialogService,\r\n $rootScope,\r\n TaskListService,\r\n $translate\r\n ) {\r\n var vm = this;\r\n\r\n var lastX, lastY, lastWidth, hourWidth = null, initialHourWidth = null, dayWidth = null, lastColor = null, lastInactiveColor, dataXSet;\r\n var resourcePlanner = null;\r\n var usersList = document.getElementById('rpUsers');\r\n var usersTasks = document.getElementById('rpUsersTasksw');\r\n var currentDatePromise = null;\r\n var currentDateElement = null;\r\n var yesterdayDate = null;\r\n\r\n vm.getContextMenuForTask = getContextMenuForTask;\r\n\r\n vm.$onInit = function () {\r\n resourcePlanner = vm.resourcePlanner;\r\n initDelegateFunctions();\r\n //reset user list scroll to top\r\n usersTasks.scrollTop = usersList.scrollTop = 0;\r\n generateWeek();\r\n init();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Zooms in into overview\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.zoomIn = function () {\r\n hourWidth += 1;\r\n dayWidth = hourWidth * (vm.endHour - vm.startHour);\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n setWidthOfElements();\r\n render();\r\n };\r\n\r\n /**\r\n * Zooms out of the overview\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.zoomOut = function () {\r\n //get the overview element so we can calculate the width of the grid\r\n var resourcePlannerOverviewElement = document.getElementsByClassName('rp-overview')[0];\r\n var minWidth = resourcePlannerOverviewElement.clientWidth / ((vm.endHour - vm.startHour) * 7);\r\n if (vm.resourcePlanner.fullDayFormat)\r\n minWidth *= 2;\r\n\r\n if (hourWidth <= minWidth + 1)\r\n return;\r\n\r\n hourWidth -= 1;\r\n dayWidth = hourWidth * (vm.endHour - vm.startHour);\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n setWidthOfElements();\r\n render();\r\n };\r\n\r\n /**\r\n * Resizes the overview for the 24h format\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.resizeFullDayFormat = function () {\r\n $timeout(function () {\r\n generateWeek();//regenerate grid for the new hour format\r\n\r\n hourWidth = Math.round(document.getElementsByClassName('rp-overview')[0].clientWidth / ((vm.endHour - vm.startHour) * 7) + 1);\r\n if (vm.resourcePlanner.fullDayFormat)\r\n hourWidth *= 2;\r\n\r\n dayWidth = vm.week[0].hours.length * hourWidth;\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n $timeout(function () {\r\n setWidthOfElements();\r\n });\r\n\r\n setStartAndEndDate();\r\n render();\r\n });\r\n };\r\n\r\n vm.resourcePlanner.showCollapseButton = function (user) {\r\n return ResourcePlannerService.showCollapseButton(user);\r\n };\r\n\r\n /**\r\n * Collapses the given user\r\n * @param {} user \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n /**\r\n * Sets the grid height\r\n * @returns {} \r\n */\r\n vm.resourcePlanner.setGridHeight = function () {\r\n $timeout(function () {\r\n var grid = document.getElementsByClassName('rp-hour-grid')[0];\r\n if (grid)\r\n grid.style.height = vm.users.length * 60 + 'px';\r\n });\r\n };\r\n\r\n /**\r\n * Returns the day for which to be deleted from the task\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getDayForDelete = function (event) {\r\n var mouseCoordinates = { x: event.originalEvent.pageX, y: event.originalEvent.pageY };\r\n var gridElement = document.getElementsByClassName('rp-hour-grid')[0];\r\n var gridPosition = gridElement.getBoundingClientRect();\r\n var xStart = mouseCoordinates.x - gridPosition.left;//get x coordinate start on grid\r\n\r\n var dayIndex = parseInt(xStart / dayWidth);\r\n return vm.week[dayIndex].date;\r\n };\r\n\r\n /**\r\n * Gets the hour for delete\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getHourForDelete = function (event) {\r\n var xCoordinate = event.originalEvent.pageX;//get mouse x coordinate\r\n var position = document.getElementsByClassName('rp-hour-grid')[0].getBoundingClientRect();//get the coordinates for the grid\r\n\r\n var x = (xCoordinate - position.left);\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + vm.startHour;\r\n var startDate = ResourcePlannerService.pxToHours(hourStartResized, vm.week[startDayIndex].date);\r\n return startDate;\r\n };\r\n\r\n vm.setPositionForTask = setPositionForTask;\r\n vm.render = render;\r\n };\r\n\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (currentDate > vm.startDate && currentDate < vm.endDate) {\r\n currentDateElement.style.left = ((ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(vm.startDate)) * hourWidth) + (getDayNumberInGrid(currentDate, true) * dayWidth) + 'px';\r\n } else {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Renders the tasks on the current overview;\r\n */\r\n function render() {\r\n if (!vm.users || vm.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var user = vm.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the width after zoom\r\n * @returns {} \r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-hour-week');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = hourWidth + 'px';\r\n }\r\n\r\n var grids = document.getElementsByClassName('rp-week-hour-line');\r\n for (i = 0; i < grids.length; i++) {\r\n grids[i].style.minWidth = hourWidth + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-week-tasks');\r\n for (i = 0; i < tasks.length; i++)\r\n tasks[i].style.minWidth = dayWidth * 7 + 'px';\r\n };\r\n\r\n /**\r\n * Checks whether the given hour is a working hour\r\n * @param {} hour \r\n * @param {} date \r\n * @returns {} \r\n */\r\n vm.isWorkingHour = function (hour, date) {\r\n return hour.getHours() >= 8 && hour.getHours() <= 16 && vm.resourcePlanner.fullDayFormat && date.getDay() != 0 && date.getDay() != 6;\r\n };\r\n\r\n /**\r\n * Gets the task info\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Checks whether the task is private or not\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.isTaskPrivate = function (task) {\r\n return ResourcePlannerService.isTaskPrivateToCurrentUser(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Gets the y coordinate\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, vm.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(vm.startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, vm.endHour - 1, 59, 59);\r\n };\r\n\r\n /**\r\n * Sets the current start and end date\r\n */\r\n function setStartAndEndDate() {\r\n if (resourcePlanner.fullDayFormat) {\r\n vm.startDate = DateUtilService.setDate(vm.week[0].date, vm.startHour, 0, 0);\r\n vm.endDate = DateUtilService.setDate(vm.week[vm.week.length - 1].date, vm.endHour - 1, 59, 59);\r\n initYesterdayDate();\r\n } else {\r\n vm.startDate = DateUtilService.setDate(vm.week[0].date, vm.startHour, 0, 0);\r\n vm.endDate = DateUtilService.setDate(vm.week[vm.week.length - 1].date, vm.endHour, 0, 0);\r\n }\r\n };\r\n\r\n /**\r\n * Generates the week grid\r\n */\r\n function generateWeek() {\r\n //generate hours\r\n var hours = [], i = 0, hoursGrid = [], day = {};\r\n vm.week = [];\r\n for (i = vm.startHour; i < vm.endHour; i++) {\r\n hours.push(DateUtilService.setDate(angular.copy(vm.date), i, 0, 0));\r\n hoursGrid.push(i);\r\n }\r\n\r\n //generate days\r\n var currentDate = angular.copy(DateUtilService.getMondayOfDate(vm.date));\r\n i = 0;\r\n while (i < 7) {\r\n day = {\r\n hours: hours,\r\n date: currentDate,\r\n grid: hoursGrid\r\n };\r\n vm.week.push(day);\r\n currentDate = DateUtilService.addDaysToDate(angular.copy(currentDate), 1);\r\n i++;\r\n }\r\n setStartAndEndDate();\r\n };\r\n\r\n /**\r\n * Gets the week number of the first week in grid\r\n */\r\n function getStartWeekNumber() {\r\n return DateUtilService.getWeekNumber(vm.startDate);\r\n };\r\n\r\n /**\r\n * Gets the week number of the last week in grid\r\n */\r\n function getEndWeekNumber() {\r\n return DateUtilService.getWeekNumber(vm.endDate);\r\n };\r\n\r\n /**\r\n * Gets the week number interval\r\n * @returns {} \r\n */\r\n vm.getWeekNumber = function () {\r\n return 'Uke: ' + getStartWeekNumber() + ' ' + (getEndWeekNumber() == getStartWeekNumber() ? '' : ' - ' + getEndWeekNumber());\r\n };\r\n\r\n /**\r\n * Goes to next week\r\n * @returns {} \r\n */\r\n vm.nextWeek = function () {\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.endDate), 1);//add one day to end date\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * Goes to previous week\r\n * @returns {} \r\n */\r\n vm.lastWeek = function () {\r\n var i = 0;\r\n while (i < 7) {\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.date), -1);\r\n i++;\r\n }\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * Checks whether date start date is in the current view range\r\n * @param {any} startHour\r\n */\r\n function isStartDateInDayRange(startHour) {\r\n var day = vm.week[getDayNumberInGrid(startHour, true)];\r\n if (startHour.getDate() != day.date.getDate())\r\n return true;\r\n if (startHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n if (startHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the end date is in the current view range\r\n * @param {any} endHour\r\n */\r\n function isEndDateInDayRange(endHour) {\r\n var day = vm.week[getDayNumberInGrid(endHour, true)];\r\n if (endHour.getDate() != day.date.getDate())\r\n return true;\r\n if (endHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n if (endHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Gets the day number for the given date\r\n * @param {any} date\r\n * @param {any} isStart\r\n */\r\n function getDayNumberInGrid(date, isStart) {\r\n for (var i = 0; i < vm.week.length; i++) {\r\n if (vm.week[i].date.getFullYear() != date.getFullYear())\r\n continue;\r\n if (vm.week[i].date.getMonth() != date.getMonth())\r\n continue;\r\n if (vm.week[i].date.getDate() == date.getDate())\r\n return i;\r\n }\r\n if (isStart)\r\n return 0;\r\n else\r\n return vm.week.length - 1;\r\n };\r\n\r\n /**\r\n * Gets the start and end date\r\n * @param {any} x\r\n * @param {any} taskWidth\r\n */\r\n function getStartAndEndDate(x, taskWidth) {\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + vm.startHour;\r\n\r\n var endDayIndex = parseInt((x + taskWidth) / dayWidth);\r\n\r\n // fix for out of range tasks\r\n if (startDayIndex <= 0) {\r\n startDayIndex = 0;\r\n }\r\n\r\n if (endDayIndex >= vm.week.length) {\r\n endDayIndex = vm.week.length - 1;\r\n }\r\n\r\n var hourEndResized = hourStartResized + taskWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStartResized, vm.week[startDayIndex].date));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEndResized, vm.week[endDayIndex].date));\r\n return { StartDate: startDate, EndDate: endDate };\r\n };\r\n\r\n /**\r\n * Saves the given task\r\n * @param {any} task\r\n */\r\n function saveTask(task) {\r\n if (task.Table == 'BOT_ORDER') {\r\n if (DateUtilService.getDateWithoutTimezone(task.EndDate) > DateUtilService.getDateWithoutTimezone(task.Order.EndDate))\r\n dialogService.showConfirmDialog('txtConfirm', 'txtEndDateBiggerThanOrderEndDate')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK) {\r\n vm.getTasks();\r\n return;\r\n }\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n });\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n }\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Opens the side panel with the task info\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.openTaskPanel = function (task) {\r\n if (resourcePlanner.newTaskPanel) //if it's open then close it\r\n resourcePlanner.newTaskPanel = false;\r\n $timeout(function () {\r\n resourcePlanner.task = angular.copy(task);\r\n resourcePlanner.task.StartDate = DateUtilService.getLongWithoutOffset(resourcePlanner.task.StartDate);\r\n resourcePlanner.task.EndDate = DateUtilService.getLongWithoutOffset(resourcePlanner.task.EndDate);\r\n\r\n resourcePlanner.newTaskPanel = true;\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideInRight');\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.remove('slideInRight');\r\n }, 1000);\r\n });\r\n });\r\n };\r\n\r\n vm.onDoubleClick = function (event, firstTask) {\r\n firstTask = angular.copy(firstTask);\r\n vm.overlap = {};\r\n var tasks = ResourcePlannerService.getOverlapDropdown(event, firstTask, vm.users);\r\n if (tasks.constructor === Array) {\r\n vm.overlap.overlappingTasks = tasks;\r\n vm.overlap.isOpen = true;\r\n } else if (firstTask.Parent && firstTask.Parent.id) {\r\n vm.resourcePlanner.getTaskById(firstTask.Parent.id)\r\n .then(function (result) {\r\n firstTask.ForeignKey = result.ForeignKey;\r\n firstTask.StartDate = result.StartDate;\r\n firstTask.EndDate = result.EndDate;\r\n vm.openTaskPanel(firstTask);\r\n });\r\n } else\r\n vm.openTaskPanel(firstTask);\r\n };\r\n\r\n vm.onMouseOver = function (event, firstTask) {\r\n vm.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, firstTask, sessionInformationService.getUser());\r\n };\r\n\r\n vm.getOpacityValue = ResourcePlannerService.getOpacityValue;\r\n\r\n /**\r\n * Gets the position of the given task in the current view\r\n * @param {any} startDate\r\n * @param {any} endDate\r\n * @param {any} task\r\n */\r\n function getPosition(startHour, endHour, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startHour, vm.startDate))//same day, check hours\r\n start = ResourcePlannerService.hoursToPx(vm.startDate);\r\n else if (!isStartDateInDayRange(startHour)) {\r\n if (startHour.getHours() < vm.startDate.getHours())\r\n start = ResourcePlannerService.hoursToPx(vm.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(vm.endDate);\r\n } else\r\n start = ResourcePlannerService.hoursToPx(startHour);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endHour, vm.endDate))//same day, check hours\r\n end = ResourcePlannerService.hoursToPx(vm.endDate);\r\n else if (!isEndDateInDayRange(endHour)) {\r\n if (endHour.getHours() < vm.startDate.getHours())\r\n end = ResourcePlannerService.hoursToPx(vm.startDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(vm.endDate);\r\n } else\r\n end = ResourcePlannerService.hoursToPx(endHour);\r\n\r\n x = ((start - ResourcePlannerService.hoursToPx(vm.startDate)) * hourWidth) + (getDayNumberInGrid(startHour, true) * dayWidth) + getDayNumberInGrid(startHour, true);//where the task begins\r\n // x = hourStartDifference * hourWidth;\r\n width = (end * hourWidth + getDayNumberInGrid(endHour, false) * dayWidth) - (start * hourWidth + getDayNumberInGrid(startHour, true) * dayWidth);\r\n\r\n console.log(hourWidth);\r\n\r\n return {\r\n x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10\r\n };\r\n };\r\n\r\n /**\r\n * Sets the hour width\r\n */\r\n function setHourWidth() {\r\n //get the hour width; if it's not set get from html \r\n hourWidth = hourWidth ? hourWidth : Math.round(document.getElementsByClassName('rp-overview')[0].clientWidth / ((vm.endHour - vm.startHour) * 7) + 1);\r\n if (vm.resourcePlanner.fullDayFormat)\r\n hourWidth *= 2;\r\n initialHourWidth = vm.resourcePlanner.hourWidth = hourWidth;\r\n };\r\n\r\n\r\n /**\r\n * Sets the day width\r\n */\r\n function setDayWidth() {\r\n //get the day width; if it's not set get from html\r\n vm.resourcePlanner.dayWidth = dayWidth = dayWidth ? dayWidth : hourWidth * (vm.endHour - vm.startHour);\r\n };\r\n\r\n /**\r\n * Gets the height of all users\r\n */\r\n function getUsersHeight() {\r\n return vm.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n /**\r\n * Gets the width of the full week\r\n */\r\n function getFullWeekWidth() {\r\n return vm.week.length * dayWidth;\r\n };\r\n\r\n /**\r\n * Sets the position of the given task in the view\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' + position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n //taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n\r\n\r\n return taskElement;\r\n };\r\n\r\n /**\r\n * Resets the task to its initial position\r\n * @param {any} target\r\n */\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n target.style.webkitTransform = target.style.transform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n };\r\n\r\n /**\r\n * Checks whether the task is out of the overview\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n\r\n //get top based on user index\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n\r\n if (currentX < 0 || topY > currentY || //dragging above top or over left\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getFullWeekWidth()) {//dragging over right\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsAtADifferentHourResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that handles the start event\r\n * @param {any} event\r\n */\r\n function startTask(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n\r\n /**\r\n * Handles the end event after drag/resize\r\n * @param {any} event\r\n */\r\n function endTask(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n\r\n if (event.type === 'dragend')\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n var task = angular.element(event.target).scope().$parent.task;\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), vm.startDate))\r\n task.StartDate = dates.StartDate;\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), vm.endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n saveTask(task);\r\n };\r\n\r\n /**\r\n * Function that handles the resize event\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Handles the drag move event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n vm.initElement = function (task) {\r\n var taskElement = setPositionForTask(task);\r\n\r\n if (!task.warningInfo) {\r\n task.warningInfo = '';\r\n }\r\n\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 12), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 12), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', endTask)\r\n .on('resizestart', startTask)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', endTask)\r\n .on('dragstart', startTask);\r\n };\r\n\r\n /**\r\n * Sets up the user dropzone for highlight\r\n * @param {any} target\r\n */\r\n function setUserDropzone(target) {\r\n target.style.backgroundColor = '#F0F0F0';\r\n target.style.border = '2px dashed lightgray';\r\n };\r\n\r\n /**\r\n * Function that handles the drag leave of the inactive task from the current view\r\n * @param {any} event\r\n */\r\n function resetUserDropzone(target) {\r\n target.style.backgroundColor = '#fff';\r\n target.style.border = '';\r\n target.style.borderBottom = '1px solid lightgray';\r\n };\r\n\r\n /**\r\n * Function that handles the drag enter event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDragEnterInactiveTask(event) {\r\n setUserDropzone(event.target);\r\n\r\n //event.relatedTarget.classList.remove('rp-inactive-task');\r\n //event.relatedTarget.classList.add('rp-day-task');\r\n //event.relatedTarget.children[1].style.display = 'block';\r\n //event.relatedTarget.children[0].style.display = 'none';\r\n\r\n //event.relatedTarget.style.minWidth = hourWidth + 'px';\r\n //if (lastInactiveColor == null)\r\n // lastInactiveColor = angular.copy(event.relatedTarget.style.borderLeft);\r\n\r\n //var scope = angular.element(event.relatedTarget).scope();\r\n //event.relatedTarget.style.backgroundColor = scope.inactiveTask.ColorSetting.Name;\r\n //event.relatedTarget.style.borderLeft = '';\r\n //event.relatedTarget.style.top = 'auto';\r\n //event.relatedTarget.style.left = 'auto';\r\n\r\n //if (!dataXSet) {\r\n // event.relatedTarget.setAttribute('data-x', parseInt(event.relatedTarget.getAttribute('data-x')) + 100);\r\n // dataXSet = true;\r\n //}\r\n };\r\n\r\n /**\r\n * Function that handles the drag leave of the inactive task from the current view\r\n * @param {any} event\r\n */\r\n function onDragLeaveInactiveTask(event) {\r\n resetUserDropzone(event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the drop for normal resource planner tasks\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var user = angular.element(event.target).scope().user;\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var start = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.relatedTarget.clientWidth);\r\n var datesAfterDrop;\r\n\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n\r\n // manage task out of boundaries left drag for 24h format\r\n if (resourcePlanner.fullDayFormat) {\r\n\r\n // if the task is dragged left\r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(vm.startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate \r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference;\r\n\r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, vm.startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, vm.endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, vm.startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n //if (task.User.id != user.id) {\r\n // vm.resourcePlanner.isUserAlreadyAssigned(task.ForeignKey, user.id)\r\n // .then(function (result) {\r\n // if (result) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(event.relatedTarget);\r\n // return;\r\n // }\r\n // task.StartDate = datesAfterDrop.StartDate;\r\n // task.EndDate = datesAfterDrop.EndDate;\r\n // task.User.id = user.id;\r\n // saveTask(task);\r\n // });\r\n //} else {\r\n task.StartDate = datesAfterDrop.StartDate;\r\n task.EndDate = datesAfterDrop.EndDate;\r\n task.User.id = user.id;\r\n saveTask(task);\r\n // }\r\n };\r\n\r\n /**\r\n * Function that handles the drop event and saves the task that is dropped \r\n * @param {any} event\r\n */\r\n function onDropInactiveTaskOnGrid(event) {\r\n var userDroppedScope = angular.element(event.target).scope();\r\n //get the participants so that we don't assign an order that he's already assigned to\r\n //vm.resourcePlanner.isUserAlreadyAssigned(ResourcePlannerService.resourcePlannerTaskDragged.ForeignKey, userDroppedScope.user.id).then(function (result) {\r\n // if (result && ResourcePlannerService.resourcePlannerTaskDragged.StartDate && ResourcePlannerService.resourcePlannerTaskDragged.EndDate) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // //reset the ui \r\n // resetUserDropzone(event.target);\r\n // document.body.removeChild(event.relatedTarget);\r\n // return;\r\n // }\r\n\r\n var xCoordinate = event.interaction.pointers[0].pageX;//get mouse x coordinate\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n var xStart = xCoordinate - position.left;//get x coordinate start on grid\r\n\r\n //first get the day index\r\n var startDayIndex = parseInt(xStart / dayWidth);\r\n //get the start hour\r\n var hourStart = (xStart - (startDayIndex * dayWidth)) / hourWidth + vm.startHour;\r\n\r\n //add one hour and get end day index\r\n var endDayIndex = parseInt((xStart + hourWidth) / dayWidth);\r\n //get the end hour\r\n var hourEnd = hourStart + hourWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n\r\n var inactiveTask = ResourcePlannerService.resourcePlannerTaskDragged;\r\n inactiveTask.StartDate = angular.copy(DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStart, vm.week[startDayIndex].date)));\r\n inactiveTask.EndDate = angular.copy(DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEnd, vm.week[endDayIndex].date)));\r\n inactiveTask.Active = true;\r\n inactiveTask.User.id = event.target.id.split('user')[1];\r\n inactiveTask.Status = {};\r\n\r\n //reset the ui \r\n resetUserDropzone(event.target);\r\n\r\n //save the task and remove it from the inactive list;\r\n resourcePlanner.updateTaskListWithoutEmail(inactiveTask).then(function () {\r\n vm.getTasks();\r\n document.body.removeChild(event.relatedTarget);\r\n vm.resourcePlanner.removeInactiveTaskByIndex(event.relatedTarget.id.split('inactiveTask')[1]);\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n // });\r\n };\r\n\r\n /**\r\n * Function that handles the drop deactivate event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDropDeactivateInactiveTask(event) {\r\n //event.relatedTarget.classList.add('rp-inactive-task');\r\n //event.relatedTarget.classList.remove('rp-day-task');\r\n\r\n //event.relatedTarget.children[0].style.display = 'block';\r\n //event.relatedTarget.children[1].style.display = 'none';\r\n //event.relatedTarget.style.backgroundColor = '';\r\n //event.relatedTarget.style.minWidth = '';\r\n //if (lastInactiveColor != null)\r\n // event.relatedTarget.style.borderLeft = lastInactiveColor;\r\n //lastInactiveColor = null;\r\n };\r\n\r\n function init() {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.rp-inactive-task'],\r\n overlap: 0.5,\r\n ondragenter: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragEnterInactiveTask(event);\r\n },\r\n ondragleave: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragLeaveInactiveTask(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropDeactivateInactiveTask(event);\r\n },\r\n ondropactivate: function (event) {\r\n dataXSet = false;\r\n },\r\n ondrop: function (event) {\r\n //check if normal task or inactive\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropInactiveTaskOnGrid(event);\r\n else\r\n onDropNormalTaskOnGrid(event);\r\n }\r\n });\r\n\r\n //wait for digest loop before doing any ui changes\r\n $timeout(function () {\r\n setHourWidth();\r\n setDayWidth();\r\n initCurrentDate();\r\n setWidthOfElements();\r\n });\r\n };\r\n\r\n function scrollTaskList() {\r\n usersTasks.scrollTop = usersList.scrollTop;\r\n };\r\n\r\n usersList.addEventListener('scroll', scrollTaskList, false);\r\n usersList.addEventListener('mousewheel', scrollTaskList, false);\r\n usersList.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n vm.resourcePlanner.zoomIn();\r\n else\r\n vm.resourcePlanner.zoomOut();\r\n };\r\n\r\n usersTasks.addEventListener('mousewheel', handleScrollWheel, false);\r\n usersTasks.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n\r\n //if the date changes, generate the grid\r\n $scope.$watch('vm.date', function () {\r\n generateWeek();\r\n if (vm.users)\r\n $timeout(function () {\r\n vm.getTasks()\r\n .then(function () {\r\n $rootScope.$broadcast(\"onRpDateIntervalUpdated\");\r\n });\r\n setWidthOfElements();\r\n });\r\n });\r\n\r\n vm.finishedRender = function (task, user) {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = vm.users.length - 1; i >= 0; i--) {\r\n if (vm.users[i].Tasks && vm.users[i].Tasks.length > 0) {\r\n lastTask = vm.users[i].Tasks[vm.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var userLooped = vm.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n vm.initElement(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n\r\n if (!user.Collapsed) {\r\n $timeout(function () {\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 100);\r\n }\r\n };\r\n\r\n vm.setOpacityLevel = function (task) {\r\n\r\n if (!task || !task.id)\r\n return;\r\n\r\n ResourcePlannerService.setOpacityLevel(task, ResourcePlannerService.getOpacityValue(task));\r\n\r\n };\r\n\r\n window.addEventListener('resize', function () {\r\n resourcePlanner.resizeFullDayFormat();\r\n });\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return vm.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n var onGetTasksForSelectedUsersResolvedSubscription = $scope.$on('onGetTasksForSelectedUsersResolved', function() {\r\n TaskListService.lockNonInteractableTasks(vm.users);\r\n });\r\n\r\n vm.$onDestroy = function () {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n window.removeEventListener('resize', function () { });\r\n interact('.rp-hour-task').unset();\r\n // de-register subscription\r\n onGetTasksForSelectedUsersResolvedSubscription();\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerWorkingDaysController.$inject = [\r\n '$scope',\r\n 'DateUtilService',\r\n '$timeout',\r\n '$filter',\r\n 'ResourcePlannerService',\r\n 'errorService',\r\n '$interval',\r\n 'sessionInformationService',\r\n 'dialogService',\r\n '$rootScope',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner').directive('resourcePlannerWorkingDays', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ResourcePlannerWorkingDaysController as vm',\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerOverview/resourcePlannerWorkingDays.html',\r\n bindToController: true,\r\n scope: {\r\n startHour: '=',\r\n endHour: '=',\r\n users: '=',\r\n date: '=',\r\n startDate: '=',\r\n endDate: '=',\r\n getTasks: '&',\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n angular.module('resourcePlanner').controller('ResourcePlannerWorkingDaysController', ResourcePlannerWorkingDaysController)\r\n\r\n function ResourcePlannerWorkingDaysController(\r\n $scope,\r\n DateUtilService,\r\n $timeout,\r\n $filter,\r\n ResourcePlannerService,\r\n errorService,\r\n $interval,\r\n sessionInformationService,\r\n dialogService,\r\n $rootScope,\r\n TaskListService,\r\n $translate\r\n ) {\r\n var vm = this, lastX, lastY, lastWidth;\r\n var hourWidth = null, initialHourWidth = null, dayWidth = null, lastColor = null, lastInactiveColor, dataXSet;\r\n var startDate = null, endDate = null;\r\n\r\n var usersList = document.getElementById('rpUsers');\r\n var usersTasks = document.getElementById('rpUsersTasksw');\r\n\r\n var resourcePlanner = null;\r\n var currentDatePromise = null;\r\n var currentDateElement = null;\r\n var yesterdayDate = null;\r\n\r\n vm.getContextMenuForTask = getContextMenuForTask;\r\n\r\n vm.$onInit = function () {\r\n resourcePlanner = vm.resourcePlanner;\r\n resourcePlanner.editMode = false;\r\n resourcePlanner.startedCreating = false;\r\n\r\n initDelegateFunctions();\r\n //reset user list scroll\r\n usersTasks.scrollTop = usersList.scrollTop = 0;\r\n //generate days\r\n generateWorkingDays();\r\n init();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Zooms in into overview\r\n * @returns {} \r\n */\r\n resourcePlanner.zoomIn = function () {\r\n hourWidth += 1;\r\n dayWidth = hourWidth * (vm.endHour - vm.startHour);\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n setWidthOfElements();\r\n render();\r\n };\r\n\r\n /**\r\n * Zooms out of the overview\r\n * @returns {} \r\n */\r\n resourcePlanner.zoomOut = function () {\r\n //get the overview element so we can calculate the width of the grid\r\n var resourcePlannerOverviewElement = document.getElementsByClassName('rp-overview')[0];\r\n var minWidth = resourcePlannerOverviewElement.clientWidth / ((vm.endHour - vm.startHour) * 5);\r\n\r\n if (vm.resourcePlanner.fullDayFormat)\r\n minWidth *= 2;\r\n\r\n if (hourWidth <= parseInt(minWidth) + 1)\r\n return;\r\n\r\n hourWidth -= 1;\r\n dayWidth = hourWidth * (vm.endHour - vm.startHour);\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n setWidthOfElements();\r\n render();\r\n };\r\n\r\n /**\r\n * Resizes the overview for the 24h format\r\n * @returns {} \r\n */\r\n resourcePlanner.resizeFullDayFormat = function () {\r\n $timeout(function () {\r\n generateWorkingDays(); //regenerate grid for the new hour format\r\n\r\n hourWidth = parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / ((vm.endHour - vm.startHour) * 5)) + 1;\r\n\r\n if (vm.resourcePlanner.fullDayFormat)\r\n hourWidth *= 2;\r\n\r\n dayWidth = vm.workingDays[0].hours.length * hourWidth;\r\n vm.resourcePlanner.dayWidth = dayWidth;\r\n vm.resourcePlanner.hourWidth = hourWidth;\r\n\r\n $timeout(function () {\r\n setWidthOfElements();\r\n });\r\n\r\n setStartAndEndDate();\r\n render();\r\n });\r\n };\r\n\r\n resourcePlanner.showCollapseButton = function (user) {\r\n return ResourcePlannerService.showCollapseButton(user);\r\n };\r\n\r\n /**\r\n * Collapses the given user\r\n * @param {} user \r\n * @returns {} \r\n */\r\n resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n /**\r\n * Sets the grid height\r\n * @returns {} \r\n */\r\n resourcePlanner.setGridHeight = function () {\r\n $timeout(function () {\r\n var grid = document.getElementsByClassName('rp-hour-grid')[0];\r\n if (grid)\r\n grid.style.height = vm.users.length * 60 + 'px';\r\n });\r\n };\r\n\r\n /**\r\n * Returns the day for which to be deleted from the task\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getDayForDelete = function (event) {\r\n var mouseCoordinates = { x: event.originalEvent.pageX, y: event.originalEvent.pageY };\r\n var gridElement = document.getElementsByClassName('rp-hour-grid')[0];\r\n var gridPosition = gridElement.getBoundingClientRect();\r\n var xStart = mouseCoordinates.x - gridPosition.left;//get x coordinate start on grid\r\n\r\n var dayIndex = parseInt(xStart / dayWidth);\r\n return vm.workingDays[dayIndex].date;\r\n };\r\n\r\n /**\r\n * Gets the hour for delete\r\n * @param {} event \r\n * @returns {} \r\n */\r\n vm.resourcePlanner.getHourForDelete = function (event) {\r\n var xCoordinate = event.originalEvent.pageX;//get mouse x coordinate\r\n var position = document.getElementsByClassName('rp-hour-grid')[0].getBoundingClientRect();//get the coordinates for the grid\r\n\r\n var x = (xCoordinate - position.left);\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + vm.startHour;\r\n var startDate = ResourcePlannerService.pxToHours(hourStartResized, vm.workingDays[startDayIndex].date);\r\n return startDate;\r\n };\r\n\r\n vm.setPositionForTask = setPositionForTask;\r\n vm.render = render;\r\n };\r\n\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (currentDate > vm.startDate && currentDate < vm.endDate)\r\n currentDateElement.style.left = ((ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(startDate)) * hourWidth) + (getDayNumberInGrid(currentDate, true) * dayWidth) + 'px';\r\n else {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Renders the tasks on the current overview;\r\n */\r\n function render() {\r\n if (!vm.users || vm.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var user = vm.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the width after zoom\r\n * @returns {} \r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-hour-working-day');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = hourWidth + 'px';\r\n }\r\n\r\n var grids = document.getElementsByClassName('rp-working-day-hour-line');\r\n for (i = 0; i < grids.length; i++) {\r\n grids[i].style.minWidth = hourWidth + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-working-days-tasks');\r\n for (i = 0; i < tasks.length; i++)\r\n tasks[i].style.minWidth = dayWidth * 5 + 'px';\r\n };\r\n\r\n /**\r\n * Gets the y coordinate\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, vm.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, vm.endHour - 1, 59, 59);\r\n };\r\n\r\n /**\r\n * Sets the current start and end date\r\n */\r\n function setStartAndEndDate() {\r\n if (resourcePlanner.fullDayFormat) {\r\n startDate = vm.startDate = DateUtilService.setDate(vm.workingDays[0].date, vm.startHour, 0, 0);\r\n endDate = vm.endDate = DateUtilService.setDate(vm.workingDays[vm.workingDays.length - 1].date, vm.endHour - 1, 59, 59);\r\n initYesterdayDate();\r\n } else {\r\n startDate = vm.startDate = DateUtilService.setDate(vm.workingDays[0].date, vm.startHour, 0, 0);\r\n endDate = vm.endDate = DateUtilService.setDate(vm.workingDays[vm.workingDays.length - 1].date, vm.endHour, 0, 0);\r\n }\r\n };\r\n\r\n /**\r\n * Generates the working days for the overview\r\n */\r\n function generateWorkingDays() {\r\n //generate hours\r\n var hours = [], i = 0, hoursGrid = [];\r\n vm.workingDays = [];\r\n for (i = vm.startHour; i < vm.endHour; i++) {\r\n hours.push(DateUtilService.setDate(vm.date, i, 0, 0));\r\n hoursGrid.push(i);\r\n }\r\n\r\n var currentDate = angular.copy(DateUtilService.getMondayOfDate(vm.date));\r\n i = 0;\r\n while (i < 5) {\r\n if (DateUtilService.isSundayOrSaturday(currentDate))\r\n currentDate = DateUtilService.addDaysToDate(angular.copy(currentDate), 1);\r\n else {\r\n vm.workingDays.push({ hours: hours, date: currentDate, grid: hoursGrid });\r\n currentDate = DateUtilService.addDaysToDate(angular.copy(currentDate), 1);\r\n i++;\r\n }\r\n }\r\n setStartAndEndDate();\r\n };\r\n\r\n /**\r\n * Checks whether the given hour is a working hour\r\n * @param {} hour \r\n * @returns {} \r\n */\r\n vm.isWorkingHour = function (hour) {\r\n return hour.getHours() >= 8 && hour.getHours() <= 16 && vm.resourcePlanner.fullDayFormat;\r\n };\r\n\r\n /**\r\n * Gets the task info\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Checks whether the task is private or not\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.isTaskPrivate = function (task) {\r\n return ResourcePlannerService.isTaskPrivateToCurrentUser(task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Gets the week number of the first week in grid\r\n */\r\n function getStartWeekNumber() {\r\n return DateUtilService.getWeekNumber(vm.startDate);\r\n };\r\n\r\n /**\r\n * Gets the week number of the last week in grid\r\n */\r\n function getEndWeekNumber() {\r\n return DateUtilService.getWeekNumber(vm.endDate);\r\n };\r\n\r\n /**\r\n * Gets the week number interval\r\n * @returns {} \r\n */\r\n vm.getWeekNumber = function () {\r\n return 'Uke: ' + getStartWeekNumber() + ' ' + (getEndWeekNumber() == getStartWeekNumber() ? '' : ' - ' + getEndWeekNumber());\r\n };\r\n\r\n /**\r\n * Goes to next week\r\n * @returns {} \r\n */\r\n vm.nextWeek = function () {\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(endDate), 1);//add one day to end date\r\n while (true) {\r\n if (DateUtilService.isSundayOrSaturday(vm.date))//check if weekend\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.date), 1);//if so add another day and check again\r\n else\r\n break;\r\n }\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * Goes to previous week\r\n * @returns {} \r\n */\r\n vm.lastWeek = function () {\r\n var i = 0;\r\n while (i < 6) {\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.date), -1);\r\n if (DateUtilService.isSundayOrSaturday(vm.date))\r\n vm.date = DateUtilService.addDaysToDate(angular.copy(vm.date), -1);\r\n i++;\r\n }\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n };\r\n\r\n /**\r\n * Checks whether date start date is in the current view range\r\n * @param {any} startHour\r\n */\r\n function isStartDateInDayRange(startHour) {\r\n var day = vm.workingDays[getDayNumberInGrid(startHour, true)];\r\n if (startHour.getYear() != day.date.getYear() || startHour.getMonth() != day.date.getMonth() || startHour.getDate() != day.date.getDate())\r\n return true;\r\n if (startHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n if (startHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the end date is in the current view range\r\n * @param {any} endHour\r\n */\r\n function isEndDateInDayRange(endHour) {\r\n var day = vm.workingDays[getDayNumberInGrid(endHour, true)];\r\n if (endHour.getYear() != day.date.getYear() || endHour.getMonth() != day.date.getMonth() || endHour.getDate() != day.date.getDate())\r\n return true;\r\n if (endHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n if (endHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Gets the day number for the given date\r\n * @param {any} date\r\n * @param {any} isStart\r\n */\r\n function getDayNumberInGrid(date, isStart) {\r\n for (var i = 0; i < vm.workingDays.length; i++) {\r\n if (vm.workingDays[i].date.getYear() != date.getYear())\r\n continue;\r\n if (vm.workingDays[i].date.getMonth() != date.getMonth())\r\n continue;\r\n if (vm.workingDays[i].date.getDate() == date.getDate())\r\n return i;\r\n }\r\n if (isStart)\r\n return 0;\r\n else\r\n return vm.workingDays.length - 1;\r\n };\r\n\r\n /**\r\n * Gets the start and end date\r\n * @param {any} x\r\n * @param {any} taskWidth\r\n */\r\n function getStartAndEndDate(x, taskWidth) {\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + vm.startHour;\r\n\r\n var endDayIndex = parseInt((x + taskWidth) / dayWidth);\r\n\r\n // for out of range tasks\r\n\r\n if (startDayIndex <= 0) {\r\n startDayIndex = 0;\r\n }\r\n\r\n if (endDayIndex >= vm.workingDays.length) {\r\n endDayIndex = vm.workingDays.length - 1;\r\n }\r\n\r\n console.log(endDayIndex);\r\n var hourEndResized = hourStartResized + taskWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStartResized, vm.workingDays[startDayIndex].date));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEndResized, vm.workingDays[endDayIndex].date));\r\n return { StartDate: startDate, EndDate: endDate };\r\n };\r\n\r\n /**\r\n * Saves the given task\r\n * @param {any} task\r\n */\r\n function saveTask(task) {\r\n if (task.Table == 'BOT_ORDER') {\r\n if (DateUtilService.getDateWithoutTimezone(task.EndDate) > DateUtilService.getDateWithoutTimezone(task.Order.EndDate))\r\n dialogService.showConfirmDialog('txtConfirm', 'txtEndDateBiggerThanOrderEndDate')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK) {\r\n vm.getTasks();\r\n return;\r\n }\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n });\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n }\r\n else\r\n vm.resourcePlanner.updateTaskListWithoutEmail(task).then(function () {\r\n vm.getTasks();\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n /**\r\n * Opens the side panel with the task info\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.openTaskPanel = function (task) {\r\n if (resourcePlanner.newTaskPanel) //if it's open then close it\r\n resourcePlanner.newTaskPanel = false;\r\n $timeout(function () {\r\n resourcePlanner.task = angular.copy(task);\r\n resourcePlanner.task.StartDate = DateUtilService.getLongWithoutOffset(resourcePlanner.task.StartDate);\r\n resourcePlanner.task.EndDate = DateUtilService.getLongWithoutOffset(resourcePlanner.task.EndDate);\r\n\r\n resourcePlanner.newTaskPanel = true;\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideInRight');\r\n $timeout(function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.remove('slideInRight');\r\n }, 1000);\r\n });\r\n });\r\n };\r\n\r\n vm.onDoubleClick = function (event, firstTask) {\r\n firstTask = angular.copy(firstTask);\r\n vm.overlap = {};\r\n var tasks = ResourcePlannerService.getOverlapDropdown(event, firstTask, vm.users);\r\n if (tasks.constructor === Array) {\r\n vm.overlap.overlappingTasks = tasks;\r\n vm.overlap.isOpen = true;\r\n } else if (firstTask.Parent && firstTask.Parent.id) {\r\n vm.resourcePlanner.getTaskById(firstTask.Parent.id)\r\n .then(function (result) {\r\n firstTask.ForeignKey = result.ForeignKey;\r\n firstTask.StartDate = result.StartDate;\r\n firstTask.EndDate = result.EndDate;\r\n vm.openTaskPanel(firstTask);\r\n });\r\n } else\r\n vm.openTaskPanel(firstTask);\r\n };\r\n\r\n vm.onMouseOver = function (event, firstTask) {\r\n vm.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, firstTask, sessionInformationService.getUser());\r\n };\r\n\r\n vm.getOpacityValue = ResourcePlannerService.getOpacityValue;\r\n\r\n /**\r\n * Gets the position of the given task in the current view\r\n * @param {any} startDate\r\n * @param {any} endDate\r\n * @param {any} task\r\n */\r\n function getPosition(startHour, endHour, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startHour, startDate)) //same day, check hours\r\n start = ResourcePlannerService.hoursToPx(startDate);\r\n else if (!isStartDateInDayRange(startHour)) {\r\n if (startHour.getHours() < vm.startDate.getHours())\r\n start = ResourcePlannerService.hoursToPx(vm.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(vm.endDate);\r\n } else\r\n start = ResourcePlannerService.hoursToPx(startHour);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endHour, endDate)) //same day, check hours\r\n end = ResourcePlannerService.hoursToPx(endDate);\r\n else if (!isEndDateInDayRange(endHour)) {\r\n if (endHour.getHours() < vm.startDate.getHours())\r\n end = ResourcePlannerService.hoursToPx(vm.startDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(vm.endDate);\r\n } else\r\n end = ResourcePlannerService.hoursToPx(endHour);\r\n\r\n\r\n x = ((start - ResourcePlannerService.hoursToPx(startDate)) * hourWidth) + (getDayNumberInGrid(startHour, true) * dayWidth) + getDayNumberInGrid(startHour, true);//where the task begins\r\n width = (end * hourWidth + getDayNumberInGrid(endHour, false) * dayWidth) - (start * hourWidth + getDayNumberInGrid(startHour, true) * dayWidth);\r\n\r\n\r\n return { x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10 };\r\n };\r\n\r\n /**\r\n * Sets the hour width\r\n */\r\n function setHourWidth() {\r\n //get the hour width; if it's not set get from html \r\n hourWidth = hourWidth ? hourWidth : parseInt(document.getElementsByClassName('rp-overview')[0].clientWidth / ((vm.endHour - vm.startHour) * 5)) + 1;\r\n\r\n if (vm.resourcePlanner.fullDayFormat)\r\n hourWidth *= 2;\r\n\r\n initialHourWidth = vm.resourcePlanner.hourWidth = hourWidth;\r\n };\r\n\r\n /**\r\n * Sets the day width\r\n */\r\n function setDayWidth() {\r\n //get the day width; if it's not set get from html\r\n vm.resourcePlanner.dayWidth = dayWidth = dayWidth ? dayWidth : hourWidth * (vm.endHour - vm.startHour);\r\n };\r\n\r\n /**\r\n * Sets the position of the given task in the view\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' + position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n //taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n\r\n\r\n return taskElement;\r\n };\r\n\r\n /**\r\n * Gets the height of all users\r\n */\r\n function getUsersHeight() {\r\n return vm.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n /**\r\n * Gets the full width of the current week\r\n */\r\n function getFullWorkingDaysWidth() {\r\n //return (endDate.getHours() - startDate.getHours()) * dayWidth;\r\n return vm.workingDays.length * dayWidth;\r\n };\r\n\r\n /**\r\n * Resets the task to its initial position\r\n * @param {any} target\r\n */\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n };\r\n\r\n /**\r\n * Checks whether the task is out of the overview\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n\r\n //get top based on user index\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n\r\n if (currentX < 0 || topY > currentY || //dragging above top or over left\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getFullWorkingDaysWidth()) {//dragging over right\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsAtADifferentHourResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the task can be resized\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n \r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Function that handles the start event of drag or resize\r\n * @param {any} event\r\n */\r\n function onStartEvent(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n\r\n /**\r\n * Function that handles the end event of drag or resize\r\n * @param {any} event\r\n */\r\n function onEndEvent(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n if (event.type === 'dragend')\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n var task = angular.element(event.target).scope().$parent.task;\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), startDate))\r\n task.StartDate = dates.StartDate;\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n saveTask(task);\r\n };\r\n\r\n /**\r\n * Function that handles the resize event\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that handles the drag event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Sets up the task for drag and drop\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.initElement = function (task) {\r\n var taskElement = setPositionForTask(task);\r\n\r\n if (!task.warningInfo) {\r\n task.warningInfo = '';\r\n }\r\n \r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 12), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 12), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', onEndEvent)\r\n .on('resizestart', onStartEvent)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onEndEvent)\r\n .on('dragstart', onStartEvent);\r\n };\r\n\r\n /**\r\n * Sets the up the user dropzone\r\n * @param {any} target\r\n */\r\n function setUserDropzone(target) {\r\n target.style.backgroundColor = '#F0F0F0';\r\n target.style.border = '2px dashed lightgray';\r\n };\r\n\r\n /**\r\n * Resets the user dropzone\r\n * @param {any} target\r\n */\r\n function resetUserDropzone(target) {\r\n target.style.backgroundColor = '#fff';\r\n target.style.border = '';\r\n target.style.borderBottom = '1px solid lightgray';\r\n };\r\n\r\n /**\r\n * Function that handles the drag enter event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDragEnterInactiveTask(event) {\r\n setUserDropzone(event.target);\r\n\r\n //event.relatedTarget.classList.remove('rp-inactive-task');\r\n //event.relatedTarget.classList.add('rp-day-task');\r\n //event.relatedTarget.children[1].style.display = 'block';\r\n //event.relatedTarget.children[0].style.display = 'none';\r\n\r\n //event.relatedTarget.style.minWidth = hourWidth + 'px';\r\n //if (lastInactiveColor == null)\r\n // lastInactiveColor = angular.copy(event.relatedTarget.style.borderLeft);\r\n\r\n //var scope = angular.element(event.relatedTarget).scope();\r\n //event.relatedTarget.style.backgroundColor = scope.inactiveTask.ColorSetting.Name;\r\n //event.relatedTarget.style.borderLeft = '';\r\n //event.relatedTarget.style.top = 'auto';\r\n //event.relatedTarget.style.left = 'auto';\r\n\r\n //if (!dataXSet) {\r\n // event.relatedTarget.setAttribute('data-x', parseInt(event.relatedTarget.getAttribute('data-x')) + 100);\r\n // dataXSet = true;\r\n //}\r\n };\r\n\r\n /**\r\n * Function that handles the drag leave of the inactive task from the current view\r\n * @param {any} event\r\n */\r\n function onDragLeaveInactiveTask(event) {\r\n resetUserDropzone(event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the drop for normal resource planner tasks\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var user = angular.element(event.target).scope().user;\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var start = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.relatedTarget.clientWidth);\r\n var datesAfterDrop;\r\n\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n\r\n // manage task out of boundaries left drag for 24h format\r\n if (resourcePlanner.fullDayFormat) {\r\n\r\n // if the task is dragged left\r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate \r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference;\r\n\r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // manage task dates after drop for not in range tasks\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n //if (task.User.id != user.id) {\r\n // vm.resourcePlanner.isUserAlreadyAssigned(task.ForeignKey, user.id)\r\n // .then(function (result) {\r\n // if (result) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(event.relatedTarget);\r\n // return;\r\n // }\r\n // task.StartDate = datesAfterDrop.StartDate;\r\n // task.EndDate = datesAfterDrop.EndDate;\r\n // task.User.id = user.id;\r\n // saveTask(task);\r\n // });\r\n //} else {\r\n task.StartDate = datesAfterDrop.StartDate;\r\n task.EndDate = datesAfterDrop.EndDate;\r\n task.User.id = user.id;\r\n saveTask(task);\r\n // }\r\n };\r\n\r\n /**\r\n * Function that handles the drop event and saves the task that is dropped \r\n * @param {any} event\r\n */\r\n function onDropInactiveTaskOnGrid(event) {\r\n var userDroppedScope = angular.element(event.target).scope();\r\n //get the participants so that we don't assign an order that he's already assigned to\r\n //vm.resourcePlanner.isUserAlreadyAssigned(ResourcePlannerService.resourcePlannerTaskDragged.ForeignKey, userDroppedScope.user.id).then(function (result) {\r\n // if (result && ResourcePlannerService.resourcePlannerTaskDragged.StartDate && ResourcePlannerService.resourcePlannerTaskDragged.EndDate) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // //reset the ui \r\n // resetUserDropzone(event.target);\r\n // document.body.removeChild(event.relatedTarget);\r\n // return;\r\n // }\r\n\r\n var xCoordinate = event.interaction.pointers[0].pageX;//get mouse x coordinate\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n var xStart = xCoordinate - position.left;//get x coordinate start on grid\r\n\r\n //first get the day index\r\n var startDayIndex = parseInt(xStart / dayWidth);\r\n //get the start hour\r\n var hourStart = (xStart - (startDayIndex * dayWidth)) / hourWidth + vm.startHour;\r\n\r\n //add one hour and get end day index\r\n var endDayIndex = parseInt((xStart + hourWidth) / dayWidth);\r\n //get the end hour\r\n var hourEnd = hourStart + hourWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n\r\n var inactiveTask = ResourcePlannerService.resourcePlannerTaskDragged;\r\n inactiveTask.StartDate = angular.copy(DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStart, vm.workingDays[startDayIndex].date)));\r\n inactiveTask.EndDate = angular.copy(DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEnd, vm.workingDays[endDayIndex].date)));\r\n inactiveTask.Active = true;\r\n inactiveTask.User.id = event.target.id.split('user')[1];\r\n inactiveTask.Status = {};\r\n\r\n //reset the ui \r\n resetUserDropzone(event.target);\r\n\r\n //save the task and remove it from the inactive list;\r\n resourcePlanner.updateTaskListWithoutEmail(inactiveTask).then(function () {\r\n vm.getTasks();\r\n document.body.removeChild(event.relatedTarget);\r\n resourcePlanner.removeInactiveTaskByIndex(event.relatedTarget.id.split('inactiveTask')[1]);\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n // });\r\n };\r\n\r\n /**\r\n * Function that handles the drop deactivate event for inactive tasks\r\n * @param {any} event\r\n */\r\n function onDropDeactivateInactiveTask(event) {\r\n //event.relatedTarget.classList.add('rp-inactive-task');\r\n //event.relatedTarget.classList.remove('rp-day-task');\r\n\r\n //event.relatedTarget.children[0].style.display = 'block';\r\n //event.relatedTarget.children[1].style.display = 'none';\r\n //event.relatedTarget.style.backgroundColor = '';\r\n //event.relatedTarget.style.minWidth = '';\r\n //if (lastInactiveColor != null)\r\n // event.relatedTarget.style.borderLeft = lastInactiveColor;\r\n //lastInactiveColor = null;\r\n };\r\n\r\n function init() {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.rp-inactive-task'],\r\n overlap: 0.5,\r\n ondragenter: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragEnterInactiveTask(event);\r\n },\r\n ondragleave: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDragLeaveInactiveTask(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropDeactivateInactiveTask(event);\r\n },\r\n ondropactivate: function () {\r\n dataXSet = false;\r\n },\r\n ondrop: function (event) {\r\n //check if normal task or inactive\r\n //if (event.draggable._element.id.indexOf('inactiveTask') > -1)\r\n if (event.relatedTarget.id.indexOf('inactiveTask') > -1)\r\n onDropInactiveTaskOnGrid(event);\r\n else\r\n onDropNormalTaskOnGrid(event);\r\n }\r\n });\r\n //wait for the digest loop before doing any ui changes\r\n $timeout(function () {\r\n setHourWidth();\r\n setDayWidth();\r\n initCurrentDate();\r\n setWidthOfElements();\r\n });\r\n };\r\n\r\n /**\r\n * @deprecated \r\n * @param {} $event \r\n * @returns {} \r\n */\r\n vm.createTask = function ($event) {\r\n if (!resourcePlanner.editMode || !resourcePlanner.startedCreating)\r\n return;\r\n\r\n //get the clicked hour\r\n var clickedHour = vm.resourcePlanner.getHourForDelete($event);\r\n //set the minutes to 00\r\n clickedHour = DateUtilService.setDate(clickedHour, clickedHour.getHours(), 0, 0);\r\n\r\n var startHour = angular.copy(clickedHour),\r\n endHour = DateUtilService.setDate(clickedHour, clickedHour.getHours() + 1, 0, 0),\r\n user = angular.element(ResourcePlannerService.getUserElementsFromCoordinates($event.originalEvent.pageX, $event.originalEvent.pageY)[0]).scope().user;\r\n if (!vm.newTask) {\r\n vm.newTask = {\r\n id: Math.random() * 10 - 100,\r\n StartDate: DateUtilService.getLongWithOffset(startHour),\r\n EndDate: DateUtilService.getLongWithOffset(endHour),\r\n User: {\r\n id: user.id\r\n },\r\n isDummy: true\r\n };\r\n user.Tasks.push(vm.newTask);\r\n } else {\r\n //vm.newTask.StartDate = DateUtilService.getLongWithOffset(startHour);\r\n vm.newTask.EndDate = DateUtilService.getLongWithOffset(endHour);\r\n }\r\n\r\n $timeout(function () {\r\n vm.initElement(vm.newTask);\r\n });\r\n console.log([startHour, endHour, user]);\r\n };\r\n\r\n vm.newTask = null;\r\n\r\n /**\r\n * @deprecated \r\n * @param {} $event \r\n * @param {} cameFromTask \r\n * @returns {} \r\n */\r\n vm.onGridClick = function ($event, cameFromTask) {\r\n return;\r\n //if (!resourcePlanner.editMode)\r\n // return;\r\n\r\n //if (!cameFromTask) {\r\n // resourcePlanner.startedCreating = !resourcePlanner.startedCreating;\r\n\r\n // vm.createTask($event);\r\n //}\r\n\r\n //if (cameFromTask && resourcePlanner.startedCreating)\r\n // resourcePlanner.startedCreating = false;\r\n\r\n //if (!resourcePlanner.startedCreating)\r\n // resourcePlanner.editMode = false;\r\n\r\n };\r\n\r\n function scrollTaskList() {\r\n usersTasks.scrollTop = usersList.scrollTop;\r\n };\r\n\r\n usersList.addEventListener('scroll', scrollTaskList, false);\r\n usersList.addEventListener('mousewheel', scrollTaskList, false);\r\n usersList.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n vm.resourcePlanner.zoomIn();\r\n else\r\n vm.resourcePlanner.zoomOut();\r\n };\r\n\r\n usersTasks.addEventListener('mousewheel', handleScrollWheel, false);\r\n usersTasks.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n\r\n $scope.$watch('vm.date', function () {\r\n generateWorkingDays();\r\n if (vm.users)\r\n $timeout(function () {\r\n vm.getTasks()\r\n .then(function () {\r\n $rootScope.$broadcast(\"onRpDateIntervalUpdated\");\r\n });\r\n setWidthOfElements();\r\n });\r\n });\r\n\r\n vm.finishedRender = function (task, user) {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = vm.users.length - 1; i >= 0; i--) {\r\n if (vm.users[i].Tasks && vm.users[i].Tasks.length > 0) {\r\n lastTask = vm.users[i].Tasks[vm.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < vm.users.length; i++) {\r\n var userLooped = vm.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++) {\r\n vm.initElement(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!user.Collapsed) {\r\n $timeout(function () {\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 100);\r\n }\r\n };\r\n\r\n vm.setOpacityLevel = function (task) {\r\n\r\n if (!task || !task.id)\r\n return;\r\n\r\n ResourcePlannerService.setOpacityLevel(task, ResourcePlannerService.getOpacityValue(task));\r\n\r\n };\r\n\r\n window.addEventListener('resize', function () {\r\n resourcePlanner.resizeFullDayFormat();\r\n });\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return vm.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n var onGetTasksForSelectedUsersResolvedSubscription = $scope.$on('onGetTasksForSelectedUsersResolved',\r\n function() {\r\n TaskListService.lockNonInteractableTasks(vm.users);\r\n });\r\n\r\n vm.$onDestroy = function () {\r\n ResourcePlannerService.resetCollapsedUsersHeight(vm.users);\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n window.removeEventListener('resize', function () { });\r\n interact('.rp-hour-task').unset();\r\n // de-register subscription\r\n onGetTasksForSelectedUsersResolvedSubscription();\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerInactiveTasksController.$inject = [\r\n '$timeout',\r\n 'DateUtilService',\r\n 'ResourcePlannerService',\r\n '$filter',\r\n '$location',\r\n 'OrganizationUtilService',\r\n 'TaskListFactory',\r\n '$scope',\r\n 'ResourcePlannerFactory',\r\n '_'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerInactiveTasksController', ResourcePlannerInactiveTasksController)\r\n .directive('resourcePlannerInactiveTasks', function () {\r\n return {\r\n restrict: 'EA',\r\n controller: 'ResourcePlannerInactiveTasksController as vm',\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerPanel/resourcePlannerInactiveTasks.html',\r\n bindToController: true,\r\n scope: {\r\n resourcePlanner: '=',\r\n users: '='\r\n }\r\n }\r\n });\r\n\r\n function ResourcePlannerInactiveTasksController(\r\n $timeout,\r\n DateUtilService,\r\n ResourcePlannerService,\r\n $filter,\r\n $location,\r\n OrganizationUtilService,\r\n TaskListFactory,\r\n $scope,\r\n ResourcePlannerFactory,\r\n _\r\n ) {\r\n\r\n var vm = this, lastX = null, lastY = null;\r\n var selectedTask = null;\r\n var allRPTasks = [];\r\n vm.currentPage = 1;\r\n vm.itemsPerPage = 5;\r\n vm.numPages = null;\r\n vm.inactivePopupInfo = {};\r\n\r\n vm.$onInit = function () {\r\n initDelegateFunctions();\r\n init();\r\n vm.getInactiveTasks();\r\n };\r\n\r\n vm.$onDestroy = function() {\r\n interact('.rp-inactive-task').unset();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n vm.resourcePlanner.onlyTodaysTasks = false;\r\n vm.resourcePlanner.notInResourcePlanner = false;\r\n vm.resourcePlanner.showResourcePlannerTasks = false;\r\n vm.resourcePlanner.getResourcePlannerTasksForSelectedUsers = getResourcePlannerTasksForSelectedUsers;\r\n };\r\n\r\n //right click options\r\n vm.inactiveTaskContextOptions = [\r\n [function ($itemScope) {\r\n return $filter('translate')('txtRestore');\r\n },\r\n function ($itemScope, $event) {\r\n $itemScope.inactiveTask.Active = true;\r\n vm.resourcePlanner.updateTaskListWithoutEmail($itemScope.inactiveTask);\r\n },\r\n function ($itemScope) {\r\n var inactiveTask = $itemScope.inactiveTask;\r\n if (!inactiveTask.id)//only if it's an inactive task\r\n return false;\r\n\r\n if (!inactiveTask.StartDate || !inactiveTask.EndDate)//only if it has start and end date\r\n return false;\r\n\r\n if (!inactiveTask.User || !inactiveTask.User.id)//only if it has user assigned\r\n return false;\r\n\r\n return true;\r\n }]\r\n ];\r\n\r\n /**\r\n * Closes the side panel\r\n * @returns {} \r\n */\r\n vm.close = function () {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideOutRight');\r\n $timeout(function () {\r\n vm.resourcePlanner.inactiveTasksPanel = false;\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Function that handles the on drag move event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var element = angular.element(event.target);\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n element.css('transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-webkit-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-moz-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-ms-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-o-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Functions that handles the on drag start event\r\n * @param {any} event\r\n */\r\n function onDragStart(event) {\r\n lastX = event.target.getAttribute('data-x') || 0;\r\n lastY = event.target.getAttribute('data-y') || 0;\r\n event.target.style.zIndex = '200';\r\n //document.getElementById('inactiveTaskPanelBody').style.overflowY = '';\r\n };\r\n\r\n /**\r\n * Function that handles the on drag end event\r\n * @param {any} event\r\n */\r\n function onDragEnd(event) {\r\n $timeout(function () {\r\n var element = angular.element(event.target);\r\n element.removeAttr('data-x');\r\n element.removeAttr('data-y');\r\n\r\n element.css('transform', '');\r\n element.css('-webkit-transform', '');\r\n element.css('-moz-transform', '');\r\n element.css('-ms-transform', '');\r\n element.css('-o-transform', '');\r\n element.css('position', '');\r\n\r\n lastX = null;\r\n lastY = null;\r\n\r\n if (_.find(document.body.children, function (c) { return c.id.indexOf('inactiveTask') > -1 }))\r\n try {\r\n document.body.removeChild(event.target);\r\n } catch (err) {}\r\n }, 2000);\r\n };\r\n\r\n function initElements() {\r\n interact('.rp-inactive-task')\r\n .draggable({\r\n autoScroll: true,\r\n enabled: true,\r\n manualStart: true\r\n })\r\n .on('dragmove', onDragMove)\r\n .on('dragstart', onDragStart)\r\n .on('dragend', onDragEnd)\r\n .on('move', function (event) {\r\n var interaction = event.interaction;\r\n if (interaction.pointerIsDown && !interaction.interacting()) {\r\n var original = event.currentTarget,\r\n clone = event.currentTarget.cloneNode(true),\r\n xCoordinate = event.pageX, yCoordinate = event.pageY,\r\n elementWidth = window.getComputedStyle(original, null).getPropertyValue('width').split('px')[0],\r\n elementHeight = window.getComputedStyle(original, null).getPropertyValue('height').split('px')[0];\r\n\r\n clone.style.left = (xCoordinate - elementWidth / 2) + 'px';\r\n clone.style.top = (yCoordinate - elementHeight / 2) + 'px';\r\n clone.style.position = 'absolute';\r\n clone.style.width = window.getComputedStyle(original, null).getPropertyValue('width');\r\n\r\n //keep track of the task that is dragged\r\n ResourcePlannerService.resourcePlannerTaskDragged = angular.element(original).scope().inactiveTask;\r\n\r\n document.body.appendChild(clone);\r\n\r\n // start a drag interaction targeting the clone\r\n interaction.start({ name: 'drag' },\r\n event.interactable,\r\n clone);\r\n }\r\n });\r\n };\r\n\r\n function init() {\r\n interact('.rp-panel-body').dropzone({\r\n accept: '.rp-inactive-task',\r\n overlap: 0.5\r\n });\r\n };\r\n\r\n /**\r\n * Function that is called when the user searches\r\n * Tasks are retrieved based on the search criteria\r\n * @param {} searchText \r\n * @param {} isForRpTasks \r\n * @returns {} \r\n */\r\n vm.onSearch = function (searchText, isForRpTasks) {\r\n\r\n var retrievedTasksLength = 0;\r\n\r\n if (isForRpTasks) {\r\n if (!searchText) {\r\n if (vm.resourcePlanner.showResourcePlannerTasks)\r\n vm.resourcePlanner.resourcePlannerTasks = allRPTasks;\r\n } else {\r\n var selectedUsers = $filter('filter')(vm.users, { Checked: 'true' });\r\n\r\n if (!selectedUsers || selectedUsers.length === 0)\r\n vm.resourcePlanner.resourcePlannerTasks = [];\r\n\r\n var userIds = selectedUsers.map(function (selectedUser) { return selectedUser.id });\r\n\r\n TaskListFactory.searchTasksByText(userIds.join('|'), searchText)\r\n .then(function (response) {\r\n\r\n if (response) {\r\n retrievedTasksLength = response.length;\r\n }\r\n\r\n vm.resourcePlanner.resourcePlannerTasks = mergeUsersTasksToList((response) ? response : []);\r\n\r\n });\r\n }\r\n } else {\r\n if (!searchText)\r\n vm.resourcePlanner.inactiveTasks = vm.originalTasks;\r\n else {\r\n var selectedUsers = $filter('filter')(vm.users, { Checked: 'true' });\r\n\r\n if (!selectedUsers || selectedUsers.length === 0)\r\n vm.resourcePlanner.inactiveTasks = [];\r\n\r\n var userIds = selectedUsers.map(function (selectedUser) { return selectedUser.id });\r\n\r\n ResourcePlannerFactory.getInactiveTasks(userIds.join('|'), vm.resourcePlanner.onlyTodaysTasks, vm.resourcePlanner.notInResourcePlanner, searchText)\r\n .then(function (response) {\r\n\r\n if (!response) {\r\n vm.resourcePlanner.inactiveTasks = [];\r\n }\r\n\r\n else {\r\n retrievedTasksLength = response.length;\r\n vm.resourcePlanner.inactiveTasks = response;\r\n }\r\n\r\n vm.numPages = Math.ceil(retrievedTasksLength / vm.itemsPerPage);\r\n\r\n });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Gets the full name of the user from the task\r\n * @param {} inactiveTask \r\n * @returns {} \r\n */\r\n vm.getInactiveTaskUserName = function (inactiveTask) {\r\n if (inactiveTask.User && !inactiveTask.User.id)\r\n return $filter('translate')('txtNoParticipant');\r\n return (inactiveTask.User.FirstName ? inactiveTask.User.FirstName + ' ' : '') + inactiveTask.User.LastName;\r\n };\r\n\r\n /**\r\n * Gets the full name of the customer from the task\r\n * @param {} inactiveTask \r\n * @returns {} \r\n */\r\n vm.getInactiveTaskCustomerName = function (inactiveTask) {\r\n if (inactiveTask.Order.Customer && (inactiveTask.Order.Customer.FirstName || inactiveTask.Order.Customer.LastName)) {\r\n return (inactiveTask.Order.Customer.FirstName ? inactiveTask.Order.Customer.FirstName + ' ' : '') + ' ' +\r\n (inactiveTask.Order.Customer.LastName ? inactiveTask.Order.Customer.LastName + ' ' : '');\r\n }\r\n\r\n return $filter('translate')('txtNoCustomer');\r\n };\r\n\r\n /**\r\n * Gets the tag from the task\r\n * @param {} inactiveTask \r\n * @returns {} \r\n */\r\n vm.getInactiveTaskTag = function (inactiveTask) {\r\n if (inactiveTask.Order.Tag)\r\n return $filter('translate')('txtTag') + ': ' + inactiveTask.Order.Tag;\r\n\r\n return $filter('translate')('txtNoTag');\r\n };\r\n\r\n /**\r\n * Gets the full address from the task\r\n * @param {} inactiveTask \r\n * @returns {} \r\n */\r\n vm.getInactiveTaskAddress = function (inactiveTask) {\r\n var address = ResourcePlannerService.getAddressOfTaskOrder(inactiveTask);\r\n\r\n if (address && address != '-') {\r\n return address;\r\n }\r\n\r\n return $filter('translate')('txtNoAddress');\r\n };\r\n\r\n /**\r\n * Gets a list of tasks\r\n * @returns {} \r\n */\r\n vm.getInactiveTasks = function () {\r\n\r\n vm.resourcePlanner.getInactiveTasks()\r\n .then(function () {\r\n vm.searchText = '';\r\n vm.originalTasks = angular.copy(vm.resourcePlanner.inactiveTasks);\r\n //vm.numPages = Math.ceil(vm.resourcePlanner.inactiveTasks.length / vm.itemsPerPage);\r\n\r\n $timeout(initElements);\r\n });\r\n };\r\n\r\n /**\r\n * Sets the text for the popover\r\n * @param {} inactiveTask \r\n * @returns {} \r\n */\r\n vm.onMouseOver = function (inactiveTask) {\r\n vm.inactivePopupInfo = ResourcePlannerService.getNameOfTask(inactiveTask) + '\\n';\r\n if (!inactiveTask.Active)\r\n vm.inactivePopupInfo += $filter('translate')('txtStatus') + ': ' + $filter('translate')('DEACTIVATED');\r\n else if (inactiveTask.Table == 'BOT_ORDER') {\r\n\r\n vm.inactivePopupInfo += $filter('translate')('txtOrderStatus') + ': ' + getOrderStatus(inactiveTask) + \"\\n\";\r\n\r\n vm.inactivePopupInfo += $filter('translate')('txtAddress') + ': ' + ResourcePlannerService.getAddressOfTaskOrder(inactiveTask);\r\n }\r\n };\r\n\r\n /**\r\n * Sets the text for the popover when hovering over a resource planner task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.onMouseOverRpTask = function (task) {\r\n\r\n vm.rpTaskPopupInfo = ResourcePlannerService.getNameOfTask(task) + '\\n';\r\n\r\n if (task.Table === \"BOT_ORDER\")\r\n vm.rpTaskPopupInfo += $filter('translate')('txtAddress') + ': ' + ResourcePlannerService.getAddressOfTaskOrder(task);\r\n\r\n };\r\n\r\n vm.onDoubleClick = function (inactiveTask) {\r\n if (inactiveTask.Table == 'BOT_ORDER')\r\n $location.path('/order/' + inactiveTask.ForeignKey);\r\n };\r\n\r\n /**\r\n * Highlights the task in the resource planner\r\n * @param {} task \r\n * @returns {} \r\n */\r\n vm.onDoubleClickOnRpTask = function (task) {\r\n\r\n if (!task || !task.StartDate)\r\n return;\r\n\r\n vm.resourcePlanner.Date = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n selectedTask = task;\r\n };\r\n\r\n /**\r\n * Function that handles the toggle switch that switches between the types of tasks to be displayed\r\n * @param {} checkboxToExclude \r\n * @returns {} \r\n */\r\n vm.switchOffLess = function (checkboxToExclude) {\r\n interact('.rp-inactive-task').unset();\r\n switch (checkboxToExclude) {\r\n case \"ALL_ORDERS\":\r\n vm.resourcePlanner.onlyTodaysTasks = false;\r\n vm.resourcePlanner.showResourcePlannerTasks = false;\r\n break;\r\n\r\n case \"TODAY_ORDERS\":\r\n vm.resourcePlanner.notInResourcePlanner = false;\r\n vm.resourcePlanner.showResourcePlannerTasks = false;\r\n break;\r\n case \"RP_TASKS\":\r\n vm.resourcePlanner.onlyTodaysTasks = false;\r\n vm.resourcePlanner.notInResourcePlanner = false;\r\n break;\r\n }\r\n\r\n };\r\n\r\n vm.getTaskUserName = function (assignedUser) {\r\n\r\n if (!assignedUser)\r\n return \"-\";\r\n\r\n return ((assignedUser.FirstName ? assignedUser.FirstName + \" \" : \"\") +\r\n (assignedUser.LastName ? assignedUser.LastName + \" \" : \"\"));\r\n\r\n };\r\n\r\n /**\r\n * Gets the resource planner tasks for the given users\r\n * @returns {} \r\n */\r\n vm.getRPTasksForSelectedUsers = function () {\r\n getResourcePlannerTasksForSelectedUsers($filter('filter')(vm.users, { Checked: 'true' }));\r\n };\r\n\r\n /**\r\n * Gets the correct status to display in resource planner side panel\r\n * @param {TaskList} task\r\n */\r\n function getOrderStatus(task) {\r\n\r\n if (!task || !task.Order)\r\n return '';\r\n\r\n // set the order status and id data from the task on the order\r\n // to be able to re-use logic from ResourcePlannerService\r\n\r\n task.Order.id = task.ForeignKey;\r\n task.Order.Status = {\r\n ProgId : task.Status.id\r\n }\r\n\r\n return ResourcePlannerService.getOrderStatus(task.Order);\r\n }\r\n\r\n function getResourcePlannerTasksForSelectedUsers(users) {\r\n\r\n if (!vm.resourcePlanner.showResourcePlannerTasks)\r\n return;\r\n\r\n var userIds = extractUserIds(users);\r\n\r\n TaskListFactory.getResourcePlannerTasksForSelectedUsers(userIds)\r\n .then(function (response) {\r\n\r\n vm.resourcePlanner.resourcePlannerTasks = mergeUsersTasksToList((response) ? response : []);\r\n allRPTasks = angular.copy(vm.resourcePlanner.resourcePlannerTasks);\r\n\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Gets a list of tasks from the given users\r\n * @param {any} selectedUsersList\r\n */\r\n function mergeUsersTasksToList(selectedUsersList) {\r\n\r\n if (!selectedUsersList || selectedUsersList.length === 0)\r\n return [];\r\n\r\n var usersTasks = [];\r\n\r\n for (var index = 0; index < selectedUsersList.length; index++) {\r\n\r\n var currentSelectedUser = selectedUsersList[index];\r\n\r\n if (!currentSelectedUser.Tasks || currentSelectedUser.Tasks.length === 0)\r\n continue;\r\n\r\n mergeWithCurrentUserTasks(currentSelectedUser, usersTasks);\r\n\r\n }\r\n\r\n return usersTasks;\r\n\r\n }\r\n\r\n function mergeWithCurrentUserTasks(user, usersTasks) {\r\n\r\n if (!user || !user.Tasks || user.Tasks.length === 0)\r\n return;\r\n\r\n if (!usersTasks)\r\n usersTasks = [];\r\n\r\n for (var index = 0; index < user.Tasks.length; index++) {\r\n usersTasks.push(user.Tasks[index]);\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Returns the user that is assigned to the given task\r\n * @param {any} task\r\n * @param {any} users\r\n */\r\n function findAssignedToUser(task, users) {\r\n\r\n if (!task || !task.User || !users || users.length === 0)\r\n return null;\r\n\r\n for (var index = 0; index < users.length; index++) {\r\n\r\n var currentUser = users[index];\r\n\r\n if (task.User.id === currentUser.id)\r\n return currentUser;\r\n\r\n }\r\n\r\n return null;\r\n\r\n }\r\n\r\n /**\r\n * Returns a list of ids from the given users\r\n * @param {any} users\r\n */\r\n function extractUserIds(users) {\r\n\r\n if (!users || users.length === 0)\r\n return \"-1\";\r\n\r\n var userIds = \"\";\r\n\r\n for (var index = 0; index < users.length; index++) {\r\n\r\n var currentUser = users[index];\r\n\r\n if (index === users.length - 1)\r\n userIds += currentUser.id;\r\n else\r\n userIds += currentUser.id + \"|\";\r\n\r\n }\r\n\r\n return (!userIds) ? \"-1\" : userIds;\r\n }\r\n\r\n $scope.$on(\"onRpDateIntervalUpdated\", function () {\r\n\r\n $timeout(function () {\r\n\r\n if (!selectedTask)\r\n return;\r\n\r\n var assignedToUser = findAssignedToUser(selectedTask, $filter('filter')(vm.users, { Checked: 'true' }));\r\n\r\n if (assignedToUser != null) {\r\n\r\n assignedToUser.Collapsed = false;\r\n\r\n vm.resourcePlanner.collapseUser(assignedToUser);\r\n\r\n // highlight the task\r\n ResourcePlannerService.setOpacityLevel(selectedTask, \"1\");\r\n\r\n }\r\n\r\n\r\n selectedTask = null;\r\n\r\n });\r\n\r\n });\r\n\r\n\r\n\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n inactiveSearch.$inject = [\r\n '$filter'\r\n ];\r\n\r\n angular.module('resourcePlanner').filter('inactiveSearch', inactiveSearch);\r\n\r\n /**\r\n * Filter used when searching through inactive tasks\r\n * @param {any} $filter\r\n */\r\n function inactiveSearch($filter) {\r\n return function (input, searchText) {\r\n var returnArray = [];\r\n var searchTextSplit = searchText.toLowerCase().split(' ');\r\n\r\n for (var i = 0; i < input.length; i++) {\r\n var count = 0,\r\n startDate = input[i].StartDate ? $filter('date')(input[i].StartDate, 'dd-MM-yyyy HH:mm', 'UTC').toString().toLowerCase() : '',\r\n endDate = input[i].EndDate ? $filter('date')(input[i].EndDate, 'dd-MM-yyyy HH:mm', 'UTC').toString().toLowerCase() : '';\r\n for (var j = 0; j < searchTextSplit.length; j++) {\r\n if (input[i].Name.toLowerCase().indexOf(searchTextSplit[j]) !== -1 ||\r\n startDate.indexOf(searchTextSplit[j]) !== -1 ||\r\n endDate.indexOf(searchTextSplit[j]) !== -1 ||\r\n input[i].ForeignKey.toString().indexOf(searchTextSplit[j]) !== -1 ||\r\n input[i].User.FirstName.toLowerCase().indexOf(searchTextSplit[j]) !== -1 ||\r\n input[i].User.LastName.toLowerCase().indexOf(searchTextSplit[j]) !== -1)\r\n count++;\r\n }\r\n if (count == searchTextSplit.length) {\r\n returnArray.push(input[i]);\r\n }\r\n }\r\n return returnArray;\r\n };\r\n };\r\n\r\n\r\n})(); ","(function () {\r\n\r\n 'use strict';\r\n\r\n ResourcePlannerTaskController.$inject = [\r\n 'DateUtilService',\r\n '$timeout',\r\n '$uibModal',\r\n '$scope',\r\n '$filter',\r\n '$q',\r\n '$location',\r\n 'sessionInformationService',\r\n 'dialogService',\r\n 'ParticipantResourcePlannerPanelService',\r\n 'ResourcePlannerService',\r\n 'OrganizationUtilService'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerTaskController', ResourcePlannerTaskController)\r\n .directive('resourcePlannerNewTask', function () {\r\n return {\r\n restrict: 'EA',\r\n controller: 'ResourcePlannerTaskController as vm',\r\n templateUrl: 'Scripts/resourcePlanner/resourcePlannerPanel/resourcePlannerTaskPanel.html',\r\n bindToController: true,\r\n scope: {\r\n resourcePlanner: '=',\r\n users: '=',\r\n isPersonnel: '='\r\n }\r\n }\r\n }).run(['$templateCache', function ($templateCache) {\r\n $templateCache.put('template/taskTypeModal.html',\r\n '
\\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n

{{vm.type.id ? vm.getTypeName(vm.type) : \\'txtNewType\\' | translate}}

\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n \\\r\n

{{vm.type.ProgId | translate}}

\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
'\r\n );\r\n }]);\r\n\r\n function ResourcePlannerTaskController(\r\n DateUtilService,\r\n $timeout,\r\n $uibModal,\r\n $scope,\r\n $filter,\r\n $q,\r\n $location,\r\n sessionInformationService,\r\n dialogService,\r\n ParticipantResourcePlannerPanelService,\r\n ResourcePlannerService,\r\n OrganizationUtilService\r\n ) {\r\n var vm = this;\r\n\r\n var hasAlreadyAnsweredForEndDateGreater = false;\r\n\r\n var originalEndDate = null;//used for checking with the end date of the order\r\n vm.task = {\r\n Active: true,\r\n Table: 'GOT_TYPE',\r\n MeetingParticipants: [],\r\n Users: [],\r\n UsersName: ''\r\n };\r\n vm.intellisense = { isTypeOpen: false, isCustomerOpen: false }\r\n\r\n /**\r\n * Closes the side panel\r\n * @returns {} \r\n */\r\n vm.close = function () {\r\n if (!vm.isPersonnel) {\r\n document.getElementsByClassName('rp-task-detail-panel')[0].classList.add('slideOutRight');\r\n $timeout(function () {\r\n vm.resourcePlanner.newTaskPanel = false;\r\n }, 1000);\r\n } else {\r\n ParticipantResourcePlannerPanelService.close();\r\n $timeout(function () {\r\n vm.resourcePlanner.taskDetailsPanel = false;\r\n }, 500);\r\n }\r\n };\r\n\r\n /**\r\n * Displays a modal with the given type\r\n * @param {} typeToEdit \r\n * @returns {} \r\n */\r\n vm.showTypeModal = function (typeToEdit) {\r\n if (typeToEdit) {\r\n $scope.vm.type = angular.copy(typeToEdit);\r\n\r\n if (!$scope.vm.type.Organization)\r\n $scope.vm.type.Organization = getOrganizationForTaskType();\r\n\r\n vm.resourcePlanner.getColorSetting(typeToEdit.id, 'GOT_TYPE').then(function (color) {\r\n $scope.vm.type.Color = color;\r\n });\r\n } else\r\n $scope.vm.type = {\r\n Active: true,\r\n Table: 'BOT_RESOURCE_PLANNER',\r\n Color: {\r\n Name: '#0072bc'\r\n },\r\n Organization: getOrganizationForTaskType()\r\n };\r\n $uibModal.open({\r\n scope: $scope,\r\n templateUrl: 'template/taskTypeModal.html'\r\n });\r\n };\r\n\r\n /**\r\n * Gets a list of types for task\r\n */\r\n function getTypes() {\r\n return vm.resourcePlanner.getTypesForTask().then(function (result) {\r\n vm.taskTypes = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets a list of customers based on the search criteria\r\n * @param {} freeText \r\n * @returns {} \r\n */\r\n vm.getCustomers = function (freeText) {\r\n vm.resourcePlanner.getResourcePlannerCustomers(freeText)\r\n .then(function (result) {\r\n vm.customers = result;\r\n vm.intellisense.isCustomerOpen = true;\r\n });\r\n };\r\n\r\n vm.toggleTypeDropdown = function () {\r\n $timeout(function () {\r\n vm.intellisense.isTypeOpen = !vm.intellisense.isTypeOpen;\r\n });\r\n };\r\n\r\n /**\r\n * Gets a list of statuses for task\r\n */\r\n function getStatuses() {\r\n return vm.resourcePlanner.getStatusesForTask().then(function (result) {\r\n vm.statuses = result;\r\n });\r\n };\r\n\r\n /**\r\n * Sets the status of the task based on todays date\r\n */\r\n function setStatus() {\r\n //var todaysDate = DateUtilService.getLongWithOffset(new Date());\r\n //if (todaysDate < vm.task.StartDate)\r\n // vm.task.Status = $filter('filter')(vm.statuses, { ProgId: 'PLANNED' })[0];\r\n\r\n //if (todaysDate > vm.task.StartDate && todaysDate < vm.task.EndDate)\r\n // vm.task.Status = $filter('filter')(vm.statuses, { ProgId: 'UNDER_IMPLEMENTATION' })[0];\r\n\r\n //if (todaysDate > vm.task.EndDate || vm.task.Execution && vm.task.Execution.InitiatedProcessList && vm.task.Execution.InitiatedProcessList.Status && vm.task.Execution.InitiatedProcessList.Status.ProgId == 'DONE')\r\n // vm.task.Status = $filter('filter')(vm.statuses, { ProgId: 'COMPLETED' })[0];\r\n vm.task.Status = { ProgId: ResourcePlannerService.getStatusOfTask(vm.task) };\r\n };\r\n\r\n function getFullName(object) {\r\n return (object.FirstName ? object.FirstName.trim() + ' ' : '') + (object.LastName ? object.LastName.trim() : '');\r\n };\r\n\r\n vm.setCustomer = function (customer) {\r\n vm.task.TableToSet = 'BOT_CUSTOMER';\r\n vm.task.ForeignKeyToSet = customer.id;\r\n vm.task.Customer = customer;\r\n vm.task.Customer.Name = getFullName(customer);\r\n };\r\n\r\n /**\r\n * Gets the formated date of the given date\r\n * @param {} freeDay \r\n * @returns {} \r\n */\r\n vm.getFreeDayText = function (freeDay) {\r\n return $filter('date')(freeDay, 'dd MMMM yyyy');\r\n };\r\n\r\n function dayExists(freeDays, day) {\r\n return $filter('filter')(freeDays, function (freeDay) {\r\n return freeDay.getDate() == day.getDate();\r\n }).length > 0;\r\n }\r\n\r\n /**\r\n * Calculates how many days the users haves between the tasks\r\n * @param {any} childTasks\r\n */\r\n function calculateFreeDays(childTasks) {\r\n var day = {};\r\n vm.freeDays = [];\r\n for (var i = 0; i < childTasks.length; i++) {\r\n if (i == childTasks.length - 1)\r\n break;\r\n var endDate = DateUtilService.getDateWithoutTimezone(childTasks[i].EndDate);\r\n var startDate = DateUtilService.getDateWithoutTimezone(childTasks[i + 1].StartDate);\r\n\r\n if (Math.abs(startDate.getHours() - endDate.getHours()) < 22)\r\n continue;\r\n\r\n day = {};\r\n if (endDate.getHours() == 23 && endDate.getMinutes() == 59)\r\n day.StartDate = DateUtilService.setDate(DateUtilService.addDaysToDate(endDate, 1), 0, 0, 0);\r\n if (startDate.getHours() == 0 && startDate.getHours() == 0)\r\n day.EndDate = DateUtilService.setDate(DateUtilService.addDaysToDate(startDate, -1), 23, 59, 59);\r\n if (day.StartDate && day.EndDate)\r\n for (var j = 0; j <= day.EndDate.getDate() - day.StartDate.getDate(); j++)\r\n vm.freeDays.push(DateUtilService.setDate(DateUtilService.addDaysToDate(day.StartDate, j), 0, 0, 0));\r\n }\r\n\r\n //check if task has been trimmed\r\n var parentStartDate = DateUtilService.getDateWithoutTimezone(vm.resourcePlanner.task.Parent.StartDate);\r\n var parentEndDate = DateUtilService.getDateWithoutTimezone(vm.resourcePlanner.task.Parent.EndDate);\r\n\r\n var firstChildStartDate = DateUtilService.getDateWithoutTimezone(childTasks[0].StartDate);\r\n var lastChildEndDate = DateUtilService.getDateWithoutTimezone(childTasks[childTasks.length - 1].EndDate);\r\n\r\n if (firstChildStartDate > parentStartDate) {\r\n for (var j = 0; j <= firstChildStartDate.getDate() - parentStartDate.getDate(); j++) {\r\n day = DateUtilService.setDate(DateUtilService.addDaysToDate(parentStartDate, j), 0, 0, 0);\r\n if (!dayExists(vm.freeDays, day))\r\n vm.freeDays.push(day);\r\n }\r\n\r\n }\r\n if (lastChildEndDate < parentEndDate) {\r\n for (var j = 0; j <= parentEndDate.getDate() - lastChildEndDate.getDate(); j++) {\r\n day = DateUtilService.setDate(DateUtilService.addDaysToDate(lastChildEndDate, j), 0, 0, 0);\r\n if (!dayExists(vm.freeDays, day))\r\n vm.freeDays.push(day);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Returns the number of freedays for the given tasks\r\n */\r\n function getFreeDays() {\r\n var deferred = $q.defer();\r\n if (!vm.resourcePlanner.task || !vm.resourcePlanner.task.id ||\r\n !vm.resourcePlanner.task.Parent || !vm.resourcePlanner.task.Parent.id)\r\n return $q.when();\r\n\r\n vm.resourcePlanner.getChildTasks(vm.resourcePlanner.task.Parent.id)\r\n .then(function (result) {\r\n if (!result || result.length == 0)\r\n deferred.resolve();\r\n else {\r\n vm.childTasks = angular.copy(result);\r\n calculateFreeDays(angular.copy(result));\r\n deferred.resolve();\r\n }\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Saves the current task type\r\n * @returns {} \r\n */\r\n vm.saveTaskType = function () {\r\n vm.resourcePlanner.saveTaskType(vm.type).then(function (result) {\r\n var colorToSave = {\r\n id: vm.type.Color.id,\r\n Name: vm.type.Color.Name,\r\n Table: 'GOT_TYPE',\r\n ForeignKey: result.id\r\n }\r\n vm.resourcePlanner.saveColorSetting(colorToSave);\r\n getTypes();\r\n });\r\n };\r\n\r\n /**\r\n * Sets the current task type\r\n * @param {} type \r\n * @returns {} \r\n */\r\n vm.setCurrentTaskType = function (type) {\r\n if (!type) {\r\n vm.task.Type = {\r\n id: -1,\r\n DisplayName: $filter('translate')('txtTaskTypeDeleted')\r\n };\r\n } else {\r\n vm.task.Type = type;\r\n\r\n if (type.ProgId == 'PROG_CUSTOMER')\r\n vm.task.Table = 'BOT_CUSTOMER';\r\n else if (type.ProgId == 'PROG_USER') {\r\n vm.task.Table = 'GOT_USER';\r\n vm.task.TableToSet = 'GOT_USER';\r\n if (vm.task.id)\r\n vm.task.CreatedBy.Name = getFullName(vm.task.CreatedBy);\r\n else {\r\n vm.task.CreatedBy = sessionInformationService.getUser();\r\n vm.task.CreatedBy.Name = getFullName(vm.task.CreatedBy);\r\n }\r\n } else {\r\n vm.task.Table = 'GOT_TYPE';\r\n vm.task.Type.DisplayName = type.Name;\r\n }\r\n\r\n if (type.ProgId == 'PROG_CUSTOMER' || type.ProgId == 'PROG_USER')\r\n vm.task.Type.DisplayName = $filter('translate')(type.ProgId);\r\n\r\n if (!vm.task.id)\r\n vm.task.ForeignKey = type.id;\r\n\r\n vm.resourcePlanner.getColorSetting(type.id, 'GOT_TYPE').then(function (color) {\r\n vm.task.Type.Color = color;\r\n vm.intellisense.isTypeOpen = false;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Adds the given user to the task\r\n * @param {} user \r\n * @returns {} \r\n */\r\n vm.addUserToTask = function (user) {\r\n if (!vm.task.Users)\r\n vm.task.Users = [];\r\n\r\n //if the user is already assigned remove it\r\n if ($filter('filter')(vm.task.Users, function (u) { return u.id == user.id }).length > 0) {\r\n //if the task has been saved before, check if the user that will be removed is the assigned one\r\n if (vm.task.id && user.id == vm.task.User.id)\r\n //mark this task as inactive\r\n vm.task.markedAsInactive = true;\r\n\r\n\r\n var index = vm.task.Users.indexOf(user);\r\n vm.task.Users.splice(index, 1);\r\n\r\n user.IsSelected = false;\r\n user.IsBusy = false;\r\n } else {//else add it to the list\r\n //if the task has been saved before, check if the user that has been is the one with the assigned one\r\n if (vm.task.id && user.id == vm.task.User.id && vm.task.markedAsInactive)\r\n //remove property\r\n delete vm.task.markedAsInactive;\r\n\r\n vm.task.Users.push(user);\r\n user.IsSelected = true;\r\n vm.checkBusyOnChange(null, user);\r\n }\r\n //get the name of each user and display it nicely\r\n vm.task.UsersName = vm.task.Users.map(function (user) { return ' ' + getFullName(user); }).toString();\r\n };\r\n\r\n /**\r\n * Clears the user property\r\n * @returns {} \r\n */\r\n vm.clearUsers = function () {\r\n //if the task has been saved before, check if the user assigned was in the list\r\n angular.forEach(vm.task.Users, function (user) {\r\n if (vm.task.User && user.id == vm.task.User.id && !vm.task.markedAsInactive)\r\n vm.task.markedAsInactive = true;\r\n });\r\n //clear list\r\n vm.task.Users = [];\r\n //clear the name\r\n vm.task.UsersName = '';\r\n //reset IsSelected, IsBusy for all users\r\n angular.forEach(vm.users, function (user) {\r\n user.IsSelected = false;\r\n user.IsBusy = false;\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the save is disabled or not\r\n * @returns {} \r\n */\r\n vm.isSaveDisabled = function () {\r\n if (!vm.task)\r\n return true;\r\n\r\n if (!vm.task.ForeignKey)\r\n return true;\r\n\r\n if ((!vm.task.Type || !vm.task.Type.id || vm.task.Type.id == -1) && vm.task.Table == 'GOT_TYPE')\r\n return true;\r\n\r\n if (!vm.task.StartDate || !vm.task.EndDate)\r\n return true;\r\n\r\n if (vm.task.StartDate >= vm.task.EndDate)\r\n return true;\r\n\r\n if (!vm.task.Users || vm.task.Users.length == 0)\r\n return true;\r\n\r\n if (vm.task.id && (!vm.task.User || !vm.task.User.id))\r\n return true;\r\n\r\n if (vm.task.id && vm.task.IsPrivate && vm.task.User.id != sessionInformationService.getUser().id)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the task is visible \r\n * @returns {} \r\n */\r\n vm.isTaskVisible = function () {\r\n if (!vm.task)\r\n return false;\r\n\r\n if (!vm.task.id)\r\n return true;\r\n\r\n if (vm.task.IsPrivate && vm.task.User.id != sessionInformationService.getUser().id)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Checks whether the private toggle is visible\r\n * @returns {} \r\n */\r\n vm.isPrivateCheckVisible = function () {\r\n if (!vm.task)\r\n return false;\r\n\r\n if (vm.task.Table == 'BOT_ORDER' || vm.task.Table == 'BOT_INITIATED_PROCESSLIST_ITEM' || vm.task.Table == 'GOT_USER')\r\n return false;\r\n\r\n if (vm.task.User && vm.task.User.id && vm.task.User.id != sessionInformationService.getUser().id)\r\n return false;\r\n\r\n if (vm.task.Users && vm.task.Users.length > 1)\r\n return false;\r\n\r\n if (vm.task.Users && vm.task.Users.length == 1 && vm.task.Users[0].id != sessionInformationService.getUser().id)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Creates and saves the meeting for the given task\r\n * @param {any} task\r\n */\r\n function saveUserMeeting(task) {\r\n\r\n if (!task.id) {//create tasks\r\n //create a task for the user that created the meeting;\r\n var organizerTask = angular.copy(task);\r\n organizerTask.Table = task.TableToSet;\r\n organizerTask.ForeignKey = sessionInformationService.getUser().id;\r\n organizerTask.Active = true;\r\n organizerTask.User = {\r\n id: sessionInformationService.getUser().id,\r\n FirstName: sessionInformationService.getUser().FirstName,\r\n LastName: sessionInformationService.getUser().LastName,\r\n Email: sessionInformationService.getUser().Email\r\n };\r\n organizerTask.PendingResponse = false;\r\n\r\n delete organizerTask.Users;\r\n delete organizerTask.UserCategory; //delete it in case somewhere is instantiated\r\n\r\n //for each user, create a task\r\n var participantTasks = [];\r\n angular.forEach(task.Users, function (user) {\r\n var participantTask = angular.copy(task);\r\n participantTask.Table = task.TableToSet;\r\n participantTask.ForeignKey = user.id;\r\n participantTask.Active = true;\r\n participantTask.User = {\r\n id: user.id,\r\n FirstName: user.FirstName,\r\n LastName: user.LastName,\r\n Email: user.Email\r\n };\r\n participantTask.PendingResponse = true;\r\n\r\n delete participantTask.Users;\r\n delete participantTask.UserCategory; //delete it in case somewhere is instantiated\r\n\r\n participantTasks.push(participantTask);\r\n });\r\n\r\n return vm.resourcePlanner.saveMeeting(organizerTask, participantTasks);\r\n } else if (!task.Active) {//if the meeting for the user has been disabled\r\n return vm.resourcePlanner.removeParticipantsFromMeeting(task, [{ id: task.User.id }]);\r\n } else {//something else was changed\r\n var addedParticipantTasks = [], removedParticipants = [];\r\n if (task.Users && task.Users.length > 0) {\r\n //go through each user and see if any new users were added\r\n angular.forEach(task.Users, function (user) {\r\n if ($filter('filter')(task.MeetingParticipants, function (participant) { return user.id == participant.id }).length == 0) {\r\n console.log('user ' + user.FirstName + ' added');\r\n var participantTask = angular.copy(task);\r\n participantTask.Table = task.TableToSet;\r\n participantTask.ForeignKey = user.id;\r\n participantTask.Active = true;\r\n participantTask.User = {\r\n id: user.id,\r\n FirstName: user.FirstName,\r\n LastName: user.LastName,\r\n Email: user.Email\r\n };\r\n participantTask.PendingResponse = true;\r\n\r\n delete participantTask.id;\r\n delete participantTask.Users;\r\n delete participantTask.UserCategory; //delete it in case somewhere is instantiated\r\n addedParticipantTasks.push(participantTask);\r\n }\r\n });\r\n\r\n // got through each participant and see if any participant was removed\r\n angular.forEach(task.MeetingParticipants, function (participant) {\r\n if ($filter('filter')(task.Users, function (user) { return user.id == participant.id }).length == 0) {\r\n //for these users, the meeting will be canceled\r\n removedParticipants.push(participant);\r\n }\r\n });\r\n }\r\n //return the promise for add/remove requests \r\n //if the lists are empty, resolve immediately \r\n return $q.all([\r\n addedParticipantTasks.length == 0 ? $q.when() : vm.resourcePlanner.addParticipantsToMeeting({ id: task.id }, addedParticipantTasks),//send only the id for the task\r\n removedParticipants.length == 0 ? $q.when() : vm.resourcePlanner.removeParticipantsFromMeeting(task, removedParticipants.map(function (u) { return { id: u.id } }))//send the extra info, we need it for when the email is sent\r\n ]);\r\n }\r\n };\r\n\r\n /**\r\n * Saves the given task with the provided start and end date\r\n * @param {any} task\r\n * @param {any} startDate\r\n * @param {any} endDate\r\n */\r\n function saveTask(task, startDate, endDate) {\r\n vm.task.StartDate = startDate;\r\n vm.task.EndDate = endDate;\r\n var promises = [];\r\n if (vm.task.Table != 'GOT_USER') {\r\n if (vm.task.TableToSet && vm.task.TableToSet == 'BOT_CUSTOMER') {\r\n vm.task.Table = vm.task.TableToSet;\r\n if (vm.task.ForeignKeyToSet)\r\n vm.task.ForeignKey = vm.task.ForeignKeyToSet;\r\n }\r\n\r\n\r\n\r\n var users = vm.task.Users;\r\n delete vm.task.Users;\r\n var taskToSave = null;\r\n\r\n //if the assigned user is no longer in the Users list and the task is marked as inactive => remove the task\r\n if (vm.task.id && $filter('filter')(users, function (u) { return u.id == vm.task.User.id }).length == 0) {\r\n taskToSave = angular.copy(vm.task);\r\n taskToSave.Active = false;\r\n promises.push(vm.resourcePlanner.updateTaskListWithoutEmail(taskToSave));\r\n }\r\n\r\n angular.forEach(users, function (user) {\r\n taskToSave = angular.copy(vm.task);\r\n //remove id if the task was saved before and the user is different from the assigned one\r\n if (taskToSave.User && taskToSave.User.id != user.id && vm.task.id)\r\n delete taskToSave.id;\r\n\r\n taskToSave.User = user;\r\n promises.push(vm.resourcePlanner.updateTaskListWithoutEmail(taskToSave));\r\n });\r\n\r\n\r\n } else\r\n promises.push(saveUserMeeting(task));\r\n\r\n $q.all(promises).then(function () {\r\n vm.resourcePlanner.getTasks();\r\n });\r\n };\r\n\r\n /**\r\n * Saves the task\r\n * @returns {} \r\n */\r\n vm.saveTask = function () {\r\n if (vm.isPersonnel)\r\n vm.resourcePlanner.loading = true;\r\n\r\n var currentStartDate = DateUtilService.getLongWithOffset(angular.copy(new Date(vm.task.StartDate)));\r\n var currentEndDate = DateUtilService.getLongWithOffset(angular.copy(new Date(vm.task.EndDate)));\r\n\r\n //if the task has been split -> meaning that the task was already saved\r\n if (vm.resourcePlanner.task && vm.resourcePlanner.task.Parent && vm.resourcePlanner.task.Parent.id) {\r\n //check if start date has been changed\r\n var firstChildDate = vm.childTasks[0].StartDate, i = 0, childTask = {};\r\n if (currentStartDate != firstChildDate) {\r\n for (i = 0; i < vm.childTasks.length; i++) {\r\n childTask = vm.childTasks[i];\r\n if (currentStartDate > childTask.EndDate) {\r\n childTask.Active = false;\r\n continue;\r\n } else {\r\n childTask.StartDate = currentStartDate;\r\n break;\r\n }\r\n }\r\n }\r\n //then check if end date has been changed\r\n var lastChildDate = vm.childTasks[vm.childTasks.length - 1].EndDate;\r\n if (currentEndDate != lastChildDate) {\r\n for (i = vm.childTasks.length - 1; i >= 0; i--) {\r\n childTask = vm.childTasks[i];\r\n if (currentEndDate < childTask.StartDate) {\r\n childTask.Active = false;\r\n continue;\r\n } else {\r\n childTask.EndDate = currentEndDate;\r\n break;\r\n }\r\n }\r\n }\r\n vm.resourcePlanner.saveChildTasks(vm.childTasks).then(function () {\r\n vm.resourcePlanner.getTasks();\r\n });\r\n } else {\r\n saveTask(vm.task, currentStartDate, currentEndDate);\r\n }\r\n\r\n vm.close();\r\n };\r\n\r\n vm.goToForeignKey = function (task) {\r\n if (task.Table == 'BOT_ORDER' && !vm.isPersonnel)\r\n $location.path('/order/' + task.ParentForeignKey);\r\n };\r\n\r\n vm.getTaskName = function (name) {\r\n if (!name)\r\n return '';\r\n var infos = name.split('|');\r\n if (infos.length == 0)\r\n return '';\r\n return infos[0];\r\n };\r\n\r\n vm.getTypeName = function (type) {\r\n if (type.ProgId == 'PROG_CUSTOMER')\r\n return $filter('translate')(type.ProgId);\r\n if (type.ProgId == 'PROG_USER')\r\n return $filter('translate')(type.ProgId);\r\n return type.Name;\r\n };\r\n\r\n vm.showTypeInput = function (type) {\r\n return !(type.ProgId == 'PROG_CUSTOMER' || type.ProgId == 'PROG_USER');\r\n };\r\n\r\n vm.onStatusChange = function () {\r\n if (vm.task.Status.ProgId == 'DEACTIVATED')\r\n vm.task.Active = false;\r\n else\r\n vm.task.Active = true;\r\n };\r\n\r\n /**\r\n * Checks if the user is busy\r\n * @param {} newEndDateValue - used only the end date changes on the task\r\n * @param {} user - used only when creating a task and assigning multiple users\r\n */\r\n vm.checkBusyOnChange = function (newEndDateValue, user) {\r\n if (!vm.task)\r\n return;\r\n\r\n if ((!vm.task.User || !vm.task.User.id) && vm.task.id)\r\n return;\r\n\r\n if (!vm.task.StartDate)\r\n return;\r\n\r\n if (!vm.task.EndDate)\r\n return;\r\n\r\n //if the date of the task was modified and if the task is order related\r\n //check if the new end date is greater then the order end date\r\n //if so, notify the user of the change\r\n if (newEndDateValue && originalEndDate && vm.task.Table == 'BOT_ORDER' && !hasAlreadyAnsweredForEndDateGreater) {\r\n if (newEndDateValue > new Date(originalEndDate))\r\n dialogService.showConfirmDialog('txtConfirm', 'txtEndDateBiggerThanOrderEndDate')\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK) {\r\n vm.task.EndDate = originalEndDate;\r\n hasAlreadyAnsweredForEndDateGreater = false;\r\n return;\r\n } else\r\n hasAlreadyAnsweredForEndDateGreater = true;\r\n });\r\n }\r\n\r\n vm.showBusy = false;\r\n\r\n if ((!user || !user.id) && (!vm.task.User || !vm.task.User.id))\r\n return;\r\n\r\n var userId;\r\n //if the task is of type meeting\r\n //check the busy status for the assigned user\r\n if (vm.task.Table == 'GOT_USER' && vm.task.id)\r\n userId = vm.task.User.id;\r\n else\r\n userId = user && user.id ? user.id : vm.task.User.id;\r\n\r\n //get the tasks for the selected user\r\n vm.resourcePlanner.getTasksForUser(userId, new Date(vm.task.StartDate), new Date(vm.task.EndDate))\r\n .then(function (result) {\r\n if (!result || result.length == 0) {\r\n vm.showBusy = false;\r\n if (user && user.id)\r\n user.IsBusy = false;\r\n return;\r\n }\r\n\r\n var returnedUser = result[0];\r\n if (!returnedUser.Tasks || returnedUser.Tasks.length == 0) {\r\n vm.showBusy = false;\r\n if (user && user.id)\r\n user.IsBusy = false;\r\n return;\r\n }\r\n\r\n //if the user has tasks and the task is new -> user busy\r\n if (user && user.id && !vm.task.id && returnedUser.Tasks.length > 0) {\r\n user.IsBusy = true;\r\n return;\r\n }\r\n\r\n //if the user has only one tasks and it's the same as this one -> them not busy\r\n if (returnedUser.Tasks.length == 1 && vm.task.id && vm.task.id == returnedUser.Tasks[0].id) {\r\n vm.showBusy = false;\r\n return;\r\n }\r\n\r\n vm.showBusy = true;\r\n });\r\n };\r\n\r\n vm.getTooltipValue = function (task) {\r\n if (task.Table == 'BOT_ORDER' && !vm.isPersonnel)\r\n return 'Ordre ID ' + task.ForeignKey;\r\n return null;\r\n };\r\n\r\n vm.onDatePickerDateChanged = function (date, dateToChange, isStartDateChanging) {\r\n\r\n if (!date || !dateToChange)\r\n return;\r\n\r\n var selectedDateDay = date.getUTCDate();\r\n var selectedDateMonth = date.getUTCMonth();\r\n var selectedDateYear = date.getUTCFullYear();\r\n\r\n var changedDate = DateUtilService.changeDate(new Date(dateToChange), selectedDateDay, selectedDateMonth, selectedDateYear);\r\n\r\n if (!changedDate)\r\n return;\r\n\r\n if (isStartDateChanging) {\r\n vm.task.StartDate = changedDate;\r\n vm.task.EndDate = changedDate;\r\n vm.task.SelectedEndDate = date;\r\n }\r\n else\r\n vm.task.EndDate = changedDate;\r\n };\r\n\r\n function addDatePickerDateAttributes(task) {\r\n\r\n if (!task)\r\n return;\r\n\r\n if (!task.StartDate)\r\n task.StartDate = moment().toDate();\r\n\r\n if (!task.EndDate)\r\n task.EndDate = moment().add(1, 'hours').toDate();\r\n\r\n task.SelectedStartDate = task.StartDate;\r\n task.SelectedEndDate = task.EndDate;\r\n\r\n };\r\n\r\n /**\r\n * Gets the organization\r\n */\r\n function getOrganizationForTaskType() {\r\n\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (loggedUser.Group.ProgId === 'ADMIN' && loggedUser.Organization.Central) {\r\n\r\n if (!OrganizationUtilService.getOrganizationId()) {\r\n return loggedUser.Organization;\r\n } else {\r\n return { id: OrganizationUtilService.getOrganizationId() };\r\n }\r\n\r\n } else {\r\n return loggedUser.Organization;\r\n }\r\n\r\n };\r\n\r\n function init() {\r\n $q.all([\r\n getTypes(),\r\n getStatuses(),\r\n getFreeDays()\r\n ])\r\n .then(function () {\r\n if (vm.resourcePlanner && vm.resourcePlanner.task) {\r\n\r\n vm.task = vm.resourcePlanner.task;\r\n originalEndDate = vm.task.EndDate;\r\n\r\n if (vm.task.Table == 'GOT_TYPE')\r\n vm.setCurrentTaskType($filter('filter')(vm.taskTypes, { id: vm.task.ForeignKey })[0]);\r\n\r\n if (vm.task.Table == 'BOT_CUSTOMER'\r\n ) { //if customer type, set the customer type and set the customers full name\r\n vm.setCurrentTaskType($filter('filter')(vm.taskTypes, { ProgId: 'PROG_CUSTOMER' })[0]);\r\n vm.task.Customer.Name = getFullName(vm.task.Customer);\r\n vm.task.ForeignKeyToSet = vm.task.Customer.id;\r\n }\r\n\r\n if (vm.task.Table == 'GOT_USER') {\r\n vm.setCurrentTaskType($filter('filter')(vm.taskTypes, { ProgId: 'PROG_USER' })[0]);\r\n //copy the users from the meeting list to the Users list for easier participant managing\r\n if (vm.task.MeetingParticipants && vm.task.MeetingParticipants.length > 0)\r\n angular.forEach(vm.task.MeetingParticipants,\r\n function (participant) {\r\n vm.addUserToTask($filter('filter')(vm.users,\r\n function (u) { return u.id == participant.id })[0]);\r\n });\r\n }\r\n\r\n\r\n //if different from meeting => init user\r\n if (vm.task.Table != 'GOT_USER')\r\n vm.addUserToTask($filter('filter')(vm.users,\r\n function (u) { return u.id == vm.task.User.id })[0]);\r\n\r\n setStatus();\r\n\r\n\r\n //stop loader if personnel\r\n if (vm.isPersonnel)\r\n $timeout(function () {\r\n vm.resourcePlanner.panelLoading = false;\r\n },\r\n 500);\r\n }\r\n\r\n addDatePickerDateAttributes(vm.task);\r\n\r\n });\r\n\r\n\r\n };\r\n\r\n $timeout(init);\r\n\r\n $scope.$on('$destroy', function () {\r\n vm.resourcePlanner.task = null;\r\n //reset IsSelected, IsBusy for all users\r\n angular.forEach(vm.users, function (user) {\r\n user.IsSelected = false;\r\n user.IsBusy = false;\r\n });\r\n\r\n if (vm.isPersonnel)\r\n vm.resourcePlanner.taskDetailsPanel = false;\r\n });\r\n\r\n vm.getTaskOrderAddress = function (task) {\r\n return ResourcePlannerService.getAddressOfTaskOrder(task);\r\n };\r\n\r\n };\r\n\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('settings')\r\n .component('vbAppDemoContentSettingsTab',\r\n {\r\n templateUrl: 'Scripts/settings/app-demo-content-settings-tab/app-demo-content-settings-tab.component.html',\r\n controller: 'AppDemoContentSettingsTabController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n appDemoContentSettingsTabController.$inject = [\r\n 'AppMenuItemFactory'\r\n ];\r\n\r\n function appDemoContentSettingsTabController(\r\n AppMenuItemFactory\r\n ) {\r\n\r\n var vm = this;\r\n var _appMenuItems = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n appMenuItems: {\r\n get: function() {\r\n return _appMenuItems;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.onAfterDemoContentSave = onAfterDemoContentSave;\r\n\r\n function getAppMenuItems() {\r\n AppMenuItemFactory.getAppMenuItems()\r\n .then(function(appMenuItems) {\r\n _appMenuItems = appMenuItems; \r\n });\r\n }\r\n\r\n function onInit() {\r\n getAppMenuItems();\r\n }\r\n\r\n function onAfterDemoContentSave() {\r\n getAppMenuItems();\r\n }\r\n }\r\n\r\n angular\r\n .module('settings')\r\n .controller('AppDemoContentSettingsTabController', appDemoContentSettingsTabController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('settings')\r\n .component('vbDemoContentSettings',\r\n {\r\n templateUrl: 'Scripts/settings/demo-content-settings/demo-content-settings.component.html',\r\n controller: 'DemoContentSettingsController',\r\n controllerAs: 'vm'\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n demoContentSettingsController.$inject = [\r\n 'MenuItemFactory'\r\n ];\r\n\r\n function demoContentSettingsController(\r\n MenuItemFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n\r\n vm.menuItems = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.getAllMenuItems = getAllMenuItems;\r\n\r\n function onInit() {\r\n\r\n getAllMenuItems();\r\n }\r\n\r\n function getAllMenuItems() {\r\n\r\n MenuItemFactory.getAllMenuItems(true)\r\n .then(function (menuItems) {\r\n\r\n vm.menuItems = menuItems;\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('settings')\r\n .controller('DemoContentSettingsController', demoContentSettingsController);\r\n\r\n})();","\r\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('AllAccessPage', {\r\n Home: 'HOME',\r\n Users: 'USERS',\r\n MyProfile: 'MY_PROFILE',\r\n Organizations: 'ORGANIZATIONS',\r\n ProcessList: 'PROCESS LIST',\r\n Customers: 'CUSTOMERS',\r\n Orders: 'ORDERS',\r\n Projects: 'PROJECTS',\r\n Products: 'PRODUCTS',\r\n Settings: 'SETTINGS',\r\n MyOrganization: 'MY ORGANIZATION',\r\n Rorhandboka: 'RØRHANDBOKA',\r\n QuickGuide: 'QUICKGUIDE',\r\n UserManual: 'USERMANUAL',\r\n GeneralHelp: 'GENERALHELP',\r\n OrderHourReport: 'REPORTORDERHOURSTIMESPAN',\r\n HourReport: 'REPORT_HOURREPORT',\r\n ResourcePlanner: 'RESOURCE PLANNER',\r\n LawsAndRegulations: 'LAWS AND REGULATIONS',\r\n Deviation: 'DEVIATION',\r\n DeviationReport: 'REPORT_DEVIATIONSREPORT',\r\n ProjectProgressReport: 'REPORT_PROJECTPROGRESS',\r\n QualityHandbook: 'QUALITY HANDBOOK',\r\n Risk: 'RISK',\r\n UsageReport: 'USAGE REPORT',\r\n ActiveUsersReport: 'REPORT_ORGANIZATIONACTIVEUSERS',\r\n NoAccess: 'NO_ACCESS',\r\n AllowAccess: 'ALLOW_ACCESS',\r\n Courses: 'COURSES'\r\n });\r\n\r\n AllAccessFactory.$inject = ['AllAccessPage', '_'];\r\n\r\n angular\r\n .module('shared')\r\n .factory('AllAccessFactory', AllAccessFactory);\r\n\r\n function AllAccessFactory(\r\n AllAccessPage,\r\n _\r\n ) {\r\n var factory = {};\r\n\r\n var routeAllAccessMap = [\r\n { route: '/login', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/home', pages: [AllAccessPage.Home] },\r\n { route: '/users', pages: [AllAccessPage.Users] },\r\n { route: '/user/:userId?', pages: [AllAccessPage.Users] },\r\n { route: '/organizations', pages: [AllAccessPage.NoAccess] },\r\n { route: '/dataDetails', pages: [AllAccessPage.NoAccess] },\r\n { route: '/organization/:organizationId?', pages: [AllAccessPage.MyOrganization] },\r\n { route: '/processList', pages: [AllAccessPage.ProcessList] },\r\n { route: '/processListElement/:processListElementId?', pages: [AllAccessPage.ProcessList] },\r\n { route: '/processListElementReadOnly/:processListElementId?', pages: [AllAccessPage.ProcessList] },\r\n { route: '/projects', pages: [AllAccessPage.Projects] },\r\n { route: '/project/:projectId?', pages: [AllAccessPage.Projects] },\r\n { route: '/lawsAndRegulations', pages: [AllAccessPage.LawsAndRegulations] },\r\n { route: '/deviations', pages: [AllAccessPage.Deviation] },\r\n { route: '/deviation/:deviationId?', pages: [AllAccessPage.Deviation] },\r\n { route: '/deviation-external-input/:deviationId/:sessionId', pages: [AllAccessPage.Deviation] },\r\n { route: '/customers', pages: [AllAccessPage.Customers] },\r\n { route: '/customer/:customerId?', pages: [AllAccessPage.Customers] },\r\n { route: '/orders', pages: [AllAccessPage.Orders] },\r\n { route: '/order/:orderId?', pages: [AllAccessPage.Orders] },\r\n { route: '/verticalSimulation/:processListElementId', pages: [AllAccessPage.ProcessList] },\r\n { route: '/horizontalSimulation/:processListElementId', pages: [AllAccessPage.ProcessList] },\r\n { route: '/verticalSimulation/:orderId/:processListElementId', pages: [AllAccessPage.Orders] },\r\n { route: '/horizontalSimulation/:orderId/:processListElementId', pages: [AllAccessPage.Orders] },\r\n { route: '/settings', pages: [AllAccessPage.NoAccess] },\r\n { route: '/products', pages: [AllAccessPage.Products] },\r\n { route: '/products/:productId?', pages: [AllAccessPage.Products] },\r\n { route: '/forgotPassword', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/reportCreator', pages: [AllAccessPage.NoAccess] },\r\n { route: '/reportViewer', pages: [AllAccessPage.NoAccess] },\r\n { route: '/reportViewer/:reportProgid', pages: [AllAccessPage.NoAccess] },\r\n { route: '/managementExecution/:foreignKey/:initiatedProcessListId/:itemId?', pages: [AllAccessPage.MyOrganization, AllAccessPage.Users] },\r\n { route: '/horizontalExecution/:initiatedProcessListId/:table/:foreignKey', pages: [AllAccessPage.MyOrganization, AllAccessPage.Users] },\r\n { route: '/execution/:mode?', pages: [AllAccessPage.NoAccess] },\r\n { route: '/riskAnalysis', pages: [AllAccessPage.Risk] },\r\n { route: '/riskHead/:riskHeadId?', pages: [AllAccessPage.Risk] },\r\n { route: '/help/QuickGuide', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/help/UserManual', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/help/GeneralHelp', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/resourcePlanner', pages: [AllAccessPage.ResourcePlanner] },\r\n { route: '/resourcePlanner/:invitationId?', pages: [AllAccessPage.ResourcePlanner] },\r\n { route: '/rp-meeting-confirmation/:sessionId/:invitationId/:isDeclined', pages: [AllAccessPage.ResourcePlanner] },\r\n { route: '/qualityHandbook', pages: [AllAccessPage.QualityHandbook] },\r\n { route: '/qualityHandbookTemplate/:table?', pages: [AllAccessPage.QualityHandbook] },\r\n { route: '/qualityHandbookView/:typeId', pages: [AllAccessPage.QualityHandbook] },\r\n { route: '/qualityHandbookView', pages: [AllAccessPage.QualityHandbook] },\r\n { route: '/qualityHandbookArchive/:qualityHandbookId?', pages: [AllAccessPage.QualityHandbook] },\r\n { route: '/packingSlipMapping', pages: [AllAccessPage.NoAccess] },\r\n { route: '/progressPlans', pages: [AllAccessPage.Projects] },\r\n { route: '/progressPlan/:progressPlanId?', pages: [AllAccessPage.Projects] },\r\n { route: '/gdpr', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/gdpr-confirm/:sessionId', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/gdpr-delete-confirm/:sessionId?', pages: [AllAccessPage.NoAccess] },\r\n { route: '/gdpr-private-customer/:sessionId', pages: [AllAccessPage.NoAccess] },\r\n { route: '/customerDeleteRequests', pages: [AllAccessPage.NoAccess] },\r\n { route: '/demo-content', pages: [AllAccessPage.AllowAccess] },\r\n { route: '/course/:courseId?', pages: [AllAccessPage.Courses, AllAccessPage.Users, AllAccessPage.MyProfile] }\r\n ];\r\n\r\n factory.getRouteAllAccessPages = function (route) {\r\n var map = _.find(routeAllAccessMap, function (r) { return r.route === route });\r\n\r\n if (_.isEmpty(map))\r\n return [AllAccessPage.NoAccess];\r\n\r\n return map.pages;\r\n }\r\n\r\n return factory;\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('AppRoutes',\r\n {\r\n accessibleRoutesWithoutASession: [\r\n '/forgotPassword',\r\n '/deviation-external-input/:deviationId/:sessionId',\r\n '/rp-meeting-confirmation/:sessionId/:invitationId/:isDeclined',\r\n '/gdpr-confirm/:sessionId',\r\n '/gdpr-delete-confirm/:sessionId?',\r\n '/gdpr-private-customer/:sessionId',\r\n '/course-invitation/:sessionId/:courseId'\r\n ],\r\n accessibleRoutesForAVbOrganizationWithoutALicense: [\r\n '/qualityHandbook',\r\n '/qualityHandbookTemplate/:table?',\r\n '/qualityHandbookView/:typeId',\r\n '/qualityHandbookArchive/:qualityHandbookId?',\r\n '/users',\r\n '/user/:userId?',\r\n '/organization/:organizationId?',\r\n '/managementExecution/:foreignKey/:initiatedProcessListId/:itemId?',\r\n '/horizontalExecution/:initiatedProcessListId/:table/:foreignKey'\r\n ],\r\n userDetails: '/user/:userId?',\r\n courses: '/courses'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('applicationChange',\r\n {\r\n create: 0,\r\n edit: 1,\r\n delete: 2\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('businessRoleCategories',\r\n {\r\n ceo: 'BUSINESSROLE_CEO',\r\n manager: 'BUSINESSROLE_MANAGER',\r\n user: 'BUSINESSROLE_USER',\r\n middleManager: 'BUSINESSROLE_MIDDLE_MANAGER'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('emailStatus',\r\n {\r\n new: 1,\r\n sent: 2,\r\n error: 3\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('EmailTemplateTables',\r\n {\r\n CourseInvitation: 'COURSE_INVITATION'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('eventTypes',\r\n {\r\n withdrawFromCourse: 'WITHDRAW_FROM_COURSE'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('orderStatuses',\r\n {\r\n preorder: 'PREORDER',\r\n ready: 'READY',\r\n started: 'STARTED',\r\n done: 'DONE'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('Patterns',\r\n {\r\n EmailPattern: /^(([^<>()\\[\\]\\\\.,,:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('ProcessListActions',\r\n {\r\n AnotherProcessList: 'ANOTHER_PROCESSLIST'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('ProcessListItemOptionTypes',\r\n {\r\n String: 'STRING',\r\n Numeric: 'NUMERIC'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('ProductColumnTypes',\r\n {\r\n description: 'DESCRIPTION',\r\n nrf: 'NRF',\r\n gtin: 'GTIN'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('QualityHandbookStatuses',\r\n {\r\n active: 'ACTIVE',\r\n archived: 'ARCHIVED'\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('QualityHandbookTypes',\r\n {\r\n qualityHandbook: 'QUALITY_HANDBOOK',\r\n centralApproval: 'CENTRAL_APPROVAL',\r\n personalHandbook: 'PERSONAL_HANDBOOK'\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('TableResources', {\r\n OrderTable: 'BOT_ORDER',\r\n ProjectTable: 'BOT_PROJECT',\r\n CustomerTable: 'BOT_CUSTOMER',\r\n DeviationCustomerTable: 'BOT_DEVIATION_CUSTOMER',\r\n DeviationInternalTable: 'BOT_DEVIATION_INTERNAL',\r\n DeviationCustomerDefaultTable: 'BOT_DEVIATION_CUSTOMER_DEFAULT',\r\n ProcessListManagement: 'BOT_PROCESSLIST_MANAGEMENT',\r\n DeviationTable: 'BOT_DEVIATION',\r\n ProcessListTable: 'BOT_PROCESSLIST',\r\n QualityHandbookTable: 'BOT_QUALITY_HANDBOOK',\r\n CourseTable: 'BOT_COURSE',\r\n CompetenceTable: 'BOT_COMPETENCE',\r\n OrderEventTable: 'BOT_ORDER_EVENT',\r\n ManagementProcessListEventTable: 'BOT_PROCESSLIST_MANAGEMENT_EVENT',\r\n DeviationEventTable: 'BOT_DEVIATION_EVENT',\r\n ProcessListEventTable: 'BOT_PROCESSLIST_EVENT',\r\n QualityHandbookEventTable: 'BOT_QUALITY_HANDBOOK_EVENT',\r\n CourseEventTable: 'BOT_COURSE_EVENT',\r\n CompetenceEventTable: 'BOT_COMPETENCE_EVENT',\r\n UserTable: 'GOT_USER',\r\n InitiatedProcessListItemTable: 'BOT_INITIATED_PROCESSLIST_ITEM',\r\n InitiatedProcessListItemCalendarTable: 'BOT_INITIATED_PROCESSLIST_ITEM_CALENDAR',\r\n NotificationMessageTable: 'BOT_NOTIFICATION_MESSAGE',\r\n CourseDayHoursTable: 'BOT_COURSE_DAY_HOURS',\r\n InitiatedProcessListTable: 'BOT_INITIATED_PROCESSLIST',\r\n OrganizationTable: 'GOT_ORGANIZATION',\r\n WorkingValueTable: 'BOT_WORKING_VALUE'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('urlsWithoutLoaderAnimation',\r\n {\r\n value: [\r\n 'REST/NotificationData.svc/MyNotifications'\r\n ]\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('userDetailsTabset',\r\n {\r\n identification: 'IDENTIFICATION',\r\n access: 'ACCESS',\r\n groupSettings: 'GROUP_SETTINGS',\r\n coursesAndCompetences: 'COURSES_AND_COMPETENCES',\r\n horizontal: 'HORIZONTAL',\r\n settings: 'USER_SETTINGS'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .constant('userGroups',\r\n {\r\n admin: 'ADMIN',\r\n manager: 'MANAGER',\r\n user: 'USER',\r\n notAUser: 'NOT_A_USER',\r\n courseHolder: 'COURSE_HOLDER',\r\n adminAll: 'ADMIN_ALL',\r\n userAll: 'USER_ALL'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n closeNotificationMenuOnClick.$inject = [\r\n '$rootScope'\r\n ];\r\n\r\n function closeNotificationMenuOnClick(\r\n $rootScope\r\n ) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n element.on('click', function (event) {\r\n\r\n var targetElement = event.target;\r\n\r\n // try to find in targetElement's parents (starting with itself) a node which matches the given selectors\r\n var navbarNotificationsContainer = targetElement.closest('.navbar-notifications-container');\r\n var notificationModalContainer = targetElement.closest('.notification-modal-container');\r\n\r\n if (!navbarNotificationsContainer && !notificationModalContainer) {\r\n // if no node is found, it means a click occured outside notification menu\r\n // or outside notification modal and we need to broadcast a close notification menu event\r\n $rootScope.$broadcast('closeNotificationMenuEvent');\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n angular\r\n .module('shared')\r\n .directive('closeNotificationMenuOnClick', closeNotificationMenuOnClick);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n innerHtmlToText.$inject = [\r\n '$timeout'\r\n ];\r\n\r\n function innerHtmlToText($timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n\r\n $timeout(function () {\r\n var elementText = element.text();\r\n\r\n element.html(elementText);\r\n });\r\n }\r\n };\r\n }\r\n\r\n angular\r\n .module('shared')\r\n .directive('innerHtmlToText', innerHtmlToText);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .component('vbDropdown', {\r\n templateUrl: 'Scripts/shared/dropdown/dropdown.component.html',\r\n controller: 'VBDropdownController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n onChange: '&',\r\n itemsList: '<',\r\n multiSelect: '<',\r\n hasHeaders: '<',\r\n selectedProperties: '<',\r\n onItemUnselect: '&?',\r\n messageForMandatoryItem: ' 0)\r\n vm.user.Supervisor = {\r\n Name: getSupervisorsName(vm.user.Supervisors)\r\n };\r\n\r\n userOriginal = angular.copy(vm.user);\r\n vm.oldUserName = angular.copy(vm.user.UserName);\r\n vm.setDefaultWebRights();\r\n initTabs();\r\n\r\n $rootScope.$broadcast('chart:user-edited', { id: vm.user.Organization.id });\r\n });\r\n\r\n vm.showPasswordFields = false;\r\n } else {\r\n titleService.changeTitle($filter('translate')('txtNewUser'));\r\n vm.user = UserFactory.getUserToSave();\r\n\r\n vm.showPasswordFields = true;\r\n vm.user.Active = true;\r\n UserFactory.getUserRights(null).$promise.then(function (result) {\r\n vm.user.Rights = result;\r\n\r\n vm.appRights = $filter('filter')(vm.user.Rights, function (right) {\r\n if (right.Table == 'GOT_RIGHT_USER') return right;\r\n });\r\n\r\n vm.webRights = $filter('filter')(vm.user.Rights, function (right) {\r\n if (right.Table == 'GOT_RIGHT_USER_WEB') return right;\r\n });\r\n });\r\n\r\n\r\n postInit().then(function () {\r\n userOriginal = angular.copy(vm.user);\r\n initTabs();\r\n });\r\n };\r\n };\r\n\r\n /**\r\n * Gets the list of bussines roles\r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n vm.getBusinessRoles = function (organizationId) {\r\n return UserFactory.getBusinessRoles(organizationId, true)\r\n .$promise\r\n .then(function (result) {\r\n for (var i = 0; i < result.length; i++) {\r\n result[i].Parent.Name = $filter('translate')(result[i].Parent.ProgId);\r\n //set all properties of businessrole\r\n if (vm.user.BusinessRole && vm.user.BusinessRole.id == result[i].id)\r\n vm.user.BusinessRole = angular.copy(result[i]);\r\n }\r\n //load managers\r\n if (vm.user.BusinessRole && vm.user.BusinessRole.Parent && vm.user.BusinessRole.Parent.ProgId != 'BUSINESSROLE_CEO')\r\n vm.getManagers();\r\n\r\n //load departments\r\n getDepartments();\r\n\r\n vm.businessRoles = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the process lists by date types\r\n */\r\n var getProcessListDataTypes = function () {\r\n var processListDataTypesPromise = ProcessListFactory.getProcessListDataTypes('BOT_PROCESSLIST_MANAGEMENT');\r\n return processListDataTypesPromise.$promise.then(function (result) {\r\n allDataTypes = result;\r\n });\r\n };\r\n\r\n /**\r\n * Set up the tabs based on the data types loaded\r\n */\r\n function initalizeDataDetailsTabs() {\r\n return getProcessListDataTypes().then(function () {\r\n var userDataType;\r\n // first we need to find the dataAboutType 'User'\r\n for (var i = 0; i < allDataTypes.length; i++) {\r\n if (allDataTypes[i].ProgId == 'GOT_USER') {\r\n userDataType = allDataTypes[i];\r\n break;\r\n }\r\n }\r\n\r\n // add all the dataDetails for the dataAboutType 'User' in the tab list\r\n for (var i = 0; i < allDataTypes.length; i++) {\r\n if (!!allDataTypes[i].Parent && allDataTypes[i].Parent.id == userDataType.id) {\r\n var dataDetailsType = allDataTypes[i];\r\n dataDetailsType.tabName = dataDetailsType.Name;\r\n dataDetailsType.tabActive = false;\r\n dataDetailsType.SortNumber = parseInt(dataDetailsType.SortNumber);\r\n vm.dataDetailsTypes.push(dataDetailsType);\r\n }\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the process lists by the user data about\r\n */\r\n function getProcessListsByDataAbout() {\r\n var deferred = $q.defer();\r\n if (!vm.user || !vm.user.id)\r\n deferred.resolve();\r\n else\r\n ProcessListFactory.getProcessListByData('GOT_USER', null, false, vm.user.Organization.id).$promise.then(function (result) {\r\n processListsByDataAbout = $filter('orderBy')(result, \"Name\", false);\r\n deferred.resolve();\r\n });\r\n\r\n processListsByDataAboutPromise = deferred.promise;\r\n\r\n return deferred.promise;\r\n };\r\n\r\n\r\n /**\r\n * Gets the process lists by the data details provided\r\n * @param {} dataDetails \r\n * @returns {} \r\n */\r\n vm.getProcessListsByDataDetails = function (dataDetails) {\r\n var deferred = $q.defer();\r\n\r\n processListsByDataAboutPromise.then(function () {\r\n var processListsByDataDetails = [];\r\n\r\n for (var i = 0; i < processListsByDataAbout.length; i++) {\r\n if (processListsByDataAbout[i].DataDetails.ProgId == dataDetails.ProgId) {\r\n processListsByDataDetails.push(processListsByDataAbout[i]);\r\n }\r\n }\r\n\r\n deferred.resolve(processListsByDataDetails);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the process lists based on \"Available on user\" property\r\n * @returns {} \r\n */\r\n vm.getProcessListsByAvailability = function () {\r\n var deferred = $q.defer();\r\n\r\n ProcessListFactory.getProcessListByAvailability(false, vm.user.Organization.id, 'GOT_USER').$promise.then(function (result) {\r\n processListsByAvailability = $filter('orderBy')(result, \"Name\", false);\r\n deferred.resolve(processListsByAvailability);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets the executions for user\r\n * @param {} includeDeactivatedItems\r\n */\r\n function getExecutions(includeDeactivatedItems) {\r\n return ExecutionFactory.getExecutions(userId, 'GOT_USER', null, includeDeactivatedItems)\r\n .$promise\r\n .then(function (result) {\r\n executions = $filter('orderBy')(result, \"InitiatedProcessList.Name\", false);\r\n });\r\n }\r\n\r\n /**\r\n * Gets the executions by \"Available on user\"\r\n * @param {} includeDeactivatedItems\r\n * @returns {} \r\n */\r\n vm.getExecutionsByAvailability = function (includeDeactivatedItems) {\r\n var deferred = $q.defer();\r\n ExecutionFactory.getExecutions(userId, 'GOT_USER', 'GOT_USER', includeDeactivatedItems).$promise.then(function (result) {\r\n deferred.resolve($filter('orderBy')(result, \"InitiatedProcessList.Name\", false));\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * Gets executions by the given data details\r\n * @param {} dataDetails \r\n * @param {} includeDeactivatedItems\r\n * @returns {} \r\n */\r\n vm.getExecutionsByDataDetails = function (dataDetails, includeDeactivatedItems) {\r\n var deferred = $q.defer();\r\n\r\n getExecutions(includeDeactivatedItems).then(function () {\r\n var executionsByDataDetails = [];\r\n for (var i = 0; i < executions.length; i++) {\r\n if (executions[i].InitiatedProcessList.DataDetails.ProgId == dataDetails.ProgId) {\r\n executionsByDataDetails.push(executions[i]);\r\n }\r\n }\r\n\r\n deferred.resolve(executionsByDataDetails);\r\n });\r\n\r\n return deferred.promise;\r\n };\r\n\r\n vm.canShowDataDetailsTabs = function () {\r\n if (sessionInformationService.isImpersonationActive())\r\n return false;\r\n\r\n return userId > 0\r\n && vm.loggedUser //&& (vm.loggedUser.Group.ProgId == 'ADMIN' || vm.loggedUser.Group.ProgId == 'MANAGER')\r\n && (vm.loggedUser.Organization.Central || vm.loggedUser.Organization.id == vm.user.Organization.id);\r\n };\r\n\r\n /**\r\n * Gets the list of companies\r\n * Only central can see this\r\n */\r\n function getOrganizationsDropdown() {\r\n return OrganizationFactory.getOrganizationsDropdown()\r\n .$promise\r\n .then(function (result) {\r\n vm.organizations = result;\r\n if (!userId) {\r\n if (OrganizationUtilService.getOrganizationId())\r\n vm.user.Organization = { id: OrganizationUtilService.getOrganizationId() };\r\n else\r\n vm.user.Organization = vm.loggedUser.Organization;\r\n\r\n //load supervisors\r\n vm.user.Supervisors = UserFactory.getUsers(null, false, vm.user.Organization.id);\r\n }\r\n\r\n //load all business roles for selected organization\r\n return vm.getBusinessRoles(vm.user.Organization.id);\r\n });\r\n };\r\n\r\n /**\r\n * Get the group access list\r\n */\r\n function getGroups() {\r\n var organizationId;\r\n // if the user is new pick the company from the context\r\n if (!userId) {\r\n organizationId = OrganizationUtilService.getOrganizationId();\r\n } else\r\n organizationId = vm.user.Organization.id;\r\n\r\n\r\n return UserFactory.getGroups(organizationId)\r\n .$promise\r\n .then(function (result) {\r\n vm.groups = result;\r\n });\r\n };\r\n\r\n vm.getManagers = function () {\r\n if (!vm.managers)\r\n vm.managers = UserFactory.getManagers(vm.user.id, vm.user.Organization.id);\r\n };\r\n\r\n /**\r\n * Checks if the selected bussines role is correct\r\n * @returns {} \r\n */\r\n vm.checkBusinessRole = function () {\r\n //when is accessed first time\r\n if (!vm.businessRole || !vm.businessRole.Name)\r\n return false;\r\n\r\n vm.businessRoleNameError = false;\r\n vm.businessRoleCEOError = false;\r\n\r\n var nrAparition = 0;\r\n for (var index = 0; index < vm.businessRoles.length; index++) {\r\n if (vm.businessRole.Name.toLowerCase() === vm.businessRoles[index].Name.toLowerCase() &&\r\n vm.businessRole.id !== vm.businessRoles[index].id) {\r\n nrAparition++;\r\n vm.businessRoleNameError = true;\r\n }\r\n\r\n if (vm.businessRole.Parent &&\r\n vm.businessRole.Parent.ProgId === 'BUSINESSROLE_CEO' &&\r\n vm.businessRoles[index].Parent.ProgId === 'BUSINESSROLE_CEO' &&\r\n vm.businessRole.id !== vm.businessRoles[index].id) {\r\n nrAparition++;\r\n vm.businessRoleCEOError = true;\r\n }\r\n\r\n if (nrAparition > 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n /**\r\n * Saves the current user\r\n * @returns {} \r\n */\r\n vm.saveUser = function () {\r\n if (userId == null || isDirty()) {\r\n if (vm.user.BusinessRole && vm.user.BusinessRole.Parent && vm.user.BusinessRole.Parent.ProgId == 'BUSINESSROLE_CEO')\r\n vm.user.Manager = null;\r\n\r\n vm.user.Phone = document.getElementById('username').value;\r\n if (vm.user.InternalOrder && !vm.user.InternalOrder.id)\r\n vm.user.InternalOrder = null;\r\n\r\n vm.user.OrganizationsAccess = OrganizationFactory.getValidOrganizationsAccessToSave(vm.organizationsAccess);\r\n\r\n if (vm.user.Competences && vm.user.Competences.length > 0)\r\n for (var i = 0; i < vm.user.Competences.length; i++) {\r\n var competence = vm.user.Competences[i];\r\n\r\n if (competence.StartDate)\r\n competence.StartDate = fixDate(competence.StartDate);\r\n\r\n if (competence.EndDate)\r\n competence.EndDate = fixDate(competence.EndDate);\r\n }\r\n\r\n var userToSave = UserFactory.saveUser(angular.copy(vm.user));\r\n userToSave.then(function () {\r\n if (userId)\r\n $route.reload();\r\n else\r\n checkUsersAccessAndNavigate();\r\n });\r\n } else {\r\n checkUsersAccessAndNavigate();\r\n }\r\n };\r\n\r\n /**\r\n * Closes the user window\r\n * User is asked if he is sure to close the window\r\n * @param {} url \r\n * @returns {} \r\n */\r\n vm.closeUser = function (url) {\r\n if (isDirty()) {\r\n dialogService.showConfirmDialog('txtCloseUserTitle', 'txtCloseUserMessage').then(function (dialogResult) {\r\n if (dialogResult == dialogService.DIALOG_RESULT_OK) {\r\n checkUsersAccessAndNavigate(url);\r\n }\r\n });\r\n } else\r\n checkUsersAccessAndNavigate(url);\r\n }\r\n\r\n function checkUsersAccessAndNavigate(url) {\r\n if (url)\r\n $location.path(url);\r\n else\r\n if (menuService.checkMenuAccess('/users')) {\r\n $location.path('/users');\r\n menuService.setSelectedMenu(menuService.getParentMenuByHref('/users'));\r\n }\r\n\r\n else {\r\n $location.path('/home');\r\n menuService.setSelectedMenu(menuService.getMenuByHref('/home'));\r\n }\r\n };\r\n\r\n vm.keyPressed = function (event) {\r\n if (event.which === 13) {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n /**\r\n * Checks whehter the save is disabled\r\n * @param {} isFormValid \r\n * @returns {} \r\n */\r\n vm.isSaveDisabled = function (isFormValid, form) {\r\n var isDisabled = false;\r\n\r\n if (!isFormValid)\r\n return true;\r\n\r\n //if (userOriginal && isDirty())\r\n // isDisabled = false;\r\n\r\n if ((userId == null || vm.showChangePass) && vm.checkConfirmedPassword())\r\n isDisabled = false;\r\n\r\n if (vm.checkPasswordSameAsUsername())\r\n isDisabled = true;\r\n //if we have settings\r\n //check if impersonate dates are ok\r\n if (vm.user && vm.user.Settings) {\r\n var startDate = moment(vm.user.Settings.FromDate);\r\n var endDate = moment(vm.user.Settings.ToDate);\r\n\r\n if (startDate.isAfter(endDate))\r\n return true;\r\n }\r\n\r\n if (vm.user && vm.user.BusinessRole && vm.user.BusinessRole.Parent &&\r\n vm.user.BusinessRole.Parent.ProgId == 'BUSINESSROLE_CEO'\r\n && (!vm.user.Department))\r\n return true;\r\n\r\n return isDisabled;\r\n };\r\n\r\n /**\r\n * Unlocks the current user\r\n * @returns {} \r\n */\r\n vm.unlockUser = function () {\r\n UserFactory.unlockUser(userId).then(function () {\r\n $route.reload();\r\n });\r\n };\r\n\r\n /************************************\r\n * *\r\n * *\r\n * IDENTIFICATION TAB *\r\n * *\r\n * *\r\n *************************************/\r\n\r\n /**\r\n * Checks if the confirmed password is correct \r\n * @returns {} \r\n */\r\n vm.checkConfirmedPassword = function () {\r\n if (vm.userForm == null)\r\n return false;\r\n if (vm.userForm.password == null || vm.userForm.confirmPassword == null)\r\n return false;\r\n if (vm.userForm.password.$modelValue == vm.userForm.confirmPassword.$modelValue)\r\n return true;\r\n else\r\n return false;\r\n };\r\n\r\n /**\r\n * Checks whether the passowrd is the same as username\r\n * @returns {} \r\n */\r\n vm.checkPasswordSameAsUsername = function () {\r\n if (!vm.user)\r\n return false;\r\n if (!vm.user.UserName)\r\n return false;\r\n if (vm.user.Password == vm.user.UserName)\r\n return true;\r\n return false;\r\n };\r\n\r\n vm.showErrOrganization = function () {\r\n if ((vm.organizations && vm.user) && vm.user.Organization) {\r\n for (var index = 0; index < vm.organizations.length; index++) {\r\n if (vm.organizations[index].id == vm.user.Organization.id) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n\r\n vm.showBusinessRoleModal = function (businessRole) {\r\n if (businessRole) {\r\n for (var index = 0; index < vm.businessRoles.length; index++) {\r\n if (businessRole.id == vm.businessRoles[index].id) {\r\n vm.businessRole = angular.copy(vm.businessRoles[index]);\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n vm.businessRole = {};\r\n\r\n\r\n if (!vm.businessRoleParents)\r\n vm.businessRoleParents = UserFactory.getBusinessRoleParents(vm.user.Organization.id);\r\n\r\n businessRoleModal = $uibModal.open({\r\n templateUrl: 'Scripts/user/user-details/user-business-role.modal.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n };\r\n\r\n vm.cancel = function () {\r\n businessRoleModal.dismiss('cancel');\r\n };\r\n\r\n vm.toggleChangePassword = function () {\r\n vm.showChangePass = !vm.showChangePass;\r\n };\r\n\r\n /**\r\n * Saves the given bussines role\r\n * @param businessRole\r\n */\r\n vm.saveBusinessRole = function (businessRole) {\r\n if (!businessRole.id)\r\n businessRole.Active = true;\r\n var roleSaved = UserFactory.saveBusinessRole(businessRole, vm.user.Organization.id);\r\n roleSaved.then(function () {\r\n vm.getBusinessRoles(vm.user.Organization.id);\r\n vm.cancel();\r\n });\r\n };\r\n\r\n vm.disabledSaveBusinessRole = function () {\r\n if (vm.roleForm && (vm.roleForm.name.$invalid && vm.roleForm.name.$error.required))\r\n return true;\r\n return false;\r\n };\r\n\r\n vm.userNamePattern = (function () {\r\n var regexp = /^[0-9\\b]+$/;\r\n return {\r\n test: function (value) {\r\n return regexp.test(value);\r\n }\r\n };\r\n })();\r\n\r\n /**\r\n * Creates a confirm modal in order to confirm the active state of the Roerhandboka\r\n */\r\n function confirmRoerhandbokaActive() {\r\n return dialogService.showConfirmDialog(\r\n 'Rørhandboka',\r\n $translate.instant('txtActivateRorhandboka'),\r\n 'lg'\r\n );\r\n };\r\n\r\n /**\r\n * Called when the user changes the rights for the current user\r\n * When access to order is given, right to suborder is given as well and vice versa\r\n * @param right\r\n */\r\n vm.rightChanged = function (right) {\r\n\r\n if (right.Table == 'GOT_RIGHT_USER') {\r\n switch (right.ProgId) {\r\n case \"NEW_EDIT_ORDER\":\r\n if (right.HasAccess)\r\n $filter('filter')(vm.appRights,\r\n function (r) {\r\n if (r.ProgId == 'NEW_EDIT_SUBORDER')\r\n r.HasAccess = true;\r\n });\r\n break;\r\n case \"NEW_EDIT_SUBORDER\":\r\n if (!right.HasAccess)\r\n $filter('filter')(vm.appRights,\r\n function (r) {\r\n if (r.ProgId == 'NEW_EDIT_ORDER')\r\n r.HasAccess = false;\r\n });\r\n break;\r\n case \"HAS_RORHANDBOKA\":\r\n if (right.HasAccess) {\r\n confirmRoerhandbokaActive()\r\n .then(function (answer) {\r\n if (answer === dialogService.DIALOG_RESULT_OK)\r\n right.HasAccess = true;\r\n else\r\n right.HasAccess = false;\r\n });\r\n }\r\n break;\r\n }\r\n } else if (right.Table == 'GOT_RIGHT_USER_WEB') {\r\n switch (right.ProgId) {\r\n case \"NEW_EDIT_ORDER\":\r\n if (right.HasAccess)\r\n $filter('filter')(vm.webRights,\r\n function (r) {\r\n if (r.ProgId == 'NEW_EDIT_SUBORDER')\r\n r.HasAccess = true;\r\n });\r\n break;\r\n case \"NEW_EDIT_SUBORDER\":\r\n if (!right.HasAccess)\r\n $filter('filter')(vm.webRights,\r\n function (r) {\r\n if (r.ProgId == 'NEW_EDIT_ORDER')\r\n r.HasAccess = false;\r\n });\r\n break;\r\n case \"HAS_RORHANDBOKA\":\r\n if (right.HasAccess) {\r\n right.HasAccess = confirm($filter('translate')('txtActivateRorhandboka'));\r\n }\r\n break;\r\n }\r\n }\r\n };\r\n\r\n function postInit() {\r\n return $q.all([\r\n getGroups(),\r\n getOrganizationsDropdown(),\r\n initalizeDataDetailsTabs(),\r\n getProcessListsByDataAbout(),\r\n getExecutions()\r\n ]);\r\n };\r\n\r\n vm.resetOrders = function () {\r\n vm.orders = [];\r\n };\r\n\r\n /**\r\n * Gets the list of order for setting the internal order\r\n * @param freeText\r\n */\r\n vm.getOrders = function (freeText) {\r\n if (!vm.user.Organization || !vm.user.Organization.id)\r\n return;\r\n\r\n OrganizationFactory.getOrders(vm.user.Organization.id, freeText).then(function (orders) {//todo move to ordersFactory\r\n vm.orders = orders;\r\n vm.user.InternalOrder.IsOpen = true;\r\n }, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n\r\n vm.setInternalOrder = function (order) {\r\n vm.user.InternalOrder = order;\r\n vm.user.InternalOrder.Name = getOrderName();\r\n vm.user.InternalOrder.IsOpen = false;\r\n };\r\n\r\n vm.setSupervisor = function (supervisor) {\r\n if (supervisor.id == vm.user.Manager.id) {\r\n supervisor.IsChecked = false;\r\n return;\r\n }\r\n supervisor.IsChecked = !supervisor.IsChecked;\r\n vm.user.Supervisor = {\r\n Name: getSupervisorsName(vm.user.Supervisors)\r\n };\r\n };\r\n\r\n vm.removeManagerFromSupervisors = function (managerId) {\r\n for (var i = 0; i < vm.user.Supervisors.length; i++) {\r\n if (vm.user.Supervisors[i].id == managerId) {\r\n vm.user.Supervisors[i].IsChecked = false;\r\n }\r\n }\r\n\r\n vm.user.Supervisor = {\r\n Name: getSupervisorsName(vm.user.Supervisors)\r\n };\r\n };\r\n\r\n vm.initiateDate = function (date) {\r\n if (!date) {\r\n return new Date();\r\n };\r\n\r\n return date;\r\n };\r\n\r\n function fixDate(date) {\r\n return date ? moment(date).add(moment().utcOffset(), 'minutes').valueOf() : null;\r\n }\r\n\r\n /**\r\n * Adds the department to the current user\r\n */\r\n vm.addDepartment = function () {\r\n if (!vm.user.Departments)\r\n vm.user.Departments = [];\r\n\r\n var department = $filter('filter')(vm.departments, function (item) {\r\n if (item.id == vm.user.Department.id)\r\n return item;\r\n })[0];\r\n\r\n var existingDepartment = $filter('filter')(vm.user.Departments, function (item) {\r\n if (item.id == vm.user.Department.id)\r\n return item;\r\n });\r\n\r\n if (existingDepartment.length == 0) {\r\n vm.user.Departments.push(department);\r\n }\r\n };\r\n\r\n vm.removeDepartment = function (index) {\r\n vm.user.Departments.splice(index, 1);\r\n };\r\n\r\n vm.changeRightState = function (right) {\r\n\r\n if (vm.loggedUser.Group.ProgId !== 'ADMIN')\r\n return;\r\n\r\n right.HasAccess = !right.HasAccess;\r\n vm.rightChanged(right);\r\n\r\n };\r\n\r\n vm.unregisterUser = function () {\r\n var message = ['GDPR.GDPR_NOT_ACCEPTED', 'GDPR.GDPR_NOT_ACCEPTED3'];\r\n\r\n dialogService.showConfirmDialog('GDPR.GDPR_CONFIRMATION_TITLE', message)\r\n .then(function (dialogResult) {\r\n if (dialogResult != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(false);\r\n\r\n var gdpr = {\r\n IsGdprAccepted: false,\r\n Table: 'GOT_USER',\r\n ForeignKey: vm.user.id\r\n };\r\n\r\n return GdprFactory.save(gdpr);\r\n }).then(function (result) {\r\n if (result === false)\r\n return;\r\n\r\n $scope.$emit('onLogout');\r\n });\r\n };\r\n\r\n /**\r\n * Sets the default check state for the selected group (All web rights for admin)\r\n */\r\n vm.setDefaultWebRights = function () {\r\n if (vm.user.Group.ProgId === 'ADMIN')\r\n for (right in vm.webRights)\r\n vm.webRights[right].HasAccess = true;\r\n };\r\n\r\n vm.selectTab = function (tabName) {\r\n TabUtilService.setCurrentTab(TabUtilService.pages.USER_DETAIL, tabName);\r\n };\r\n\r\n function initTabs() {\r\n var currentTab = TabUtilService.getCurrentTab(TabUtilService.pages.USER_DETAIL);\r\n\r\n if (_.isNil(currentTab)) {\r\n vm.activeTab = 'IDENTIFICATION';\r\n return;\r\n }\r\n\r\n vm.activeTab = currentTab;\r\n };\r\n\r\n function hasLoggedUserFullAccess() {\r\n return sessionInformationService.hasLoggedUserFullAccess();\r\n }\r\n\r\n function onBusinessRoleChange() {\r\n\r\n if (vm.user.BusinessRole.Parent && vm.user.BusinessRole.Parent.ProgId === businessRoleCategories.ceo) {\r\n\r\n if (!vm.user.Settings) {\r\n vm.user.Settings = {\r\n CanSignUpForCourses: true\r\n }\r\n } else {\r\n vm.user.Settings.CanSignUpForCourses = true;\r\n }\r\n\r\n } else {\r\n vm.getManagers();\r\n }\r\n }\r\n\r\n function onExecutionStart() {\r\n ExecutionService.setPageFromWhereTheExecutionWasOpened([AllAccessPage.Users, AllAccessPage.MyProfile]);\r\n }\r\n\r\n function onExecutionResume() {\r\n ExecutionService.setPageFromWhereTheExecutionWasOpened([AllAccessPage.Users, AllAccessPage.MyProfile]);\r\n }\r\n };\r\n\r\n})();\r\n","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('userList', {\r\n templateUrl: 'Scripts/user/user-list/user-list.component.html',\r\n controller: 'UserListController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserListController.$inject = [\r\n '$filter',\r\n 'titleService',\r\n 'searchService',\r\n 'UserFactory',\r\n '$q',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n '_',\r\n 'sessionInformationService',\r\n '$location'\r\n ];\r\n\r\n angular.module('user').controller('UserListController', UserListController);\r\n\r\n function UserListController(\r\n $filter,\r\n titleService,\r\n searchService,\r\n UserFactory,\r\n $q,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n _,\r\n sessionInformationService,\r\n $location\r\n ) {\r\n var vm = this;\r\n titleService.changeTitle($filter('translate')('Users'));\r\n\r\n vm.predicate = UserFactory.predicateUsers;\r\n vm.includeDeactivatedItems = UserFactory.includeDeactivatedItems;\r\n\r\n var allUsers = [];\r\n var nrOfRowsToLoadAtStart = 70;\r\n var nrOfRowsToLoad = 10;\r\n\r\n //pagination for small devices\r\n vm.currentPage = 1;\r\n vm.itemsPerPage = 30;\r\n vm.numPages = 1;\r\n vm.companyHasAutomile = false;\r\n\r\n vm.loggedUser = sessionInformationService.getUser();\r\n vm.search = searchService.getSearch();\r\n\r\n vm.go = go;\r\n vm.isImpersonationActive = sessionInformationService.isImpersonationActive;\r\n\r\n\r\n /**\r\n * Changes the sort order using the given vm.predicate\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n vm.changeOrder = function (orderBy) {\r\n vm.users = [];\r\n if (orderBy != vm.predicate) {\r\n vm.predicate = orderBy;\r\n UserFactory.predicateUsers = orderBy;\r\n } else {\r\n vm.predicate = !vm.predicate;\r\n UserFactory.predicateUsers = vm.predicate;\r\n }\r\n\r\n allUsers = $filter('orderBy')(allUsers, UserFactory.predicateUsers, UserFactory.predicateUsers);\r\n\r\n vm.users = allUsers.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n /**\r\n * Gets the list of users based on the search criteria\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n vm.getUsers = function (freeText, organizationId) {\r\n\r\n OrganizationUtilService.setOrganizationId(organizationId ? organizationId : null);\r\n if (freeText != undefined && freeText != null) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n searchService.setSearch(freeText);\r\n UserFactory.includeDeactivatedItems = vm.includeDeactivatedItems;\r\n var users = UserFactory.getUsers(freeText, vm.includeDeactivatedItems, organizationId);\r\n users.$promise.then(function (result) {\r\n allUsers = result;\r\n for (var index = 0; index < allUsers.length; index++) {\r\n allUsers[index].id = parseInt(allUsers[index].id);\r\n allUsers[index].ExternalId = parseInt(allUsers[index].ExternalId);\r\n }\r\n allUsers = $filter('orderBy')(allUsers, UserFactory.predicateUsers, UserFactory.predicateUsers);\r\n\r\n if (vm.isXs) {\r\n vm.users = allUsers;\r\n vm.numPages = Math.ceil(allUsers.length / vm.itemsPerPage);\r\n } else\r\n vm.users = allUsers.slice(0, nrOfRowsToLoadAtStart);\r\n\r\n vm.companyHasAutomile = _.some(result, function (user) { return user.AutomileConnected });\r\n });\r\n };\r\n\r\n vm.reachedEndOfList = false;\r\n /**\r\n * Gets called when the user has reached the bottom of list\r\n * @returns {} \r\n */\r\n vm.loadMore = function () {\r\n if (vm.users && vm.users.length < allUsers.length) {\r\n var last = vm.users.length > 0 ? vm.users.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allUsers.length ? allUsers.length : last + nrOfRowsToLoad;\r\n\r\n vm.users = allUsers.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (allUsers.length > nrOfRowsToLoadAtStart) {\r\n vm.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n vm.getCurrentOrganization = function () {\r\n if (vm.loggedUser.Organization.Central && vm.loggedUser.Group.ProgId == 'ADMIN') {\r\n if (vm.search.Organization && vm.search.Organization.id)\r\n return vm.search.Organization.id;\r\n }\r\n return vm.loggedUser.Organization.id;\r\n };\r\n\r\n vm.onOrganizationChange = function (organization, firstTime) {\r\n vm.search.Organization = organization;\r\n vm.getUsers(vm.search.text, organization.id);\r\n }\r\n\r\n vm.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n function go(path) {\r\n $location.path(path);\r\n }\r\n\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUsers',\r\n {\r\n templateUrl: 'Scripts/user/users/users.component.html',\r\n controller: 'UsersController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n users: '<',\r\n expandableRows: '<',\r\n selectableRows: '<',\r\n useMaxHeight: '<',\r\n onUserClick: '&?',\r\n extraColumns: ' 0;\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('UsersController', usersController);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n TabUtilService.$inject = [\r\n '_',\r\n '$localStorage',\r\n '$rootScope'\r\n ];\r\n\r\n angular\r\n .module('util')\r\n .service('TabUtilService', TabUtilService);\r\n\r\n function TabUtilService(\r\n _,\r\n $localStorage,\r\n $rootScope\r\n ) {\r\n var tabUtilService = {};\r\n\r\n tabUtilService.configuration = $localStorage.tabConfiguration || [];\r\n\r\n tabUtilService.pages = {\r\n USER_DETAIL: 0,\r\n ORGANIZATION_DETAIL: 1,\r\n ORDER_DETAIL: 2,\r\n PROJECT_DETAIL: 3,\r\n COURSE_DETAIL: 4,\r\n COURSES_AND_COMPETENCES_TAB: 5,\r\n COURSES: 6\r\n };\r\n\r\n tabUtilService.setCurrentTab = function (page, tabName) {\r\n //find any existing config for current page\r\n var existingConfiguration = _.find(tabUtilService.configuration, function (c) { return c.page == page });\r\n\r\n if (!_.isNil(existingConfiguration))\r\n existingConfiguration.currentTab = tabName;\r\n else {\r\n existingConfiguration = { page: page, currentTab: tabName };\r\n tabUtilService.configuration.push(existingConfiguration);\r\n }\r\n\r\n //save in localstorage\r\n $localStorage.tabConfiguration = tabUtilService.configuration;\r\n };\r\n\r\n tabUtilService.getCurrentTab = function(page) {\r\n var pageConfig = _.find(tabUtilService.configuration, function(e) { return e.page == page });\r\n\r\n if (_.isNil(pageConfig))\r\n return null;\r\n\r\n return pageConfig.currentTab;\r\n };\r\n\r\n tabUtilService.clearConfiguration = function() {\r\n tabUtilService.configuration = $localStorage.tabConfiguration = [];\r\n $rootScope.$broadcast('onTabConfigClearSuccess');\r\n };\r\n\r\n return tabUtilService;\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n fileReader.$inject = [\r\n '$http',\r\n '$q'\r\n ];\r\n\r\n angular\r\n .module('VBSmart')\r\n .factory('fileReader', fileReader);\r\n\r\n function fileReader(\r\n $http,\r\n $q\r\n ) {\r\n /**\r\n * Function that is called the file has been loaded\r\n * @param reader\r\n * @param deferred\r\n * @param scope\r\n */\r\n var onLoad = function (reader, deferred, scope) {\r\n return function () {\r\n scope.$apply(function () {\r\n deferred.resolve(reader.result);\r\n });\r\n };\r\n };\r\n\r\n /**\r\n * Function that is called when an error occurs\r\n * @param reader\r\n * @param deferred\r\n * @param scope\r\n */\r\n var onError = function (reader, deferred, scope) {\r\n return function () {\r\n scope.$apply(function () {\r\n deferred.reject(reader.result);\r\n });\r\n };\r\n };\r\n\r\n /**\r\n * Function that is called during the read process\r\n * @param reader\r\n * @param scope\r\n */\r\n var onProgress = function (reader, scope) {\r\n return function (event) {\r\n scope.$broadcast(\"fileProgress\",\r\n {\r\n total: event.total,\r\n loaded: event.loaded\r\n });\r\n };\r\n };\r\n\r\n /**\r\n * Sets up a new file reader with the necessary parameters\r\n * @param deferred\r\n * @param scope\r\n * @returns\r\n */\r\n var getReader = function (deferred, scope) {\r\n var reader = new FileReader();\r\n reader.onload = onLoad(reader, deferred, scope);\r\n reader.onerror = onError(reader, deferred, scope);\r\n reader.onprogress = onProgress(reader, scope);\r\n return reader;\r\n };\r\n\r\n /**\r\n * Reads the base64 for any given file\r\n * @param file\r\n * @param scope\r\n * @returns\r\n */\r\n var readAsDataURL = function (file, scope) {\r\n var deferred = $q.defer();\r\n\r\n var reader = getReader(deferred, scope);\r\n reader.readAsDataURL(file);\r\n\r\n return deferred.promise;\r\n };\r\n\r\n return {\r\n readAsDataUrl: readAsDataURL\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('configuration')\r\n .component('vbDataDetailItem',\r\n {\r\n templateUrl: 'Scripts/configuration/data-details/data-details-item/data-details-item.component.html',\r\n controller: 'DataDetailsItemController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dataDetail: '=vbDataDetail',\r\n checkIfDataDetailExist: '&',\r\n modalInstance: '<',\r\n dataAbout: ' 0) {\r\n ListService.markExistentItemsAsSelected(vm.courseTargetAudiences, vm.course.TargetAudiences);\r\n }\r\n });\r\n }\r\n\r\n function getCourseSubjectManagers() {\r\n\r\n CourseSubjectManagerFactory.getCourseSubjectManagers()\r\n .then(function(courseSubjectManagers) {\r\n\r\n vm.courseSubjectManagers = courseSubjectManagers;\r\n\r\n if (vm.course.SubjectManagers && vm.course.SubjectManagers.length > 0) {\r\n ListService.markExistentItemsAsSelected(vm.courseSubjectManagers, vm.course.SubjectManagers, 'id');\r\n }\r\n });\r\n }\r\n\r\n function saveCourseCategory(courseCategory) {\r\n return TypeFactory.saveCourseCategory(courseCategory);\r\n }\r\n\r\n function saveTargetAudience(targetAudience) {\r\n return TypeFactory.saveTargetAudience(targetAudience);\r\n }\r\n\r\n function canNrOfParticipantsFieldBeDisplayed() {\r\n return vm.course.Type && vm.course.Type.ProgId === CourseTypes.Classroom;\r\n }\r\n\r\n function canLocationFieldBeDisplayed() {\r\n return vm.course.Type && vm.course.Type.ProgId === CourseTypes.ELearning;\r\n }\r\n\r\n function onCourseCategorySelect(courseCategory) {\r\n vm.course.Category = courseCategory;\r\n }\r\n\r\n function onCourseKeywordsChange(courseKeywords) {\r\n\r\n if (!vm.course.Keywords) {\r\n vm.course.Keywords = { KeywordsList: [] };\r\n }\r\n\r\n vm.course.Keywords.KeywordsList = courseKeywords;\r\n }\r\n\r\n function onCourseCategoryAdd() {\r\n\r\n openTypeModal(null, 'COURSE.CATEGORY', saveCourseCategory)\r\n .then(function () {\r\n // refresh course category dropdown\r\n getCourseCategories();\r\n });\r\n }\r\n\r\n function onCourseCategoryEdit(courseCategory) {\r\n\r\n openTypeModal(courseCategory, 'COURSE.CATEGORY', saveCourseCategory)\r\n .then(function () {\r\n // refresh course category dropdown\r\n getCourseCategories();\r\n });\r\n }\r\n\r\n function onCourseTargetAudienceChange(targetAudienceObject, isFromSelectAll) {\r\n\r\n if (!vm.course.TargetAudiences) \r\n vm.course.TargetAudiences = [];\r\n\r\n var targetAudienceName = targetAudienceObject.name;\r\n\r\n ListService.addPrimitiveItemIfNotExists(targetAudienceName, vm.course.TargetAudiences);\r\n\r\n if (!isFromSelectAll)\r\n $rootScope.$broadcast('onTargetAudienceFromCourseInformationTabSelect');\r\n }\r\n\r\n function onSelectAllTargetAudiences() {\r\n $rootScope.$broadcast('onTargetAudienceFromCourseInformationTabSelectAll');\r\n }\r\n\r\n function onCourseTargetAudienceAdd() {\r\n\r\n openTypeModal(null, 'COURSE_PAGE.TARGET_AUDIENCE', saveTargetAudience)\r\n .then(function() {\r\n // refresh target audience dropdown\r\n getTargetAudiences();\r\n });\r\n }\r\n\r\n function onCourseTargetAudienceEdit(targetAudience) {\r\n\r\n openTypeModal(targetAudience, 'COURSE_PAGE.TARGET_AUDIENCE', saveTargetAudience)\r\n .then(function() {\r\n // refresh target audience dropdown\r\n getTargetAudiences();\r\n });\r\n }\r\n \r\n function onCourseSubjectManagerChange(courseSubjectManager) {\r\n\r\n if (!vm.course.SubjectManagers) {\r\n vm.course.SubjectManagers = [];\r\n }\r\n\r\n ListService.addItemIfNotExists(courseSubjectManager, vm.course.SubjectManagers, 'id');\r\n }\r\n\r\n function onCourseSubjectManagerAdd() {\r\n\r\n openSubjectManagerModal()\r\n .then(function() {\r\n // refresh the subject manager dropdown\r\n getCourseSubjectManagers();\r\n });\r\n }\r\n\r\n function onCourseSubjectManagerEdit(subjectManager) {\r\n\r\n openSubjectManagerModal(subjectManager)\r\n .then(function() {\r\n // refresh the subject manager dropdown\r\n getCourseSubjectManagers();\r\n });\r\n }\r\n\r\n function openSubjectManagerModal(subjectManager) {\r\n\r\n // prepare data for the modal component\r\n $scope.subjectManager = subjectManager;\r\n\r\n var subjectManagerModalHtmlComponent = '\\\r\n ';\r\n\r\n return ModalService.openModal($scope, subjectManagerModalHtmlComponent, 'md');\r\n }\r\n\r\n function openTypeModal(type, modalTitle, saveDelegate) {\r\n\r\n // prepare data for the modal component\r\n $scope.title = modalTitle;\r\n $scope.saveDelegate = saveDelegate;\r\n $scope.type = angular.copy(type);\r\n TypeService.removeCharactersFromName($scope.type, 'N/A');\r\n\r\n var typeModalHtmlComponent = '\\\r\n ';\r\n\r\n return ModalService.openModal($scope, typeModalHtmlComponent, 'md');\r\n }\r\n\r\n function onCourseTargetAudienceUnselect(courseTargetAudienceObject) {\r\n\r\n if (!vm.course || !vm.course.id) {\r\n return;\r\n }\r\n\r\n CourseTargetAudienceFactory.checkIfTargetAudienceIsUsedInAccessForCourse(courseTargetAudienceObject.name,\r\n vm.course.id)\r\n .then(function(response) {\r\n\r\n var result = response.CheckIfTargetAudienceIsUsedInAccessForCourseResult;\r\n\r\n if (result) {\r\n errorService.changeError($translate.instant('ERRORS.CANNOT_UNCHECK_TARGET_AUDIENCE'));\r\n courseTargetAudienceObject.checked = true;\r\n _targetAudienceDropdownComponent.onItemReselected();\r\n } else {\r\n if (!vm.course.TargetAudiences) {\r\n return;\r\n }\r\n\r\n var targetAudienceName = courseTargetAudienceObject.name;\r\n\r\n var index = vm.course.TargetAudiences.findIndex(function (currentTargetAudience) {\r\n return currentTargetAudience === targetAudienceName;\r\n });\r\n\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n vm.course.TargetAudiences.splice(index, 1);\r\n\r\n $rootScope.$broadcast('onTargetAudienceFromCourseInformationTabUnselect');\r\n }\r\n });\r\n }\r\n\r\n function onCourseSubjectManagerUnselect(courseSubjectManager) {\r\n ListService.removeItemFromList(courseSubjectManager, vm.course.SubjectManagers);\r\n }\r\n\r\n function getIntranettPositions() {\r\n UserFactory.getIntranettPositions(_targetAudienceSearchText)\r\n .then(function(intranettPositions) {\r\n\r\n _intranettPositions\r\n = UserService.convertIntranettPositionsToObjects(intranettPositions);\r\n\r\n if (vm.course.TargetAudiences && vm.course.TargetAudiences.length > 0) {\r\n\r\n var targetAudiencesObjects\r\n = UserService.convertIntranettPositionsToObjects(vm.course.TargetAudiences);\r\n\r\n ListService.markExistentItemsAsSelected(_intranettPositions, targetAudiencesObjects, 'name');\r\n }\r\n });\r\n }\r\n\r\n function initTargetAudienceDropdownReference(componentReference) {\r\n _targetAudienceDropdownComponent = componentReference;\r\n }\r\n\r\n function onTargetAudienceSearchTextChange(searchText) {\r\n _targetAudienceSearchText = searchText;\r\n getIntranettPositions();\r\n }\r\n\r\n function onCourseTypeSelect(courseType) {\r\n vm.course.Type = courseType;\r\n }\r\n\r\n function onCourseStatusSelect(courseStatus) {\r\n vm.course.Status = courseStatus;\r\n }\r\n\r\n function onCourseOrganizerChange(courseOrganizer) {\r\n vm.course.Organizer = courseOrganizer;\r\n }\r\n\r\n function translateCourseTypes() {\r\n // use a copy to trigger $onChanges for vb-dropdown\r\n var courseTypesCopy = angular.copy(vm.courseTypes);\r\n\r\n if (courseTypesCopy && courseTypesCopy.length > 0) {\r\n courseTypesCopy.forEach(function (courseType) {\r\n courseType.Name = TypeService.getTypeTranslation(courseType);\r\n });\r\n }\r\n\r\n if (vm.course.Type && vm.course.Type.id) {\r\n vm.course.Type.Name = TypeService.getTypeTranslation(vm.course.Type);\r\n }\r\n\r\n vm.courseTypes = courseTypesCopy;\r\n }\r\n\r\n function translateCourseStatuses() {\r\n // use a copy to trigger $onChanges for vb-dropdown\r\n var courseStatusesCopy = angular.copy(vm.courseStatuses);\r\n\r\n if (courseStatusesCopy && courseStatusesCopy.length > 0) {\r\n courseStatusesCopy.forEach(function(courseStatus) {\r\n courseStatus.Name = StatusService.getStatusTranslation(courseStatus);\r\n });\r\n }\r\n\r\n if (vm.course.Status && vm.course.Status.id) {\r\n vm.course.Status.Name = StatusService.getStatusTranslation(vm.course.Status);\r\n }\r\n\r\n vm.courseStatuses = courseStatusesCopy;\r\n }\r\n\r\n function translateObjects() {\r\n translateCourseTypes();\r\n translateCourseStatuses();\r\n }\r\n\r\n function canCancellationDeadlineFieldBeDisplayed() {\r\n return CourseService.isCourseOfTypeELearning(vm.course) === false;\r\n }\r\n\r\n _translationChangeSuccessDeregistrationFunction = $rootScope.$on('$translateChangeSuccess',\r\n function() {\r\n translateObjects();\r\n });\r\n\r\n function onDestroy() {\r\n if (_translationChangeSuccessDeregistrationFunction &&\r\n typeof _translationChangeSuccessDeregistrationFunction === 'function') {\r\n // unsubscribe from $translateChangeSuccess event\r\n _translationChangeSuccessDeregistrationFunction();\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsInformationTabController', courseDetailsInformationTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsInformationTabReadonly',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-information-tab-readonly/course-details-information-tab-readonly.component.html',\r\n controller: 'CourseDetailsInformationTabReadonlyController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsInformationTabReadonlyController.$inject = [\r\n 'TypeService',\r\n 'StatusService',\r\n '$translate'\r\n ];\r\n\r\n function courseDetailsInformationTabReadonlyController(\r\n TypeService,\r\n StatusService,\r\n $translate\r\n ) {\r\n var vm = this;\r\n\r\n vm.getCourseTypeTranslation = getCourseTypeTranslation;\r\n vm.getCourseStatusTranslation = getCourseStatusTranslation;\r\n vm.getAccommodationTextValue = getAccommodationTextValue;\r\n\r\n function getCourseTypeTranslation() {\r\n return TypeService.getTypeTranslation(vm.course.Type);\r\n }\r\n\r\n function getCourseStatusTranslation() {\r\n return StatusService.getStatusTranslation(vm.course.Status);\r\n }\r\n\r\n function getAccommodationTextValue() {\r\n\r\n if (!vm.course) {\r\n return '';\r\n }\r\n\r\n if (!vm.course.Settings) {\r\n return '';\r\n }\r\n\r\n return vm.course.Settings.Accommodation\r\n ? $translate.instant('COMMON.YES')\r\n : $translate.instant('COMMON.NO');\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsInformationTabReadonlyController', courseDetailsInformationTabReadonlyController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsLocationTab',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-location-tab/course-details-location-tab.component.html',\r\n controller: 'CourseDetailsLocationTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsLocationTabController.$inject = [\r\n 'CountryFactory',\r\n '$q',\r\n 'CourseLocationFactory',\r\n 'AllAccessPage',\r\n '$timeout'\r\n ];\r\n\r\n function courseDetailsLocationTabController(\r\n CountryFactory,\r\n $q,\r\n CourseLocationFactory,\r\n AllAccessPage,\r\n $timeout\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.countries = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.$onChanges = onChanges;\r\n\r\n function onInit() {\r\n\r\n $q.all([\r\n getCountries()\r\n ]).then(function () {\r\n return initLocation();\r\n }).then(function () {\r\n\r\n if (!vm.course.Location.Address.Country.id) {\r\n preselectCountry();\r\n }\r\n });\r\n }\r\n\r\n function onChanges(changes) {\r\n\r\n // if previous value for course has an id means that onChanges is called because a new reference was assigned to course\r\n if (changes.course.previousValue.id) {\r\n getCourseLocation();\r\n }\r\n }\r\n\r\n function initLocation() {\r\n if (vm.course.id) {\r\n return getCourseLocation();\r\n } else {\r\n\r\n if (!vm.course.Location) {\r\n vm.course.Location = {};\r\n }\r\n\r\n if (!vm.course.Location.Address) {\r\n vm.course.Location.Address = {};\r\n }\r\n\r\n return $q.when();\r\n }\r\n }\r\n\r\n function preselectCountry() {\r\n \r\n $timeout(function () {\r\n\r\n // this code will be executed after the browser has finished the rendering\r\n\r\n if (!vm.countries) {\r\n return;\r\n }\r\n\r\n var norway = vm.countries.find(function (country) {\r\n return country.CountryIsoCode === 'no';\r\n });\r\n\r\n if (!norway) {\r\n return;\r\n }\r\n\r\n vm.course.Location.Address.Country = norway;\r\n });\r\n }\r\n\r\n function getCourseLocation() {\r\n\r\n return CourseLocationFactory.getCourseLocationByCourseId(vm.course.id)\r\n .then(function(courseLocation) {\r\n vm.course.Location = courseLocation;\r\n });\r\n }\r\n\r\n function getCountries() {\r\n\r\n return CountryFactory.getCountries([AllAccessPage.Courses, AllAccessPage.Users, AllAccessPage.MyProfile])\r\n .then(function(countries) {\r\n vm.countries = countries;\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseLocation')\r\n .controller('CourseDetailsLocationTabController', courseDetailsLocationTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsLocationTabReadonly',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-location-tab-readonly/course-details-location-tab-readonly.component.html',\r\n controller: 'CourseDetailsLocationTabReadonlyController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsLocationTabReadonlyController.$inject = [\r\n 'CourseLocationFactory'\r\n ];\r\n\r\n function courseDetailsLocationTabReadonlyController(\r\n CourseLocationFactory\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = onInit;\r\n\r\n function onInit() {\r\n\r\n if (vm.course.id) {\r\n getCourseLocation();\r\n }\r\n }\r\n\r\n function getCourseLocation() {\r\n CourseLocationFactory.getCourseLocationByCourseId(vm.course.id)\r\n .then(function(location) {\r\n vm.course.Location = location;\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsLocationTabReadonlyController', courseDetailsLocationTabReadonlyController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsNotificationsSentTab',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-notifications-sent-tab/course-details-notifications-sent-tab.component.html',\r\n controller: 'CourseDetailsNotificationsSentTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n courseDetailsNotificationsSentTabController.$inject = [\r\n 'NotificationFactory',\r\n 'TableResources',\r\n '$scope',\r\n 'ModalService'\r\n ];\r\n\r\n function courseDetailsNotificationsSentTabController(\r\n NotificationFactory,\r\n TableResources,\r\n $scope,\r\n ModalService\r\n ) {\r\n\r\n var vm = this;\r\n var _notificationMessages = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n notificationMessages: {\r\n get: function () {\r\n return _notificationMessages;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.onNotificationClick = onNotificationClick;\r\n\r\n function onInit() {\r\n getNotificationMessages();\r\n }\r\n\r\n function getNotificationMessages() {\r\n\r\n NotificationFactory.getNotificationMessages(vm.course.id, TableResources.CourseTable)\r\n .then(function (notificationMessages) {\r\n _notificationMessages = notificationMessages;\r\n });\r\n }\r\n\r\n function onNotificationClick(notification) {\r\n openNotificationModal(notification);\r\n }\r\n\r\n function openNotificationModal(notification) {\r\n\r\n // prepare input for the modal component\r\n $scope.notification = notification;\r\n\r\n var htmlComponent = '\\\r\n ';\r\n\r\n ModalService.openModal($scope, htmlComponent, 'lg');\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsNotificationsSentTabController', courseDetailsNotificationsSentTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsSessionsTab',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-sessions-tab/course-details-sessions-tab.component.html',\r\n controller: 'CourseDetailsSessionsTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsSessionsTabController.$inject = [\r\n 'CourseSessionFactory',\r\n '$location'\r\n ];\r\n\r\n function courseDetailsSessionsTabController(\r\n CourseSessionFactory,\r\n $location\r\n ) {\r\n var vm = this;\r\n var _courseSessions = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n courseSessions: {\r\n get: function() {\r\n return _courseSessions;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.onViewSessionClick = onViewSessionClick;\r\n\r\n function onInit() {\r\n getCourseSessionsByCourseId();\r\n }\r\n\r\n function getCourseSessionsByCourseId() {\r\n CourseSessionFactory.getCourseSessionsByCourseId(vm.course.id)\r\n .then(function(courseSessions) {\r\n _courseSessions = courseSessions;\r\n });\r\n }\r\n\r\n function onViewSessionClick(courseSession) {\r\n $location.path('/course-session/' + courseSession.id);\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsSessionsTabController', courseDetailsSessionsTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsTimeIntervalTab',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-time-interval-tab/course-details-time-interval-tab.component.html',\r\n controller: 'CourseDetailsTimeIntervalTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<',\r\n onDateIntervalChange: '&?'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsTimeIntervalTabController.$inject = [\r\n 'DateUtilService',\r\n 'CourseDetailsTimeIntervalTabService',\r\n 'CourseDayFactory',\r\n '_',\r\n '$q',\r\n 'CourseService',\r\n 'UserSettingsFactory',\r\n 'CourseEnrollmentFactory',\r\n '$scope',\r\n 'sessionInformationService',\r\n 'ModalService',\r\n '$translate',\r\n 'dialogService',\r\n 'CourseDayService'\r\n ];\r\n\r\n function courseDetailsTimeIntervalTabController(\r\n DateUtilService,\r\n CourseDetailsTimeIntervalTabService,\r\n CourseDayFactory,\r\n _,\r\n $q,\r\n CourseService,\r\n UserSettingsFactory,\r\n CourseEnrollmentFactory,\r\n $scope,\r\n sessionInformationService,\r\n ModalService,\r\n $translate,\r\n dialogService,\r\n CourseDayService\r\n ) {\r\n\r\n var vm = this;\r\n var _loggedUserSettings = null;\r\n var _loggedUser = sessionInformationService.getUser();\r\n var _daysFromCourseDateInterval = [];\r\n var _previousStartDate = null;\r\n var _previousEndDate = null;\r\n\r\n Object.defineProperties(vm,\r\n {\r\n daysFromCourseDateInterval: {\r\n get: function() {\r\n return _daysFromCourseDateInterval;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.$onChanges = onChanges;\r\n vm.onCourseStartDateChange = onCourseStartDateChange;\r\n vm.onCourseEndDateChange = onCourseEndDateChange;\r\n vm.canEnrollButtonBeDisplayed = canEnrollButtonBeDisplayed;\r\n vm.openEnrollmentModal = openEnrollmentModal;\r\n vm.onDaySelectionToggle = onDaySelectionToggle;\r\n vm.onDaysSelectionToggle = onDaysSelectionToggle;\r\n vm.isEnrollButtonDisabledForDay = isEnrollButtonDisabledForDay;\r\n vm.getTooltipMessageForEnrollButton = getTooltipMessageForEnrollButton;\r\n vm.$onDestroy = onDestroy;\r\n\r\n function onInit() {\r\n getLoggedUserSettings();\r\n }\r\n\r\n function onChanges() {\r\n if (vm.course.Settings.IsSpanningSeveralDays) {\r\n\r\n getCourseDays()\r\n .then(function() {\r\n\r\n _daysFromCourseDateInterval =\r\n CourseDetailsTimeIntervalTabService.getDaysFromCourseDateInterval(vm.course);\r\n\r\n markExistentCourseDaysAsSelected();\r\n });\r\n }\r\n }\r\n\r\n function getLoggedUserSettings() {\r\n UserSettingsFactory.get()\r\n .then(function(loggedUserSettings) {\r\n _loggedUserSettings = loggedUserSettings;\r\n });\r\n }\r\n\r\n function getCourseDays() {\r\n\r\n if (!vm.course.id) {\r\n return $q.when();\r\n }\r\n\r\n return CourseDayFactory.getCourseDaysForCourse(vm.course.id)\r\n .then(function(days) {\r\n vm.course.Days = days;\r\n\r\n CourseDayService.convertCourseDaysDatesToMillisecondsWithoutOffset(vm.course.Days);\r\n });\r\n }\r\n\r\n function onCourseStartDateChange(date) {\r\n\r\n _previousStartDate = vm.course.StartDate;\r\n\r\n if (DateUtilService.isDateAfter(date, vm.course.EndDate)) {\r\n vm.course.EndDate = angular.copy(date);\r\n }\r\n\r\n // for some reason at this point in execution the vm.course.StartDate still has the old value\r\n // so we will change it here manually\r\n vm.course.StartDate = date;\r\n\r\n if (DateUtilService.isSameDate(vm.course.StartDate, vm.course.EndDate)) {\r\n checkItRepeatsDailySetting();\r\n } else {\r\n checkIsSpanningSeveralDaysSetting();\r\n }\r\n\r\n _daysFromCourseDateInterval\r\n = CourseDetailsTimeIntervalTabService.getDaysFromCourseDateInterval(vm.course);\r\n \r\n markExistentCourseDaysAsSelected();\r\n\r\n if (CourseService.isSpanningOnSeveralDays(vm.course) &&\r\n vm.course.Days &&\r\n vm.course.Days.length > 0 &&\r\n CourseDetailsTimeIntervalTabService.isAtLeastOneCourseDayOutOfTheCourseDateInterval(vm.course.Days,\r\n _daysFromCourseDateInterval)) {\r\n\r\n showCourseIntervalChangeWarning()\r\n .then(function(dialogResult) {\r\n\r\n if (dialogResult !== dialogService.DIALOG_RESULT_OK) {\r\n // go back to the previous start date\r\n onCourseStartDateChange(_previousStartDate);\r\n return;\r\n }\r\n\r\n CourseDetailsTimeIntervalTabService.removeCourseDaysNotPresentInCourseDateInterval(\r\n vm.course.Days,\r\n _daysFromCourseDateInterval);\r\n\r\n notifyParentComponentAboutDateIntervalChange();\r\n });\r\n } else {\r\n notifyParentComponentAboutDateIntervalChange();\r\n }\r\n }\r\n\r\n function onCourseEndDateChange(date) {\r\n\r\n _previousEndDate = vm.course.EndDate;\r\n\r\n if (DateUtilService.isDateBefore(date, vm.course.StartDate)) {\r\n vm.course.StartDate = angular.copy(date);\r\n }\r\n\r\n // for some reason at this point in execution the vm.course.EndDate still has the old value\r\n // so we will change it here manually\r\n vm.course.EndDate = date;\r\n\r\n if (DateUtilService.isSameDate(vm.course.StartDate, vm.course.EndDate)) {\r\n checkItRepeatsDailySetting();\r\n } else {\r\n checkIsSpanningSeveralDaysSetting();\r\n }\r\n\r\n _daysFromCourseDateInterval\r\n = CourseDetailsTimeIntervalTabService.getDaysFromCourseDateInterval(vm.course);\r\n\r\n markExistentCourseDaysAsSelected();\r\n\r\n if (CourseService.isSpanningOnSeveralDays(vm.course) &&\r\n vm.course.Days &&\r\n vm.course.Days.length > 0 &&\r\n CourseDetailsTimeIntervalTabService.isAtLeastOneCourseDayOutOfTheCourseDateInterval(vm.course.Days,\r\n _daysFromCourseDateInterval)) {\r\n\r\n showCourseIntervalChangeWarning()\r\n .then(function(dialogResult) {\r\n\r\n if (dialogResult !== dialogService.DIALOG_RESULT_OK) {\r\n // go back to the previous end date\r\n onCourseEndDateChange(_previousEndDate);\r\n return;\r\n }\r\n\r\n CourseDetailsTimeIntervalTabService.removeCourseDaysNotPresentInCourseDateInterval(\r\n vm.course.Days,\r\n _daysFromCourseDateInterval);\r\n\r\n notifyParentComponentAboutDateIntervalChange();\r\n });\r\n } else {\r\n notifyParentComponentAboutDateIntervalChange();\r\n }\r\n }\r\n\r\n function showCourseIntervalChangeWarning() {\r\n\r\n return dialogService\r\n .showConfirmDialog(\r\n 'COMMON.WARNING',\r\n 'COURSE.MESSAGES.COURSE_INTERVAL_CHANGE_WARNING',\r\n 'md',\r\n true\r\n );\r\n }\r\n\r\n function checkItRepeatsDailySetting() {\r\n vm.course.Settings.ItRepeatsDaily = true;\r\n vm.course.Settings.IsSpanningSeveralDays = false;\r\n }\r\n\r\n function checkIsSpanningSeveralDaysSetting() {\r\n vm.course.Settings.IsSpanningSeveralDays = true;\r\n vm.course.Settings.ItRepeatsDaily = false;\r\n }\r\n\r\n function canEnrollButtonBeDisplayed() {\r\n return _loggedUserSettings && _loggedUserSettings.CanSignUpForCourses &&\r\n CourseService.isPublished(vm.course);\r\n }\r\n\r\n function openEnrollmentModal(courseDay) {\r\n\r\n if (isEnrollButtonDisabledForDay(courseDay)) {\r\n return;\r\n }\r\n\r\n var loggedUserCourseEnrollment = {};\r\n\r\n if (courseDay.Enrollments && courseDay.Enrollments.length > 0) {\r\n\r\n var enrollmentFound = courseDay.Enrollments.find(function(enrollment) {\r\n return enrollment.User && enrollment.User.id === _loggedUser.id;\r\n });\r\n\r\n if (enrollmentFound) {\r\n loggedUserCourseEnrollment = enrollmentFound;\r\n }\r\n }\r\n\r\n $scope.courseEnrollment = loggedUserCourseEnrollment;\r\n\r\n $scope.course = vm.course;\r\n $scope.user = _loggedUser;\r\n $scope.courseDay = courseDay;\r\n\r\n var componentHtml = '\\\r\n ';\r\n\r\n ModalService.openModal($scope, componentHtml, 'lg')\r\n .then(function () {\r\n return CourseEnrollmentFactory.getEnrollmentByCourseDay(courseDay.id, vm.course.id);\r\n })\r\n .then(function (courseEnrollment) {\r\n\r\n if (!courseDay.Enrollments) {\r\n courseDay.Enrollments = [];\r\n }\r\n\r\n var indexOfLoggedUserEnrollment = courseDay.Enrollments.findIndex(function(enrollment) {\r\n return enrollment.id === courseEnrollment.id;\r\n });\r\n\r\n if (indexOfLoggedUserEnrollment === -1) {\r\n courseDay.Enrollments.push(courseEnrollment);\r\n } else {\r\n courseDay.Enrollments[indexOfLoggedUserEnrollment] = courseEnrollment;\r\n }\r\n\r\n $scope.$broadcast('onAfterEnrollmentSave', { courseDay: courseDay });\r\n });\r\n }\r\n\r\n function notifyParentComponentAboutDateIntervalChange() {\r\n if (vm.onDateIntervalChange && typeof vm.onDateIntervalChange === 'function') {\r\n vm.onDateIntervalChange();\r\n }\r\n }\r\n\r\n function openCourseDayUnselectWarning(day) {\r\n\r\n dialogService.showConfirmDialog(\r\n 'COURSE_DAY.MESSAGES.COURSE_DAY_UNSELECT_DIALOG_TITLE',\r\n 'COURSE_DAY.MESSAGES.COURSE_DAY_UNSELECT_DIALOG_MESSAGE',\r\n 'md',\r\n true\r\n ).then(function (dialogResult) {\r\n\r\n if (dialogResult === dialogService.DIALOG_RESULT_OK) {\r\n CourseService.updateCourseDays(vm.course, day);\r\n } else {\r\n day.isSelected = true;\r\n }\r\n });\r\n }\r\n\r\n function openCourseDaysUnselectWarning(days) {\r\n\r\n dialogService.showConfirmDialog(\r\n 'COURSE_DAY.MESSAGES.COURSE_DAYS_UNSELECT_DIALOG_TITLE',\r\n 'COURSE_DAY.MESSAGES.COURSE_DAYS_UNSELECT_DIALOG_MESSAGE',\r\n 'md',\r\n true\r\n ).then(function(dialogResult) {\r\n\r\n if (dialogResult === dialogService.DIALOG_RESULT_OK) {\r\n days.forEach(function(day) {\r\n CourseService.updateCourseDays(vm.course, day);\r\n });\r\n } else {\r\n days.forEach(function(day) {\r\n day.isSelected = true;\r\n });\r\n }\r\n });\r\n }\r\n\r\n function onDaySelectionToggle(day) {\r\n\r\n if (!day) {\r\n return;\r\n }\r\n\r\n if (!day.isSelected) {\r\n openCourseDayUnselectWarning(day);\r\n } else {\r\n\r\n var daysNotPresentInCourseDateInterval\r\n = CourseDetailsTimeIntervalTabService.getDaysNotPresentInCourseDateInterval();\r\n\r\n // check if the added day was removed before, in order to restore hours\r\n var dayIndex = CourseDayService.findDayIndexInList(day, daysNotPresentInCourseDateInterval);\r\n\r\n if (dayIndex !== -1) {\r\n var removedDay = daysNotPresentInCourseDateInterval[dayIndex];\r\n\r\n // if the day had hours before, restore them\r\n if (removedDay.HoursList && removedDay.HoursList.length > 0) {\r\n day.HoursList = removedDay.HoursList;\r\n }\r\n }\r\n\r\n CourseService.updateCourseDays(vm.course, day);\r\n }\r\n }\r\n\r\n function onDaysSelectionToggle(days, selection) {\r\n\r\n if (!days) {\r\n return;\r\n }\r\n\r\n if (!selection) {\r\n openCourseDaysUnselectWarning(days);\r\n } else {\r\n days.forEach(function (day) {\r\n CourseService.updateCourseDays(vm.course, day);\r\n });\r\n }\r\n }\r\n\r\n function markExistentCourseDaysAsSelected() {\r\n\r\n if (!vm.course.Days) {\r\n return;\r\n }\r\n\r\n _daysFromCourseDateInterval.forEach(function(day) {\r\n\r\n var dayMomentDate = moment(day.Date);\r\n\r\n var index = vm.course.Days.findIndex(function(currentDay) {\r\n\r\n var currentDayMomentDate = moment(currentDay.Date);\r\n\r\n return currentDayMomentDate.date() === dayMomentDate.date() &&\r\n currentDayMomentDate.month() === dayMomentDate.month() &&\r\n currentDayMomentDate.year() === dayMomentDate.year();\r\n });\r\n\r\n if (index === -1) {\r\n return;\r\n }\r\n\r\n day.isSelected = true;\r\n });\r\n }\r\n\r\n function isEnrollButtonDisabledForDay(day) {\r\n\r\n if (!day || !day.id) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function getTooltipMessageForEnrollButton(day) {\r\n\r\n if (!day || !day.id) {\r\n return $translate.instant('COURSE_ENROLLMENT.MESSAGES.CANNOT_ENROLL_BECAUSE_DAY_NOT_SAVED');\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function onDestroy() {\r\n CourseDetailsTimeIntervalTabService.clearDaysNotPresentInCourseDateInterval();\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsTimeIntervalTabController', courseDetailsTimeIntervalTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsTimeIntervalTabService.$inject = [\r\n 'DateUtilService',\r\n 'CourseDayService',\r\n 'CourseDayHoursService'\r\n ];\r\n\r\n function courseDetailsTimeIntervalTabService(\r\n DateUtilService,\r\n CourseDayService,\r\n CourseDayHoursService\r\n ) {\r\n\r\n var _daysNotPresentInCourseDateInterval = [];\r\n\r\n function getDaysNotPresentInCourseDateInterval() {\r\n return _daysNotPresentInCourseDateInterval;\r\n }\r\n\r\n function clearDaysNotPresentInCourseDateInterval() {\r\n _daysNotPresentInCourseDateInterval = [];\r\n }\r\n\r\n function getTimeFromDate(date) {\r\n \r\n var time = {};\r\n\r\n time.hour = moment(date).hour();\r\n time.minutes = moment(date).minutes();\r\n time.seconds = moment(date).seconds();\r\n\r\n return time;\r\n }\r\n\r\n function setTimeForDate(time, date) {\r\n\r\n var momentDate = moment(date);\r\n\r\n momentDate.hour(time.hour);\r\n momentDate.minutes(time.minutes);\r\n momentDate.seconds(time.seconds);\r\n\r\n return momentDate.toDate();\r\n }\r\n\r\n function getDaysFromCourseDateInterval(course) {\r\n\r\n if (!course) {\r\n throw new Error('Course cannot be null when getting days from course date interval');\r\n }\r\n\r\n if (!course.StartDate) {\r\n throw new Error('Course start date cannot be null when getting days from course date interval');\r\n }\r\n\r\n if (!course.EndDate) {\r\n throw new Error('Course end date cannot be null when getting days from course date interval');\r\n }\r\n\r\n var days = [];\r\n\r\n var currentDate = moment(course.StartDate).toDate();\r\n\r\n while (!DateUtilService.isDateAfter(currentDate, course.EndDate)) {\r\n\r\n days.push({ Date: moment(currentDate).valueOf() });\r\n\r\n currentDate = DateUtilService.addDaysToDate(currentDate, 1);\r\n }\r\n\r\n return days;\r\n }\r\n\r\n function setCourseDatesToToday(course) {\r\n\r\n if (!course) {\r\n throw new Error('Cannot set dates for an invalid course');\r\n }\r\n\r\n if (course.StartDate) {\r\n\r\n // get the existent time\r\n var startDateTime = getTimeFromDate(course.StartDate);\r\n\r\n // set the existent time on the new date\r\n course.StartDate = setTimeForDate(startDateTime, new Date());\r\n }\r\n\r\n if (course.EndDate) {\r\n\r\n // get the existent time\r\n var endDateTime = getTimeFromDate(course.EndDate);\r\n\r\n // set the existent time on the new date\r\n course.EndDate = setTimeForDate(endDateTime, new Date());\r\n }\r\n }\r\n\r\n function isAtLeastOneCourseDayOutOfTheCourseDateInterval(courseDays, daysFromCourseDateInterval) {\r\n\r\n if (!courseDays || courseDays.length === 0 ||\r\n !daysFromCourseDateInterval || daysFromCourseDateInterval.length === 0) {\r\n return null;\r\n }\r\n \r\n var existsAtLeastOneDayOutOfTheCourseDateInterval = false;\r\n\r\n courseDays.forEach(function (courseDay) {\r\n\r\n if (!courseDay.Date) {\r\n return;\r\n }\r\n \r\n var dayIndex = CourseDayService.findDayIndexInList(courseDay, daysFromCourseDateInterval);\r\n\r\n if (dayIndex === -1) {\r\n existsAtLeastOneDayOutOfTheCourseDateInterval = true;\r\n }\r\n });\r\n console.log('existsAtLeastOneDayOutOfTheCourseDateInterval: ' + existsAtLeastOneDayOutOfTheCourseDateInterval);\r\n return existsAtLeastOneDayOutOfTheCourseDateInterval;\r\n }\r\n\r\n function removeCourseDaysNotPresentInCourseDateInterval(courseDays, daysFromCourseDateInterval) {\r\n\r\n if (!courseDays || courseDays.length === 0 ||\r\n !daysFromCourseDateInterval || daysFromCourseDateInterval.length === 0) {\r\n return;\r\n }\r\n\r\n courseDays.forEach(function (courseDay) {\r\n\r\n if (!courseDay.Date) {\r\n return;\r\n }\r\n\r\n var dayIndexInDaysFromCourseDateInterval\r\n = CourseDayService.findDayIndexInList(courseDay, daysFromCourseDateInterval);\r\n\r\n if (dayIndexInDaysFromCourseDateInterval === -1) {\r\n\r\n if (courseDay.HoursList && courseDay.HoursList.length > 0) {\r\n CourseDayHoursService.deactivateHoursFromList(courseDay.HoursList);\r\n }\r\n\r\n var dayIndexInDaysNotPresentInCourseDateInterval =\r\n CourseDayService.findDayIndexInList(courseDay, _daysNotPresentInCourseDateInterval);\r\n\r\n // add the day if not exists\r\n if (dayIndexInDaysNotPresentInCourseDateInterval === -1) {\r\n _daysNotPresentInCourseDateInterval.push(courseDay);\r\n } else {\r\n // update the day's hours\r\n var existentDay =\r\n _daysNotPresentInCourseDateInterval[dayIndexInDaysNotPresentInCourseDateInterval];\r\n existentDay.HoursList = courseDay.HoursList;\r\n }\r\n } else {\r\n // if the day exists in the course date interval, we make sure it's\r\n // removed from _daysNotPresentInCourseDateInterval\r\n var index\r\n = CourseDayService.findDayIndexInList(courseDay, _daysNotPresentInCourseDateInterval);\r\n\r\n if (index !== -1) {\r\n _daysNotPresentInCourseDateInterval.splice(index, 1);\r\n }\r\n }\r\n });\r\n\r\n _daysNotPresentInCourseDateInterval.forEach(function (notPresentDay) {\r\n\r\n var index = CourseDayService.findDayIndexInList(notPresentDay, courseDays);\r\n\r\n if (index !== -1) {\r\n courseDays.splice(index, 1);\r\n }\r\n });\r\n\r\n console.log(_daysNotPresentInCourseDateInterval);\r\n }\r\n\r\n return {\r\n getDaysFromCourseDateInterval: getDaysFromCourseDateInterval,\r\n setCourseDatesToToday: setCourseDatesToToday,\r\n isAtLeastOneCourseDayOutOfTheCourseDateInterval: isAtLeastOneCourseDayOutOfTheCourseDateInterval,\r\n removeCourseDaysNotPresentInCourseDateInterval: removeCourseDaysNotPresentInCourseDateInterval,\r\n getDaysNotPresentInCourseDateInterval: getDaysNotPresentInCourseDateInterval,\r\n clearDaysNotPresentInCourseDateInterval: clearDaysNotPresentInCourseDateInterval\r\n };\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .service('CourseDetailsTimeIntervalTabService', courseDetailsTimeIntervalTabService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbCourseDetailsTimeIntervalTabReadonly',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-time-interval-tab-readonly/course-details-time-interval-tab-readonly.component.html',\r\n controller: 'CourseDetailsTimeIntervalTabReadonlyController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDetailsTimeIntervalTabReadonlyController.$inject = [\r\n 'CourseDayFactory',\r\n '$scope',\r\n 'sessionInformationService',\r\n 'ModalService',\r\n 'CourseEnrollmentFactory',\r\n 'CourseDayService'\r\n ];\r\n\r\n function courseDetailsTimeIntervalTabReadonlyController(\r\n CourseDayFactory,\r\n $scope,\r\n sessionInformationService,\r\n ModalService,\r\n CourseEnrollmentFactory,\r\n CourseDayService\r\n ) {\r\n\r\n var vm = this;\r\n var _courseDays = [];\r\n var _loggedUser = sessionInformationService.getUser();\r\n\r\n Object.defineProperties(vm,\r\n {\r\n courseDays: {\r\n get: function() {\r\n return _courseDays;\r\n }\r\n }\r\n });\r\n\r\n vm.getDateFormat = getDateFormat;\r\n vm.$onInit = onInit;\r\n vm.onEnrollClick = onEnrollClick;\r\n\r\n function onInit() {\r\n getCourseDays();\r\n }\r\n\r\n function getCourseDays() {\r\n CourseDayFactory.getCourseDaysForCourse(vm.course.id)\r\n .then(function(courseDays) {\r\n _courseDays = courseDays;\r\n keepOnlyActiveHoursForDays();\r\n CourseDayService.convertCourseDaysDatesToMillisecondsWithoutOffset(_courseDays);\r\n });\r\n }\r\n\r\n function getDateFormat() {\r\n\r\n if (!vm.course || !vm.course.Settings) {\r\n return '';\r\n }\r\n\r\n if (vm.course.Settings.ItRepeatsDaily) {\r\n return 'HH:mm';\r\n }\r\n\r\n if (vm.course.Settings.IsSpanningSeveralDays) {\r\n return 'dd.MM.yyyy';\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function openEnrollmentModal(courseDay) {\r\n\r\n var loggedUserCourseEnrollment = {};\r\n\r\n if (courseDay.Enrollments && courseDay.Enrollments.length > 0) {\r\n\r\n var enrollmentFound = courseDay.Enrollments.find(function(enrollment) {\r\n return enrollment.User && enrollment.User.id === _loggedUser.id;\r\n });\r\n\r\n if (enrollmentFound) {\r\n loggedUserCourseEnrollment = enrollmentFound;\r\n }\r\n }\r\n\r\n $scope.courseEnrollment = loggedUserCourseEnrollment;\r\n $scope.course = vm.course;\r\n $scope.user = _loggedUser;\r\n $scope.courseDay = courseDay;\r\n\r\n var componentHtml = '\\\r\n ';\r\n\r\n ModalService.openModal($scope, componentHtml, 'lg')\r\n .then(function () {\r\n return CourseEnrollmentFactory.getEnrollmentByCourseDay(courseDay.id, vm.course.id);\r\n })\r\n .then(function (courseEnrollment) {\r\n\r\n if (!courseDay.Enrollments) {\r\n courseDay.Enrollments = [];\r\n }\r\n\r\n var indexOfLoggedUserEnrollment = courseDay.Enrollments.findIndex(function(enrollment) {\r\n return enrollment.id === courseEnrollment.id;\r\n });\r\n\r\n\r\n if (indexOfLoggedUserEnrollment === -1) {\r\n courseDay.Enrollments.push(courseEnrollment);\r\n } else {\r\n courseDay.Enrollments[indexOfLoggedUserEnrollment] = courseEnrollment;\r\n }\r\n });\r\n }\r\n\r\n function onEnrollClick(courseDay) {\r\n openEnrollmentModal(courseDay);\r\n }\r\n\r\n function keepOnlyActiveHoursForDays() {\r\n if (!_courseDays || _courseDays.length === 0) {\r\n return;\r\n }\r\n\r\n _courseDays.forEach(function (day) {\r\n\r\n if (!day.HoursList || day.HoursList.length === 0) {\r\n return;\r\n }\r\n\r\n day.HoursList = day.HoursList.filter(function (hours) { return hours.Active; });\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('CourseDetailsTimeIntervalTabReadonlyController', courseDetailsTimeIntervalTabReadonlyController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbEnrolledUsersSelectionForDiplomaModal',\r\n {\r\n templateUrl: 'Scripts/course/course-details/enrolled-users-selection-for-diploma-modal/enrolled-users-selection-for-diploma-modal.component.html',\r\n controller: 'EnrolledUsersSelectionForDiplomaModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n courseId: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n enrolledUsersSelectionForDiplomaModalController.$inject = [\r\n 'UserFactory',\r\n 'ListService',\r\n 'F5ReportFactory',\r\n 'infoService',\r\n '$translate'\r\n ];\r\n\r\n function enrolledUsersSelectionForDiplomaModalController(\r\n UserFactory,\r\n ListService,\r\n F5ReportFactory,\r\n infoService,\r\n $translate\r\n ) {\r\n\r\n var vm = this;\r\n var _enrolledUsers = [];\r\n var _selectedEnrolledUsers = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n enrolledUsers: {\r\n get: function() {\r\n return _enrolledUsers;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.onUserClick = onUserClick;\r\n vm.isGenerateDiplomaForSelectedUsersButtonDisabled = isGenerateDiplomaForSelectedUsersButtonDisabled;\r\n vm.generateDiplomaForSelectedUsers = generateDiplomaForSelectedUsers;\r\n\r\n function onInit() {\r\n getAllUsersEnrolledToCourse();\r\n }\r\n\r\n function getAllUsersEnrolledToCourse() {\r\n UserFactory.getAllUsersEnrolledToCourse(vm.courseId)\r\n .then(function(enrolledUsers) {\r\n _enrolledUsers = enrolledUsers;\r\n });\r\n }\r\n\r\n function onUserClick(user) {\r\n\r\n if (user.isSelected) {\r\n // addItemIfNotExists was changed on another branch so will expect a third parameter, that's why\r\n // we pass an 'id' here in order for merge to not mess up this call, this comment can be removed\r\n // after merge\r\n ListService.addItemIfNotExists(user, _selectedEnrolledUsers, 'id'); \r\n } else {\r\n ListService.removeItemFromList(user, _selectedEnrolledUsers);\r\n }\r\n }\r\n\r\n function isGenerateDiplomaForSelectedUsersButtonDisabled() {\r\n return _selectedEnrolledUsers.length === 0;\r\n }\r\n\r\n function generateDiplomaForSelectedUsers() {\r\n F5ReportFactory.generateDiplomaForUsers(_selectedEnrolledUsers, vm.courseId)\r\n .then(function (response) {\r\n infoService.changeInfo($translate.instant(response.GenerateDiplomaForUsersResult));\r\n vm.dismiss();\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('EnrolledUsersSelectionForDiplomaModalController', enrolledUsersSelectionForDiplomaModalController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseEnrollment')\r\n .component('vbCourseEnrollmentDetails',\r\n {\r\n templateUrl: 'Scripts/course/course-enrollment/course-enrollment-details/course-enrollment-details.component.html',\r\n controller: 'CourseEnrollmentDetailsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n courseEnrollment: '=',\r\n course: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function courseEnrollmentDetailsController() {\r\n var vm = this;\r\n\r\n vm.$onInit = onInit;\r\n vm.computePriceForEnrollment = computePriceForEnrollment;\r\n vm.onAccommodationChange = onAccommodationChange;\r\n\r\n function onInit() {\r\n \r\n if (!vm.courseEnrollment) {\r\n vm.courseEnrollment = {};\r\n }\r\n\r\n if (!vm.courseEnrollment.Price) {\r\n computePriceForEnrollment();\r\n }\r\n }\r\n\r\n function computePriceForEnrollment() {\r\n\r\n var price = 0;\r\n\r\n if (vm.course) {\r\n if (vm.courseEnrollment.Accommodation) {\r\n if (vm.course.CostWithAccommodation) {\r\n price = vm.course.CostWithAccommodation;\r\n }\r\n } else {\r\n if (vm.course.CostWithoutAccommodation) {\r\n price = vm.course.CostWithoutAccommodation;\r\n }\r\n }\r\n }\r\n\r\n vm.courseEnrollment.Price = price;\r\n }\r\n\r\n function onAccommodationChange() {\r\n computePriceForEnrollment();\r\n }\r\n }\r\n\r\n angular\r\n .module('courseEnrollment')\r\n .controller('CourseEnrollmentDetailsController', courseEnrollmentDetailsController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseEnrollment')\r\n .component('vbCourseOthersEnrollmentModal',\r\n {\r\n templateUrl: 'Scripts/course/course-enrollment/course-others-enrollment-modal/course-others-enrollment-modal.component.html',\r\n controller: 'CourseOthersEnrollmentModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n close: '&',\r\n course: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseOthersEnrollmentModalController.$inject = [\r\n 'CourseService',\r\n 'courseEnrollmentOptions',\r\n '$translate',\r\n 'UserFactory',\r\n 'CourseReservationFactory',\r\n 'UserService',\r\n 'sessionInformationService',\r\n 'CourseTypes',\r\n 'CourseReservationService',\r\n 'CourseFactory',\r\n 'OrganizationFactory',\r\n '$q',\r\n '_',\r\n 'applicationChange'\r\n ];\r\n\r\n function courseOthersEnrollmentModalController(\r\n CourseService,\r\n courseEnrollmentOptions,\r\n $translate,\r\n UserFactory,\r\n CourseReservationFactory,\r\n UserService,\r\n sessionInformationService,\r\n CourseTypes,\r\n CourseReservationService,\r\n CourseFactory,\r\n OrganizationFactory,\r\n $q,\r\n _,\r\n applicationChange\r\n ) {\r\n\r\n var vm = this;\r\n var _showOptionInfoMessage = false;\r\n var _allAlreadyEnrolledUsers = [];\r\n var _enrolledUsers = [];\r\n var _allUsers = [];\r\n var _selectedOrganizationsIds = [];\r\n var _initiallySelectedOrganization = {};\r\n var _loggedUser = sessionInformationService.getUser();\r\n var _nrOfUsersEnrolledToCourse = 0;\r\n var _nrOfReservedSeatsForCourse = 0;\r\n var _courseReservations = [];\r\n var _organizations = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n showOptionInfoMessage: {\r\n get: function() {\r\n return _showOptionInfoMessage;\r\n }\r\n },\r\n organizations: {\r\n get: function() {\r\n return _organizations;\r\n }\r\n },\r\n initiallySelectedOrganization: {\r\n get: function() {\r\n return _initiallySelectedOrganization;\r\n }\r\n },\r\n allUsers: {\r\n get: function() {\r\n return _allUsers;\r\n }\r\n }\r\n });\r\n\r\n vm.courseReservation = {};\r\n vm.selectedOption = courseEnrollmentOptions.reserveOption;\r\n\r\n vm.$onInit = onInit;\r\n vm.getCourseEnrollmentOptions = getCourseEnrollmentOptions;\r\n vm.getOptionInfoMessage = getOptionInfoMessage;\r\n vm.save = save;\r\n vm.isSaveButtonDisabled = isSaveButtonDisabled;\r\n vm.onOrganizationChange = onOrganizationChange;\r\n vm.onOrganizationUnselect = onOrganizationUnselect;\r\n vm.getReservationNotificationMessage = getReservationNotificationMessage;\r\n vm.canReservationNotificationBeDisplayed = canReservationNotificationBeDisplayed;\r\n vm.isNrOfPeopleValueTooBig = isNrOfPeopleValueTooBig;\r\n vm.onUserClick = onUserClick;\r\n vm.onAccommodationChange = onAccommodationChange;\r\n vm.onNrOfPeopleChange = onNrOfPeopleChange;\r\n vm.computePriceForEnrolledUsers = computePriceForEnrolledUsers;\r\n vm.onAllOrganizationsSelect = onAllOrganizationsSelect;\r\n vm.$onDestroy = onDestroy;\r\n\r\n function onInit() {\r\n\r\n getOrganizationsForDropdown()\r\n .then(function() {\r\n\r\n if (!_organizations || _organizations.length === 0) {\r\n return $q.when(null);\r\n }\r\n\r\n // find logged user's organization\r\n var loggedUserOrganization = _organizations.find(function(organization) {\r\n return organization.id == _loggedUser.Organization.id;\r\n });\r\n\r\n if (!loggedUserOrganization) {\r\n return $q.when(null);\r\n }\r\n\r\n // pre-select logged user's organization\r\n _initiallySelectedOrganization = loggedUserOrganization;\r\n onOrganizationChange(loggedUserOrganization);\r\n\r\n return $q.when();\r\n })\r\n .then(function (result) {\r\n\r\n if (result === null) {\r\n return;\r\n }\r\n\r\n showOptionInfoMessageIfCourseStartsInLessThanTwoWeeks();\r\n getNrOfUsersEnrolledToCourse();\r\n\r\n switch (vm.selectedOption) {\r\n case courseEnrollmentOptions.reserveOption:\r\n getReservationForCourse()\r\n .then(function () {\r\n\r\n if (!vm.courseReservation.Price) {\r\n computeReservationPrice();\r\n }\r\n\r\n getCourseReservationsForCourse();\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n }\r\n\r\n function getOrganizationsForDropdown() {\r\n var courseId = vm.course ? vm.course.id : null;\r\n return OrganizationFactory.getOrganizationsWithAccessToCourse(courseId)\r\n .then(function(organizations) {\r\n _organizations = organizations;\r\n });\r\n }\r\n\r\n function showOptionInfoMessageIfCourseStartsInLessThanTwoWeeks() {\r\n\r\n var nrOfDaysUntilCourseStarts = CourseService.computeNrOfDaysLeftUntilCourseStarts(vm.course);\r\n\r\n // if there are less than 2 weeks before course starts, show a info message\r\n // which states that no reservations/enrollments can be done when there is \r\n // less than 2 weeks left until the course starts\r\n if (nrOfDaysUntilCourseStarts < 14) {\r\n _showOptionInfoMessage = true;\r\n }\r\n }\r\n\r\n function getCourseEnrollmentOptions() {\r\n return courseEnrollmentOptions;\r\n }\r\n \r\n function getOptionInfoMessage() {\r\n return $translate.instant('COURSE_PAGE.OPTION_INFO_MESSAGE');\r\n }\r\n\r\n function getUsersFromSelectedOrganization(selectedOrganizationId) {\r\n\r\n var enrolledUsers = [];\r\n\r\n getUsersEnrolledToCourse(selectedOrganizationId)\r\n .then(function (users) {\r\n enrolledUsers = users;\r\n cacheAlreadyEnrolledUsers(enrolledUsers);\r\n return getUsers(selectedOrganizationId);\r\n })\r\n .then(function (users) {\r\n UserService.markAlreadyEnrolledUsers(enrolledUsers, users);\r\n return users;\r\n })\r\n .then(function (users) {\r\n\r\n if (!users || users.length === 0) {\r\n return;\r\n }\r\n\r\n users.forEach(function(user) {\r\n\r\n // if not exists in allUsers list, we add him\r\n var index = _allUsers.findIndex(function(currentUser) {\r\n return currentUser.id == user.id;\r\n });\r\n\r\n if (index === -1) {\r\n _allUsers.push(user);\r\n }\r\n });\r\n });\r\n }\r\n\r\n function getUsersEnrolledToCourse(selectedOrganizationId) {\r\n return UserFactory.getUsersEnrolledToCourse(vm.course.id, selectedOrganizationId, false);\r\n }\r\n\r\n function getUsers(selectedOrganizationId) {\r\n var courseId = vm.course ? vm.course.id : null;\r\n\r\n return UserFactory.getUsersForCourseEnrollment(selectedOrganizationId, courseId);\r\n }\r\n\r\n function save() {\r\n\r\n switch (vm.selectedOption) {\r\n case courseEnrollmentOptions.reserveOption:\r\n saveCourseReservation();\r\n break;\r\n case courseEnrollmentOptions.continueEnrollmentOption:\r\n enrollUsersToCourse();\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n function isSaveButtonDisabled() {\r\n\r\n if (_showOptionInfoMessage) {\r\n return true;\r\n }\r\n\r\n if (vm.selectedOption === courseEnrollmentOptions.reserveOption) {\r\n \r\n if (!vm.courseReservation.NrOfPeople) {\r\n return true;\r\n }\r\n\r\n if (isNrOfPeopleValueTooBig()) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function saveCourseReservation() {\r\n CourseReservationFactory.saveCourseReservation(vm.courseReservation, vm.course.id)\r\n .then(function() {\r\n vm.dismiss();\r\n });\r\n }\r\n\r\n function enrollUsersToCourse() {\r\n\r\n // get users marked to be enrolled\r\n var users = _allUsers.filter(function(user) {\r\n return user.isSelected;\r\n });\r\n\r\n UserFactory.enrollUsersToCourse(users, vm.course.id, _selectedOrganizationsIds)\r\n .then(function() {\r\n vm.dismiss();\r\n });\r\n }\r\n\r\n function getReservationForCourse() {\r\n return CourseReservationFactory.getReservationByCourseId(vm.course.id)\r\n .then(function (courseReservation) {\r\n vm.courseReservation = courseReservation;\r\n });\r\n }\r\n\r\n function addSelectedOrganizationIfNotExists(organizationId) {\r\n\r\n var index = _selectedOrganizationsIds.findIndex(function(currentOrgId) {\r\n return currentOrgId == organizationId;\r\n });\r\n\r\n if (index === -1) {\r\n _selectedOrganizationsIds.push(organizationId);\r\n }\r\n }\r\n\r\n function onOrganizationChange(organization, isFromSelectAll) {\r\n\r\n addSelectedOrganizationIfNotExists(organization.id);\r\n console.log(_selectedOrganizationsIds);\r\n // we will use on-select-all-items event to handle all items selection\r\n if (isFromSelectAll) {\r\n return;\r\n }\r\n\r\n console.log('selected org.', organization);\r\n getUsersFromSelectedOrganization(organization.id);\r\n }\r\n\r\n function onAllOrganizationsSelect(organizations) {\r\n\r\n if (!organizations || organizations.length === 0) {\r\n return;\r\n }\r\n\r\n // get the users for all the selected organizations\r\n organizations.forEach(function(organization) {\r\n getUsersFromSelectedOrganization(organization.id);\r\n });\r\n }\r\n\r\n function onOrganizationUnselect(organization) {\r\n\r\n // remove organization from _selectedOrganizationsIds\r\n _.remove(_selectedOrganizationsIds,\r\n function(organizationId) {\r\n return organizationId == organization.id;\r\n });\r\n console.log(_selectedOrganizationsIds);\r\n if (!_allUsers || _allUsers.length === 0) {\r\n return;\r\n }\r\n\r\n _.remove(_allUsers, function(user) {\r\n return user.Organization && user.Organization.id == organization.id;\r\n });\r\n console.log('unselected org.', organization);\r\n }\r\n\r\n function getReservationNotificationMessage() {\r\n return $translate.instant('COURSE_PAGE.RESERVATION_NOTIFICATION_MESSAGE');\r\n }\r\n\r\n function canReservationNotificationBeDisplayed() {\r\n\r\n // check if logged user has enrolled users\r\n var users = _enrolledUsers.filter(function(enrolledUser) {\r\n return enrolledUser.CourseEnrollment.CreatedBy.id === _loggedUser.id;\r\n });\r\n\r\n // show the notification when the logged user hasn't enrolled users\r\n // and when a reservation can be made (option info message is not displayed)\r\n return users.length === 0 && !_showOptionInfoMessage;\r\n }\r\n\r\n function getNrOfUsersEnrolledToCourse() {\r\n UserFactory.getNrOfUsersEnrolledToCourse(vm.course.id)\r\n .then(function(response) {\r\n _nrOfUsersEnrolledToCourse = response.GetNrOfUsersEnrolledToCourseResult;\r\n });\r\n }\r\n\r\n function isNrOfPeopleValueTooBig() {\r\n\r\n if (vm.course.Type && vm.course.Type.ProgId === CourseTypes.Classroom) {\r\n \r\n if ((_nrOfReservedSeatsForCourse + _nrOfUsersEnrolledToCourse + vm.courseReservation.NrOfPeople) >\r\n vm.course.NrOfParticipants) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function getCourseReservationsForCourse() {\r\n CourseReservationFactory.getCourseReservationsForCourse(vm.course.id)\r\n .then(function (courseReservations) {\r\n\r\n _courseReservations = courseReservations;\r\n\r\n CourseReservationService.removeCourseReservationFromList(vm.courseReservation, _courseReservations);\r\n\r\n _nrOfReservedSeatsForCourse = CourseReservationService.computeNrOfReservedSeats(_courseReservations);\r\n });\r\n }\r\n\r\n function onUserClick(user) {\r\n if (!user.isSelected) {\r\n CourseFactory.checkIfUserEnrollmentToCourseIsConnectedToCourseSessions(user, vm.course.id)\r\n .catch(function() {\r\n // select user again if an error occurs\r\n user.isSelected = true;\r\n });\r\n } else {\r\n\r\n // if it wasn't already enrolled, mark its enrollment with CREATE\r\n var userIndex = _allAlreadyEnrolledUsers.findIndex(function(enrolledUser) {\r\n return enrolledUser.id == user.id;\r\n });\r\n\r\n if (userIndex === -1)\r\n user.CourseEnrollment.Change = applicationChange.create;\r\n }\r\n }\r\n\r\n function onNrOfPeopleChange() {\r\n computeReservationPrice();\r\n }\r\n\r\n function onAccommodationChange() {\r\n computeReservationPrice();\r\n }\r\n\r\n function computeReservationPrice() {\r\n\r\n if (!vm.courseReservation || !vm.courseReservation.NrOfPeople) {\r\n return;\r\n }\r\n\r\n if (!vm.course) {\r\n return;\r\n }\r\n\r\n var price = 0;\r\n var nrOfPeople = vm.courseReservation.NrOfPeople;\r\n\r\n if (vm.courseReservation.Accommodation) {\r\n if (vm.course.CostWithAccommodation) {\r\n price = nrOfPeople * vm.course.CostWithAccommodation;\r\n }\r\n } else {\r\n if (vm.course.CostWithoutAccommodation) {\r\n price = nrOfPeople * vm.course.CostWithoutAccommodation;\r\n }\r\n }\r\n\r\n vm.courseReservation.Price = price;\r\n }\r\n\r\n function computePriceForEnrolledUsers() {\r\n\r\n if (!_allUsers || _allUsers.length === 0) {\r\n return null;\r\n }\r\n\r\n var enrolledUsers = _allUsers.filter(function(user) {\r\n return user.isSelected;\r\n });\r\n\r\n if (enrolledUsers.length === 0) {\r\n return null;\r\n }\r\n\r\n var enrollments = enrolledUsers.map(function(user) {\r\n return user.CourseEnrollment;\r\n });\r\n\r\n if (!enrollments || enrollments.length === 0) {\r\n return null;\r\n }\r\n\r\n var price = 0;\r\n\r\n enrollments.forEach(function(enrollment) {\r\n if (!enrollment) {\r\n return;\r\n }\r\n\r\n price += enrollment.Price;\r\n });\r\n\r\n return price;\r\n }\r\n\r\n function cacheAlreadyEnrolledUsers(enrolledUsers) {\r\n\r\n if (!enrolledUsers || enrolledUsers.length === 0)\r\n return;\r\n\r\n enrolledUsers.forEach(function(enrolledUser) {\r\n\r\n var userIndex = _allAlreadyEnrolledUsers.findIndex(function(user) {\r\n return user.id == enrolledUser.id;\r\n });\r\n\r\n if (userIndex === -1)\r\n _allAlreadyEnrolledUsers.push(enrolledUser);\r\n });\r\n }\r\n\r\n function onDestroy() {\r\n _allAlreadyEnrolledUsers = [];\r\n }\r\n }\r\n\r\n angular\r\n .module('courseEnrollment')\r\n .controller('CourseOthersEnrollmentModalController', courseOthersEnrollmentModalController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseEnrollment')\r\n .component('vbCourseUserEnrollmentModal',\r\n {\r\n templateUrl: 'Scripts/course/course-enrollment/course-user-enrollment-modal/course-user-enrollment-modal.component.html',\r\n controller: 'CourseUserEnrollmentModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n close: '&',\r\n courseEnrollment: '=',\r\n course: '<',\r\n user: '<',\r\n courseDay: ' vm.course.NrOfParticipants)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function canSaveButtonBeDisplayed() {\r\n return !canInfoMessageBeDisplayed() && canEnroll();\r\n }\r\n }\r\n\r\n angular\r\n .module('courseEnrollment')\r\n .controller('CourseUserEnrollmentModalController', courseUserEnrollmentModalController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseSessionDetails')\r\n .component('vbCourseSessionDetails',\r\n {\r\n templateUrl: 'Scripts/course/course-session/course-session-details/course-session-details.component.html',\r\n controller: 'CourseSessionDetailsController',\r\n controllerAs: 'vm'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseSessionDetailsController.$inject = [\r\n 'courseSessionDetailsTabsetTabs',\r\n '$routeParams',\r\n 'CourseFactory',\r\n 'CourseSessionFactory',\r\n 'UserFactory',\r\n 'UserService',\r\n '$location',\r\n 'CourseDayFactory'\r\n ];\r\n\r\n function courseSessionDetailsController(\r\n courseSessionDetailsTabsetTabs,\r\n $routeParams,\r\n CourseFactory,\r\n CourseSessionFactory,\r\n UserFactory,\r\n UserService,\r\n $location,\r\n CourseDayFactory\r\n ) {\r\n\r\n var vm = this;\r\n var _activeTab = courseSessionDetailsTabsetTabs.courseInformationTab;\r\n var _courseSessionId = $routeParams.courseSessionId;\r\n var _courseSession = null;\r\n var _course = {};\r\n var _usersPresentToSession = [];\r\n var _courseAgendaDetailsForm = null;\r\n var _dayOfTheSession = null;\r\n\r\n Object.defineProperties(vm, {\r\n activeTab: {\r\n get: function() {\r\n return _activeTab;\r\n }\r\n },\r\n enrolledUsersTab: {\r\n get: function() {\r\n return courseSessionDetailsTabsetTabs.enrolledUsersTab;\r\n }\r\n },\r\n course: {\r\n get: function() {\r\n return _course;\r\n }\r\n },\r\n courseInformationTab: {\r\n get: function() {\r\n return courseSessionDetailsTabsetTabs.courseInformationTab;\r\n }\r\n },\r\n agendaTab: {\r\n get: function() {\r\n return courseSessionDetailsTabsetTabs.agendaTab;\r\n }\r\n },\r\n courseSession: {\r\n get: function() {\r\n return _courseSession;\r\n }\r\n },\r\n dayOfTheSession: {\r\n get: function() {\r\n return _dayOfTheSession;\r\n }\r\n }\r\n });\r\n\r\n vm.selectTab = selectTab;\r\n vm.$onInit = onInit;\r\n vm.onEnrolledUserClick = onEnrolledUserClick;\r\n vm.onEnrolledUsersRetrieve = onEnrolledUsersRetrieve;\r\n vm.onCourseAgendaDetailsFormInitialized = onCourseAgendaDetailsFormInitialized;\r\n vm.goBackToCourseDetails = goBackToCourseDetails;\r\n vm.isSaveButtonDisabled = isSaveButtonDisabled;\r\n vm.getClassesForAgendaTab = getClassesForAgendaTab;\r\n vm.saveCourseSession = saveCourseSession;\r\n\r\n function onInit() {\r\n getCourseSessionById();\r\n getCourse();\r\n getUsersPresentToCourseSession();\r\n // check if the session is associated with a course day\r\n getCourseDayByCourseSessionId();\r\n }\r\n\r\n function getCourseSessionById() {\r\n CourseSessionFactory.getCourseSessionById(_courseSessionId)\r\n .then(function(courseSession) {\r\n _courseSession = courseSession;\r\n });\r\n }\r\n\r\n function getCourse() {\r\n CourseFactory.getCourseByCourseSessionId(_courseSessionId)\r\n .then(function(course) {\r\n _course = course;\r\n });\r\n }\r\n\r\n function selectTab(tab) {\r\n _activeTab = tab;\r\n }\r\n\r\n function onEnrolledUserClick(user) {\r\n if (user.isSelected) {\r\n saveUserPresenceToSession(user);\r\n } else {\r\n removeUserPresenceFromSession(user);\r\n }\r\n }\r\n\r\n function saveUserPresenceToSession(user) {\r\n CourseSessionFactory.saveUserPresenceToSession(_courseSessionId, user);\r\n }\r\n\r\n function removeUserPresenceFromSession(user) {\r\n CourseSessionFactory.removeUserPresenceFromSession(_courseSessionId, user);\r\n }\r\n\r\n function getUsersPresentToCourseSession() {\r\n UserFactory.getUsersPresentToCourseSession(_courseSessionId)\r\n .then(function(users) {\r\n _usersPresentToSession = users;\r\n });\r\n }\r\n\r\n function onEnrolledUsersRetrieve(enrolledUsers) {\r\n UserService.markUsersPresentToSession(_usersPresentToSession, enrolledUsers);\r\n }\r\n\r\n function onCourseAgendaDetailsFormInitialized(form) {\r\n _courseAgendaDetailsForm = form;\r\n }\r\n\r\n function goBackToCourseDetails() {\r\n $location.path('/course/' + _course.id);\r\n }\r\n\r\n function isSaveButtonDisabled() {\r\n return _courseAgendaDetailsForm && _courseAgendaDetailsForm.$invalid;\r\n }\r\n\r\n function getClassesForAgendaTab() {\r\n\r\n if (_courseAgendaDetailsForm && _courseAgendaDetailsForm.$invalid) {\r\n return 'red-border red-color';\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function saveCourseSession() {\r\n CourseSessionFactory.saveCourseSession(vm.courseSession)\r\n .then(function() {\r\n getCourseSessionById();\r\n });\r\n }\r\n\r\n function getCourseDayByCourseSessionId() {\r\n\r\n CourseDayFactory.getCourseDayByCourseSessionId(_courseSessionId)\r\n .then(function(courseDay) {\r\n _dayOfTheSession = courseDay;\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseSessionDetails')\r\n .controller('CourseSessionDetailsController', courseSessionDetailsController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseSession')\r\n .component('vbCourseSessionList',\r\n {\r\n templateUrl: 'Scripts/course/course-session/course-session-list/course-session-list.component.html',\r\n controller: 'CourseSessionListController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n courseSessions: '=',\r\n onViewSessionClick: '&?'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function courseSessionListController() {\r\n\r\n var vm = this;\r\n\r\n vm.onViewSessionClicked = onViewSessionClicked;\r\n\r\n function onViewSessionClicked(courseSession) {\r\n notifyParentComponentAboutViewSessionClick(courseSession);\r\n }\r\n\r\n function notifyParentComponentAboutViewSessionClick(courseSession) {\r\n\r\n if (vm.onViewSessionClick && typeof vm.onViewSessionClick === 'function') {\r\n vm.onViewSessionClick({ courseSession: courseSession });\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('courseSession')\r\n .controller('CourseSessionListController', courseSessionListController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseSubjectManager')\r\n .component('vbCourseSubjectManagerDetails',\r\n {\r\n templateUrl: 'Scripts/course/course-subject-manager/course-subject-manager-details/course-subject-manager-details.component.html',\r\n controller: 'CourseSubjectManagerDetailsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n subjectManager: '<',\r\n onFormInit: '&'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseSubjectManagerDetailsController.$inject = [\r\n '$timeout',\r\n '$scope'\r\n ];\r\n\r\n function courseSubjectManagerDetailsController(\r\n $timeout,\r\n $scope\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.$onInit = onInit;\r\n\r\n function onInit() {\r\n notifyParentAboutFormInitialization();\r\n }\r\n\r\n function notifyParentAboutFormInitialization() {\r\n $timeout(function () {\r\n\r\n if (vm.onFormInit && typeof vm.onFormInit === 'function') {\r\n vm.onFormInit({ form: $scope.subjectManagerDetailsForm });\r\n }\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseSubjectManager')\r\n .controller('CourseSubjectManagerDetailsController', courseSubjectManagerDetailsController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseSubjectManager')\r\n .component('vbCourseSubjectManagerModal',\r\n {\r\n templateUrl: 'Scripts/course/course-subject-manager/course-subject-manager-modal/course-subject-manager-modal.component.html',\r\n controller: 'CourseSubjectManagerModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n close: '&',\r\n subjectManager: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseSubjectManagerModalController.$inject = [\r\n 'CourseSubjectManagerFactory'\r\n ];\r\n\r\n function courseSubjectManagerModalController(\r\n CourseSubjectManagerFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.subjectManagerDetailsForm = {};\r\n\r\n vm.$onInit = onInit;\r\n vm.onSubjectManagerDetailsFormInit = onSubjectManagerDetailsFormInit;\r\n vm.saveSubjectManager = saveSubjectManager;\r\n\r\n function onInit() {\r\n\r\n if (!vm.subjectManager) {\r\n vm.subjectManager = {};\r\n }\r\n }\r\n\r\n function onSubjectManagerDetailsFormInit(form) {\r\n vm.subjectManagerDetailsForm = form;\r\n }\r\n\r\n function saveSubjectManager() {\r\n\r\n CourseSubjectManagerFactory.saveSubjectManager(vm.subjectManager)\r\n .then(function() {\r\n vm.close();\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseSubjectManager')\r\n .controller('CourseSubjectManagerModalController', courseSubjectManagerModalController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n angular\r\n .module('customer')\r\n .component('vbCustomerTabset', {\r\n templateUrl: 'Scripts/customer/customer-details/customer-tabset/customer-tabset.component.html',\r\n controller: 'CustomerTabsetController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n customer: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CustomerTabsetController.$inject = [\r\n '$scope',\r\n '$routeParams',\r\n '$filter',\r\n 'titleService',\r\n 'dialogService',\r\n 'CustomerFactory',\r\n 'OrganizationFactory',\r\n 'OrganizationUtilService',\r\n 'OrderFactory',\r\n '$q',\r\n 'Patterns',\r\n 'ContactFactory',\r\n 'sessionInformationService',\r\n '$location',\r\n 'CountryFactory',\r\n 'AllAccessPage'\r\n ];\r\n\r\n angular.module('customer').controller('CustomerTabsetController', CustomerTabsetController);\r\n\r\n function CustomerTabsetController(\r\n $scope,\r\n $routeParams,\r\n $filter,\r\n titleService,\r\n dialogService,\r\n CustomerFactory,\r\n OrganizationFactory,\r\n OrganizationUtilService,\r\n OrderFactory,\r\n $q,\r\n Patterns,\r\n ContactFactory,\r\n sessionInformationService,\r\n $location,\r\n CountryFactory,\r\n AllAccessPage\r\n ) {\r\n var vm = this;\r\n $scope.nrOfContactsOnCustomer = 0;\r\n var customerPromise = null;\r\n var originalCustomer = {};\r\n $scope.reverse = true;\r\n $scope.predicate = \"id\";\r\n $scope.showContactForm = false;\r\n $scope.currentPage = 1;\r\n $scope.itemsPerPage = 10;\r\n $scope.numPages = 1;\r\n $scope.contact = {};\r\n var contactsUpdated = [];\r\n $scope.loggedUser = sessionInformationService.getUser();\r\n\r\n var customerId = null;\r\n if ($scope.isFromOrderWindow) //use the id that came from the new order window\r\n customerId = $scope.currentCustomerIdFromOrder;\r\n else\r\n customerId = $routeParams.customerId;\r\n\r\n if (customerId == null && CustomerFactory.customerId != 0) {\r\n customerId = CustomerFactory.customerId;\r\n CustomerFactory.customerId = 0;\r\n }\r\n\r\n if (customerId) {\r\n customerPromise = CustomerFactory.getCustomer(customerId)\r\n .$promise.then(function (result) {\r\n //vm.customer = result;\r\n //originalCustomer = angular.copy(result);\r\n //getNrOfContactsOnCustomer();\r\n });\r\n } else {\r\n vm.customer = CustomerFactory.getCustomerToSave();\r\n vm.customer.MobilePhone = '0047';\r\n //$scope.customer.Telephone = 47;\r\n //$scope.customer.Telefax = 47;\r\n titleService.changeTitle($filter('translate')('txtNewCustomer'));\r\n customerPromise = $q.when();\r\n }\r\n\r\n $scope.reverse = OrderFactory.reverseOrders;\r\n $scope.predicate = OrderFactory.predicateOrders;\r\n\r\n /**\r\n * Goes to the specified page\r\n * @param {} path \r\n * @returns {} \r\n */\r\n $scope.go = function (path) {\r\n $location.path(path);\r\n };\r\n\r\n /**\r\n * Saves or updates the current customer\r\n */\r\n $scope.saveCustomer = function () {\r\n\r\n if (!vm.customer.ContactList)\r\n vm.customer.ContactList = [];\r\n\r\n var customerSaved = CustomerFactory.saveCustomer(vm.customer);\r\n if ($scope.isFromOrderWindow) {\r\n customerSaved.then(function (result) {\r\n var newCustomer = new Object();\r\n\r\n newCustomer.id = result.id;\r\n newCustomer.FirstName = result.FirstName;\r\n newCustomer.LastName = result.LastName;\r\n newCustomer.PostalAddress = vm.customer.PostalAddress;\r\n\r\n $scope.customerModal.close(newCustomer);\r\n }, function (error) {\r\n vm.customer.MobilePhone = parseInt(vm.customer.MobilePhone.toString());\r\n vm.customer.Telephone = parseInt(vm.customer.Telephone.toString());\r\n vm.customer.Telefax = parseInt(vm.customer.Telefax.toString());\r\n });\r\n } else\r\n customerSaved.then(function () {\r\n $scope.go('/customers');\r\n });\r\n };\r\n\r\n\r\n /**\r\n * Used to check if the phone number is correct\r\n * @param phone\r\n * @returns\r\n */\r\n $scope.phonePattern = function (phone) {\r\n var regexp = /([0-9][0-9])([0-9]{1,20})$/;\r\n return regexp.test(phone);\r\n };\r\n\r\n /**\r\n * Checks whether to show or not the orders tab\r\n * @returns\r\n */\r\n $scope.isCustomerUpdating = function () {\r\n return customerId ? true : false;\r\n }\r\n\r\n /**\r\n * Saves or updates any contact\r\n */\r\n $scope.saveContact = function () {\r\n\r\n // set the contact as Active\r\n $scope.contact.Active = true;\r\n // push a copy to the contactsUpdated \r\n contactsUpdated.push(angular.copy($scope.contact));\r\n\r\n if (!vm.customer.ContactList)\r\n vm.customer.ContactList = [];\r\n\r\n if (!$scope.contact.id && !$scope.contact.justAdded) {\r\n $scope.contact.justAdded = true;\r\n vm.customer.ContactList.push(angular.copy($scope.contact));\r\n }\r\n\r\n $scope.contact = {};\r\n $scope.showContactForm = false;\r\n };\r\n\r\n /**\r\n * Prepares the form for an existing contact\r\n * @param contact\r\n */\r\n $scope.getContact = function (contact) {\r\n $scope.contact = contact;\r\n $scope.showContactForm = true;\r\n };\r\n\r\n /**\r\n * Fetches the list of orders for the current customer\r\n */\r\n $scope.getOrdersForCustomer = function () {\r\n\r\n OrderFactory.getOrdersForCustomer(customerId).$promise.then(function (response) {\r\n\r\n $scope.ordersForCustomer = $filter('orderBy')(response, OrderFactory.predicateOrders, OrderFactory.reverseOrders);\r\n\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Changes the order based on a given predicate\r\n * @param orderBy\r\n */\r\n $scope.changeOrder = function (orderBy) {\r\n\r\n if (orderBy != $scope.predicate) {\r\n $scope.predicate = orderBy;\r\n OrderFactory.predicateOrders = orderBy;\r\n } else {\r\n $scope.reverse = !$scope.reverse;\r\n OrderFactory.reverseOrders = $scope.reverse;\r\n }\r\n $scope.ordersForCustomer = $filter('orderBy')($scope.ordersForCustomer, OrderFactory.predicateOrders, OrderFactory.reverseOrders);\r\n\r\n };\r\n\r\n /**\r\n * Prepares the form for a new contact\r\n */\r\n $scope.setNewContact = function () {\r\n $scope.showContactForm = true;\r\n $scope.contact = {};\r\n $scope.contact.Active = true;\r\n };\r\n\r\n function isEmailValid(email) {\r\n\r\n if (!email) {\r\n return false;\r\n }\r\n\r\n return Patterns.EmailPattern.test(email);\r\n }\r\n\r\n /**\r\n * Checks whether the save button for contact is disabled\r\n * @returns\r\n */\r\n $scope.disableSaveContact = function () {\r\n if ($scope.contact && $scope.contact.Name && $scope.contact.Mobile) {\r\n\r\n if ($scope.contact.Telephone && !$scope.phonePattern($scope.contact.Telephone))\r\n return true;\r\n\r\n if (!$scope.contact.Email || !isEmailValid($scope.contact.Email))\r\n return true;\r\n\r\n return false;\r\n }\r\n return true;\r\n };\r\n\r\n function getNrOfContactsOnCustomer() {\r\n\r\n ContactFactory.getNrOfContactsOnCustomer(vm.customer.id)\r\n .then(function (nrOfContacts) {\r\n\r\n $scope.nrOfContactsOnCustomer = nrOfContacts[0];\r\n });\r\n }\r\n\r\n /**\r\n * Fetches the list of companies\r\n * Only central can create customers for other companies\r\n */\r\n $scope.getOrganizationsDropdown = function () {\r\n var organizations = OrganizationFactory.getOrganizationsDropdown();\r\n organizations.$promise.then(function (result) {\r\n $scope.organizations = result;\r\n if ($scope.loggedUser.Organization.Central == false) {\r\n vm.customer.Organization = $scope.loggedUser.Organization;\r\n } else if (OrganizationUtilService.getOrganizationId())\r\n customerPromise.then(function () {\r\n vm.customer.Organization = {\r\n id: OrganizationUtilService.getOrganizationId()\r\n };\r\n });\r\n else\r\n customerPromise.then(function () {\r\n vm.customer.Organization = $scope.loggedUser.Organization;\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Fetches the list of statuses\r\n */\r\n $scope.getStatusDropdown = function () {\r\n var statusDropdown = CustomerFactory.getStatusDropdown();\r\n statusDropdown.$promise.then(function (result) {\r\n $scope.statusDropdown = result;\r\n for (var index = 0; index < $scope.statusDropdown.length; index++) {\r\n if ($scope.statusDropdown[index].ProgId == \"ACTIVE\") {\r\n if (vm.customer == undefined) {\r\n vm.customer = CustomerFactory.getCustomerToSave();\r\n }\r\n if (vm.customer.Status == undefined) {\r\n vm.customer.Status = $scope.statusDropdown[index];\r\n }\r\n break;\r\n }\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Fetches the list of types\r\n */\r\n $scope.getTypes = function () {\r\n var types = CustomerFactory.getTypes();\r\n types.$promise.then(function (result) {\r\n $scope.types = result;\r\n if ($scope.types.length > 0) {\r\n if (vm.customer == undefined) {\r\n vm.customer = CustomerFactory.getCustomerToSave();\r\n }\r\n if (vm.customer.Type == undefined)\r\n vm.customer.Type = types[0];\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Fetches the list of countries\r\n */\r\n $scope.getCountries = function () {\r\n CountryFactory.getCountries([AllAccessPage.Customers])\r\n .then(function (result) {\r\n $scope.countries = result;\r\n });\r\n };\r\n }\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n EmailTemplateFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService',\r\n '$filter'\r\n ];\r\n\r\n angular.module(\"deviation\").factory(\"EmailTemplateFactory\", EmailTemplateFactory);\r\n\r\n function EmailTemplateFactory(\r\n $resource,\r\n baseUrlService,\r\n $filter\r\n ) {\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n\r\n var EmailTemplatesForDeviation = $resource(baseUrl + 'REST/EmailTemplate.svc/EmailTemplatesForDeviation');\r\n var DeviationEmailTemplate = $resource(baseUrl + 'REST/EmailTemplate.svc/DeviationEmailTemplate');\r\n var DeviationEmailTemplateFor = $resource(baseUrl + 'REST/EmailTemplate.svc/DeviationEmailTemplate');\r\n var EmailTemplate = $resource(baseUrl + 'REST/EmailTemplate.svc/EmailTemplate/:table');\r\n\r\n /**\r\n * Returns a list of varibles based on a given table\r\n * @param table\r\n * @returns\r\n */\r\n var getTemplateVariables = function (table) {\r\n\r\n var variables = [\r\n { key: 'VARIABLE.SENDER_FIRST_NAME', hashtag: '##SenderFirstName##' },\r\n { key: 'VARIABLE.SENDER_LAST_NAME', hashtag: '##SenderLastName##' },\r\n { key: 'VARIABLE.SENDER_EMAIL', hashtag: '##SenderEmail##' },\r\n { key: 'VARIABLE.SENDER_ORGANIZATION_NAME', hashtag: '##SenderOrganizationName##' },\r\n { key: 'VARIABLE.SENDER_ORGANIZATION_NUMBER', hashtag: '##SenderOrganizationNr##' },\r\n { key: 'VARIABLE.SENDER_ORGANIZATION_EMAIL', hashtag: '##SenderOrganizationEmail##' }\r\n ];\r\n\r\n switch (table) {\r\n\r\n case \"BOT_DEVIATION_CUSTOMER\":\r\n\r\n variables.push({ key: 'VARIABLE.CUSTOMER_FIRST_NAME', hashtag: '##CustomerFirstName##' });\r\n variables.push({ key: 'VARIABLE.CUSTOMER_LAST_NAME', hashtag: '##CustomerLastName##' });\r\n variables.push({ key: 'VARIABLE.CUSTOMER_EMAIL', hashtag: '##CustomerEmail##' });\r\n\r\n break;\r\n\r\n case \"BOT_DEVIATION_INTERNAL\":\r\n\r\n variables.push({ key: 'VARIABLE.USER_FIRST_NAME', hashtag: '##UserFirstName##' });\r\n variables.push({ key: 'VARIABLE.USER_LAST_NAME', hashtag: '##UserLastName##' });\r\n variables.push({ key: 'VARIABLE.USER_EMAIL', hashtag: '##UserEmail##' });\r\n\r\n break;\r\n }\r\n\r\n\r\n return variables;\r\n\r\n };\r\n\r\n /**\r\n * Get the associated entity based on the given table\r\n * @param table\r\n * @returns\r\n */\r\n var getAssociatedEntityType = function (table) {\r\n\r\n var associatedEntityType = \"\";\r\n\r\n if (table) {\r\n\r\n var firstLetter = \"\";\r\n\r\n associatedEntityType = table;\r\n\r\n associatedEntityType = associatedEntityType.replace(\"BOT_DEVIATION_\", \"\")\r\n .replace(\"_\", \" \");\r\n\r\n // get first letter\r\n firstLetter = associatedEntityType.substring(0, 1);\r\n\r\n // get rest of the word and transform him to lowercase\r\n\r\n associatedEntityType = associatedEntityType.substring(1, associatedEntityType.length).toLowerCase();\r\n\r\n // build the final word\r\n associatedEntityType = firstLetter + associatedEntityType;\r\n\r\n }\r\n\r\n return $filter('translate')(associatedEntityType);\r\n\r\n };\r\n\r\n /**\r\n * Fetches the email templates for deviation\r\n * @returns\r\n */\r\n var getEmailTemplatesForDeviation = function () {\r\n return EmailTemplatesForDeviation.query().$promise;\r\n };\r\n\r\n /**\r\n * Saves any given deviation email template\r\n * @param deviationEmailTemplate\r\n * @returns\r\n */\r\n var saveDeviationEmailTemplate = function (deviationEmailTemplate) {\r\n return DeviationEmailTemplate.save(deviationEmailTemplate).$promise;\r\n };\r\n\r\n /**\r\n * Fetches the email templates for a given entity\r\n * @param templateFor\r\n * @returns\r\n */\r\n var getDeviationEmailTemplateForAssociatedEntity = function (templateFor, organizationId) {\r\n return DeviationEmailTemplateFor.get({\r\n templateFor: templateFor,\r\n organizationId: organizationId\r\n }).$promise;\r\n };\r\n\r\n function getEmailTemplateByTable(table) {\r\n return EmailTemplate.get({ table: table }).$promise;\r\n }\r\n\r\n return {\r\n getTemplateVariables: getTemplateVariables,\r\n getAssociatedEntityType: getAssociatedEntityType,\r\n getEmailTemplatesForDeviation: getEmailTemplatesForDeviation,\r\n saveDeviationEmailTemplate: saveDeviationEmailTemplate,\r\n getDeviationEmailTemplateForAssociatedEntity: getDeviationEmailTemplateForAssociatedEntity,\r\n getEmailTemplateByTable: getEmailTemplateByTable\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('laws')\r\n .component('vbLawsRegulationsOpenFileModal',\r\n {\r\n templateUrl: 'Scripts/laws-regulations/laws-regulations-documents/open-file-modal/open-file-modal.component.html',\r\n controller: 'LawsAndRegulationsOpenFileController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n attachmentId: '<',\r\n closeModal: '&',\r\n fillAttachmentId: '<',\r\n project: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n LawsAndRegulationsOpenFileController.$inject = [\r\n 'AttachmentFactory',\r\n 'DownloadService',\r\n 'LawsAndRegulationsFactory',\r\n 'OrganizationUtilService',\r\n 'ProcessListFactory',\r\n '$translate',\r\n 'TableResources',\r\n '_',\r\n 'OrganizationFactory'\r\n ];\r\n\r\n angular\r\n .module('laws')\r\n .controller('LawsAndRegulationsOpenFileController', LawsAndRegulationsOpenFileController);\r\n\r\n function LawsAndRegulationsOpenFileController(\r\n AttachmentFactory,\r\n DownloadService,\r\n LawsAndRegulationsFactory,\r\n OrganizationUtilService,\r\n ProcessListFactory,\r\n $translate,\r\n TableResources,\r\n _,\r\n OrganizationFactory\r\n ) {\r\n var vm = this;\r\n\r\n vm.fillData = null;\r\n vm.orderOptions = {\r\n orderFreeText: ''\r\n };\r\n\r\n vm.$onInit = onInit;\r\n vm.getRegularFile = getRegularFile;\r\n vm.getFilledFile = getFilledFile;\r\n vm.dismiss = dismiss;\r\n vm.isGetFilledDisabled = isGetFilledDisabled;\r\n vm.showFillInput = showFillInput;\r\n vm.isInputDisabled = isInputDisabled;\r\n vm.getIntellisense = getIntellisense;\r\n vm.selectAssociatedObject = selectAssociatedObject;\r\n vm.onUseProjectCustomerChange = onUseProjectCustomerChange;\r\n vm.onUseProjectOrderChange = onUseProjectOrderChange;\r\n vm.showOrderDropdown = showOrderDropdown;\r\n vm.getOrders = getOrders;\r\n vm.setOrderForInputsOfTypeOrder = setOrderForInputsOfTypeOrder;\r\n\r\n function onInit() {\r\n getFilledData()\r\n .then(function () {\r\n\r\n });\r\n };\r\n\r\n function getRegularFile() {\r\n return AttachmentFactory.getAttachment(vm.attachmentId)\r\n .$promise\r\n .then(function (result) {\r\n DownloadService.download(result.URL);\r\n });\r\n };\r\n\r\n function getFilledFile() {\r\n if (isGetFilledDisabled())\r\n return Promise.resolve();\r\n\r\n for (var i = 0; i < vm.fillData.length; i++) {\r\n switch (vm.fillData[i].ProgId) {\r\n case 'BOT_CUSTOM_DATE':\r\n var date = _.cloneDeep(vm.fillData[i].Value);\r\n date = moment(date).valueOf();\r\n\r\n vm.fillData[i].Value = date;\r\n break;\r\n }\r\n }\r\n\r\n return LawsAndRegulationsFactory.getFilledPdfUrl(vm.attachmentId, vm.fillAttachmentId, vm.fillData)\r\n .then(function (result) {\r\n DownloadService.download(result.URL);\r\n });\r\n };\r\n\r\n function showFillInput(input) {\r\n return !_.some(['BOT_CUSTOM_NUMBER', 'BOT_CUSTOM_TEXT', 'BOT_CUSTOM_DATE'], function (s) { return s == input.ProgId });\r\n };\r\n\r\n function isInputDisabled(input) {\r\n if (input.ProgId == 'BOT_CUSTOMER' && input.useProjectCustomer)\r\n return true;\r\n\r\n if (input.ProgId == 'BOT_ORDER')\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n function isGetFilledDisabled() {\r\n if (_.isNil(vm.fillData) || _.isEmpty(vm.fillData))\r\n return true;\r\n\r\n var notFilledValues = _.some(_.filter(vm.fillData, function (e) { return e.ProgId == 'BOT_CUSTOMER' || e.ProgId == 'BOT_ORDER' }), function (e) { return !e.Value });\r\n\r\n return notFilledValues;\r\n };\r\n\r\n function dismiss() {\r\n if (vm.closeModal)\r\n vm.closeModal()();\r\n };\r\n\r\n function getFilledData() {\r\n return LawsAndRegulationsFactory.getFilledPdfMappingTypes(vm.attachmentId, vm.fillAttachmentId)\r\n .$promise\r\n .then(function (result) {\r\n vm.fillData = result;\r\n\r\n if (vm.project && vm.project.id)\r\n for (var i = 0; i < vm.fillData.length; i++) {\r\n if (vm.fillData[i].ProgId != 'BOT_CUSTOMER' && vm.fillData[i].ProgId != 'BOT_ORDER')\r\n continue;\r\n\r\n vm.fillData[i].useProjectCustomer = true;\r\n vm.fillData[i].useProjectOrder = true;\r\n\r\n vm.onUseProjectCustomerChange(vm.fillData[i]);\r\n vm.onUseProjectOrderChange(vm.fillData[i]);\r\n }\r\n });\r\n };\r\n\r\n function getIntellisense(table, freeText, input) {\r\n var organizationId = OrganizationUtilService.getOrganizationId();\r\n\r\n //TODO: this should be renamed or copied into a service\r\n ProcessListFactory.getRiskAnalysisIntellisense(table, organizationId, freeText)\r\n .$promise\r\n .then(function (result) {\r\n input.IntellisenseList = result;\r\n });\r\n };\r\n\r\n function selectAssociatedObject(object, input) {\r\n input.freetext = angular.copy(object.id + ' ' + object.Name);\r\n input.Value = object.ForeignKey;\r\n };\r\n\r\n function onUseProjectCustomerChange(input) {\r\n if (input.useProjectCustomer) {\r\n if (!vm.project || !vm.project.Order || !vm.project.Order.Customer)\r\n return;\r\n\r\n input.freetext = vm.project.Order.Customer.FullName;\r\n input.Value = vm.project.Order.Customer.id;\r\n } else {\r\n input.freeText = null;\r\n input.Value = null;\r\n }\r\n };\r\n\r\n function onUseProjectOrderChange(input) {\r\n if (input.useProjectOrder) {\r\n if (!vm.project || !vm.project.Order)\r\n return;\r\n\r\n input.freetext = $translate.instant('txtOrder') + ' ' + (vm.project.Order.OrderNumber ? + vm.project.Order.OrderNumber : vm.project.Order.id);\r\n input.Value = vm.project.Order.id;\r\n } else {\r\n input.freeText = null;\r\n input.Value = null;\r\n }\r\n };\r\n\r\n function showOrderDropdown(fillData) {\r\n // we display the order dropdown only if the pdf contains inputs with value type Order\r\n // return fillData && _.find(fillData, function (item) { return item.ProgId === TableResources.OrderTable });\r\n return true;\r\n }\r\n\r\n function getOrders(orderOptions) {\r\n return OrganizationFactory.getOrders(OrganizationUtilService.getOrganizationId(), orderOptions.orderFreeText)\r\n .then(function (result) {\r\n orderOptions.IntellisenseList = result;\r\n });\r\n }\r\n\r\n function setOrderForInputsOfTypeOrder(order, fillData) {\r\n\r\n if (!fillData) {\r\n return;\r\n }\r\n\r\n _.forEach(fillData, function (input) {\r\n\r\n if (input.ProgId === TableResources.OrderTable && !input.useProjectOrder) {\r\n input.Value = order.id;\r\n } else if (input.ProgId === TableResources.CustomerTable && !input.useProjectOrder)\r\n input.Value = order.Customer.id;\r\n });\r\n\r\n vm.orderOptions.orderFreeText = (order.OrderNumber ? ('Eks. ID ' + order.OrderNumber) : ('ID ' + order.id)) + ' ' + order.Customer.FirstName + ' ' + order.Customer.LastName;\r\n }\r\n }\r\n})();","(function() {\r\n 'use strict';\r\n\r\n // component that represents the risk analysis list page\r\n // in the future i think can be refactored to use internally\r\n // the risk heads component which presents a list of risks\r\n // therefore we can separate a bit the responsibilities\r\n // by handing the presentation to risk heads component\r\n // and the extra html like organization dropdown which\r\n // is related to vbRiskHeadList can remain in this component\r\n angular\r\n .module('riskAnalysis')\r\n .component('vbRiskHeadList',\r\n {\r\n templateUrl: 'scripts/management/riskAnalysis/risk-head-list/risk-head-list.component.html',\r\n controller: 'RiskAnalysisController',\r\n controllerAs : 'vm'\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n RiskAnalysisController.$inject = [\r\n '$filter',\r\n 'titleService',\r\n 'searchService',\r\n 'ProcessListFactory',\r\n 'OrganizationFactory',\r\n 'UserFactory',\r\n 'OrganizationUtilService',\r\n '$location'\r\n ];\r\n\r\n angular.module('processList').controller('RiskAnalysisController', RiskAnalysisController);\r\n\r\n function RiskAnalysisController(\r\n $filter,\r\n titleService,\r\n searchService,\r\n ProcessListFactory,\r\n OrganizationFactory,\r\n UserFactory,\r\n OrganizationUtilService,\r\n $location\r\n ) {\r\n\r\n var vm = this;\r\n\r\n titleService.changeTitle($filter('translate')('Risk'));\r\n\r\n vm.reverse = UserFactory.reverseUsers;\r\n vm.predicate = UserFactory.predicateUsers;\r\n vm.includeDeactivatedItems = UserFactory.includeDeactivatedItems;\r\n\r\n var allRiskHeads = [];\r\n var nrOfRowsToLoadAtStart = 30;\r\n var nrOfRowsToLoad = 10;\r\n\r\n //pagination for small devices\r\n vm.currentPage = 1;\r\n vm.itemsPerPage = 30;\r\n vm.numPages = 1;\r\n\r\n vm.search = searchService.getSearch();\r\n\r\n /**\r\n * Change sorting based on the predicate given\r\n * @param {} orderBy \r\n * @returns {} \r\n */\r\n vm.changeOrder = function (orderBy) {\r\n vm.riskAnalysis = [];\r\n if (orderBy != vm.predicate) {\r\n vm.predicate = orderBy;\r\n UserFactory.predicateUsers = orderBy;\r\n } else {\r\n vm.reverse = !vm.reverse;\r\n UserFactory.reverseUsers = vm.reverse;\r\n }\r\n\r\n allRiskHeads = $filter('orderBy')(allRiskHeads, UserFactory.predicateUsers, UserFactory.reverseUsers);\r\n\r\n vm.riskAnalysis = allRiskHeads.slice(0, nrOfRowsToLoadAtStart);\r\n };\r\n\r\n vm.reachedEndOfList = false;\r\n /**\r\n * Functio used for infinite scroll when the scroll reaches end of list\r\n * @returns {} \r\n */\r\n vm.loadMore = function () {\r\n if (vm.riskAnalysis && vm.riskAnalysis.length < allRiskHeads.length) {\r\n var last = vm.riskAnalysis.length > 0 ? vm.riskAnalysis.length : 0;\r\n var indexToLoad = last + nrOfRowsToLoad > allRiskHeads.length ? allRiskHeads.length : last + nrOfRowsToLoad;\r\n\r\n vm.riskAnalysis = allRiskHeads.slice(0, indexToLoad);\r\n }\r\n else {\r\n if (allRiskHeads.length > nrOfRowsToLoadAtStart) {\r\n vm.reachedEndOfList = true;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Get the risk analysis based on search criteria\r\n * @param {} freeText \r\n * @param {} organizationId \r\n * @returns {} \r\n */\r\n vm.getManagementRiskAnalysis = function (freeText, organizationId) {\r\n OrganizationUtilService.setOrganizationId(organizationId ? organizationId : null);\r\n if (freeText != undefined && freeText != null) {\r\n if (!freeText.replace(/\\s/g, '').length)// check if contains only spaces\r\n freeText = null;\r\n if (freeText == '')//check if empty string\r\n freeText = null;\r\n }\r\n\r\n searchService.setSearch(freeText);\r\n\r\n var managementRiskAnalysis = ProcessListFactory.getManagementRiskAnalysis(freeText, organizationId, vm.includeDeactivatedItems);\r\n managementRiskAnalysis.$promise.then(function (result) {\r\n allRiskHeads = result;\r\n for (var index = 0; index < allRiskHeads.length; index++) {\r\n allRiskHeads[index].id = parseInt(allRiskHeads[index].id);\r\n allRiskHeads[index].ExternalId = parseInt(allRiskHeads[index].ExternalId);\r\n }\r\n allRiskHeads = $filter('orderBy')(allRiskHeads, UserFactory.predicateUsers, UserFactory.reverseUsers);\r\n\r\n if (vm.isXs) {\r\n vm.riskAnalysis = allRiskHeads;\r\n vm.numPages = Math.ceil(allRiskHeads.length / vm.itemsPerPage);\r\n } else\r\n vm.riskAnalysis = allRiskHeads.slice(0, nrOfRowsToLoadAtStart);\r\n\r\n }, function (err) {\r\n\r\n });\r\n };\r\n\r\n vm.onOrganizationChange = function (organization) {\r\n vm.search.Organization = organization;\r\n vm.getManagementRiskAnalysis(vm.search.text, organization.id);\r\n }\r\n\r\n vm.navigateTo = function(path) {\r\n $location.path(path);\r\n }\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .component('vbRiskHead',\r\n {\r\n templateUrl: 'scripts/management/riskAnalysis/risk-head/risk-head.component.html',\r\n controller: 'RiskHeadController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n riskHeadId: '',\r\n scope: $scope,\r\n size: 'lg',\r\n keyboard: false,\r\n backdrop: 'static'\r\n\r\n }).opened.then(function () {\r\n $timeout(function () {\r\n $scope.$broadcast('rzSliderForceRender');\r\n });\r\n });\r\n };\r\n\r\n\r\n function initRiskRows(riskRow) {\r\n\r\n if (riskRow.ProbabilityOne) {\r\n riskRow.probabilityChoice = 1;\r\n } else if (riskRow.ProbabilityTwo) {\r\n riskRow.probabilityChoice = 2;\r\n } else if (riskRow.ProbabilityThree) {\r\n riskRow.probabilityChoice = 3;\r\n } else if (riskRow.ProbabilityFour) {\r\n riskRow.probabilityChoice = 4;\r\n } else if (riskRow.ProbabilityFive) {\r\n riskRow.probabilityChoice = 5;\r\n } else {\r\n riskRow.probabilityChoice = 1;\r\n }\r\n\r\n if (riskRow.ConsequenceOne) {\r\n riskRow.consequenceChoice = 1;\r\n } else if (riskRow.ConsequenceTwo) {\r\n riskRow.consequenceChoice = 2;\r\n } else if (riskRow.ConsequenceThree) {\r\n riskRow.consequenceChoice = 3;\r\n } else if (riskRow.ConsequenceFour) {\r\n riskRow.consequenceChoice = 4;\r\n } else if (riskRow.ConsequenceFive) {\r\n riskRow.consequenceChoice = 5;\r\n } else {\r\n riskRow.consequenceChoice = 1;\r\n }\r\n\r\n riskRow.deadline = riskRow.Deadline ? DateUtilService.getDateWithoutTimezone(riskRow.Deadline) : null;\r\n };\r\n\r\n /**\r\n * Get data for 'intellisense' dropdown\r\n * @param {} setCurrentFreeText \r\n * @returns {} \r\n */\r\n vm.getRiskAnalysisIntellisense = function (setCurrentFreeText) {\r\n var organizationId;\r\n\r\n if (!setCurrentFreeText) {\r\n vm.riskHead.ForeignKey = null;\r\n }\r\n\r\n if (loggedUser.Organization.Central) {\r\n organizationId = OrganizationUtilService.getOrganizationId();\r\n } else {\r\n organizationId = loggedUser.Organization.id;\r\n }\r\n\r\n // check if foreign key and table it's sent in the component in order to be used\r\n if (vm.foreignKey && vm.table) {\r\n vm.freeText.value = vm.foreignKey;\r\n vm.riskHead.Table = vm.table;\r\n }\r\n\r\n ProcessListFactory.getRiskAnalysisIntellisense(vm.riskHead.Table, organizationId, vm.freeText.value).$promise.then(function (result) {\r\n vm.riskAnalysisIntellisense = result;\r\n\r\n // if a id and a table it's sent into the component, preselect that entity\r\n if (vm.foreignKey && vm.table) {\r\n preSelectAssociatedObject(vm.foreignKey, vm.riskAnalysisIntellisense);\r\n }\r\n\r\n if (setCurrentFreeText) {\r\n var currentData = $filter('filter')(vm.riskAnalysisIntellisense, function (data) {\r\n if (data.ForeignKey == vm.riskHead.ForeignKey) return data;\r\n });\r\n\r\n if (currentData && currentData.length) {\r\n vm.freeText.value = currentData[0].id + ' ' + currentData[0].Name;\r\n }\r\n }\r\n });\r\n };\r\n\r\n vm.changeRiskHeadType = function () {\r\n vm.freeText.value = null;\r\n vm.getRiskAnalysisIntellisense();\r\n }\r\n\r\n /**\r\n * Get process lists and try to assign it to the existing risk\r\n * @returns {} \r\n */\r\n vm.getProcessListExternal = function () {\r\n var organizationId;\r\n if (loggedUser.Organization.Central) {\r\n organizationId = OrganizationUtilService.getOrganizationId();\r\n } else {\r\n organizationId = loggedUser.Organization.id;\r\n }\r\n\r\n var processList = ProcessListFactory.GetProcessListsForRiskAnalysis(organizationId);\r\n processList.$promise.then(function (result) {\r\n vm.processLists = $filter('orderBy')(result, 'Name', false);\r\n\r\n if (vm.riskHead.ProcessListId) {\r\n var data = $filter('filter')(vm.processLists, function (processList) {\r\n if (processList.id == vm.riskHead.ProcessListId)\r\n return processList;\r\n });\r\n\r\n if (data && data.length > 0) {\r\n vm.processListName = data[0].Name;\r\n vm.riskHead.ProcessListName = data[0].Name;\r\n }\r\n };\r\n });\r\n };\r\n\r\n vm.processListFiltered = function (filterData) {\r\n if (!filterData)\r\n return [];\r\n\r\n var list = $filter('filter')(vm.processLists, function (processList) {\r\n\r\n if (\r\n (!filterData.Name ||\r\n ((processList.Name && processList.Name.toUpperCase().indexOf(filterData.Name.toUpperCase()) >= 0) || processList.id.indexOf(filterData.Name) >= 0))\r\n ) {\r\n return processList;\r\n }\r\n });\r\n\r\n return list;\r\n };\r\n\r\n vm.selectProcessList = function (processList) {\r\n vm.riskHead.ProcessListId = processList.id;\r\n vm.riskHead.ProcessListName = processList.Name;\r\n vm.processListName = processList.Name;\r\n };\r\n\r\n vm.resetProcessList = function () {\r\n vm.riskHead.ProcessListId = null;\r\n vm.processListName = null;\r\n };\r\n\r\n vm.hasProcessListId = function () {\r\n if (!vm.riskHead) {\r\n return false;\r\n }\r\n\r\n if (vm.riskHead.ProcessListId)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Set organization to risk head\r\n * @param {any} riskHead\r\n */\r\n function setRiskHeadOrganization(riskHead) {\r\n\r\n if (!riskHead)\r\n return;\r\n\r\n if (loggedUser.Group.ProgId === 'ADMIN' && loggedUser.Organization.Central) {\r\n\r\n if (!OrganizationUtilService.getOrganizationId())\r\n riskHead.Organization = loggedUser.Organization;\r\n else\r\n riskHead.Organization = { id: OrganizationUtilService.getOrganizationId() }\r\n\r\n } else {\r\n riskHead.Organization = loggedUser.Organization;\r\n }\r\n\r\n }\r\n\r\n vm.disableRiskRow = function (riskRow, $index) {\r\n if (riskRow.id) {\r\n riskRow.Active = false;\r\n } else {\r\n vm.riskHead.RiskRows.splice($index, 1);\r\n }\r\n };\r\n\r\n vm.showRiskRowsTable = function () {\r\n if (!vm.riskHead || !vm.riskHead.RiskRows)\r\n return false;\r\n\r\n var data = $filter('filter')(vm.riskHead.RiskRows, { Active: true });\r\n\r\n if (data && data.length > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n vm.closeRiskAnalysis = function () {\r\n\r\n // if nothing is sent into the component redirect to risk analysis when close\r\n if (!vm.foreignKey && !vm.table) {\r\n $location.path('/riskAnalysis');\r\n }\r\n }\r\n\r\n vm.selectAssociatedObject = function (object) {\r\n vm.riskHead.Table = object.Table;\r\n vm.riskHead.ForeignKey = object.ForeignKey;\r\n vm.freeText.value = angular.copy(object.id + ' ' + object.Name);\r\n };\r\n\r\n /**\r\n * Checks whether the risk form is disabled or not\r\n * @returns {} \r\n */\r\n vm.disableRiskAnalysis = function () {\r\n if (!vm.riskHead)\r\n return true;\r\n\r\n if (!vm.riskHead.Table)\r\n return true;\r\n\r\n if (!vm.riskHead.ForeignKey)\r\n return true;\r\n\r\n if (!vm.riskHead.IsFromExecution && !vm.riskHead.ProcessListId && vm.riskHead.Table != 'BOT_ORDER' && vm.riskHead.Table != 'BOT_PROJECT')\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Save the risk \r\n * @returns {} \r\n */\r\n vm.saveRiskAnalysis = function () {\r\n if (vm.disableRiskAnalysis())\r\n return $q.reject();\r\n\r\n return ProcessListFactory.saveRiskAnalysis(vm.riskHead).then(function () {\r\n vm.closeRiskAnalysis();\r\n });\r\n };\r\n\r\n vm.isImpersonationActive = function () {\r\n return sessionInformationService.isImpersonationActive();\r\n };\r\n\r\n\r\n function preSelectAssociatedObject(foreignKey, riskAnalysisIntellisense) {\r\n\r\n if (!riskAnalysisIntellisense || riskAnalysisIntellisense.length === 0) {\r\n return;\r\n }\r\n\r\n var objectFound = _.find(riskAnalysisIntellisense, function (element) {\r\n return element.ForeignKey === foreignKey;\r\n });\r\n\r\n if (!objectFound) {\r\n return;\r\n }\r\n\r\n // select the found order\r\n vm.selectAssociatedObject(objectFound);\r\n }\r\n\r\n function canProcessListDropdownBeDisplayed() {\r\n\r\n return RiskHeadService.canProcessListDropdownBeDisplayed(vm.riskHead);\r\n }\r\n\r\n function canDisableButtonBeDisplayed() {\r\n\r\n return !(vm.foreignKey && vm.table);\r\n }\r\n };\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .controller('RiskHeadController', RiskHeadController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n riskHeadService.$inject = [\r\n '_'\r\n ];\r\n\r\n function riskHeadService(\r\n _\r\n ) {\r\n\r\n function canProcessListDropdownBeDisplayed(riskHead) {\r\n\r\n if (_.isNil(riskHead)) {\r\n return false;\r\n }\r\n\r\n return !riskHead.IsFromExecution &&\r\n riskHead.Table !== 'BOT_ORDER' &&\r\n riskHead.Table !== 'BOT_PROJECT';\r\n }\r\n\r\n return {\r\n canProcessListDropdownBeDisplayed: canProcessListDropdownBeDisplayed\r\n };\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .service('RiskHeadService', riskHeadService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .component('vbRiskHeadModal',\r\n {\r\n templateUrl: 'scripts/management/riskAnalysis/risk-head-modal/risk-head-modal.component.html',\r\n controller: 'RiskHeadModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n foreignKey: '<',\r\n table: '@',\r\n riskHeadId: '<',\r\n dismiss: '&',\r\n close : '&'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function RiskHeadModalController() {\r\n\r\n var vm = this;\r\n\r\n // controller API \r\n // reference to saveRiskAnalysis from risk head component\r\n vm.saveRiskAnalysis = null;\r\n\r\n vm.saveRisk = function() {\r\n if (vm.saveRiskAnalysis && typeof (vm.saveRiskAnalysis) === 'function') {\r\n vm.saveRiskAnalysis()\r\n .then(function() {\r\n // close modal\r\n vm.close();\r\n });\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .controller('RiskHeadModalController', RiskHeadModalController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n // re-usable component which have the responsibility to present a list of risk heads\r\n angular\r\n .module('riskAnalysis')\r\n .component('vbRiskHeads',\r\n {\r\n templateUrl: 'Scripts/management/riskAnalysis/risk-heads/risk-heads.component.html',\r\n controller: 'RiskHeadsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n riskHeads: '<',\r\n onRiskHeadClick: '&?',\r\n table:'@?'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n riskHeadsController.$inject = [\r\n 'RiskHeadsService'\r\n ];\r\n\r\n function riskHeadsController(\r\n RiskHeadsService\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.onRiskHeadClicked = onRiskHeadClicked;\r\n vm.getExecutedForNameByTable = getExecutedForNameByTable;\r\n\r\n function onRiskHeadClicked(riskHead) {\r\n\r\n if (vm.onRiskHeadClick && typeof vm.onRiskHeadClick === 'function') {\r\n vm.onRiskHeadClick({ riskHead: riskHead });\r\n }\r\n }\r\n\r\n function getExecutedForNameByTable(table) {\r\n\r\n return RiskHeadsService.getExecutedForNameByTable(table);\r\n }\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .controller('RiskHeadsController', riskHeadsController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n riskHeadsService.$inject = [\r\n 'TableResources'\r\n ];\r\n\r\n function riskHeadsService(\r\n TableResources\r\n ) {\r\n\r\n function getExecutedForNameByTable(table) {\r\n\r\n if (!table) {\r\n return '-';\r\n }\r\n\r\n switch (table) {\r\n case TableResources.OrderTable:\r\n return 'BOT_ORDER';\r\n case TableResources.ProjectTable:\r\n return 'BOT_PROJECT';\r\n default:\r\n return '-';\r\n }\r\n }\r\n\r\n return {\r\n getExecutedForNameByTable: getExecutedForNameByTable\r\n };\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .service('RiskHeadsService', riskHeadsService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .component('vbRiskRowModal', {\r\n templateUrl: 'scripts/management/riskAnalysis/risk-row-modal/risk-row-modal.component.html',\r\n controller: 'RiskRowModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n currentRiskRow: '<',\r\n riskHead : '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n RiskRowModalController.$inject = [\r\n 'ProcessListFactory',\r\n 'sessionInformationService',\r\n 'OrganizationUtilService',\r\n 'UserFactory',\r\n 'RiskAnalysisUtilsFactory',\r\n 'DateUtilService'\r\n ];\r\n\r\n function RiskRowModalController(\r\n ProcessListFactory,\r\n sessionInformationService,\r\n OrganizationUtilService,\r\n UserFactory,\r\n RiskAnalysisUtilsFactory,\r\n DateUtilService\r\n ) {\r\n\r\n var vm = this;\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n // controller API\r\n vm.riskRowStatusList = [];\r\n vm.users = [];\r\n vm.isRiskRowInvalid = isRiskRowInvalid;\r\n vm.saveCurrentRiskRow = saveCurrentRiskRow;\r\n\r\n vm.$onInit = function() {\r\n getStatusList();\r\n getUsers();\r\n }\r\n\r\n /**\r\n * Get status list to fill status dropdown from the modal\r\n */\r\n function getStatusList() {\r\n ProcessListFactory.getRiskRowStatusList().$promise\r\n .then(function (result) {\r\n vm.riskRowStatusList = result;\r\n });\r\n }\r\n\r\n /**\r\n * Get users to fill responsibility dropdown from the modal\r\n */\r\n function getUsers() {\r\n\r\n var organizationId;\r\n\r\n if (loggedUser.Organization.Central) {\r\n organizationId = OrganizationUtilService.getOrganizationId();\r\n } else {\r\n organizationId = loggedUser.Organization.id;\r\n }\r\n\r\n UserFactory.getUsersByOrganizationId(organizationId).$promise\r\n .then(function (result) {\r\n vm.users = result;\r\n });\r\n }\r\n\r\n function isRiskRowInvalid() {\r\n return RiskAnalysisUtilsFactory.isRiskRowInvalid(vm.currentRiskRow);\r\n }\r\n\r\n function saveCurrentRiskRow() {\r\n if (RiskAnalysisUtilsFactory.isRiskRowInvalid(vm.currentRiskRow))\r\n return;\r\n\r\n if (!vm.riskHead.RiskRows)\r\n vm.riskHead.RiskRows = [];\r\n\r\n setRiskRowValues(vm.currentRiskRow);\r\n\r\n if (vm.currentRiskRow.index != null) {\r\n vm.riskHead.RiskRows[vm.currentRiskRow.index] = angular.copy(vm.currentRiskRow);\r\n } else {\r\n vm.riskHead.RiskRows.push(vm.currentRiskRow);\r\n }\r\n }\r\n\r\n /**\r\n * Resets values for a given risk row probabilities and consequences\r\n * @param {any} riskRow\r\n */\r\n function resetRiskRowValues(riskRow) {\r\n riskRow.ProbabilityOne = false;\r\n riskRow.ProbabilityTwo = false;\r\n riskRow.ProbabilityThree = false;\r\n riskRow.ProbabilityFour = false;\r\n riskRow.ProbabilityFive = false;\r\n\r\n riskRow.ConsequenceOne = false;\r\n riskRow.ConsequenceTwo = false;\r\n riskRow.ConsequenceThree = false;\r\n riskRow.ConsequenceFour = false;\r\n riskRow.ConsequenceFive = false;\r\n }\r\n\r\n /**\r\n * Set values for consequences and probabilities of a given risk row\r\n * @param {any} riskRow\r\n */\r\n function setRiskRowValues(riskRow) {\r\n\r\n resetRiskRowValues(riskRow);\r\n\r\n switch (riskRow.probabilityChoice) {\r\n case 1:\r\n riskRow.ProbabilityOne = true;\r\n break;\r\n case 2:\r\n riskRow.ProbabilityTwo = true;\r\n break;\r\n case 3:\r\n riskRow.ProbabilityThree = true;\r\n break;\r\n case 4:\r\n riskRow.ProbabilityFour = true;\r\n break;\r\n case 5:\r\n riskRow.ProbabilityFive = true;\r\n break;\r\n }\r\n\r\n switch (riskRow.consequenceChoice) {\r\n case 1:\r\n riskRow.ConsequenceOne = true;\r\n break;\r\n case 2:\r\n riskRow.ConsequenceTwo = true;\r\n break;\r\n case 3:\r\n riskRow.ConsequenceThree = true;\r\n break;\r\n case 4:\r\n riskRow.ConsequenceFour = true;\r\n break;\r\n case 5:\r\n riskRow.ConsequenceFive = true;\r\n break;\r\n }\r\n\r\n riskRow.Deadline = DateUtilService.getLongWithOffset(new Date(riskRow.deadline));\r\n }\r\n }\r\n\r\n angular\r\n .module('riskAnalysis')\r\n .controller('RiskRowModalController', RiskRowModalController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('menuItem')\r\n .component('vbDemoContentModal',\r\n {\r\n templateUrl: 'Scripts/menu-item/demo-content/demo-content-modal/demo-content-modal.component.html',\r\n controller: 'DemoContentModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n demoContent: '<',\r\n dismiss: '&',\r\n close: '&'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n function demoContentModalController() {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.$onInit = onInit;\r\n vm.saveDemoContent = saveDemoContent;\r\n\r\n function onInit() {\r\n\r\n if (!vm.demoContent) {\r\n vm.demoContent = {};\r\n }\r\n }\r\n\r\n function saveDemoContent() {\r\n\r\n if (!vm.demoContent.VideoTitle) {\r\n return;\r\n }\r\n\r\n vm.close({ editedContent: vm.demoContent });\r\n }\r\n }\r\n\r\n angular\r\n .module('menuItem')\r\n .controller('DemoContentModalController', demoContentModalController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('demoContent')\r\n .component('vbDemoContentDetails',\r\n {\r\n templateUrl: 'Scripts/menu-item/demo-content/demo-content-details/demo-content-details.component.html',\r\n controller: 'DemoContentDetailsController',\r\n controllerAs: 'vm'\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n demoContentDetailsController.$inject = [\r\n '$scope',\r\n 'DemoContentFactory',\r\n 'menuService'\r\n ];\r\n\r\n function demoContentDetailsController(\r\n $scope,\r\n DemoContentFactory,\r\n menuService\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.demoContent = {};\r\n vm.$onInit = onInit;\r\n vm.$onDestroy = onDestroy;\r\n\r\n function onInit() {\r\n\r\n var selectedMenu = menuService.getSelectedMenuItem();\r\n\r\n getDemoContentByMenuItemId(selectedMenu.id);\r\n\r\n //var onMenuItemSelectedDeregistrationFunction = $scope.$on('onMenuItemSelected', function (event, args) {\r\n\r\n // var menuItem = args;\r\n\r\n // getDemoContentByMenuItemId(menuItem.id);\r\n //});\r\n }\r\n\r\n function getDemoContentByMenuItemId(menuItemId) {\r\n\r\n DemoContentFactory.getDemoContentByMenuItemId(menuItemId)\r\n .then(function (demoContent) {\r\n\r\n vm.demoContent = demoContent;\r\n });\r\n }\r\n\r\n\r\n\r\n function onDestroy() {\r\n // onMenuItemSelectedDeregistrationFunction();\r\n }\r\n }\r\n\r\n angular\r\n .module('demoContent')\r\n .controller('DemoContentDetailsController', demoContentDetailsController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n orderProgressBarService.$inject = [\r\n 'orderStatuses'\r\n ];\r\n\r\n function orderProgressBarService(\r\n orderStatuses\r\n ) {\r\n\r\n function computeOrderProgress(order) {\r\n\r\n var orderProgress = {\r\n progress: 0,\r\n executionItems: 0\r\n };\r\n\r\n if (!order || !order.id) {\r\n return orderProgress;\r\n }\r\n\r\n orderProgress.progress = 0;\r\n\r\n if (!!order.Active || !order.Active && !order.ParentId) {// if the order is active or it's inactive and it's the main order\r\n // if the order is completed and it's not KONTRAKT nor TILLEGG\r\n if (order.Status.ProgId === orderStatuses.done && !_.some(['**KONTRAKT**', '*TILLEGG*'], orderNumber => orderNumber === order.OrderNumber))\r\n orderProgress.progress = 1;\r\n }\r\n\r\n orderProgress.executionItems = 0;\r\n\r\n if (!!order.Active || !order.Active && !order.ParentId) {// if the order is active or it's inactive and it's the main order\r\n // if the order's status is different from preorder and it's not KONTRAKT nor TILLEGG\r\n if (order.Status.ProgId !== orderStatuses.preorder && !_.some(['**KONTRAKT**', '*TILLEGG*'], orderNumber => orderNumber === order.OrderNumber))\r\n orderProgress.executionItems = 1;\r\n }\r\n\r\n if (!order.SubOrders || order.SubOrders.length === 0) {\r\n return orderProgress;\r\n }\r\n\r\n order.SubOrders.forEach(function (subOrder) {\r\n\r\n var currentSubOrderProgress = computeOrderProgress(subOrder);\r\n\r\n orderProgress.progress += currentSubOrderProgress.progress;\r\n orderProgress.executionItems += currentSubOrderProgress.executionItems;\r\n });\r\n\r\n return orderProgress;\r\n }\r\n\r\n return {\r\n computeOrderProgress: computeOrderProgress\r\n };\r\n }\r\n\r\n angular\r\n .module('order')\r\n .service('OrderProgressBarService', orderProgressBarService);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('participant')\r\n .component('vbParticipantDates',\r\n {\r\n templateUrl: 'scripts/order/participant/participant-dates/participant-dates.component.html',\r\n controller: 'ParticipantDatesController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dates: '=',\r\n participant: '=',\r\n onDatesChange: '&',\r\n onParticipantDatesDelete: '&',\r\n onNewParticipantDatesDelete: '&?',\r\n onParticipantDatesRetrieve: '&?'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n participantDatesController.$inject = [\r\n 'ParticipantDatesService',\r\n '_',\r\n 'dialogService',\r\n 'ParticipantDatesFactory'\r\n ];\r\n\r\n function participantDatesController(\r\n ParticipantDatesService,\r\n _,\r\n dialogService,\r\n ParticipantDatesFactory\r\n ) {\r\n\r\n var vm = this;\r\n var oldDates = null;\r\n\r\n // controller API\r\n // vm.$onChanges = onChanges;\r\n // vm.$doCheck = doCheck;\r\n vm.$onInit = onInit;\r\n vm.addNewDateLine = addNewDateLine;\r\n vm.isNewButtonDisabled = isNewButtonDisabled;\r\n vm.notifyListenersForChange = notifyListenersForChange;\r\n vm.deleteParticipantDates = deleteParticipantDates;\r\n vm.onStartDateChange = onStartDateChange;\r\n vm.onEndDateChange = onEndDateChange;\r\n vm.canDeleteIconBeDisplayedForDateLine = canDeleteIconBeDisplayedForDateLine;\r\n vm.isSameDate = isSameDate;\r\n\r\n function onInit() {\r\n ParticipantDatesFactory.getParticipantDatesListForParticipant(vm.participant.id)\r\n .then(function (participantDates) {\r\n\r\n vm.dates = participantDates;\r\n\r\n ParticipantDatesService.initParticipantDates(vm.dates);\r\n\r\n if (_.some(vm.dates, function (d) { return !d.id }))\r\n notifyListenersForChange(true);\r\n\r\n notifyParentComponentAboutParticipantDatesRetrieve();\r\n });\r\n }\r\n\r\n function notifyParentComponentAboutParticipantDatesRetrieve() {\r\n\r\n if (vm.onParticipantDatesRetrieve && typeof vm.onParticipantDatesRetrieve === 'function') {\r\n vm.onParticipantDatesRetrieve({\r\n data: {\r\n participant: vm.participant,\r\n dates: vm.dates\r\n }\r\n });\r\n }\r\n }\r\n\r\n //function onChanges() {\r\n\r\n // if (_.isNil(vm.dates)) {\r\n // vm.dates = [];\r\n // }\r\n\r\n // // ParticipantDatesService.initParticipantDates(vm.dates);\r\n //}\r\n\r\n //function doCheck() {\r\n // if (_.isEqual(vm.dates, oldDates))\r\n // return;\r\n\r\n // oldDates = vm.dates;\r\n\r\n // ParticipantDatesService.initParticipantDates(vm.dates);\r\n\r\n // if (_.some(vm.dates, function (d) { return !d.id }))\r\n // notifyListenersForChange(true);\r\n //}\r\n\r\n function addNewDateLine() {\r\n ParticipantDatesService.addNewDateLine(vm.dates);\r\n }\r\n\r\n function isNewButtonDisabled() {\r\n return ParticipantDatesService.isNewButtonDisabled(vm.dates);\r\n }\r\n\r\n function notifyListenersForChange(skipPeriodiseringAlert) {\r\n\r\n // notify the parent component that a change occured\r\n if (!_.isNil(vm.onDatesChange) && typeof vm.onDatesChange === 'function') {\r\n vm.onDatesChange()(vm.participant, skipPeriodiseringAlert);\r\n }\r\n }\r\n\r\n function deleteParticipantDates(participantDates) {\r\n\r\n dialogService.showConfirmDialog(\r\n 'PARTICIPANT_DATES_MODEL.DELETE_PARTICIPANT_DATES_TITLE',\r\n 'PARTICIPANT_DATES_MODEL.DELETE_PARTICIPANT_DATES_MESSAGE'\r\n )\r\n .then(function (dialogResult) {\r\n\r\n if (dialogResult === dialogService.DIALOG_RESULT_OK) {\r\n if (participantDates.id) {\r\n ParticipantDatesFactory.deleteParticipantDatesById(participantDates.id)\r\n .then(function() {\r\n\r\n // notify the parent component about the deletion\r\n if (!_.isNil(vm.onParticipantDatesDelete) &&\r\n typeof vm.onParticipantDatesDelete === 'function') {\r\n\r\n vm.onParticipantDatesDelete()(vm.participant);\r\n\r\n }\r\n });\r\n } else {\r\n _.remove(vm.dates, function (d) { return d.id === participantDates.id });\r\n notifyParentComponentAboutNewParticipantDatesDelete();\r\n }\r\n }\r\n });\r\n }\r\n\r\n function onStartDateChange(participantDate) {\r\n var startDateMoment = moment(participantDate.StartDate);\r\n var endDateMoment = moment(participantDate.EndDate);\r\n\r\n var endDateHourBeforeChange = endDateMoment.hour();\r\n var endDateMinuteBeforeChange = endDateMoment.minute();\r\n \r\n if (startDateMoment.isAfter(endDateMoment)) {\r\n participantDate.EndDate = participantDate.StartDate;\r\n\r\n participantDate.EndDate = moment(participantDate.EndDate)\r\n .hour(endDateHourBeforeChange);\r\n\r\n participantDate.EndDate = participantDate.EndDate\r\n .minute(endDateMinuteBeforeChange);\r\n\r\n participantDate.EndDate = participantDate.EndDate.toDate();\r\n }\r\n }\r\n\r\n function onEndDateChange(participantDate) {\r\n var startDateMoment = moment(participantDate.StartDate);\r\n var endDateMoment = moment(participantDate.EndDate);\r\n\r\n if (endDateMoment.isBefore(startDateMoment))\r\n participantDate.StartDate = participantDate.EndDate;\r\n }\r\n\r\n function canDeleteIconBeDisplayedForDateLine(participantDates) {\r\n return ParticipantDatesService.canDeleteIconBeDisplayedForDateLine(participantDates);\r\n }\r\n\r\n function isSameDate(date) {\r\n if (!date || !date.StartDate || !date.EndDate)\r\n return false;\r\n\r\n return moment(date.StartDate).format('DD.MM.YYYY HH:mm') === moment(date.EndDate).format('DD.MM.YYYY HH:mm');\r\n }\r\n\r\n function notifyParentComponentAboutNewParticipantDatesDelete() {\r\n\r\n if (vm.onNewParticipantDatesDelete && typeof vm.onNewParticipantDatesDelete === 'function') {\r\n vm.onNewParticipantDatesDelete({\r\n participant: vm.participant\r\n });\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('participant')\r\n .controller('ParticipantDatesController', participantDatesController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n participantDatesFactory.$inject = [\r\n 'baseUrlService',\r\n '$resource'\r\n ];\r\n\r\n function participantDatesFactory(\r\n baseUrlService,\r\n $resource\r\n ) {\r\n\r\n var baseUrl = baseUrlService.getBaseUrl();\r\n var ParticipantDatesListForParticipant = $resource(baseUrl + 'REST/ParticipantDatesRetrieve.svc/ParticipantDatesList');\r\n var DeleteParticipantDatesById = $resource(baseUrl + 'REST/ParticipantDatesModify.svc/DeleteParticipantDatesById');\r\n\r\n function getParticipantDatesListForParticipant(participantId) {\r\n\r\n return ParticipantDatesListForParticipant.query({\r\n participantId: participantId\r\n }).$promise;\r\n }\r\n\r\n function deleteParticipantDatesById(participantDatesId) {\r\n\r\n return DeleteParticipantDatesById.save(participantDatesId)\r\n .$promise;\r\n }\r\n\r\n return {\r\n getParticipantDatesListForParticipant: getParticipantDatesListForParticipant,\r\n deleteParticipantDatesById: deleteParticipantDatesById\r\n };\r\n }\r\n\r\n angular\r\n .module('participant')\r\n .factory('ParticipantDatesFactory', participantDatesFactory);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n participantDatesService.$inject = [\r\n '_'\r\n ];\r\n\r\n function participantDatesService(\r\n _\r\n ) {\r\n var participantDatesService = {};\r\n participantDatesService.getOrderDates = null;\r\n\r\n function initParticipantDates(dates) {\r\n\r\n // if the dates list is empty add a default line\r\n if (_.isEmpty(dates)) {\r\n addNewDateLine(dates);\r\n }\r\n\r\n convertParticipantDatesListToNormalDates(dates);\r\n }\r\n\r\n /**\r\n * Converts 'StartDate' and 'EndDate' to javascript 'Date' objects for a given list of participant dates\r\n * @param {any} datesList\r\n */\r\n function convertParticipantDatesListToNormalDates(datesList) {\r\n\r\n if (_.isNil(datesList) || _.isEmpty(datesList)) {\r\n return;\r\n }\r\n\r\n datesList.forEach(function (dates) {\r\n\r\n if (dates.configured)\r\n return;\r\n\r\n if (!_.isNil(dates.StartDate)) {\r\n dates.StartDate = moment(dates.StartDate).subtract(moment(dates.StartDate).utcOffset(), 'minutes').toDate();\r\n }\r\n\r\n if (!_.isNil(dates.EndDate)) {\r\n dates.EndDate = moment(dates.EndDate).subtract(moment(dates.EndDate).utcOffset(), 'minutes').toDate();\r\n }\r\n\r\n dates.configured = true;\r\n });\r\n }\r\n\r\n function addNewDateLine(dates) {\r\n var startDate = moment().toDate(), endDate = moment().add(1, 'd').toDate();\r\n\r\n if (participantDatesService.getOrderDates) {\r\n var datess = participantDatesService.getOrderDates();\r\n startDate = datess.StartDate;\r\n endDate = datess.EndDate;\r\n }\r\n\r\n\r\n dates.push({\r\n StartDate: startDate,\r\n EndDate: endDate,\r\n Description: ''\r\n });\r\n\r\n convertParticipantDatesListToNormalDates(dates);\r\n }\r\n\r\n function isNewButtonDisabled(dates) {\r\n\r\n if (_.isNil(dates) || _.isEmpty(dates)) {\r\n return false;\r\n }\r\n\r\n // search for a uncompleted date line\r\n var uncompletedDateLine = _.find(dates, function (date) {\r\n return !(date.StartDate && date.EndDate);\r\n });\r\n\r\n // if an uncompleted date line exists then the 'New' button is disabled otherwise not\r\n return _.isNil(uncompletedDateLine) ? false : true;\r\n }\r\n\r\n function convertParticipantDatesToMilliseconds(participantDates) {\r\n\r\n if (_.isNil(participantDates)) {\r\n return;\r\n }\r\n\r\n if (!_.isNil(participantDates.StartDate) && typeof participantDates.StartDate !== 'number') {\r\n participantDates.StartDate = moment(participantDates.StartDate).add(moment(participantDates.StartDate).utcOffset(), 'minutes').valueOf();\r\n }\r\n\r\n if (!_.isNil(participantDates.EndDate) && typeof participantDates.EndDate !== 'number') {\r\n participantDates.EndDate = moment(participantDates.EndDate).add(moment(participantDates.StartDate).utcOffset(), 'minutes').valueOf();\r\n }\r\n };\r\n\r\n function convertParticipantDatesListToMilliseconds(participantDatesList) {\r\n\r\n if (_.isNil(participantDatesList) || _.isEmpty(participantDatesList)) {\r\n return;\r\n }\r\n\r\n participantDatesList.forEach(function (dates) {\r\n convertParticipantDatesToMilliseconds(dates);\r\n });\r\n }\r\n\r\n function canDeleteIconBeDisplayedForDateLine(participantDates) {\r\n\r\n return true;\r\n }\r\n\r\n function getMinAndMaxDatesFromParticipantDates(participantDates) {\r\n\r\n if (!participantDates || participantDates.length === 0) {\r\n return null;\r\n }\r\n\r\n // obtain all the start dates\r\n var startDatesList = participantDates\r\n .map(function(item) {\r\n return item.StartDate;\r\n })\r\n // filter out null and undefined values\r\n .filter(function (startDate) {\r\n return startDate;\r\n });\r\n\r\n // find the minimum start date\r\n var minStartDate = Math.min.apply(null, startDatesList);\r\n\r\n // obtain all the end dates\r\n var endDatesList = participantDates\r\n .map(function(item) {\r\n return item.EndDate;\r\n })\r\n // filter out null and undefined values\r\n .filter(function(endDate) {\r\n return endDate;\r\n });\r\n\r\n // find the maximum end date\r\n var maxEndDate = Math.max.apply(null, endDatesList);\r\n\r\n return {\r\n minStartDate: minStartDate,\r\n maxEndDate: maxEndDate\r\n };\r\n }\r\n\r\n participantDatesService.initParticipantDates = initParticipantDates;\r\n participantDatesService.addNewDateLine = addNewDateLine;\r\n participantDatesService.isNewButtonDisabled = isNewButtonDisabled;\r\n participantDatesService.convertParticipantDatesListToMilliseconds = convertParticipantDatesListToMilliseconds;\r\n participantDatesService.canDeleteIconBeDisplayedForDateLine = canDeleteIconBeDisplayedForDateLine;\r\n participantDatesService.getMinAndMaxDatesFromParticipantDates = getMinAndMaxDatesFromParticipantDates;\r\n\r\n return participantDatesService;\r\n }\r\n\r\n angular\r\n .module('participant')\r\n .service('ParticipantDatesService', participantDatesService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ParticipantResourcePlannerDayController.$inject = [\r\n '$timeout',\r\n '$filter',\r\n 'DateUtilService',\r\n '$scope',\r\n '$interval',\r\n 'ResourcePlannerService',\r\n 'sessionInformationService',\r\n 'errorService',\r\n '$q',\r\n 'dialogService',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ParticipantResourcePlannerDayController', ParticipantResourcePlannerDayController)\r\n .directive('participantResourcePlannerDay', function () {\r\n return {\r\n restrict: 'AE',\r\n controller: 'ParticipantResourcePlannerDayController as day',\r\n bindToController: true,\r\n templateUrl: 'Scripts/order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerDay.html',\r\n scope: {\r\n resourcePlanner: '=',\r\n users: '='\r\n }\r\n }\r\n });\r\n\r\n function ParticipantResourcePlannerDayController(\r\n $timeout,\r\n $filter,\r\n DateUtilService,\r\n $scope,\r\n $interval,\r\n ResourcePlannerService,\r\n sessionInformationService,\r\n errorService,\r\n $q,\r\n dialogService,\r\n TaskListService,\r\n $translate\r\n ) {\r\n var day = this,\r\n userListElement = null,\r\n userTaskListElement = null,\r\n hourWidth = 0,\r\n currentDatePromise = null,\r\n minimumWidth = null,\r\n lastWidth = null,\r\n lastX = null,\r\n lastY = null,\r\n oldHourLineElement = null,\r\n yesterdayDate = null;\r\n\r\n day.getContextMenuForTask = getContextMenuForTask;\r\n\r\n day.$onInit = function () {\r\n initDelegateFunctions();\r\n day.resourcePlanner.init();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n\r\n day.resourcePlanner.resizeOverviewToFit = resizeToFit;\r\n\r\n day.resourcePlanner.onDateChange = onDateChange;\r\n\r\n day.resourcePlanner.cancelCurrentDateInterval = cancelCurrentDateInterval;\r\n\r\n /**\r\n * Zoom in in overview\r\n * @returns {} \r\n */\r\n day.resourcePlanner.zoomIn = function () {\r\n hourWidth += 5;\r\n setWidthOfElements();\r\n render();\r\n day.resourcePlanner.hourWidth = hourWidth;\r\n };\r\n\r\n /**\r\n * Zoom out in overview\r\n * @returns {} \r\n */\r\n day.resourcePlanner.zoomOut = function () {\r\n if (hourWidth == minimumWidth || hourWidth - 1 == minimumWidth || hourWidth <= minimumWidth) {\r\n hourWidth = minimumWidth;\r\n setWidthOfElements();\r\n return;\r\n }\r\n hourWidth -= 5;\r\n setWidthOfElements();\r\n render();\r\n day.resourcePlanner.hourWidth = hourWidth;\r\n };\r\n\r\n day.resourcePlanner.assignUserToOrder = assignUserToOrder;\r\n\r\n /**\r\n * Toggles between 24h format and normal format\r\n * @returns {} \r\n */\r\n day.resourcePlanner.resizeFullDayFormat = function () {\r\n day.resourcePlanner.loading = true;\r\n //wait for $digest\r\n $timeout(function () {\r\n //regenerate the grid\r\n generateGrid();\r\n //set start and end dates\r\n setStartAndEndDate();\r\n $timeout(function () {\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n //get tasks\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n\r\n //$timeout(function () {\r\n // day.resourcePlanner.loading = false;\r\n //}, 100);\r\n });\r\n };\r\n\r\n day.resourcePlanner.init = function () {\r\n generateGrid();\r\n //listen for scroll\r\n userListElement = document.getElementsByClassName(\"participant-resource-planner-user-list\")[0];\r\n userTaskListElement = document.getElementById(\"resourcePlannerDayTasks\");\r\n\r\n userListElement.addEventListener('scroll', scrollTaskList, false);\r\n userListElement.addEventListener('mousewheel', scrollTaskList, false);\r\n userListElement.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n //set start and end dates\r\n setStartAndEndDate();\r\n $timeout(function () {\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n //init dropzone\r\n initDropzone();\r\n\r\n initZoomScroll();\r\n\r\n //get tasks\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n };\r\n\r\n /**\r\n * Collapses/Expands a users tasks\r\n * @param {} user \r\n * @returns {} \r\n */\r\n day.resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n /**\r\n * Return the day from the position from where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n day.resourcePlanner.getDayForDelete = function (event) {\r\n var xCoordinate = event.pageX;\r\n var relativeXCoordinate = xCoordinate - event.currentTarget.offsetParent.getBoundingClientRect().left;\r\n var startHourCoordinates = relativeXCoordinate / hourWidth + day.resourcePlanner.startHour;\r\n return ResourcePlannerService.pxToHours(startHourCoordinates, day.resourcePlanner.Date);\r\n };\r\n\r\n /**\r\n * Return the hour from the position where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n day.resourcePlanner.getHourForDelete = function (event) {\r\n return day.resourcePlanner.getDayForDelete(event);\r\n };\r\n\r\n /**\r\n * Set the scroll to top\r\n * @returns {} \r\n */\r\n day.resourcePlanner.resetScroll = function () {\r\n userTaskListElement.scrollTop = userListElement.scrollTop = 0;\r\n };\r\n\r\n day.resourcePlanner.loading = true;\r\n\r\n day.setPositionForTask = setPositionForTask;\r\n day.render = render;\r\n };\r\n\r\n /**\r\n * Generate the hour/day grid\r\n */\r\n function generateGrid() {\r\n day.hours = [];\r\n day.hoursGrid = [];\r\n for (var i = day.resourcePlanner.startHour; i < day.resourcePlanner.endHour; i++) {\r\n day.hours.push(DateUtilService.setDate(day.resourcePlanner.Date, i, 0, 0));\r\n\r\n //inserting twice, grid -> half an hour\r\n day.hoursGrid.push(i);\r\n day.hoursGrid.push(i);\r\n };\r\n };\r\n\r\n /**\r\n * All tasks are redrawn when a resize event occurs \r\n * @param {any} initElement\r\n */\r\n function render(initElement) {\r\n if (!day.resourcePlanner.users || day.resourcePlanner.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < day.resourcePlanner.users.length; i++) {\r\n var user = day.resourcePlanner.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n if (initElement)\r\n day.initTask(user.Tasks[j]);\r\n else\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n function scrollTaskList() {\r\n userTaskListElement.scrollTop = userListElement.scrollTop;\r\n };\r\n\r\n /**\r\n * Set the width of the overview elements to the calculated width and height\r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-hour');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = (parseInt(hourWidth)) + 'px';\r\n hours[i].style.width = (parseInt(hourWidth)) + 'px';\r\n hours[i].style.maxWidth = (parseInt(hourWidth)) + 'px';\r\n }\r\n\r\n var grids = document.getElementsByClassName('rp-hour-line');\r\n for (i = 0; i < grids.length; i++) {\r\n grids[i].style.minWidth = parseInt(hourWidth) + 'px';\r\n grids[i].style.width = parseInt(hourWidth) + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-hour-tasks');\r\n for (i = 0; i < tasks.length; i++) {\r\n tasks[i].style.minWidth = parseInt(hourWidth) * (day.resourcePlanner.endHour - day.resourcePlanner.startHour) + 'px';\r\n tasks[i].style.width = parseInt(hourWidth) * (day.resourcePlanner.endHour - day.resourcePlanner.startHour) + 'px';\r\n }\r\n };\r\n\r\n /**\r\n * Resize the overview to fit the screen\r\n */\r\n function resizeToFit() {\r\n $timeout(function () {\r\n var overviewElement = document.getElementsByClassName(\"resource-planner-overview\")[0];\r\n var overviewCurrentWidth = overviewElement.offsetWidth;\r\n\r\n hourWidth = parseInt(overviewCurrentWidth / (day.resourcePlanner.endHour - day.resourcePlanner.startHour));\r\n //set the minimum width\r\n minimumWidth = angular.copy(hourWidth);\r\n\r\n setWidthOfElements();\r\n render();\r\n day.resourcePlanner.hourWidth = hourWidth;\r\n });\r\n };\r\n\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n var currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (currentDate > day.resourcePlanner.startDate && currentDate < day.resourcePlanner.endDate)\r\n currentDateElement.style.left = (ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(day.resourcePlanner.startDate)) * hourWidth + 'px';\r\n else {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(day.resourcePlanner.startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, day.resourcePlanner.endHour - 1, 59, 59);\r\n }\r\n \r\n function setStartAndEndDate() {\r\n if (day.resourcePlanner.fullDayFormat) {\r\n day.resourcePlanner.startDate = DateUtilService.setDate(day.resourcePlanner.Date, day.resourcePlanner.startHour, 0, 0);\r\n day.resourcePlanner.endDate = DateUtilService.setDate(day.resourcePlanner.Date, day.resourcePlanner.endHour - 1, 59, 59);//the end date is set to 59 so that it doesn't go to the next day\r\n initYesterdayDate();\r\n } else {\r\n day.resourcePlanner.startDate = DateUtilService.setDate(day.resourcePlanner.Date, day.resourcePlanner.startHour, 0, 0);\r\n day.resourcePlanner.endDate = DateUtilService.setDate(day.resourcePlanner.Date, day.resourcePlanner.endHour, 0, 0);\r\n }\r\n\r\n day.resourcePlanner.Date = new Date(day.resourcePlanner.startDate);\r\n };\r\n\r\n /**\r\n * Function that handles the scroll wheel\r\n * This will zoom in/out\r\n * @param {any} event\r\n */\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n day.resourcePlanner.zoomIn();\r\n else\r\n day.resourcePlanner.zoomOut();\r\n };\r\n\r\n function initZoomScroll() {\r\n userTaskListElement.addEventListener('mousewheel', handleScrollWheel, false);\r\n userTaskListElement.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n };\r\n\r\n /**\r\n * Function that collapses all users\r\n */\r\n function collapseAllUsers() {\r\n ResourcePlannerService.resetCollapsedUsersHeight(day.resourcePlanner.users);\r\n for (var i = 0; i < day.resourcePlanner.users.length; i++) {\r\n day.resourcePlanner.users[i].Collapsed = true;\r\n day.resourcePlanner.collapseUser(day.resourcePlanner.users[i]);\r\n }\r\n };\r\n\r\n /**\r\n * When the date is changed, tasks are fetched again\r\n */\r\n function onDateChange() {\r\n $timeout(function () {\r\n setStartAndEndDate();\r\n //wait for $digest so that the dates are updated\r\n $timeout(function () {\r\n day.resourcePlanner.loading = true;\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n //colapse all users\r\n collapseAllUsers();\r\n });\r\n };\r\n\r\n /**\r\n * Goes to next day\r\n * @returns {} \r\n */\r\n day.nextDay = function () {\r\n day.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(day.resourcePlanner.Date), 1);\r\n onDateChange();\r\n };\r\n\r\n /**\r\n * Goes to previous day\r\n * @returns {} \r\n */\r\n day.lastDay = function () {\r\n day.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(day.resourcePlanner.Date), -1);\r\n onDateChange();\r\n };\r\n\r\n /**\r\n * Get the opacity of the task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n day.getOpacityValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1';\r\n\r\n if (task.Table == 'GOT_USER' && task.PendingResponse)\r\n return '0.2';\r\n\r\n if (task.Execution && task.Execution.InitiatedProcessList && task.Execution.InitiatedProcessList.Status && task.Execution.InitiatedProcessList.Status.ProgId == 'DONE')\r\n return '0.3';\r\n\r\n return '0.5';\r\n };\r\n\r\n day.getBorderValue = function(task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1px solid black';\r\n\r\n return 'none';\r\n }\r\n\r\n /**\r\n * Get the color of the task\r\n * If the task does not have any color provide a default value\r\n * @param {} task \r\n * @returns {} \r\n */\r\n day.getBackgroundColor = function (task) {\r\n\r\n if (task.ColorSetting && task.ColorSetting.Name)\r\n return task.ColorSetting.Name;\r\n\r\n return 'rgb(0, 114, 188)';\r\n };\r\n\r\n /**\r\n * Processes any given task after it has been dropped on overview\r\n * @param {any} task\r\n * @param {any} user\r\n * @param {any} dates\r\n * @param {any} target\r\n */\r\n function processTaskForDrop(task, user, dates, target) {\r\n //show the loader\r\n day.resourcePlanner.loading = true;\r\n\r\n if (task.Table != 'BOT_ORDER') {//if the type of task is not bot_order, don't bother with checks\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n day.resourcePlanner.saveTask(task).then(function () {\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n return;\r\n }\r\n\r\n //check if order is saved\r\n if (day.resourcePlanner.mainOrder.id) {\r\n //if the user is different, check if the new user is already assigned\r\n //if (task.User.id != user.id && task.Table == 'BOT_ORDER')\r\n // day.resourcePlanner.isUserAssignedToOrder(user.id, task.ForeignKey)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // day.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(target);\r\n // return;\r\n // } else {\r\n // task.StartDate = dates.StartDate;\r\n // task.EndDate = dates.EndDate;\r\n // task.User.id = user.id;\r\n\r\n // if (task.id < 1) {\r\n // day.resourcePlanner.loading = false;\r\n // return;\r\n // }\r\n\r\n // //checkUser(user);\r\n // day.resourcePlanner.saveTask(task).then(function () {\r\n // if ($filter('filter')(day.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n // processDatesForOrder([task]);\r\n // day.resourcePlanner.getTasksForSelectedUsers();\r\n // });\r\n // }\r\n // });\r\n //else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n\r\n if (task.id < 1) {\r\n day.resourcePlanner.loading = false;\r\n return;\r\n };\r\n\r\n day.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(day.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n // }\r\n }\r\n };\r\n\r\n /**\r\n * Processes any given task after the resize event has occured\r\n * @param {any} task\r\n * @param {any} dates\r\n * @param {any} event\r\n */\r\n function processTaskForResize(task, dates, event) {\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), day.resourcePlanner.startDate))\r\n task.StartDate = dates.StartDate;\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), day.resourcePlanner.endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n if (task.id < 1)\r\n return;\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (day.resourcePlanner.mainOrder.id) {\r\n day.resourcePlanner.loading = true;\r\n day.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(day.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n };\r\n\r\n \r\n\r\n /**\r\n * Processes the normal drag and drop of any task\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var user = angular.element(event.target).scope().user;\r\n var x = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var taskWidth = event.relatedTarget.clientWidth;\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var datesAfterDrop;\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, day.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, day.resourcePlanner.endDate)) {\r\n\r\n // manage task out of boundaries left drag for 24h format\r\n if (day.resourcePlanner.fullDayFormat) {\r\n\r\n // if the task was dragged to the left \r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(day.resourcePlanner.startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate \r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference; \r\n \r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n \r\n }\r\n }\r\n // manage task dates after drop for not in range tasks\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, day.resourcePlanner.startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, day.resourcePlanner.endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, day.resourcePlanner.startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n processTaskForDrop(task, user, datesAfterDrop, event.relatedTarget);\r\n };\r\n\r\n /**\r\n * Highlight the dropzone so that the user knows where he is currently\r\n * @param {any} event\r\n */\r\n function hightlightDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#f0f0f0');\r\n };\r\n\r\n /**\r\n * Reset the dropzone to it's default color\r\n * @param {any} event\r\n */\r\n function resetDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#fff');\r\n };\r\n\r\n /**\r\n * Function that occurs when the order has entered the dropzone\r\n * @param {any} event\r\n */\r\n function onDragEnterOrder(event) {\r\n //higlight the dropzone\r\n hightlightDropzone(event);\r\n oldHourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-hour-line')[0]);\r\n };\r\n\r\n /**\r\n * Function that occurs when order has left the dropzone\r\n * @param {any} event\r\n */\r\n function onDragLeaveOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n };\r\n\r\n /**\r\n * Function that handles the drop of the order on the dropzone\r\n * @param {any} event\r\n */\r\n function onDropDeactivateOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n };\r\n\r\n /**\r\n * Function that occurs when the user moves the order around the dropzone\r\n * @param {any} event\r\n */\r\n function onDropMove(event) {\r\n var hourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-hour-line')[0]);\r\n if (oldHourLineElement[0] != hourLineElement[0]) {\r\n oldHourLineElement.css('background', '');\r\n oldHourLineElement = hourLineElement;\r\n } else\r\n hourLineElement.css('background', 'rgba(240, 240, 240, 0.6)');\r\n };\r\n\r\n function confirmUsingCurrentDates() {\r\n //Client wanted to remove whats here\r\n //TODO: remove this function\r\n return $q.when(false);\r\n };\r\n\r\n function confirmUsingSuborders() {\r\n //Client wanted to remove whats here\r\n //TODO: remove this function\r\n return $q.when(true);\r\n };\r\n\r\n function checkUser(user) {\r\n //add the user as participant\r\n // user.Checked = false;\r\n day.resourcePlanner.checkUser(user, true);\r\n };\r\n\r\n /**\r\n * Creates a new task at the given interval for the given user on the given orders\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTask(startHour, endHour, order, user) {\r\n //create the task\r\n return {\r\n Active: true,\r\n StartDate: startHour,\r\n EndDate: endHour,\r\n Table: 'BOT_ORDER',\r\n User: user,\r\n ForeignKey: order.id ? order.id : undefined\r\n }\r\n };\r\n\r\n function createTaskAndCheckUser(startHour, endHour, order, user) {\r\n //create the task\r\n var task = createTask(startHour, endHour, order, user);\r\n\r\n //check the user\r\n if (!user.IsAssignedToOrder)\r\n checkUser(user);\r\n else //if the user is already assigned, we must set the active status on the participant\r\n day.resourcePlanner.setActiveStatusForUser(user, user.ParticipantActive);\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (order.id) {\r\n day.resourcePlanner.assignUser([task])\r\n .then(function (tasks) {\r\n processDatesForOrder(tasks);\r\n day.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Get a list of ids from any given task list\r\n * @param {any} tasks\r\n */\r\n function getOrderIdsFromTask(tasks) {\r\n if (!tasks || tasks.length == 0)\r\n return [];\r\n\r\n var orders = day.resourcePlanner.getOrderList();\r\n var orderIds = [];\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n if ($filter('filter')(tasks, function (task) { return task.ForeignKey == order.id }).length > 0)\r\n orderIds.push(order.id);\r\n }\r\n\r\n return orderIds;\r\n };\r\n\r\n /**\r\n * Process the dates for the given tasks\r\n * Cordel dates aren't UTC so the timezone must be fixed\r\n * @param {any} tasks\r\n */\r\n function processDatesForOrder(tasks) {\r\n var orderIds = getOrderIdsFromTask(tasks);\r\n\r\n if (!orderIds || orderIds.length == 0)\r\n return;\r\n\r\n day.resourcePlanner.getDatesExtremities(orderIds)\r\n .then(function (returnedTasks) {\r\n if (!returnedTasks || returnedTasks == 0)\r\n return;\r\n\r\n var orders = day.resourcePlanner.getOrderList();\r\n\r\n for (var i = 0; i < returnedTasks.length; i++) {\r\n var task = returnedTasks[i];\r\n\r\n var order = $filter('filter')(orders, function (o) { return o.id == task.ForeignKey })[0];\r\n\r\n order.StartDate = task.StartDate;\r\n order.EndDate = task.EndDate;\r\n\r\n day.resourcePlanner.fixTimezone(order);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Get the default start and end date\r\n * 07:00 - 15:00\r\n */\r\n function getStartAndEndHoursFortheDay() {\r\n var startHour = day.resourcePlanner.Date;\r\n startHour.setHours(7);\r\n startHour.setMinutes(0);\r\n startHour.setSeconds(0);\r\n startHour = DateUtilService.getLongWithOffset(startHour);\r\n\r\n //set the end date\r\n var endHour = day.resourcePlanner.Date;\r\n endHour.setHours(15);\r\n endHour.setMinutes(0);\r\n endHour.setSeconds(0);\r\n endHour = DateUtilService.getLongWithOffset(endHour);\r\n\r\n return { startHour: startHour, endHour: endHour };\r\n };\r\n\r\n /**\r\n * Create task only for main order\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForMainOrder(order, user) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = true;//the participant is now active for main order;\r\n confirmUsingSuborders()\r\n .then(function (result) {\r\n //if (result)\r\n // createTasksForAllOrders(user);\r\n //else if (order.StartDate && order.EndDate) {\r\n // //ask user if he wants to use the current dates\r\n // confirmUsingCurrentDates()\r\n // .then(function (result) {\r\n // if (result) {\r\n // startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n // endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n // } else {\r\n // hours = getStartAndEndHoursFortheDay();\r\n // startHour = hours.startHour;\r\n // endHour = hours.endHour;\r\n\r\n // }\r\n // createTaskAndCheckUser(startHour, endHour, order, user);\r\n // });\r\n //} else {//create the order task with 07:00-15:00\r\n hours = getStartAndEndHoursFortheDay();\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n //}\r\n });\r\n };\r\n\r\n /**\r\n * Create task only for the given suborder\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForSubOrder(order, user) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = false;//the participant is now active for main order;\r\n if (order.StartDate && order.EndDate) {\r\n //ask user if he wants to use the current dates\r\n confirmUsingCurrentDates()\r\n .then(function (result) {\r\n if (result) {\r\n startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n } else {\r\n hours = getStartAndEndHoursFortheDay();\r\n startHour = hours.startHour;\r\n endHour = hours.endHour;\r\n\r\n }\r\n createTaskAndCheckUser(startHour, endHour, order, user);\r\n });\r\n } else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay();\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n }\r\n };\r\n\r\n /**\r\n * Assigns a user to any given order\r\n * @param {any} user\r\n * @param {any} order\r\n * @param {any} xCoordinate\r\n * @param {any} position\r\n */\r\n function assignUserToOrder(user, order, xCoordinate, position) {\r\n //if main order, ask user if he wants the suborder as well\r\n if (order.id == day.resourcePlanner.mainOrder.id) {\r\n createTaskForMainOrder(order, user);\r\n } else {\r\n if (!order.InitiatedProcessListId) {\r\n day.resourcePlanner.loading = false;\r\n return;\r\n }\r\n createTaskForSubOrder(order, user);\r\n }\r\n };\r\n\r\n /**\r\n * Function that processes the drop event\r\n * @param {any} event\r\n */\r\n function onDropOrder(event) {\r\n //get the order\r\n var order = angular.copy(ResourcePlannerService.resourcePlannerOrderDragged);\r\n var user = angular.element(event.target).scope().user;\r\n\r\n\r\n var xCoordinate = event.relatedTarget.getBoundingClientRect().left;//get mouse x coordinate\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n\r\n if (order.id) {\r\n day.resourcePlanner.loading = true;\r\n\r\n if (!order.InitiatedProcessListId) {\r\n day.resourcePlanner.loading = false;\r\n errorService.changeError($filter('translate')(\"errOrderMustBeInitiated\"));\r\n return;\r\n }\r\n\r\n //check if the user is already assigned to the order\r\n //day.resourcePlanner.isUserAssignedToOrder(user.id, order.id)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // day.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // return;\r\n // } else {\r\n assignUserToOrder(user, order, xCoordinate, position);\r\n // }\r\n //});\r\n }\r\n\r\n };\r\n\r\n function initDropzone() {\r\n $timeout(function () {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.resource-planner-order-list'],\r\n overlap: 0.5,\r\n ondrop: function (event) {\r\n if (!angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropNormalTaskOnGrid(event);\r\n else\r\n onDropOrder(event);\r\n },\r\n ondragenter: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragEnterOrder(event);\r\n },\r\n ondragleave: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragLeaveOrder(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropDeactivateOrder(event);\r\n },\r\n ondropmove: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropMove(event);\r\n }\r\n });\r\n });\r\n };\r\n\r\n function getUsersHeight() {\r\n return day.resourcePlanner.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n function getFullDayWidth() {\r\n if (day.resourcePlanner.fullDayFormat)\r\n return 24 * hourWidth;//full day\r\n return (day.resourcePlanner.endDate.getHours() - day.resourcePlanner.startDate.getHours()) * hourWidth;\r\n };\r\n\r\n function getStartAndEndDate(x, taskWidth) {\r\n var hourStartResized = x / hourWidth + day.resourcePlanner.startHour;\r\n var hourEndResized = hourStartResized + (taskWidth + 2) / hourWidth;\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStartResized, day.resourcePlanner.Date));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEndResized, day.resourcePlanner.Date));\r\n return { StartDate: startDate, EndDate: endDate };\r\n };\r\n\r\n /**\r\n * Checks whether the task that the user is dragging is out of boundaries of the view\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n\r\n //get top based on user index\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n if (currentX < 0 ||\r\n topY > currentY ||\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getFullDayWidth())\r\n return true;\r\n return false;\r\n };\r\n\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n\r\n //restore\r\n target.style.webkitTransform = target.style.transform = target.style.msTransform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n }\r\n\r\n /**\r\n * Function that handles the resize move\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that handles the end events\r\n * @param {any} event\r\n */\r\n function onEndEvent(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, day.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, day.resourcePlanner.endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n\r\n if (event.type === 'dragend') //drag and drop will be handled in the dropzone\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n\r\n\r\n processTaskForResize(task, dates, event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the start events\r\n * @param {any} event\r\n */\r\n function onStartEvent(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n\r\n /**\r\n * Function that handles the drag event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = target.style.msTransform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, day.resourcePlanner.startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, day.resourcePlanner.endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be dragged\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n task.warningInfo += $translate.instant('TASKLIST_MODEL.WARNINGS.NOT_INTERACTABLE_TASK') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, day.resourcePlanner.startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, day.resourcePlanner.endDate)) {\r\n\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Get the Y coordinate of any given task\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, day.resourcePlanner.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n //TODO: makes these constants\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n /**\r\n * Get the position in the overview of the task\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} task\r\n */\r\n function getPosition(startHour, endHour, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startHour, day.resourcePlanner.startDate))//same day, check hours\r\n start = ResourcePlannerService.hoursToPx(day.resourcePlanner.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(startHour);\r\n\r\n //first check if the endDate is less than start date\r\n if (!ResourcePlannerService.isStartDateInRange(endHour, day.resourcePlanner.startDate))\r\n end = ResourcePlannerService.hoursToPx(DateUtilService.addHours(day.resourcePlanner.startDate, -1));\r\n //check if task end hour is greater than day end -> year, month, day\r\n else if (!ResourcePlannerService.isEndDateInRange(endHour, day.resourcePlanner.endDate))//same day, check hours\r\n end = ResourcePlannerService.hoursToPx(day.resourcePlanner.endDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(endHour);\r\n\r\n x = (start - ResourcePlannerService.hoursToPx(day.resourcePlanner.startDate)) * hourWidth;//where the task begins\r\n width = (end - start) * hourWidth;//the width of the task\r\n\r\n return {\r\n x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10 - (task.currentOrder ? 2 : 0) // -10 because of the top/bottom padding\r\n };\r\n };\r\n\r\n /**\r\n * Set the position of the task\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n try {\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' +\r\n position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n\r\n if (task.id < 1) {\r\n taskElement.style.zIndex = 10;\r\n taskElement.style.border = '1px solid #000';\r\n } else\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n } catch (ex) {\r\n throw ex;\r\n }\r\n\r\n return taskElement;\r\n };\r\n\r\n /**\r\n * Init drag and drop for task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n day.initTask = function (task) {\r\n var taskElement = setPositionForTask(task);\r\n task.warningInfo = '';\r\n task.canDrag = true;\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [\r\n interact.createSnapGrid({\r\n x: (hourWidth / 6),\r\n y: ResourcePlannerService.USER_HEIGHT\r\n })\r\n ]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [\r\n interact.createSnapGrid({\r\n x: (hourWidth / 6),\r\n y: ResourcePlannerService.USER_HEIGHT\r\n })\r\n ]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', onEndEvent)\r\n .on('resizestart', onStartEvent)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onEndEvent)\r\n .on('dragstart', onStartEvent);;\r\n };\r\n\r\n day.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n day.onMouseOver = function (event, task) {\r\n day.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Function that handles on finish render event\r\n * @param {} task \r\n * @param {} user \r\n * @returns {} \r\n */\r\n day.finishedRender = function (task, user) {\r\n $timeout(function () {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = day.resourcePlanner.users.length - 1; i >= 0; i--) {\r\n if (day.resourcePlanner.users[i].Tasks && day.resourcePlanner.users[i].Tasks.length > 0) {\r\n lastTask = day.resourcePlanner.users[i].Tasks[day.resourcePlanner.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < day.resourcePlanner.users.length; i++) {\r\n var userLooped = day.resourcePlanner.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n day.initTask(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n //timeout so that everyting loads up nicely\r\n $timeout(function () {\r\n day.resourcePlanner.loading = false;\r\n if (!user.Collapsed)\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 200);\r\n });\r\n };\r\n\r\n /**\r\n * Function that handles double click event on a given task\r\n * @param {} event \r\n * @param {} task \r\n * @returns {} \r\n */\r\n day.onDoubleClick = function (event, task) {\r\n if (task.Parent && task.Parent.id) {\r\n day.resourcePlanner.getTaskById(task.Parent.id)\r\n .then(function (result) {\r\n task.ForeignKey = result.ForeignKey;\r\n task.StartDate = result.StartDate;\r\n task.EndDate = result.EndDate;\r\n day.resourcePlanner.toggleTaskDetailsPanel(task);\r\n });\r\n } else\r\n day.resourcePlanner.toggleTaskDetailsPanel(task);\r\n };\r\n\r\n function cancelCurrentDateInterval() {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n };\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return day.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n day.$onDestroy = function () {\r\n cancelCurrentDateInterval();\r\n interact('.rp-hour-task').unset();\r\n oldHourLineElement = null;\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ParticipantResourcePlannerMonthController.$inject = [\r\n '$timeout',\r\n '$filter',\r\n 'DateUtilService',\r\n '$interval',\r\n 'ResourcePlannerService',\r\n 'sessionInformationService',\r\n 'errorService',\r\n 'dialogService',\r\n '$q',\r\n '$scope',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ParticipantResourcePlannerMonthController', ParticipantResourcePlannerMonthController)\r\n .directive('participantResourcePlannerMonth', function () {\r\n return {\r\n restrict: 'AE',\r\n controller: 'ParticipantResourcePlannerMonthController as month',\r\n bindToController: true,\r\n templateUrl: 'Scripts/order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerMonth.html',\r\n scope: {\r\n resourcePlanner: '='\r\n //Part of 10572 task\r\n //organizationSettings : '='\r\n }\r\n }\r\n });\r\n\r\n function ParticipantResourcePlannerMonthController(\r\n $timeout,\r\n $filter,\r\n DateUtilService,\r\n $interval,\r\n ResourcePlannerService,\r\n sessionInformationService,\r\n errorService,\r\n dialogService,\r\n $q,\r\n $scope,\r\n TaskListService,\r\n $translate\r\n ) {\r\n var month = this;\r\n var userListElement = null,\r\n userTaskListElement = null,\r\n hourWidth = 0,\r\n currentDatePromise = null,\r\n minimumWidth = null,\r\n lastWidth = null,\r\n lastX = null,\r\n lastY = null,\r\n dayWidth = null,\r\n oldHourLineElement = null,\r\n yesterdayDate = null;\r\n\r\n month.getContextMenuForTask = getContextMenuForTask;\r\n month.month = { days: [] };\r\n \r\n month.$onInit = function () {\r\n //Part of 10572 task\r\n //month.nextMonthDate = moment(month.resourcePlanner.Date).add(1, 'months').toDate(); \r\n iniDelegateFunctions();\r\n month.resourcePlanner.init();\r\n };\r\n\r\n function iniDelegateFunctions() {\r\n month.resourcePlanner.cancelCurrentDateInterval = cancelCurrentDateInterval;\r\n /**\r\n * Collapses/Expands a users tasks\r\n * @param {} user \r\n * @returns {} \r\n */\r\n month.resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n month.resourcePlanner.onDateChange = onDateChange;\r\n /**\r\n * Zoom in in overview\r\n * @returns {} \r\n */\r\n month.resourcePlanner.zoomIn = function () {\r\n dayWidth += 5;\r\n hourWidth = dayWidth / 24;\r\n\r\n setWidthOfElements();\r\n render();\r\n\r\n month.resourcePlanner.hourWidth = hourWidth;\r\n month.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n /**\r\n * Zoom out in overview\r\n * @returns {} \r\n */\r\n month.resourcePlanner.zoomOut = function () {\r\n if (dayWidth == minimumWidth || dayWidth - 1 == minimumWidth || dayWidth <= minimumWidth) {\r\n dayWidth = minimumWidth;\r\n\r\n hourWidth = dayWidth / 24;\r\n setWidthOfElements();\r\n return;\r\n }\r\n dayWidth -= 5;\r\n\r\n hourWidth = dayWidth / 24;\r\n setWidthOfElements();\r\n\r\n render();\r\n\r\n month.resourcePlanner.hourWidth = hourWidth;\r\n month.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n month.resourcePlanner.resizeOverviewToFit = resizeToFit;\r\n\r\n /**\r\n * 24h is not supported in the month overview \r\n * but we have to support snap actions \r\n */\r\n month.resourcePlanner.resizeFullDayFormat = function () {\r\n month.resourcePlanner.loading = true;\r\n //wait for $digest\r\n $timeout(function () {\r\n resizeToFit();\r\n\r\n $timeout(function () {\r\n month.resourcePlanner.loading = false;\r\n }, 100);\r\n });\r\n };\r\n\r\n month.resourcePlanner.assignUserToOrder = assignUserToOrder;\r\n\r\n month.resourcePlanner.init = function () {\r\n generateGrid();\r\n //listen for scroll\r\n userListElement = document.getElementsByClassName(\"participant-resource-planner-user-list\")[0];\r\n userTaskListElement = document.getElementById(\"resourcePlannerMonthTasks\");\r\n\r\n userListElement.addEventListener('scroll', scrollTaskList, false);\r\n userListElement.addEventListener('mousewheel', scrollTaskList, false);\r\n userListElement.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n //set start and end dates\r\n setStartAndEndDate();\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n\r\n //init dropzone\r\n initDropzone();\r\n\r\n initZoomScroll();\r\n //get tasks\r\n month.resourcePlanner.getTasksForSelectedUsers();\r\n };\r\n /**\r\n * Set the scroll to top\r\n * @returns {} \r\n */\r\n month.resourcePlanner.resetScroll = function () {\r\n userTaskListElement.scrollTop = userListElement.scrollTop = 0;\r\n };\r\n /**\r\n * Return the day from the position from where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n month.resourcePlanner.getDayForDelete = function (event) {\r\n var xCoordinate = event.pageX;\r\n var relativeXCoordinate = xCoordinate - event.currentTarget.offsetParent.getBoundingClientRect().left;\r\n var startDayIndex = parseInt(relativeXCoordinate / dayWidth);\r\n var startHourCoordinates = (relativeXCoordinate - (startDayIndex * dayWidth)) / hourWidth;\r\n return ResourcePlannerService.pxToHours(startHourCoordinates, month.month.days[startDayIndex]);\r\n };\r\n /**\r\n * Return the hour from the position where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n month.resourcePlanner.getHourForDelete = function (event) {\r\n return month.resourcePlanner.getDayForDelete(event);\r\n };\r\n\r\n month.resourcePlanner.loading = true;\r\n month.setPositionForTask = setPositionForTask;\r\n month.render = render;\r\n };\r\n /**\r\n * Generate the hour/day grid\r\n */\r\n function generateGrid() {\r\n\r\n month.month.days = [];\r\n\r\n // Part of 10572 task\r\n //if (month.organizationSettings &&\r\n // month.organizationSettings.UseSalaryPeriod &&\r\n // month.organizationSettings.SalaryPeriodFrom &&\r\n // month.organizationSettings.SalaryPeriodTo) {\r\n\r\n // processSalaryPeriod(month.organizationSettings.SalaryPeriodFrom);\r\n\r\n //} else {\r\n\r\n var numberOfDays = DateUtilService.getNumberOfDaysInMonth(month.resourcePlanner.Date);\r\n for (var i = 0; i < numberOfDays; i++) {\r\n month.month.days.push(DateUtilService.getDateInMonth(month.resourcePlanner.Date.getFullYear(), month.resourcePlanner.Date.getMonth(), i + 1));\r\n }\r\n //}\r\n };\r\n\r\n /**\r\n * Set the width of the overview elements to the calculated width and height\r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-hour');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = (parseInt(dayWidth)) + 'px';\r\n hours[i].style.width = (parseInt(dayWidth)) + 'px';\r\n hours[i].style.maxWidth = (parseInt(dayWidth)) + 'px';\r\n }\r\n\r\n var dayGridLines = document.getElementsByClassName('rp-day-line');\r\n for (i = 0; i < dayGridLines.length; i++) {\r\n dayGridLines[i].style.minWidth = dayWidth + 'px';\r\n dayGridLines[i].style.width = dayWidth + 'px';\r\n dayGridLines[i].style.maxWidth = dayWidth + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-month-tasks');\r\n for (i = 0; i < tasks.length; i++) {\r\n tasks[i].style.minWidth = dayWidth * month.month.days.length + 'px';\r\n }\r\n };\r\n\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(month.resourcePlanner.startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, 23, 59, 59);\r\n }\r\n\r\n function setStartAndEndDate() {\r\n month.resourcePlanner.startDate = DateUtilService.setDate(month.month.days[0], 0, 0, 0);\r\n month.resourcePlanner.endDate = DateUtilService.setDate(month.month.days[month.month.days.length - 1], 23, 59, 59);\r\n initYesterdayDate();\r\n };\r\n\r\n //Part of 10572 task\r\n ///**\r\n // * This function prepares the dates that will be displayed in the resource planner\r\n // * @param {number} salaryPeriodFrom\r\n // */\r\n //function processSalaryPeriod(salaryPeriodFrom) {\r\n // month.month = ResourcePlannerService.processSalaryPeriod(salaryPeriodFrom, month.resourcePlanner.Date, month.nextMonthDate);\r\n //}\r\n\r\n /**\r\n * Function that collapses all users\r\n */\r\n function collapseAllUsers() {\r\n ResourcePlannerService.resetCollapsedUsersHeight(month.resourcePlanner.users);\r\n for (var i = 0; i < month.resourcePlanner.users.length; i++) {\r\n month.resourcePlanner.users[i].Collapsed = true;\r\n month.resourcePlanner.collapseUser(month.resourcePlanner.users[i]);\r\n }\r\n };\r\n /**\r\n * When the date is changed, tasks are fetched again\r\n */\r\n function onDateChange() {\r\n //Part of 10572 task\r\n //month.nextMonthDate = moment(month.resourcePlanner.Date).add(1, 'months').toDate();\r\n month.resourcePlanner.loading = true;\r\n\r\n $timeout(function () {\r\n generateGrid();\r\n setStartAndEndDate();\r\n //wait for $digest so that the dates are updated\r\n $timeout(function () {\r\n month.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n //colapse all users\r\n collapseAllUsers();\r\n });\r\n };\r\n\r\n /**\r\n * Go to next month\r\n * @returns {} \r\n */\r\n month.nextMonth = function () {\r\n //set the date to the first of the month so that navigation is not broken if 30 or 31\r\n month.resourcePlanner.Date = new Date(month.resourcePlanner.Date.setDate(1));\r\n month.resourcePlanner.Date = DateUtilService.addMonthsToDate(angular.copy(month.resourcePlanner.Date), 1);\r\n\r\n //Part of 10572 task\r\n // if 'Use salary period' setting is set, increment nextMonthDate with 1 month\r\n //if (month.organizationSettings &&\r\n // month.organizationSettings.UseSalaryPeriod &&\r\n // month.organizationSettings.SalaryPeriodFrom &&\r\n // month.organizationSettings.SalaryPeriodTo) {\r\n // month.nextMonthDate = DateUtilService.addMonthsToDate(angular.copy(month.nextMonthDate), 1);\r\n //}\r\n \r\n onDateChange();\r\n\r\n //Part of 10572 task\r\n // ui fix when you switch months\r\n //resizeToFit();\r\n //render();\r\n };\r\n\r\n /**\r\n * Go to previous month\r\n * @returns {} \r\n */\r\n month.lastMonth = function () {\r\n //set the date to the first of the month so that navigation is not broken if 30 or 31\r\n month.resourcePlanner.Date = new Date(month.resourcePlanner.Date.setDate(1));\r\n month.resourcePlanner.Date = DateUtilService.addMonthsToDate(angular.copy(month.resourcePlanner.Date), -1);\r\n\r\n //Part of 10572 task\r\n // if 'Use salary period' setting is set, decrement nextMonthDate with 1 month\r\n //if (month.organizationSettings &&\r\n // month.organizationSettings.UseSalaryPeriod &&\r\n // month.organizationSettings.SalaryPeriodFrom &&\r\n // month.organizationSettings.SalaryPeriodTo) {\r\n // month.nextMonthDate = DateUtilService.addMonthsToDate(angular.copy(month.nextMonthDate), -1);\r\n //}\r\n \r\n onDateChange();\r\n\r\n //Part of 10572 task\r\n // ui fix when you switch months\r\n //resizeToFit();\r\n //render();\r\n };\r\n\r\n function getUsersHeight() {\r\n return month.resourcePlanner.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n function getMonthWidth() {\r\n return month.month.days.length * dayWidth;\r\n };\r\n /**\r\n * Checks whether the task that the user is dragging is out of boundaries of the view\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n if (currentX < 0 ||\r\n topY > currentY ||\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getMonthWidth())\r\n return true;\r\n return false;\r\n };\r\n\r\n function getStartAndEndDate(x, taskWidth) {\r\n var startDayIndex = parseInt(x / dayWidth);\r\n\r\n var endDayIndex = parseInt((x + taskWidth) / dayWidth);\r\n\r\n // fix for out of range tasks\r\n\r\n if (startDayIndex <= 0) {\r\n startDayIndex = 0;\r\n }\r\n\r\n if (endDayIndex >= month.month.days.length) {\r\n endDayIndex = month.month.days.length - 1;\r\n }\r\n\r\n var startHour = (x - (startDayIndex * dayWidth)) / hourWidth;\r\n var endHour = startHour + taskWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(startHour, month.month.days[startDayIndex]));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(endHour, month.month.days[endDayIndex]));\r\n return { StartDate: startDate, EndDate: endDate };\r\n\r\n };\r\n\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n target.style.webkitTransform = target.style.transform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n };\r\n /**\r\n * Function that handles the start events\r\n * @param {any} event\r\n */\r\n function onStartEvent(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n /**\r\n * Function that checks whether the task can be resized to the left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, month.resourcePlanner.startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, month.resourcePlanner.endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be dragged\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n task.warningInfo += $translate.instant('TASKLIST_MODEL.WARNINGS.NOT_INTERACTABLE_TASK') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, month.resourcePlanner.startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, month.resourcePlanner.endDate)) {\r\n\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n\r\n task.canDrag = false;\r\n return false;\r\n\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Processes any given task after the resize event has occured\r\n * @param {any} task\r\n * @param {any} dates\r\n * @param {any} event\r\n */\r\n function processTaskForResize(task, dates, event) {\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), month.resourcePlanner.startDate))\r\n task.StartDate = dates.StartDate;\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), month.resourcePlanner.endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n if (task.id < 1)\r\n return;\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (month.resourcePlanner.mainOrder.id) {\r\n month.resourcePlanner.loading = true;\r\n month.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(month.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n month.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n };\r\n /**\r\n * Function that handles the resize move\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n /**\r\n * Function that handles the drag event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that handles the end events\r\n * @param {any} event\r\n */\r\n function onEndEvent(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, month.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, month.resourcePlanner.endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n if (event.type === 'dragend') //drag and drop will be handled in the dropzone\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n \r\n\r\n processTaskForResize(task, dates, event.target);\r\n };\r\n\r\n /**\r\n * Get the day number at any given date\r\n * @param {any} date\r\n * @param {any} isStart\r\n */\r\n function getDayNumberInGrid(date, isStart) {\r\n for (var i = 0; i < month.month.days.length; i++) {\r\n var day = month.month.days[i];\r\n if (day.getFullYear() != date.getFullYear())\r\n continue;\r\n\r\n if (day.getMonth() != date.getMonth())\r\n continue;\r\n\r\n if (day.getDate() == date.getDate())\r\n return i;\r\n }\r\n if (isStart)\r\n return 0;\r\n\r\n return month.month.days.length - 1;\r\n };\r\n\r\n function initCurrentDate() {\r\n var currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (month.resourcePlanner.Date.getMonth() != currentDate.getMonth() || month.resourcePlanner.Date.getFullYear() != currentDate.getFullYear()) {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n currentDateElement.style.left = ((ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(month.resourcePlanner.startDate)) * hourWidth) + (getDayNumberInGrid(currentDate, true) * dayWidth) + 'px';\r\n\r\n }, 500);\r\n };\r\n /**\r\n * Get the Y coordinate of any given task\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, month.resourcePlanner.users);\r\n\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n /**\r\n * Get the position in the overview of the task\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} task\r\n */\r\n function getPosition(startDate, endDate, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startDate, month.resourcePlanner.startDate))//same day, check hour\r\n start = ResourcePlannerService.hoursToPx(month.resourcePlanner.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(startDate);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endDate, month.resourcePlanner.endDate))//same day, check hours\r\n end = ResourcePlannerService.hoursToPx(month.resourcePlanner.endDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(endDate);\r\n\r\n x = ((start - ResourcePlannerService.hoursToPx(month.resourcePlanner.startDate)) * hourWidth) + (getDayNumberInGrid(startDate, true) * dayWidth);\r\n width = (end * hourWidth + getDayNumberInGrid(endDate, false) * dayWidth) - (start * hourWidth + getDayNumberInGrid(startDate, true) * dayWidth);\r\n\r\n return { x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10 - (task.currentOrder ? 2 : 0) };\r\n };\r\n /**\r\n * Set the position of the task\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n try {\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' +\r\n position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n //taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n if (task.id < 1) {\r\n taskElement.style.zIndex = 10;\r\n taskElement.style.border = '1px solid #000';\r\n } else\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n } catch (ex) {\r\n throw ex;\r\n }\r\n\r\n return taskElement;\r\n };\r\n /**\r\n * All tasks are redrawn when a resize event occurs \r\n * @param {any} initElement\r\n */\r\n function render() {\r\n if (!month.resourcePlanner.users || month.resourcePlanner.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < month.resourcePlanner.users.length; i++) {\r\n var user = month.resourcePlanner.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * It finds out the width of the overview and is sets the day width \r\n * so that the overview fits and no scrollbar is shown\r\n */\r\n function resizeToFit() {\r\n $timeout(function () {\r\n var overviewElement = document.getElementsByClassName(\"resource-planner-overview\")[0];\r\n var overviewCurrentWidth = overviewElement.offsetWidth;\r\n \r\n dayWidth = parseInt(overviewCurrentWidth / month.month.days.length);\r\n\r\n hourWidth = dayWidth / 24;\r\n //set the minimum width\r\n minimumWidth = angular.copy(dayWidth);\r\n\r\n setWidthOfElements();\r\n\r\n render();\r\n\r\n month.resourcePlanner.hourWidth = hourWidth;\r\n month.resourcePlanner.dayWidth = dayWidth;\r\n });\r\n };\r\n\r\n /**\r\n * Function that handles the scroll event to whether zoom in or out\r\n * @param {any} event\r\n */\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n month.resourcePlanner.zoomIn();\r\n else\r\n month.resourcePlanner.zoomOut();\r\n };\r\n\r\n function initZoomScroll() {\r\n userTaskListElement.addEventListener('mousewheel', handleScrollWheel, false);\r\n userTaskListElement.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n };\r\n\r\n function scrollTaskList() {\r\n userTaskListElement.scrollTop = userListElement.scrollTop;\r\n };\r\n /**\r\n * Get the opacity of the task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n month.getOpacityValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1';\r\n\r\n if (task.Table == 'GOT_USER' && task.PendingResponse)\r\n return '0.2';\r\n\r\n if (task.Execution && task.Execution.InitiatedProcessList && task.Execution.InitiatedProcessList.Status && task.Execution.InitiatedProcessList.Status.ProgId == 'DONE')\r\n return '0.3';\r\n\r\n return '0.5';\r\n };\r\n\r\n month.getBorderValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1px solid black';\r\n\r\n return 'none';\r\n }\r\n /**\r\n * Get the color of the task\r\n * If the task does not have any color provide a default value\r\n * @param {} task \r\n * @returns {} \r\n */\r\n month.getBackgroundColor = function (task) {\r\n if (task.ColorSetting && task.ColorSetting.Name)\r\n return task.ColorSetting.Name;\r\n\r\n return 'rgb(0, 114, 188)';\r\n };\r\n /**\r\n * Processes any given task after it has been dropped on overview\r\n * @param {any} task\r\n * @param {any} user\r\n * @param {any} dates\r\n * @param {any} target\r\n */\r\n function processTaskForDrop(task, user, dates, target) {\r\n //show the loader\r\n month.resourcePlanner.loading = true;\r\n\r\n if (task.Table != 'BOT_ORDER') {//if the type of task is not bot_order, don't bother with checks\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n month.resourcePlanner.saveTask(task).then(function () {\r\n month.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n return;\r\n }\r\n\r\n //check if order is saved\r\n if (month.resourcePlanner.mainOrder.id) {\r\n //if the user is different, check if the new user is already assigned\r\n //if (task.User.id != user.id)\r\n // month.resourcePlanner.isUserAssignedToOrder(user.id, task.ForeignKey)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // month.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(target);\r\n // return;\r\n // } else {\r\n // task.StartDate = dates.StartDate;\r\n // task.EndDate = dates.EndDate;\r\n // task.User.id = user.id;\r\n\r\n // if (task.id < 1) {\r\n // month.resourcePlanner.loading = false;\r\n // return;\r\n // }\r\n\r\n // month.resourcePlanner.saveTask(task).then(function () {\r\n // if ($filter('filter')(month.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n // processDatesForOrder([task]);\r\n\r\n // month.resourcePlanner.getTasksForSelectedUsers();\r\n // });\r\n // }\r\n // });\r\n //else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n\r\n if (task.id < 1) {\r\n month.resourcePlanner.loading = false;\r\n return;\r\n }\r\n\r\n month.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(month.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n month.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n //}\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n\r\n };\r\n /**\r\n * Processes the normal drag and drop of any task\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var user = angular.element(event.target).scope().user;\r\n var x = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var taskWidth = event.relatedTarget.clientWidth;\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var datesAfterDrop;\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, month.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, month.resourcePlanner.endDate)) {\r\n\r\n // manage task out of boundaries left drag when\r\n // the task has its original dates in the current\r\n // navigation mode range\r\n\r\n // if the task is dragged left\r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(month.resourcePlanner.startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate \r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference;\r\n\r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate \r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, month.resourcePlanner.startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, month.resourcePlanner.endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, month.resourcePlanner.startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n processTaskForDrop(task, user, datesAfterDrop, event.relatedTarget);\r\n };\r\n /**\r\n * Highlight the dropzone so that the user knows where he is currently\r\n * @param {any} event\r\n */\r\n function hightlightDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#f0f0f0');\r\n };\r\n /**\r\n * Reset the dropzone to it's default color\r\n * @param {any} event\r\n */\r\n function resetDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#fff');\r\n };\r\n /**\r\n * Function that occurs when the order has entered the dropzone\r\n * @param {any} event\r\n */\r\n function onDragEnterOrder(event) {\r\n //higlight the dropzone\r\n hightlightDropzone(event);\r\n oldHourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-day-line')[0]);\r\n };\r\n /**\r\n * Function that occurs when order has left the dropzone\r\n * @param {any} event\r\n */\r\n function onDragLeaveOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n console.log(oldHourLineElement);\r\n };\r\n /**\r\n * Function that handles the drop of the order on the dropzone\r\n * @param {any} event\r\n */\r\n function onDropDeactivateOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n console.log(oldHourLineElement);\r\n };\r\n\r\n /**\r\n * Function that occurs when the user moves the order around the dropzone\r\n * @param {any} event\r\n */\r\n function onDropMove(event) {\r\n var hourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-day-line')[0]);\r\n if (oldHourLineElement[0] != hourLineElement[0]) {\r\n oldHourLineElement.css('background', '');\r\n oldHourLineElement = hourLineElement;\r\n } else\r\n hourLineElement.css('background', 'rgba(240, 240, 240, 0.6)');\r\n };\r\n\r\n function confirmUsingCurrentDates() {\r\n return $q.when(false);\r\n };\r\n\r\n function confirmUsingSuborders() {\r\n return $q.when(true);\r\n };\r\n\r\n function checkUser(user) {\r\n //add the user as participant\r\n //user.Checked = false;\r\n month.resourcePlanner.checkUser(user, true);\r\n };\r\n\r\n /**\r\n * Creates a new task at the given interval for the given user on the given orders\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTask(startHour, endHour, order, user) {\r\n //create the task\r\n return {\r\n Active: true,\r\n StartDate: startHour,\r\n EndDate: endHour,\r\n Table: 'BOT_ORDER',\r\n User: user,\r\n ForeignKey: order.id ? order.id : undefined\r\n }\r\n };\r\n\r\n function createTaskAndCheckUser(startHour, endHour, order, user) {\r\n //create the task\r\n var task = createTask(startHour, endHour, order, user);\r\n\r\n //check the user\r\n if (!user.IsAssignedToOrder)\r\n checkUser(user);\r\n else //if the user is already assigned, we must set the active status on the participant\r\n month.resourcePlanner.setActiveStatusForUser(user, user.ParticipantActive);\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (order.id) {\r\n month.resourcePlanner.assignUser([task])\r\n .then(function (tasks) {\r\n processDatesForOrder(tasks);\r\n month.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n };\r\n\r\n function getStartAndEndHoursFortheDay(date) {\r\n var startHour = new Date(date);\r\n startHour.setHours(7);\r\n startHour.setMinutes(0);\r\n startHour.setSeconds(0);\r\n startHour = DateUtilService.getLongWithOffset(startHour);\r\n\r\n //set the end date\r\n var endHour = new Date(date);\r\n endHour.setHours(15);\r\n endHour.setMinutes(0);\r\n endHour.setSeconds(0);\r\n endHour = DateUtilService.getLongWithOffset(endHour);\r\n\r\n return { startHour: startHour, endHour: endHour };\r\n };\r\n\r\n /**\r\n * Get a list of ids from any given task list\r\n * @param {any} tasks\r\n */\r\n\r\n function getOrderIdsFromTask(tasks) {\r\n if (!tasks || tasks.length == 0)\r\n return [];\r\n\r\n var orders = month.resourcePlanner.getOrderList();\r\n var orderIds = [];\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n if ($filter('filter')(tasks, function (task) { return task.ForeignKey == order.id }).length > 0)\r\n orderIds.push(order.id);\r\n }\r\n\r\n return orderIds;\r\n };\r\n\r\n /**\r\n * Process the dates for the given tasks\r\n * Cordel dates aren't UTC so the timezone must be fixed\r\n * @param {any} tasks\r\n */\r\n function processDatesForOrder(tasks) {\r\n var orderIds = getOrderIdsFromTask(tasks);\r\n\r\n if (!orderIds || orderIds.length == 0)\r\n return;\r\n\r\n month.resourcePlanner.getDatesExtremities(orderIds)\r\n .then(function (returnedTasks) {\r\n if (!returnedTasks || returnedTasks == 0)\r\n return;\r\n\r\n var orders = month.resourcePlanner.getOrderList();\r\n\r\n for (var i = 0; i < returnedTasks.length; i++) {\r\n var task = returnedTasks[i];\r\n\r\n var order = $filter('filter')(orders, function (o) { return o.id == task.ForeignKey })[0];\r\n\r\n order.StartDate = task.StartDate;\r\n order.EndDate = task.EndDate;\r\n\r\n month.resourcePlanner.fixTimezone(order);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Create task only for main order\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForMainOrder(order, user, date) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = true;//the participant is now active for main order;\r\n confirmUsingSuborders()\r\n .then(function (result) {\r\n //if (result)\r\n // createTasksForAllOrders(user, date);\r\n //else if (order.StartDate && order.EndDate) {\r\n // //ask user if he wants to use the current dates\r\n // confirmUsingCurrentDates()\r\n // .then(function (result) {\r\n // if (result) {\r\n // startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n // endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n // } else {\r\n // hours = getStartAndEndHoursFortheDay(date);\r\n // startHour = hours.startHour;\r\n // endHour = hours.endHour;\r\n\r\n // }\r\n // createTaskAndCheckUser(startHour, endHour, order, user);\r\n // });\r\n //} else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay(date);\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n // }\r\n });\r\n };\r\n /**\r\n * Create task only for the given suborder\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForSubOrder(order, user, date) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = false;//the participant is now active for main order;\r\n if (order.StartDate && order.EndDate) {\r\n //ask user if he wants to use the current dates\r\n confirmUsingCurrentDates()\r\n .then(function (result) {\r\n if (result) {\r\n startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n } else {\r\n hours = getStartAndEndHoursFortheDay(date);\r\n startHour = hours.startHour;\r\n endHour = hours.endHour;\r\n\r\n }\r\n createTaskAndCheckUser(startHour, endHour, order, user);\r\n });\r\n } else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay(date);\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n }\r\n };\r\n /**\r\n * Assigns a user to any given order\r\n * @param {any} user\r\n * @param {any} order\r\n * @param {any} xCoordinate\r\n * @param {any} position\r\n */\r\n function assignUserToOrder(user, order, date) {\r\n //if main order, ask user if he wants the suborder as well\r\n if (order.id == month.resourcePlanner.mainOrder.id) {\r\n createTaskForMainOrder(order, user, date);\r\n } else {\r\n if (!order.InitiatedProcessListId) {\r\n month.resourcePlanner.loading = false;\r\n return;\r\n }\r\n createTaskForSubOrder(order, user, date);\r\n }\r\n };\r\n /**\r\n * Function that processes the drop event\r\n * @param {any} event\r\n */\r\n function onDropOrder(event) {\r\n //get the order\r\n var order = angular.copy(ResourcePlannerService.resourcePlannerOrderDragged);\r\n var user = angular.element(event.target).scope().user;\r\n\r\n\r\n //var xCoordinate = event.relatedTarget.getBoundingClientRect().left;//get task x coordinate\r\n var xCoordinate = event.interaction.pointers[0].pageX;\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n var xStart = xCoordinate - position.left;//get x coordinate start on grid\r\n\r\n var dates = getStartAndEndDate(xStart, 8 * hourWidth);\r\n\r\n if (order.id) {\r\n month.resourcePlanner.loading = true;\r\n\r\n if (!order.InitiatedProcessListId) {\r\n month.resourcePlanner.loading = false;\r\n errorService.changeError($filter('translate')(\"errOrderMustBeInitiated\"));\r\n return;\r\n }\r\n\r\n //check if the user is already assigned to the order\r\n //month.resourcePlanner.isUserAssignedToOrder(user.id, order.id)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // month.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // return;\r\n // } else {\r\n assignUserToOrder(user, order, dates.StartDate);\r\n // }\r\n //});\r\n }\r\n };\r\n\r\n function initDropzone() {\r\n $timeout(function () {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.resource-planner-order-list'],\r\n overlap: 0.5,\r\n ondrop: function (event) {\r\n if (!angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropNormalTaskOnGrid(event);\r\n else\r\n onDropOrder(event);\r\n },\r\n ondragenter: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragEnterOrder(event);\r\n },\r\n ondragleave: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragLeaveOrder(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropDeactivateOrder(event);\r\n },\r\n ondropmove: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropMove(event);\r\n }\r\n });\r\n });\r\n };\r\n\r\n month.initTask = function (task) {\r\n var taskElement = setPositionForTask(task);\r\n\r\n task.warningInfo = '';\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', onEndEvent)\r\n .on('resizestart', onStartEvent)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onEndEvent)\r\n .on('dragstart', onStartEvent);\r\n };\r\n /**\r\n * Function that handles on finish render event\r\n * @param {} task \r\n * @param {} user \r\n * @returns {} \r\n */\r\n month.finishedRender = function (task, user) {\r\n $timeout(function () {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = month.resourcePlanner.users.length - 1; i >= 0; i--) {\r\n if (month.resourcePlanner.users[i].Tasks && month.resourcePlanner.users[i].Tasks.length > 0) {\r\n lastTask = month.resourcePlanner.users[i].Tasks[month.resourcePlanner.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < month.resourcePlanner.users.length; i++) {\r\n var userLooped = month.resourcePlanner.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n month.initTask(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n //timeout so that everyting loads up nicely\r\n $timeout(function () {\r\n month.resourcePlanner.loading = false;\r\n if (!user.Collapsed)\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 200);\r\n });\r\n };\r\n\r\n month.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n month.onMouseOver = function (event, task) {\r\n month.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Function that handles double click event on a given task\r\n * @param {} event \r\n * @param {} task \r\n * @returns {} \r\n */\r\n month.onDoubleClick = function (event, task) {\r\n if (task.Parent && task.Parent.id) {\r\n month.resourcePlanner.getTaskById(task.Parent.id)\r\n .then(function (result) {\r\n task.ForeignKey = result.ForeignKey;\r\n task.StartDate = result.StartDate;\r\n task.EndDate = result.EndDate;\r\n month.resourcePlanner.toggleTaskDetailsPanel(task);\r\n });\r\n } else\r\n month.resourcePlanner.toggleTaskDetailsPanel(task);\r\n };\r\n\r\n function cancelCurrentDateInterval() {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n };\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return month.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n month.$onDestroy = function () {\r\n cancelCurrentDateInterval();\r\n interact('.rp-hour-task').unset();\r\n oldHourLineElement = null;\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ParticipantResourcePlannerWeekController.$inject = [\r\n '$timeout',\r\n '$filter',\r\n '$scope',\r\n '$interval',\r\n 'ResourcePlannerService',\r\n 'DateUtilService',\r\n 'sessionInformationService',\r\n '$q',\r\n 'dialogService',\r\n 'errorService',\r\n 'ParticipantResourcePlannerPanelService',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ParticipantResourcePlannerWeekController', ParticipantResourcePlannerWeekController)\r\n .directive('participantResourcePlannerWeek', function () {\r\n return {\r\n restrict: 'AE',\r\n controller: 'ParticipantResourcePlannerWeekController as week',\r\n bindToController: true,\r\n templateUrl: 'Scripts/order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerWeek.html',\r\n scope: {\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n function ParticipantResourcePlannerWeekController(\r\n $timeout,\r\n $filter,\r\n $scope,\r\n $interval,\r\n ResourcePlannerService,\r\n DateUtilService,\r\n sessionInformationService,\r\n $q,\r\n dialogService,\r\n errorService,\r\n ParticipantResourcePlannerPanelService,\r\n TaskListService,\r\n $translate\r\n ) {\r\n var week = this;\r\n var currentDatePromise = null,\r\n hourWidth = null,\r\n minimumWidth = null,\r\n dayWidth = null,\r\n userListElement = null,\r\n userTaskListElement = null,\r\n lastWidth = null,\r\n lastX = null, lastY = null,\r\n oldHourLineElement = null,\r\n yesterdayDate = null;\r\n\r\n week.overlayedTasksInfo = '';\r\n\r\n week.getContextMenuForTask = getContextMenuForTask;\r\n\r\n week.$onInit = function () {\r\n initDelegateFunctions();\r\n week.resourcePlanner.init();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n week.resourcePlanner.onDateChange = onDateChange;\r\n\r\n week.resourcePlanner.resizeOverviewToFit = resizeToFit;\r\n\r\n week.resourcePlanner.cancelCurrentDateInterval = cancelCurrentDateInterval;\r\n\r\n /**\r\n * Zoom in in overview\r\n * @returns {} \r\n */\r\n week.resourcePlanner.zoomIn = function () {\r\n hourWidth += 5;\r\n dayWidth = hourWidth * (week.resourcePlanner.endHour - week.resourcePlanner.startHour);\r\n setWidthOfElements();\r\n render();\r\n\r\n week.resourcePlanner.hourWidth = hourWidth;\r\n week.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n /**\r\n * Zoom out in overview\r\n * @returns {} \r\n */\r\n week.resourcePlanner.zoomOut = function () {\r\n if (hourWidth == minimumWidth || hourWidth - 1 == minimumWidth || hourWidth <= minimumWidth)\r\n hourWidth = minimumWidth;\r\n else\r\n hourWidth -= 5;\r\n dayWidth = hourWidth * (week.resourcePlanner.endHour - week.resourcePlanner.startHour);\r\n setWidthOfElements();\r\n render();\r\n\r\n week.resourcePlanner.hourWidth = hourWidth;\r\n week.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n /**\r\n * Toggles between 24h format and normal format\r\n * @returns {} \r\n */\r\n week.resourcePlanner.resizeFullDayFormat = function () {\r\n week.resourcePlanner.loading = true;\r\n //wait for $digest\r\n $timeout(function () {\r\n //regenerate the grid\r\n generateGrid();\r\n //set start and end dates\r\n setStartAndEndDate();\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n //get tasks\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n };\r\n\r\n week.resourcePlanner.init = function () {\r\n week.resourcePlanner.loading = true;\r\n //regenerate the grid\r\n generateGrid();\r\n //listen for scroll\r\n userListElement = document.getElementsByClassName(\"participant-resource-planner-user-list\")[0];\r\n userTaskListElement = document.getElementById(\"resourcePlannerWeekTasks\");\r\n\r\n userListElement.addEventListener('scroll', scrollTaskList, false);\r\n userListElement.addEventListener('mousewheel', scrollTaskList, false);\r\n userListElement.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n //set start and end dates\r\n setStartAndEndDate();\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n\r\n initZoomScroll();\r\n //init dropzone\r\n initDropzone();\r\n\r\n //get tasks\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n };\r\n\r\n /**\r\n * Collapses/Expands a users tasks\r\n * @param {} user \r\n * @returns {} \r\n */\r\n week.resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n week.resourcePlanner.assignUserToOrder = assignUserToOrder;\r\n\r\n /**\r\n * Set the scroll to top\r\n * @returns {} \r\n */\r\n week.resourcePlanner.resetScroll = function () {\r\n userTaskListElement.scrollTop = userListElement.scrollTop = 0;\r\n };\r\n\r\n /**\r\n * Return the day from the position from where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n week.resourcePlanner.getDayForDelete = function (event) {\r\n var xCoordinate = event.pageX;\r\n var relativeXCoordinate = xCoordinate - event.currentTarget.offsetParent.getBoundingClientRect().left;\r\n var startDayIndex = parseInt(relativeXCoordinate / dayWidth);\r\n var startHourCoordinates = (relativeXCoordinate - (startDayIndex * dayWidth)) / hourWidth + week.resourcePlanner.startHour;\r\n return ResourcePlannerService.pxToHours(startHourCoordinates, week.week[startDayIndex].date);\r\n };\r\n\r\n /**\r\n * Return the hour from the position where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n week.resourcePlanner.getHourForDelete = function (event) {\r\n return week.resourcePlanner.getDayForDelete(event);\r\n };\r\n week.resourcePlanner.loading = true;\r\n\r\n week.setPositionForTask = setPositionForTask;\r\n week.render = render;\r\n };\r\n\r\n /**\r\n * Generate the hour/day grid\r\n */\r\n function generateGrid() {\r\n var hours = [], i = 0, hoursGrid = [];\r\n week.week = [];\r\n for (i = week.resourcePlanner.startHour; i < week.resourcePlanner.endHour; i++) {\r\n hours.push(DateUtilService.setDate(week.resourcePlanner.Date, i, 0, 0));\r\n hoursGrid.push(i);\r\n }\r\n\r\n var monday = angular.copy(DateUtilService.getMondayOfDate(week.resourcePlanner.Date));\r\n i = 0;\r\n while (i < 7) {\r\n week.week.push({ hours: hours, date: monday, grid: hoursGrid });\r\n monday = DateUtilService.addDaysToDate(angular.copy(monday), 1);\r\n i++;\r\n }\r\n };\r\n\r\n /**\r\n * Get the day number in grid based on the given date\r\n * @param date\r\n * @param isStart\r\n * @returns\r\n */\r\n function getDayNumberInGrid(date, isStart) {\r\n for (var i = 0; i < week.week.length; i++) {\r\n if (week.week[i].date.getFullYear() != date.getFullYear())\r\n continue;\r\n if (week.week[i].date.getMonth() != date.getMonth())\r\n continue;\r\n if (week.week[i].date.getDate() == date.getDate())\r\n return i;\r\n }\r\n if (isStart)\r\n return 0;\r\n else\r\n return week.week.length - 1;\r\n };\r\n\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n var currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (currentDate > week.resourcePlanner.startDate && currentDate < week.resourcePlanner.endDate) {\r\n currentDateElement.style.left = ((ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(week.resourcePlanner.startDate)) * hourWidth) + (getDayNumberInGrid(currentDate, true) * dayWidth) + 'px';\r\n } else {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Set the width of the overview elements to the calculated width and height\r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-working-day');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = parseInt(dayWidth) + 'px';\r\n hours[i].style.width = parseInt(dayWidth) + 'px';\r\n hours[i].style.maxWidth = parseInt(dayWidth) + 'px';\r\n }\r\n\r\n var grids = document.getElementsByClassName('rp-working-day-hour-line');\r\n for (i = 0; i < grids.length; i++) {\r\n grids[i].style.minWidth = parseInt(hourWidth) + 'px';\r\n grids[i].style.width = parseInt(hourWidth) + 'px';\r\n grids[i].style.maxWidth = parseInt(hourWidth) + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-working-days-tasks');\r\n for (i = 0; i < tasks.length; i++) {\r\n tasks[i].style.minWidth = dayWidth * 7 + 'px';\r\n tasks[i].style.width = dayWidth * 7 + 'px';\r\n tasks[i].style.maxWidth = dayWidth * 7 + 'px';\r\n }\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(week.resourcePlanner.startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, week.resourcePlanner.endHour - 1, 59, 59);\r\n };\r\n\r\n function setStartAndEndDate() {\r\n if (week.resourcePlanner.fullDayFormat) {\r\n week.resourcePlanner.startDate = DateUtilService.setDate(week.week[0].date, week.resourcePlanner.startHour, 0, 0);\r\n week.resourcePlanner.endDate = DateUtilService.setDate(week.week[week.week.length - 1].date, week.resourcePlanner.endHour - 1, 59, 59);\r\n initYesterdayDate();\r\n } else {\r\n week.resourcePlanner.startDate = DateUtilService.setDate(week.week[0].date, week.resourcePlanner.startHour, 0, 0);\r\n week.resourcePlanner.endDate = DateUtilService.setDate(week.week[week.week.length - 1].date, week.resourcePlanner.endHour, 0, 0);\r\n }\r\n };\r\n\r\n function getStartWeekNumber() {\r\n return DateUtilService.getWeekNumber(week.resourcePlanner.startDate);\r\n };\r\n\r\n function getEndWeekNumber() {\r\n return DateUtilService.getWeekNumber(week.resourcePlanner.endDate);\r\n };\r\n\r\n week.getWeekNumber = function () {\r\n return 'Uke: ' + getStartWeekNumber() + ' ' + (getEndWeekNumber() == getStartWeekNumber() ? '' : ' - ' + getEndWeekNumber());\r\n };\r\n\r\n /**\r\n * All tasks are redrawn when a resize event occurs \r\n * @param {any} initElement\r\n */\r\n function render() {\r\n if (!week.resourcePlanner.users || week.resourcePlanner.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < week.resourcePlanner.users.length; i++) {\r\n var user = week.resourcePlanner.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * When the date is changed, tasks are fetched again\r\n */\r\n function onDateChange() {\r\n week.resourcePlanner.loading = true;\r\n $timeout(function () {\r\n generateGrid();\r\n setStartAndEndDate();\r\n $timeout(function () {\r\n setWidthOfElements();\r\n //get the tasks\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n //colapse all users\r\n collapseAllUsers();\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Function that collapses all users\r\n */\r\n function collapseAllUsers() {\r\n ResourcePlannerService.resetCollapsedUsersHeight(week.resourcePlanner.users);\r\n for (var i = 0; i < week.resourcePlanner.users.length; i++) {\r\n week.resourcePlanner.users[i].Collapsed = true;\r\n week.resourcePlanner.collapseUser(week.resourcePlanner.users[i]);\r\n }\r\n };\r\n\r\n /**\r\n * Resize the overview to fit the screen\r\n */\r\n function resizeToFit() {\r\n $timeout(function () {\r\n var overviewElement = document.getElementsByClassName(\"resource-planner-overview\")[0];\r\n var overviewCurrentWidth = overviewElement.offsetWidth;\r\n\r\n hourWidth = parseInt(overviewCurrentWidth / ((week.resourcePlanner.endHour - week.resourcePlanner.startHour) * 7));\r\n\r\n if (week.resourcePlanner.fullDayFormat)\r\n hourWidth *= 3;\r\n\r\n //set the minimum width\r\n minimumWidth = angular.copy(parseInt(hourWidth));\r\n\r\n dayWidth = hourWidth * (week.resourcePlanner.endHour - week.resourcePlanner.startHour);\r\n\r\n setWidthOfElements();\r\n\r\n render();\r\n\r\n week.resourcePlanner.hourWidth = hourWidth;\r\n week.resourcePlanner.dayWidth = dayWidth;\r\n });\r\n };\r\n\r\n /**\r\n * Go to next week\r\n */\r\n week.nextWeek = function () {\r\n week.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(week.resourcePlanner.endDate), 1);//add one day to end date\r\n\r\n onDateChange();\r\n };\r\n\r\n /**\r\n * Go to previous week\r\n */\r\n week.lastWeek = function () {\r\n var i = 0;\r\n while (i < 7) {\r\n week.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(week.resourcePlanner.Date), -1);\r\n i++;\r\n }\r\n onDateChange();\r\n };\r\n\r\n /**\r\n * Function that handles the scroll wheel\r\n * This will zoom in/out\r\n * @param {any} event\r\n */\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n week.resourcePlanner.zoomIn();\r\n else\r\n week.resourcePlanner.zoomOut();\r\n };\r\n\r\n function initZoomScroll() {\r\n userTaskListElement.addEventListener('mousewheel', handleScrollWheel, false);\r\n userTaskListElement.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n };\r\n\r\n /**\r\n * Checks whether the hour is a working hour, between 07:00 - 15:00\r\n * @param hour\r\n * @returns\r\n */\r\n week.isWorkingHour = function (hour) {\r\n return hour.getHours() >= 7 && hour.getHours() <= 15 && week.resourcePlanner.fullDayFormat;\r\n };\r\n\r\n function scrollTaskList() {\r\n userTaskListElement.scrollTop = userListElement.scrollTop;\r\n };\r\n\r\n function getUsersHeight() {\r\n return week.resourcePlanner.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n function getFullWorkingDaysWidth() {\r\n //return (endDate.getHours() - startDate.getHours()) * dayWidth;\r\n return week.week.length * dayWidth;\r\n };\r\n\r\n function getStartAndEndDate(x, taskWidth) {\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + week.resourcePlanner.startHour;\r\n\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var endDayIndex = parseInt((x + taskWidth) / dayWidth);\r\n\r\n // fix for out of range tasks\r\n if (startDayIndex <= 0) {\r\n startDayIndex = 0;\r\n }\r\n\r\n if (endDayIndex >= week.week.length) {\r\n endDayIndex = week.week.length - 1;\r\n }\r\n\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + week.resourcePlanner.startHour;\r\n var hourEndResized = hourStartResized + taskWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStartResized, week.week[startDayIndex].date));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEndResized, week.week[endDayIndex].date));\r\n\r\n return { StartDate: startDate, EndDate: endDate };\r\n\r\n };\r\n\r\n /**\r\n * Checks whether the task that the user is dragging is out of boundaries of the view\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n\r\n //get top based on user index\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n\r\n if (currentX < 0 || topY > currentY || //dragging above top or over left\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getFullWorkingDaysWidth()) {//dragging over right\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n };\r\n\r\n /**\r\n * Function that handles the resize move\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Processes any given task after the resize event has occured\r\n * @param {any} task\r\n * @param {any} dates\r\n * @param {any} event\r\n */\r\n function processTaskForResize(task, dates, event) {\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), week.resourcePlanner.startDate))\r\n task.StartDate = dates.StartDate;\r\n\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), week.resourcePlanner.endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n if (task.id < 1)\r\n return;\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (week.resourcePlanner.mainOrder.id) {\r\n week.resourcePlanner.loading = true;\r\n week.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(week.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n };\r\n\r\n /**\r\n * Function that handles the end events\r\n * @param {any} event\r\n */\r\n function onEndEvent(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, week.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, week.resourcePlanner.endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n if (event.type === 'dragend')\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n\r\n processTaskForResize(task, dates, event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the start events\r\n * @param {any} event\r\n */\r\n function onStartEvent(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n\r\n /**\r\n * Function that handles the drag event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = target.style.msTransform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, week.resourcePlanner.startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsAtADifferentHourResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, week.resourcePlanner.endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be dragged\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n task.warningInfo += $translate.instant('TASKLIST_MODEL.WARNINGS.NOT_INTERACTABLE_TASK') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, week.resourcePlanner.startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, week.resourcePlanner.endDate)) {\r\n\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Get the Y coordinate of any given task\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, week.resourcePlanner.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n function isStartDateInDayRange(startHour) {\r\n var day = week.week[getDayNumberInGrid(startHour, true)];\r\n if (startHour.getYear() != day.date.getYear() || startHour.getMonth() != day.date.getMonth() || startHour.getDate() != day.date.getDate())\r\n return true;\r\n if (startHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n if (startHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n function isEndDateInDayRange(endHour) {\r\n var day = week.week[getDayNumberInGrid(endHour, true)];\r\n if (endHour.getYear() != day.date.getYear() || endHour.getMonth() != day.date.getMonth() || endHour.getDate() != day.date.getDate())\r\n return true;\r\n if (endHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n if (endHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Get the position in the overview of the task\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} task\r\n */\r\n function getPosition(startHour, endHour, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startHour, week.resourcePlanner.startDate)) //same day, check hours\r\n start = ResourcePlannerService.hoursToPx(week.resourcePlanner.startDate);\r\n else if (!isStartDateInDayRange(startHour)) {\r\n if (startHour.getHours() < week.resourcePlanner.startDate.getHours())\r\n start = ResourcePlannerService.hoursToPx(week.resourcePlanner.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(week.resourcePlanner.endDate);\r\n } else\r\n start = ResourcePlannerService.hoursToPx(startHour);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endHour, week.resourcePlanner.endDate)) //same day, check hours\r\n end = ResourcePlannerService.hoursToPx(week.resourcePlanner.endDate);\r\n else if (!isEndDateInDayRange(endHour)) {\r\n if (endHour.getHours() < week.resourcePlanner.startDate.getHours())\r\n end = ResourcePlannerService.hoursToPx(week.resourcePlanner.startDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(week.resourcePlanner.endDate);\r\n } else\r\n end = ResourcePlannerService.hoursToPx(endHour);\r\n\r\n\r\n x = ((start - ResourcePlannerService.hoursToPx(week.resourcePlanner.startDate)) * hourWidth) + (getDayNumberInGrid(startHour, true) * dayWidth);//where the task begins\r\n width = (end * hourWidth + getDayNumberInGrid(endHour, false) * dayWidth) - (start * hourWidth + getDayNumberInGrid(startHour, true) * dayWidth);\r\n\r\n\r\n return { x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10 - (task.currentOrder ? 2 : 0) };\r\n };\r\n\r\n /**\r\n * Set the position of the task\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n try {\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' +\r\n position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n //taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n if (task.id < 1) {\r\n taskElement.style.zIndex = 10;\r\n taskElement.style.border = '1px solid #000';\r\n } else\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n } catch (ex) {\r\n throw ex;\r\n }\r\n\r\n return taskElement;\r\n };\r\n\r\n /**\r\n * Init drag and drop for task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n week.initTask = function (task) {\r\n var taskElement = setPositionForTask(task);\r\n\r\n task.warningInfo = '';\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', onEndEvent)\r\n .on('resizestart', onStartEvent)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onEndEvent)\r\n .on('dragstart', onStartEvent);\r\n };\r\n\r\n /**\r\n * Function that handles on finish render event\r\n * @param {} task \r\n * @param {} user \r\n * @returns {} \r\n */\r\n week.finishedRender = function (task, user) {\r\n $timeout(function () {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = week.resourcePlanner.users.length - 1; i >= 0; i--) {\r\n if (week.resourcePlanner.users[i].Tasks && week.resourcePlanner.users[i].Tasks.length > 0) {\r\n lastTask = week.resourcePlanner.users[i].Tasks[week.resourcePlanner.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < week.resourcePlanner.users.length; i++) {\r\n var userLooped = week.resourcePlanner.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n week.initTask(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n //timeout so that everyting loads up nicely\r\n $timeout(function () {\r\n week.resourcePlanner.loading = false;\r\n if (!user.Collapsed)\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 200);\r\n });\r\n };\r\n\r\n /**\r\n * Get the opacity of the task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n week.getOpacityValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1';\r\n\r\n if (task.Table == 'GOT_USER' && task.PendingResponse)\r\n return '0.2';\r\n\r\n if (task.Execution && task.Execution.InitiatedProcessList && task.Execution.InitiatedProcessList.Status && task.Execution.InitiatedProcessList.Status.ProgId == 'DONE')\r\n return '0.3';\r\n\r\n return '0.5';\r\n };\r\n\r\n week.getBorderValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1px solid black';\r\n\r\n return 'none';\r\n }\r\n\r\n /**\r\n * Get the color of the task\r\n * If the task does not have any color provide a default value\r\n * @param {} task \r\n * @returns {} \r\n */\r\n week.getBackgroundColor = function (task) {\r\n if (task.ColorSetting && task.ColorSetting.Name)\r\n return task.ColorSetting.Name;\r\n\r\n return 'rgb(0, 114, 188)';\r\n };\r\n\r\n /**\r\n * Processes any given task after it has been dropped on overview\r\n * @param {any} task\r\n * @param {any} user\r\n * @param {any} dates\r\n * @param {any} target\r\n */\r\n function processTaskForDrop(task, user, dates, target) {\r\n //show the loader\r\n week.resourcePlanner.loading = true;\r\n\r\n if (task.Table != 'BOT_ORDER') {//if the type of task is not bot_order, don't bother with checks\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n week.resourcePlanner.saveTask(task).then(function () {\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n return;\r\n }\r\n\r\n //check if order is saved\r\n if (week.resourcePlanner.mainOrder.id) {\r\n //if the user is different, check if the new user is already assigned\r\n //if (task.User.id != user.id)\r\n // week.resourcePlanner.isUserAssignedToOrder(user.id, task.ForeignKey)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // week.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(target);\r\n // return;\r\n // } else {\r\n // task.StartDate = dates.StartDate;\r\n // task.EndDate = dates.EndDate;\r\n // task.User.id = user.id;\r\n\r\n // if (task.id < 1) {\r\n // workingDays.resourcePlanner.loading = false;\r\n // return;\r\n // }\r\n\r\n // week.resourcePlanner.saveTask(task).then(function () {\r\n // if ($filter('filter')(week.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n // processDatesForOrder([task]);\r\n\r\n // week.resourcePlanner.getTasksForSelectedUsers();\r\n // });\r\n // }\r\n // });\r\n //else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n\r\n if (task.id < 1) {\r\n workingDays.resourcePlanner.loading = false;\r\n return;\r\n }\r\n\r\n week.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(week.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n //}\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Processes the normal drag and drop of any task\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var user = angular.element(event.target).scope().user;\r\n var x = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var taskWidth = event.relatedTarget.clientWidth;\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var datesAfterDrop;\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, week.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, week.resourcePlanner.endDate)) {\r\n\r\n // manage task out of boundaries left drag for 24h format\r\n if (week.resourcePlanner.fullDayFormat) {\r\n\r\n // if the task was dragged to the left\r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(week.resourcePlanner.startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n // get the difference between task's original StartDate and current nav mode StartDate\r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference;\r\n\r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n }\r\n\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, week.resourcePlanner.startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, week.resourcePlanner.endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, week.resourcePlanner.startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n processTaskForDrop(task, user, datesAfterDrop, event.relatedTarget);\r\n\r\n };\r\n\r\n /**\r\n * Highlight the dropzone so that the user knows where he is currently\r\n * @param {any} event\r\n */\r\n function hightlightDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#f0f0f0');\r\n };\r\n\r\n /**\r\n * Reset the dropzone to it's default color\r\n * @param {any} event\r\n */\r\n function resetDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#fff');\r\n };\r\n\r\n /**\r\n * Function that occurs when the order has entered the dropzone\r\n * @param {any} event\r\n */\r\n function onDragEnterOrder(event) {\r\n //higlight the dropzone\r\n hightlightDropzone(event);\r\n oldHourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-day-grid')[0]);\r\n };\r\n\r\n /**\r\n * Function that occurs when order has left the dropzone\r\n * @param {any} event\r\n */\r\n function onDragLeaveOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n };\r\n\r\n /**\r\n * Function that handles the drop of the order on the dropzone\r\n * @param {any} event\r\n */\r\n function onDropDeactivateOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n };\r\n\r\n /**\r\n * Function that occurs when the user moves the order around the dropzone\r\n * @param {any} event\r\n */\r\n function onDropMove(event) {\r\n var hourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-day-grid')[0]);\r\n if (oldHourLineElement[0] != hourLineElement[0]) {\r\n oldHourLineElement.css('background', '');\r\n oldHourLineElement = hourLineElement;\r\n } else\r\n hourLineElement.css('background', 'rgba(240, 240, 240, 0.6)');\r\n };\r\n\r\n function confirmUsingCurrentDates() {\r\n return $q.when(false);\r\n };\r\n\r\n function confirmUsingSuborders() {\r\n return $q.when(true);\r\n };\r\n\r\n function checkUser(user) {\r\n //add the user as participant\r\n //user.Checked = false;\r\n week.resourcePlanner.checkUser(user, true);\r\n };\r\n\r\n /**\r\n * Creates a new task at the given interval for the given user on the given orders\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTask(startHour, endHour, order, user) {\r\n //create the task\r\n return {\r\n Active: true,\r\n StartDate: startHour,\r\n EndDate: endHour,\r\n Table: 'BOT_ORDER',\r\n User: user,\r\n ForeignKey: order.id ? order.id : undefined\r\n }\r\n };\r\n\r\n function createTaskAndCheckUser(startHour, endHour, order, user) {\r\n //create the task\r\n var task = createTask(startHour, endHour, order, user);\r\n\r\n //check the user\r\n if (!user.IsAssignedToOrder)\r\n checkUser(user);\r\n else //if the user is already assigned, we must set the active status on the participant\r\n week.resourcePlanner.setActiveStatusForUser(user, user.ParticipantActive);\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (order.id) {\r\n week.resourcePlanner.assignUser([task])\r\n .then(function (tasks) {\r\n processDatesForOrder(tasks);\r\n week.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Get the default start and end date\r\n * 07:00 - 15:00\r\n */\r\n function getStartAndEndHoursFortheDay(date) {\r\n var startHour = new Date(date);\r\n startHour.setHours(7);\r\n startHour.setMinutes(0);\r\n startHour.setSeconds(0);\r\n startHour = DateUtilService.getLongWithOffset(startHour);\r\n\r\n //set the end date\r\n var endHour = new Date(date);\r\n endHour.setHours(15);\r\n endHour.setMinutes(0);\r\n endHour.setSeconds(0);\r\n endHour = DateUtilService.getLongWithOffset(endHour);\r\n\r\n return { startHour: startHour, endHour: endHour };\r\n };\r\n\r\n /**\r\n * Get a list of ids from any given task list\r\n * @param {any} tasks\r\n */\r\n function getOrderIdsFromTask(tasks) {\r\n if (!tasks || tasks.length == 0)\r\n return [];\r\n\r\n var orders = week.resourcePlanner.getOrderList();\r\n var orderIds = [];\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n if ($filter('filter')(tasks, function (task) { return task.ForeignKey == order.id }).length > 0)\r\n orderIds.push(order.id);\r\n }\r\n\r\n return orderIds;\r\n };\r\n\r\n /**\r\n * Process the dates for the given tasks\r\n * Cordel dates aren't UTC so the timezone must be fixed\r\n * @param {any} tasks\r\n */\r\n function processDatesForOrder(tasks) {\r\n var orderIds = getOrderIdsFromTask(tasks);\r\n\r\n if (!orderIds || orderIds.length == 0)\r\n return;\r\n\r\n week.resourcePlanner.getDatesExtremities(orderIds)\r\n .then(function (returnedTasks) {\r\n if (!returnedTasks || returnedTasks == 0)\r\n return;\r\n\r\n var orders = week.resourcePlanner.getOrderList();\r\n\r\n for (var i = 0; i < returnedTasks.length; i++) {\r\n var task = returnedTasks[i];\r\n\r\n var order = $filter('filter')(orders, function (o) { return o.id == task.ForeignKey })[0];\r\n\r\n order.StartDate = task.StartDate;\r\n order.EndDate = task.EndDate;\r\n\r\n week.resourcePlanner.fixTimezone(order);\r\n }\r\n });\r\n };\r\n \r\n /**\r\n * Create task only for main order\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForMainOrder(order, user, date) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = true;//the participant is now active for main order;\r\n confirmUsingSuborders()\r\n .then(function (result) {\r\n //if (result)\r\n // createTasksForAllOrders(user, date);\r\n //else if (order.StartDate && order.EndDate) {\r\n // //ask user if he wants to use the current dates\r\n // confirmUsingCurrentDates()\r\n // .then(function (result) {\r\n // if (result) {\r\n // startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n // endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n // } else {\r\n // hours = getStartAndEndHoursFortheDay(date);\r\n // startHour = hours.startHour;\r\n // endHour = hours.endHour;\r\n\r\n // }\r\n // createTaskAndCheckUser(startHour, endHour, order, user);\r\n // });\r\n //} else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay(date);\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n //}\r\n });\r\n };\r\n\r\n /**\r\n * Create task only for the given suborder\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForSubOrder(order, user, date) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = false;//the participant is now active for main order;\r\n if (order.StartDate && order.EndDate) {\r\n //ask user if he wants to use the current dates\r\n confirmUsingCurrentDates()\r\n .then(function (result) {\r\n if (result) {\r\n startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n } else {\r\n hours = getStartAndEndHoursFortheDay(date);\r\n startHour = hours.startHour;\r\n endHour = hours.endHour;\r\n\r\n }\r\n createTaskAndCheckUser(startHour, endHour, order, user);\r\n });\r\n } else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay(date);\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n }\r\n };\r\n\r\n /**\r\n * Assigns a user to any given order\r\n * @param {any} user\r\n * @param {any} order\r\n * @param {any} date\r\n */\r\n function assignUserToOrder(user, order, date) {\r\n //if main order, ask user if he wants the suborder as well\r\n if (order.id == week.resourcePlanner.mainOrder.id) {\r\n createTaskForMainOrder(order, user, date);\r\n } else {\r\n if (!order.InitiatedProcessListId) {\r\n week.resourcePlanner.loading = false;\r\n return;\r\n }\r\n createTaskForSubOrder(order, user, date);\r\n }\r\n };\r\n\r\n function getDatesAtCoordinates(xCoordinate, position) {\r\n //create a task at the mouse position of 4h long\r\n var startHour = (xCoordinate - position.left) / hourWidth + week.resourcePlanner.startHour;//find the start hour\r\n startHour = ResourcePlannerService.pxToHours(startHour, week.resourcePlanner.Date);//get the converted hour\r\n\r\n var endHour = DateUtilService.addHours(angular.copy(startHour), 4);\r\n\r\n //get long\r\n return {\r\n startHour: DateUtilService.getLongWithOffset(startHour),\r\n endHour: DateUtilService.getLongWithOffset(endHour)\r\n };\r\n };\r\n\r\n /**\r\n * Function that processes the drop event\r\n * @param {any} event\r\n */\r\n function onDropOrder(event) {\r\n //get the order\r\n var order = angular.copy(ResourcePlannerService.resourcePlannerOrderDragged);\r\n var user = angular.element(event.target).scope().user;\r\n\r\n\r\n //var xCoordinate = event.relatedTarget.getBoundingClientRect().left;//get mouse x coordinate\r\n var xCoordinate = event.interaction.pointers[0].pageX;\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n var xStart = xCoordinate - position.left;//get x coordinate start on grid\r\n //get the day index\r\n var startDayIndex = parseInt(xStart / dayWidth);\r\n var date = week.week[startDayIndex].date;\r\n\r\n if (order.id) {\r\n week.resourcePlanner.loading = true;\r\n\r\n if (!order.InitiatedProcessListId) {\r\n week.resourcePlanner.loading = false;\r\n errorService.changeError($filter('translate')(\"errOrderMustBeInitiated\"));\r\n return;\r\n }\r\n\r\n //check if the user is already assigned to the order\r\n //week.resourcePlanner.isUserAssignedToOrder(user.id, order.id)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // week.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // return;\r\n // } else {\r\n assignUserToOrder(user, order, date);\r\n // }\r\n //});\r\n }\r\n\r\n ResourcePlannerService.resourcePlannerOrderDragged = null;\r\n };\r\n\r\n function initDropzone() {\r\n $timeout(function () {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.resource-planner-order-list'],\r\n overlap: 0.5,\r\n ondrop: function (event) {\r\n if (!angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropNormalTaskOnGrid(event);\r\n else\r\n onDropOrder(event);\r\n },\r\n ondragenter: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragEnterOrder(event);\r\n },\r\n ondragleave: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragLeaveOrder(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropDeactivateOrder(event);\r\n },\r\n ondropmove: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropMove(event);\r\n }\r\n });\r\n });\r\n };\r\n\r\n week.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n week.onMouseOver = function (event, task) {\r\n week.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Function that handles double click event on a given task\r\n * @param {} event \r\n * @param {} task \r\n * @returns {} \r\n */\r\n week.onDoubleClick = function (event, task) {\r\n if (task.Parent && task.Parent.id) {\r\n week.resourcePlanner.getTaskById(task.Parent.id)\r\n .then(function (result) {\r\n task.ForeignKey = result.ForeignKey;\r\n task.StartDate = result.StartDate;\r\n task.EndDate = result.EndDate;\r\n week.resourcePlanner.toggleTaskDetailsPanel(task);\r\n });\r\n } else\r\n week.resourcePlanner.toggleTaskDetailsPanel(task);\r\n };\r\n\r\n function cancelCurrentDateInterval() {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n };\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return week.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n week.$onDestroy = function () {\r\n cancelCurrentDateInterval();\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ParticipantResourcePlannerWorkingDaysController.$inject = [\r\n '$timeout',\r\n '$filter',\r\n '$scope',\r\n '$interval',\r\n 'ResourcePlannerService',\r\n 'DateUtilService',\r\n 'errorService',\r\n 'dialogService',\r\n '$q',\r\n 'sessionInformationService',\r\n 'TaskListService',\r\n '$translate'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ParticipantResourcePlannerWorkingDaysController', ParticipantResourcePlannerWorkingDaysController)\r\n .directive('participantResourcePlannerWorkingDays', function () {\r\n return {\r\n restrict: 'AE',\r\n controller: 'ParticipantResourcePlannerWorkingDaysController as workingDays',\r\n bindToController: true,\r\n templateUrl: 'Scripts/order/resourcePlanner/resourcePlannerOverview/participantResourcePlannerWorkingDays.html',\r\n scope: {\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n function ParticipantResourcePlannerWorkingDaysController(\r\n $timeout,\r\n $filter,\r\n $scope,\r\n $interval,\r\n ResourcePlannerService,\r\n DateUtilService,\r\n errorService,\r\n dialogService,\r\n $q,\r\n sessionInformationService,\r\n TaskListService,\r\n $translate\r\n ) {\r\n var workingDays = this;\r\n var currentDatePromise = null,\r\n hourWidth = null,\r\n minimumWidth = null,\r\n dayWidth = null,\r\n userListElement = null,\r\n userTaskListElement = null,\r\n lastWidth = null,\r\n lastX = null,\r\n lastY = null,\r\n oldHourLineElement = null,\r\n yesterdayDate = null;\r\n\r\n workingDays.getContextMenuForTask = getContextMenuForTask;\r\n\r\n workingDays.$onInit = function () {\r\n initDelegateFunctions();\r\n workingDays.resourcePlanner.init();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n\r\n workingDays.resourcePlanner.resizeOverviewToFit = resizeToFit;\r\n\r\n workingDays.resourcePlanner.onDateChange = onDateChange;\r\n\r\n workingDays.resourcePlanner.cancelCurrentDateInterval = cancelCurrentDateInterval;\r\n\r\n /**\r\n * Zoom in in overview\r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.zoomIn = function () {\r\n hourWidth += 5;\r\n dayWidth = hourWidth * (workingDays.resourcePlanner.endHour - workingDays.resourcePlanner.startHour);\r\n setWidthOfElements();\r\n render();\r\n\r\n workingDays.resourcePlanner.hourWidth = hourWidth;\r\n workingDays.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n /**\r\n * Zoom out in overview\r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.zoomOut = function () {\r\n if (hourWidth == minimumWidth || hourWidth - 1 == minimumWidth || hourWidth <= minimumWidth)\r\n hourWidth = minimumWidth;\r\n else\r\n hourWidth -= 5;\r\n dayWidth = hourWidth * (workingDays.resourcePlanner.endHour - workingDays.resourcePlanner.startHour);\r\n setWidthOfElements();\r\n render();\r\n\r\n workingDays.resourcePlanner.hourWidth = hourWidth;\r\n workingDays.resourcePlanner.dayWidth = dayWidth;\r\n };\r\n\r\n workingDays.resourcePlanner.assignUserToOrder = assignUserToOrder;\r\n\r\n /**\r\n * Toggles between 24h format and normal format\r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.resizeFullDayFormat = function () {\r\n workingDays.resourcePlanner.loading = true;\r\n //wait for $digest\r\n $timeout(function () {\r\n //regenerate the grid\r\n generateGrid();\r\n //set start and end dates\r\n setStartAndEndDate();\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n //get tasks\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n };\r\n\r\n workingDays.resourcePlanner.init = function () {\r\n workingDays.resourcePlanner.loading = true;\r\n //generate the grid\r\n generateGrid();\r\n //listen for scroll\r\n userListElement = document.getElementsByClassName(\"participant-resource-planner-user-list\")[0];\r\n userTaskListElement = document.getElementById(\"resourcePlannerWorkingDaysTasks\");\r\n\r\n userListElement.addEventListener('scroll', scrollTaskList, false);\r\n userListElement.addEventListener('mousewheel', scrollTaskList, false);\r\n userListElement.addEventListener('DOMMouseScroll', scrollTaskList, false);\r\n\r\n //set start and end dates\r\n setStartAndEndDate();\r\n //resize elements to fit\r\n resizeToFit();\r\n //set the current date bar\r\n initCurrentDate();\r\n //init dropzone\r\n initDropzone();\r\n\r\n initZoomScroll();\r\n\r\n //get tasks\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n };\r\n\r\n /**\r\n * Set the scroll to top\r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.resetScroll = function () {\r\n userTaskListElement.scrollTop = userListElement.scrollTop = 0;\r\n };\r\n\r\n /**\r\n * Collapses/Expands a users tasks\r\n * @param {} user \r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.collapseUser = function (user) {\r\n if (user.Collapsed)\r\n ResourcePlannerService.collapseUserTasks(user);\r\n else\r\n user.Lines = ResourcePlannerService.expandUserTasks(user);\r\n };\r\n\r\n /**\r\n * Return the day from the position from where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.getDayForDelete = function (event) {\r\n var xCoordinate = event.pageX;\r\n var relativeXCoordinate = xCoordinate - event.currentTarget.offsetParent.getBoundingClientRect().left;\r\n var startDayIndex = parseInt(relativeXCoordinate / dayWidth);\r\n var startHourCoordinates = (relativeXCoordinate - (startDayIndex * dayWidth)) / hourWidth + workingDays.resourcePlanner.startHour;\r\n return ResourcePlannerService.pxToHours(startHourCoordinates, workingDays.workingDays[startDayIndex].date);\r\n };\r\n\r\n /**\r\n * Return the hour from the position where the user has clicked\r\n * @param {} event \r\n * @returns {} \r\n */\r\n workingDays.resourcePlanner.getHourForDelete = function (event) {\r\n return workingDays.resourcePlanner.getDayForDelete(event);\r\n };\r\n workingDays.resourcePlanner.loading = true;\r\n\r\n workingDays.setPositionForTask = setPositionForTask;\r\n workingDays.render = render;\r\n };\r\n\r\n /**\r\n * Initiates the yesterday date. We need this when a task has its\r\n * original StartDate and EndDate in the current navigation range\r\n * and it is dragged back in time. We will use yesterday date as\r\n * the StartDate of the task for date computations to be done correctly\r\n */\r\n function initYesterdayDate() {\r\n yesterdayDate = DateUtilService.subtractDaysFromDate(workingDays.resourcePlanner.startDate, 1);\r\n yesterdayDate = DateUtilService.setDate(yesterdayDate, workingDays.resourcePlanner.endHour - 1, 59, 59);\r\n }\r\n\r\n function setStartAndEndDate() {\r\n if (workingDays.resourcePlanner.fullDayFormat) {\r\n workingDays.resourcePlanner.startDate = DateUtilService.setDate(workingDays.workingDays[0].date, workingDays.resourcePlanner.startHour, 0, 0);\r\n workingDays.resourcePlanner.endDate = DateUtilService.setDate(workingDays.workingDays[workingDays.workingDays.length - 1].date, workingDays.resourcePlanner.endHour - 1, 59, 59);\r\n initYesterdayDate();\r\n } else {\r\n workingDays.resourcePlanner.startDate = DateUtilService.setDate(workingDays.workingDays[0].date, workingDays.resourcePlanner.startHour, 0, 0);\r\n workingDays.resourcePlanner.endDate = DateUtilService.setDate(workingDays.workingDays[workingDays.workingDays.length - 1].date, workingDays.resourcePlanner.endHour, 0, 0);\r\n }\r\n };\r\n\r\n /**\r\n * Generate the hour/day grid\r\n */\r\n function generateGrid() {\r\n var hours = [], i = 0, hoursGrid = [];\r\n workingDays.workingDays = [];\r\n for (i = workingDays.resourcePlanner.startHour; i < workingDays.resourcePlanner.endHour; i++) {\r\n hours.push(DateUtilService.setDate(workingDays.resourcePlanner.Date, i, 0, 0));\r\n hoursGrid.push(i);\r\n }\r\n\r\n var monday = angular.copy(DateUtilService.getMondayOfDate(workingDays.resourcePlanner.Date));\r\n i = 0;\r\n while (i < 5) {\r\n workingDays.workingDays.push({ hours: hours, date: monday, grid: hoursGrid });\r\n monday = DateUtilService.addDaysToDate(angular.copy(monday), 1);\r\n i++;\r\n }\r\n };\r\n\r\n function scrollTaskList() {\r\n userTaskListElement.scrollTop = userListElement.scrollTop;\r\n };\r\n\r\n /**\r\n * Set the width of the overview elements to the calculated width and height\r\n */\r\n function setWidthOfElements() {\r\n var i = 0;\r\n var hours = document.getElementsByClassName('rp-working-day');\r\n for (i = 0; i < hours.length; i++) {\r\n hours[i].style.minWidth = parseInt(dayWidth) + 'px';\r\n hours[i].style.width = parseInt(dayWidth) + 'px';\r\n hours[i].style.maxWidth = parseInt(dayWidth) + 'px';\r\n }\r\n\r\n var grids = document.getElementsByClassName('rp-working-day-hour-line');\r\n for (i = 0; i < grids.length; i++) {\r\n grids[i].style.minWidth = parseInt(hourWidth) + 'px';\r\n grids[i].style.width = parseInt(hourWidth) + 'px';\r\n grids[i].style.maxWidth = parseInt(hourWidth) + 'px';\r\n }\r\n\r\n var tasks = document.getElementsByClassName('rp-working-days-tasks');\r\n for (i = 0; i < tasks.length; i++) {\r\n tasks[i].style.minWidth = dayWidth * 5 + 'px';\r\n tasks[i].style.width = dayWidth * 5 + 'px';\r\n tasks[i].style.maxWidth = dayWidth * 5 + 'px';\r\n }\r\n };\r\n\r\n /**\r\n * All tasks are redrawn when a resize event occurs \r\n * @param {any} initElement\r\n */\r\n function render() {\r\n if (!workingDays.resourcePlanner.users || workingDays.resourcePlanner.users.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < workingDays.resourcePlanner.users.length; i++) {\r\n var user = workingDays.resourcePlanner.users[i];\r\n if (!user.Tasks || user.Tasks.length == 0)\r\n continue;\r\n\r\n for (var j = 0; j < user.Tasks.length; j++) {\r\n setPositionForTask(user.Tasks[j]);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Resize the overview to fit the screen\r\n */\r\n function resizeToFit() {\r\n $timeout(function () {\r\n var overviewElement = document.getElementsByClassName(\"resource-planner-overview\")[0];\r\n var overviewCurrentWidth = overviewElement.offsetWidth;\r\n\r\n hourWidth = parseInt(overviewCurrentWidth / ((workingDays.resourcePlanner.endHour - workingDays.resourcePlanner.startHour) * 5));\r\n\r\n if (workingDays.resourcePlanner.fullDayFormat)\r\n hourWidth *= 2;\r\n\r\n //set the minimum width\r\n minimumWidth = angular.copy(parseInt(hourWidth));\r\n\r\n dayWidth = hourWidth * (workingDays.resourcePlanner.endHour - workingDays.resourcePlanner.startHour);\r\n\r\n setWidthOfElements();\r\n\r\n render();\r\n\r\n workingDays.resourcePlanner.hourWidth = hourWidth;\r\n workingDays.resourcePlanner.dayWidth = dayWidth;\r\n });\r\n };\r\n\r\n function getStartWeekNumber() {\r\n return DateUtilService.getWeekNumber(workingDays.resourcePlanner.startDate);\r\n };\r\n\r\n function getEndWeekNumber() {\r\n return DateUtilService.getWeekNumber(workingDays.resourcePlanner.endDate);\r\n };\r\n\r\n workingDays.getWeekNumber = function () {\r\n return 'Uke: ' + getStartWeekNumber() + ' ' + (getEndWeekNumber() == getStartWeekNumber() ? '' : ' - ' + getEndWeekNumber());\r\n };\r\n\r\n /**\r\n * When the date is changed, tasks are fetched again\r\n */\r\n function onDateChange() {\r\n workingDays.resourcePlanner.loading = true;\r\n $timeout(function () {\r\n generateGrid();\r\n setStartAndEndDate();\r\n $timeout(function () {\r\n setWidthOfElements();\r\n //get the tasks\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n //colapse all users\r\n collapseAllUsers();\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Function that collapses all users\r\n */\r\n function collapseAllUsers() {\r\n ResourcePlannerService.resetCollapsedUsersHeight(workingDays.resourcePlanner.users);\r\n for (var i = 0; i < workingDays.resourcePlanner.users.length; i++) {\r\n workingDays.resourcePlanner.users[i].Collapsed = true;\r\n workingDays.resourcePlanner.collapseUser(workingDays.resourcePlanner.users[i]);\r\n }\r\n };\r\n\r\n /**\r\n * Goes to next week\r\n */\r\n workingDays.nextWeek = function () {\r\n workingDays.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(workingDays.resourcePlanner.endDate), 1);//add one day to end date\r\n while (true) {\r\n if (DateUtilService.isSundayOrSaturday(workingDays.resourcePlanner.Date))//check if weekend\r\n workingDays.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(workingDays.resourcePlanner.Date), 1);//if so add another day and check again\r\n else\r\n break;\r\n }\r\n onDateChange();\r\n //ResourcePlannerService.resetCollapsedUsersHeight(workingDays.resourcePlanner.users);\r\n };\r\n\r\n /**\r\n * Goes to previous week\r\n */\r\n workingDays.lastWeek = function () {\r\n var i = 0;\r\n while (i < 6) {\r\n workingDays.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(workingDays.resourcePlanner.Date), -1);\r\n if (DateUtilService.isSundayOrSaturday(workingDays.resourcePlanner.Date))\r\n workingDays.resourcePlanner.Date = DateUtilService.addDaysToDate(angular.copy(workingDays.resourcePlanner.Date), -1);\r\n i++;\r\n }\r\n onDateChange();\r\n //ResourcePlannerService.resetCollapsedUsersHeight(workingDays.resourcePlanner.users);\r\n };\r\n\r\n function getDayNumberInGrid(date, isStart) {\r\n for (var i = 0; i < workingDays.workingDays.length; i++) {\r\n if (workingDays.workingDays[i].date.getYear() != date.getYear())\r\n continue;\r\n if (workingDays.workingDays[i].date.getMonth() != date.getMonth())\r\n continue;\r\n if (workingDays.workingDays[i].date.getDate() == date.getDate())\r\n return i;\r\n }\r\n if (isStart)\r\n return 0;\r\n else\r\n return workingDays.workingDays.length - 1;\r\n };\r\n\r\n /**\r\n * Init the current date visualizer\r\n */\r\n function initCurrentDate() {\r\n var currentDateElement = document.getElementsByClassName('rp-current-date')[0];\r\n if (currentDatePromise) {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n }\r\n currentDatePromise = $interval(function () {\r\n var currentDate = new Date();\r\n if (currentDate > workingDays.resourcePlanner.startDate && currentDate < workingDays.resourcePlanner.endDate)\r\n currentDateElement.style.left = ((ResourcePlannerService.hoursToPx(currentDate) - ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.startDate)) * hourWidth) + (getDayNumberInGrid(currentDate, true) * dayWidth) + 'px';\r\n else {\r\n currentDateElement.style.left = '-10px';\r\n return;\r\n }\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Function that handles the scroll wheel\r\n * This will zoom in/out\r\n * @param {any} event\r\n */\r\n function handleScrollWheel(event) {\r\n var e = window.event || event; // old IE support\r\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\r\n if (delta > 0)\r\n workingDays.resourcePlanner.zoomIn();\r\n else\r\n workingDays.resourcePlanner.zoomOut();\r\n };\r\n\r\n function initZoomScroll() {\r\n userTaskListElement.addEventListener('mousewheel', handleScrollWheel, false);\r\n userTaskListElement.addEventListener('DOMMouseScroll', handleScrollWheel, false);\r\n };\r\n\r\n workingDays.isWorkingHour = function (hour) {\r\n return hour.getHours() >= 8 && hour.getHours() <= 16 && workingDays.resourcePlanner.fullDayFormat;\r\n };\r\n\r\n function isStartDateInDayRange(startHour) {\r\n var day = workingDays.workingDays[getDayNumberInGrid(startHour, true)];\r\n if (startHour.getYear() != day.date.getYear() || startHour.getMonth() != day.date.getMonth() || startHour.getDate() != day.date.getDate())\r\n return true;\r\n if (startHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n if (startHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n function isEndDateInDayRange(endHour) {\r\n var day = workingDays.workingDays[getDayNumberInGrid(endHour, true)];\r\n if (endHour.getYear() != day.date.getYear() || endHour.getMonth() != day.date.getMonth() || endHour.getDate() != day.date.getDate())\r\n return true;\r\n if (endHour.getHours() > day.hours[day.hours.length - 1].getHours())\r\n return false;\r\n if (endHour.getHours() < day.hours[0].getHours())\r\n return false;\r\n return true;\r\n };\r\n\r\n /**\r\n * Processes any given task after it has been dropped on overview\r\n * @param {any} task\r\n * @param {any} user\r\n * @param {any} dates\r\n * @param {any} target\r\n */\r\n function processTaskForDrop(task, user, dates, target) {\r\n //show the loader\r\n workingDays.resourcePlanner.loading = true;\r\n\r\n if (task.Table != 'BOT_ORDER') {//if the type of task is not bot_order, don't bother with checks\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n workingDays.resourcePlanner.saveTask(task).then(function () {\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n return;\r\n }\r\n\r\n //check if order is saved\r\n if (workingDays.resourcePlanner.mainOrder.id) {\r\n //if the user is different, check if the new user is already assigned\r\n //if (task.User.id != user.id)\r\n // workingDays.resourcePlanner.isUserAssignedToOrder(user.id, task.ForeignKey)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // workingDays.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // resetTaskToInitialPosition(target);\r\n // return;\r\n // } else {\r\n // task.StartDate = dates.StartDate;\r\n // task.EndDate = dates.EndDate;\r\n // task.User.id = user.id;\r\n\r\n // if (task.id < 1) {\r\n // workingDays.resourcePlanner.loading = false;\r\n // return;\r\n // }\r\n\r\n // workingDays.resourcePlanner.saveTask(task).then(function () {\r\n // if ($filter('filter')(workingDays.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n // processDatesForOrder([task]);\r\n // workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n // });\r\n // }\r\n // });\r\n //else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n\r\n if (task.id < 1) {\r\n workingDays.resourcePlanner.loading = false;\r\n return;\r\n }\r\n\r\n workingDays.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(workingDays.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n //}\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Processes the normal drag and drop of any task\r\n * @param {any} event\r\n */\r\n function onDropNormalTaskOnGrid(event) {\r\n\r\n var task = angular.element(event.relatedTarget).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n var user = angular.element(event.target).scope().user;\r\n var x = parseFloat(event.relatedTarget.getAttribute('data-x'));\r\n var taskWidth = event.relatedTarget.clientWidth;\r\n var dates = getStartAndEndDate(x, taskWidth);\r\n var datesAfterDrop;\r\n\r\n if (outOfBoundaries(event.relatedTarget) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, workingDays.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, workingDays.resourcePlanner.endDate)) {\r\n\r\n // manage task out of boundaries left drag for 24h format\r\n if (workingDays.resourcePlanner.fullDayFormat) {\r\n\r\n // if the task was dragged to the left \r\n if (dates.EndDate < task.EndDate) {\r\n\r\n var currentNavigationModeStartDate = DateUtilService.getLongWithOffset(workingDays.resourcePlanner.startDate);\r\n\r\n // if the task is not at the begining of the rp\r\n if (task.StartDate !== currentNavigationModeStartDate) {\r\n\r\n //get the difference between task's original StartDate and current nav mode StartDate\r\n var currentNavDifference = task.StartDate - currentNavigationModeStartDate;\r\n // we will subtract this from task's original EndDate\r\n // and what will remain will be subtracted from yesterday date\r\n task.EndDate = task.EndDate - currentNavDifference; \r\n }\r\n\r\n task.StartDate = DateUtilService.getLongWithOffset(yesterdayDate);\r\n // update taskStartDate\r\n taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // manage task dates after drop for not in range tasks\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, workingDays.resourcePlanner.startDate) ||\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, workingDays.resourcePlanner.endDate)) {\r\n\r\n var taskDates = ResourcePlannerService.manageNotInRangeTask(task, dates, workingDays.resourcePlanner.startDate);\r\n\r\n datesAfterDrop = taskDates ? taskDates : dates;\r\n\r\n } else {\r\n datesAfterDrop = dates;\r\n }\r\n\r\n\r\n processTaskForDrop(task, user, datesAfterDrop, event.relatedTarget);\r\n\r\n };\r\n\r\n /**\r\n * Highlight the dropzone so that the user knows where he is currently\r\n * @param {any} event\r\n */\r\n function hightlightDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#f0f0f0');\r\n };\r\n\r\n /**\r\n * Reset the dropzone to it's default color\r\n * @param {any} event\r\n */\r\n function resetDropzone(event) {\r\n var element = angular.element(event.target);\r\n element.css('background', '#fff');\r\n };\r\n\r\n /**\r\n * Function that occurs when the order has entered the dropzone\r\n * @param {any} event\r\n */\r\n function onDragEnterOrder(event) {\r\n //higlight the dropzone\r\n hightlightDropzone(event);\r\n oldHourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-day-grid')[0]);\r\n };\r\n\r\n /**\r\n * Function that occurs when order has left the dropzone\r\n * @param {any} event\r\n */\r\n function onDragLeaveOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n };\r\n\r\n /**\r\n * Function that handles the drop of the order on the dropzone\r\n * @param {any} event\r\n */\r\n function onDropDeactivateOrder(event) {\r\n //set it as it was\r\n resetDropzone(event);\r\n oldHourLineElement.css('background', '');\r\n };\r\n\r\n /**\r\n * Function that occurs when the user moves the order around the dropzone\r\n * @param {any} event\r\n */\r\n function onDropMove(event) {\r\n var hourLineElement = angular.element(ResourcePlannerService.getHtmlElementsFromCoordinates(event.interaction.pointers[0].pageX, event.interaction.pointers[0].pageY, 'rp-day-grid')[0]);\r\n if (oldHourLineElement[0] != hourLineElement[0]) {\r\n oldHourLineElement.css('background', '');\r\n oldHourLineElement = hourLineElement;\r\n } else\r\n hourLineElement.css('background', 'rgba(240, 240, 240, 0.6)');\r\n };\r\n\r\n function confirmUsingCurrentDates() {\r\n //return $q(function (resolve) {\r\n // dialogService.showCustomDialog('txtConfirm', 'txtUseCurrentDates', [$filter('translate')('txtYes'), $filter('translate')('txtNo')])\r\n // .then(function (result) {\r\n // resolve(result == 0);\r\n // });\r\n //});\r\n return $q.when(false);\r\n };\r\n\r\n function confirmUsingSuborders() {\r\n //return $q(function (resolve) {\r\n // dialogService.showCustomDialog('txtConfirm', 'txtIncludeSuborders',\r\n // [$filter('translate')('txtYes'), $filter('translate')('txtNo')])\r\n // .then(function (result) {\r\n // resolve(result == 0);\r\n // });\r\n //});\r\n return $q.when(true);\r\n };\r\n\r\n function checkUser(user) {\r\n //add the user as participant\r\n //user.Checked = false;\r\n workingDays.resourcePlanner.checkUser(user, true);\r\n };\r\n\r\n /**\r\n * Creates a new task at the given interval for the given user on the given orders\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTask(startHour, endHour, order, user) {\r\n //create the task\r\n return {\r\n Active: true,\r\n StartDate: startHour,\r\n EndDate: endHour,\r\n Table: 'BOT_ORDER',\r\n User: user,\r\n ForeignKey: order.id ? order.id : undefined\r\n }\r\n };\r\n\r\n function createTaskAndCheckUser(startHour, endHour, order, user) {\r\n //create the task\r\n var task = createTask(startHour, endHour, order, user);\r\n\r\n //check the user\r\n if (!user.IsAssignedToOrder)\r\n checkUser(user);\r\n else //if the user is already assigned, we must set the active status on the participant\r\n workingDays.resourcePlanner.setActiveStatusForUser(user, user.ParticipantActive);\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (order.id) {\r\n workingDays.resourcePlanner.assignUser([task])\r\n .then(function (tasks) {\r\n processDatesForOrder(tasks);\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Get a list of ids from any given task list\r\n * @param {any} tasks\r\n */\r\n function getOrderIdsFromTask(tasks) {\r\n if (!tasks || tasks.length == 0)\r\n return [];\r\n\r\n var orders = workingDays.resourcePlanner.getOrderList();\r\n var orderIds = [];\r\n for (var i = 0; i < orders.length; i++) {\r\n var order = orders[i];\r\n if ($filter('filter')(tasks, function (task) { return task.ForeignKey == order.id }).length > 0)\r\n orderIds.push(order.id);\r\n }\r\n\r\n return orderIds;\r\n };\r\n\r\n /**\r\n * Process the dates for the given tasks\r\n * Cordel dates aren't UTC so the timezone must be fixed\r\n * @param {any} tasks\r\n */\r\n function processDatesForOrder(tasks) {\r\n var orderIds = getOrderIdsFromTask(tasks);\r\n\r\n if (!orderIds || orderIds.length == 0)\r\n return;\r\n\r\n workingDays.resourcePlanner.getDatesExtremities(orderIds)\r\n .then(function (returnedTasks) {\r\n if (!returnedTasks || returnedTasks == 0)\r\n return;\r\n\r\n var orders = workingDays.resourcePlanner.getOrderList();\r\n\r\n for (var i = 0; i < returnedTasks.length; i++) {\r\n var task = returnedTasks[i];\r\n\r\n var order = $filter('filter')(orders, function (o) { return o.id == task.ForeignKey })[0];\r\n\r\n order.StartDate = task.StartDate;\r\n order.EndDate = task.EndDate;\r\n\r\n workingDays.resourcePlanner.fixTimezone(order);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Get the default start and end date\r\n * 07:00 - 15:00\r\n */\r\n function getStartAndEndHoursFortheDay(date) {\r\n var startHour = new Date(date);\r\n startHour.setHours(7);\r\n startHour.setMinutes(0);\r\n startHour.setSeconds(0);\r\n startHour = DateUtilService.getLongWithOffset(startHour);\r\n\r\n //set the end date\r\n var endHour = new Date(date);\r\n endHour.setHours(15);\r\n endHour.setMinutes(0);\r\n endHour.setSeconds(0);\r\n endHour = DateUtilService.getLongWithOffset(endHour);\r\n\r\n return { startHour: startHour, endHour: endHour };\r\n };\r\n\r\n /**\r\n * Create task only for main order\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForMainOrder(order, user, date) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = true;//the participant is now active for main order;\r\n confirmUsingSuborders()\r\n .then(function (result) {\r\n //if (result)\r\n // createTasksForAllOrders(user, date);\r\n //else if (order.StartDate && order.EndDate) {\r\n // //ask user if he wants to use the current dates\r\n // confirmUsingCurrentDates()\r\n // .then(function (result) {\r\n // if (result) {\r\n // startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n // endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n // } else {\r\n // hours = getStartAndEndHoursFortheDay(date);\r\n // startHour = hours.startHour;\r\n // endHour = hours.endHour;\r\n\r\n // }\r\n // createTaskAndCheckUser(startHour, endHour, order, user);\r\n // });\r\n //} else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay(date);\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n // }\r\n });\r\n };\r\n\r\n /**\r\n * Create task only for the given suborder\r\n * @param {any} order\r\n * @param {any} user\r\n */\r\n function createTaskForSubOrder(order, user, date) {\r\n var startHour, endHour, hours;\r\n user.ParticipantActive = false;//the participant is now active for main order;\r\n if (order.StartDate && order.EndDate) {\r\n //ask user if he wants to use the current dates\r\n confirmUsingCurrentDates()\r\n .then(function (result) {\r\n if (result) {\r\n startHour = DateUtilService.getLongWithOffset(new Date(order.StartDate));\r\n endHour = DateUtilService.getLongWithOffset(new Date(order.EndDate));\r\n } else {\r\n hours = getStartAndEndHoursFortheDay(date);\r\n startHour = hours.startHour;\r\n endHour = hours.endHour;\r\n\r\n }\r\n createTaskAndCheckUser(startHour, endHour, order, user);\r\n });\r\n } else {//create the order task with 08:00-16:00\r\n hours = getStartAndEndHoursFortheDay(date);\r\n\r\n createTaskAndCheckUser(hours.startHour, hours.endHour, order, user);\r\n }\r\n };\r\n\r\n /**\r\n * Assigns a user to any given order\r\n * @param {any} user\r\n * @param {any} order\r\n * @param {any} xCoordinate\r\n * @param {any} position\r\n */\r\n function assignUserToOrder(user, order, date) {\r\n //if main order, ask user if he wants the suborder as well\r\n if (order.id == workingDays.resourcePlanner.mainOrder.id) {\r\n createTaskForMainOrder(order, user, date);\r\n } else {\r\n if (!order.InitiatedProcessListId) {\r\n workingDays.resourcePlanner.loading = false;\r\n return;\r\n }\r\n createTaskForSubOrder(order, user, date);\r\n }\r\n };\r\n\r\n function getDatesAtCoordinates(xCoordinate, position) {\r\n //create a task at the mouse position of 4h long\r\n var startHour = (xCoordinate - position.left) / hourWidth + workingDays.resourcePlanner.startHour;//find the start hour\r\n startHour = ResourcePlannerService.pxToHours(startHour, workingDays.resourcePlanner.Date);//get the converted hour\r\n\r\n var endHour = DateUtilService.addHours(angular.copy(startHour), 4);\r\n\r\n //get long\r\n return {\r\n startHour: DateUtilService.getLongWithOffset(startHour),\r\n endHour: DateUtilService.getLongWithOffset(endHour)\r\n };\r\n };\r\n\r\n /**\r\n * Function that processes the drop event\r\n * @param {any} event\r\n */\r\n function onDropOrder(event) {\r\n //get the order\r\n var order = angular.copy(ResourcePlannerService.resourcePlannerOrderDragged);\r\n var user = angular.element(event.target).scope().user;\r\n\r\n\r\n //var xCoordinate = event.relatedTarget.getBoundingClientRect().left;//get mouse x coordinate\r\n var xCoordinate = event.interaction.pointers[0].pageX;\r\n var position = event.target.getBoundingClientRect();//get the coordinates for the grid\r\n\r\n var xStart = xCoordinate - position.left;//get x coordinate start on grid\r\n //get the day index\r\n var startDayIndex = parseInt(xStart / dayWidth);\r\n var date = workingDays.workingDays[startDayIndex].date;\r\n\r\n if (order.id) {\r\n workingDays.resourcePlanner.loading = true;\r\n\r\n if (!order.InitiatedProcessListId) {\r\n workingDays.resourcePlanner.loading = false;\r\n errorService.changeError($filter('translate')(\"errOrderMustBeInitiated\"));\r\n return;\r\n }\r\n\r\n //check if the user is already assigned to the order\r\n //workingDays.resourcePlanner.isUserAssignedToOrder(user.id, order.id)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // workingDays.resourcePlanner.loading = false;\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // return;\r\n // } else {\r\n assignUserToOrder(user, order, date);\r\n // }\r\n //});\r\n }\r\n };\r\n\r\n function initDropzone() {\r\n $timeout(function () {\r\n interact('.rp-hour-task').dropzone({\r\n accept: ['.rp-day-task', '.resource-planner-order-list'],\r\n overlap: 0.5,\r\n ondrop: function (event) {\r\n if (!angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropNormalTaskOnGrid(event);\r\n else\r\n onDropOrder(event);\r\n },\r\n ondragenter: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragEnterOrder(event);\r\n },\r\n ondragleave: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDragLeaveOrder(event);\r\n },\r\n ondropdeactivate: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropDeactivateOrder(event);\r\n },\r\n ondropmove: function (event) {\r\n if (angular.element(event.relatedTarget).hasClass('resource-planner-order-list'))\r\n onDropMove(event);\r\n }\r\n });\r\n });\r\n };\r\n\r\n function getUsersHeight() {\r\n return workingDays.resourcePlanner.users.length * ResourcePlannerService.USER_HEIGHT;\r\n };\r\n\r\n function getFullWorkingDaysWidth() {\r\n //return (endDate.getHours() - startDate.getHours()) * dayWidth;\r\n return workingDays.workingDays.length * dayWidth;\r\n };\r\n\r\n function getStartAndEndDate(x, taskWidth) {\r\n\r\n var startDayIndex = parseInt(x / dayWidth);\r\n var endDayIndex = parseInt((x + taskWidth) / dayWidth);\r\n\r\n // for out of range tasks\r\n\r\n if (startDayIndex <= 0) {\r\n startDayIndex = 0;\r\n }\r\n\r\n if (endDayIndex >= workingDays.workingDays.length) {\r\n endDayIndex = workingDays.workingDays.length - 1;\r\n }\r\n\r\n var hourStartResized = (x - (startDayIndex * dayWidth)) / hourWidth + workingDays.resourcePlanner.startHour;\r\n var hourEndResized = hourStartResized + taskWidth / hourWidth - ((endDayIndex - startDayIndex) * dayWidth) / hourWidth;\r\n var startDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourStartResized, workingDays.workingDays[startDayIndex].date));\r\n var endDate = DateUtilService.getLongWithOffset(ResourcePlannerService.pxToHours(hourEndResized, workingDays.workingDays[endDayIndex].date));\r\n\r\n return { StartDate: startDate, EndDate: endDate };\r\n\r\n };\r\n\r\n /**\r\n * Checks whether the task that the user is dragging is out of boundaries of the view\r\n * @param {any} targetElement\r\n */\r\n function outOfBoundaries(targetElement) {\r\n var currentY = parseFloat(targetElement.getAttribute('data-y'));\r\n var currentX = parseFloat(targetElement.getAttribute('data-x'));\r\n\r\n //get top based on user index\r\n var topY = parseFloat(targetElement.getAttribute('user-index')) * (-Math.abs(ResourcePlannerService.USER_HEIGHT));\r\n var userScope = angular.element(targetElement).scope().$parent.$parent.user;\r\n var nrOfLines = userScope.Lines ? userScope.Lines.length - 1 : 0;\r\n var bottomY = currentY + parseFloat(targetElement.getAttribute('user-index')) * ResourcePlannerService.USER_HEIGHT - (nrOfLines * ResourcePlannerService.USER_HEIGHT);\r\n\r\n if (currentX < 0 || topY > currentY || //dragging above top or over left\r\n bottomY >= getUsersHeight() ||\r\n currentX + targetElement.clientWidth > getFullWorkingDaysWidth()) {//dragging over right\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n function resetTaskToInitialPosition(target) {\r\n //add transition animation\r\n target.style.transition = 'all 0.5s ease-in';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + lastX + 'px, ' + lastY + 'px)';\r\n target.style.width = lastWidth;\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', lastX);\r\n target.setAttribute('data-y', lastY);\r\n\r\n $timeout(function () {\r\n target.style.transition = '';\r\n }, 1000);\r\n };\r\n\r\n /**\r\n * Function that handles the resize move\r\n * @param {any} event\r\n */\r\n function onResizeMove(event) {\r\n var target = event.target;\r\n var x, y;\r\n x = (parseFloat(target.getAttribute('data-x')) || 0);\r\n y = (parseFloat(target.getAttribute('data-y')) || 0);\r\n\r\n x += event.deltaRect.left;\r\n y += event.deltaRect.top;\r\n\r\n //set width\r\n target.style.width = event.rect.width + 'px';\r\n\r\n target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';\r\n\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Processes any given task after the resize event has occured\r\n * @param {any} task\r\n * @param {any} dates\r\n * @param {any} event\r\n */\r\n function processTaskForResize(task, dates, event) {\r\n\r\n if (ResourcePlannerService.isStartDateInRange(DateUtilService.getDateWithoutTimezone(task.StartDate), workingDays.resourcePlanner.startDate))\r\n task.StartDate = dates.StartDate;\r\n\r\n if (ResourcePlannerService.isEndDateInRange(DateUtilService.getDateWithoutTimezone(task.EndDate), workingDays.resourcePlanner.endDate))\r\n task.EndDate = dates.EndDate;\r\n\r\n if (task.id < 1)\r\n return;\r\n\r\n //if the order has been saved before -> save the task to db\r\n if (workingDays.resourcePlanner.mainOrder.id) {\r\n workingDays.resourcePlanner.loading = true;\r\n workingDays.resourcePlanner.saveTask(task).then(function () {\r\n if ($filter('filter')(workingDays.resourcePlanner.getOrderList(), function (o) { return o.id == task.ForeignKey }).length > 0)\r\n processDatesForOrder([task]);\r\n workingDays.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n } else {\r\n task.StartDate = dates.StartDate;\r\n task.EndDate = dates.EndDate;\r\n task.User.id = user.id;\r\n task.noDelete = true;\r\n }\r\n };\r\n\r\n /**\r\n * Function that handles the end events\r\n * @param {any} event\r\n */\r\n function onEndEvent(event) {\r\n\r\n var task = angular.element(event.target).scope().$parent.task;\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (outOfBoundaries(event.target) &&\r\n ResourcePlannerService.isStartDateInRange(taskStartDate, workingDays.resourcePlanner.startDate) &&\r\n ResourcePlannerService.isEndDateInRange(taskEndDate, workingDays.resourcePlanner.endDate)) {\r\n resetTaskToInitialPosition(event.target);\r\n return;\r\n }\r\n if (event.type === 'dragend')\r\n return;\r\n\r\n var start = parseFloat(event.target.getAttribute('data-x'));\r\n var dates = getStartAndEndDate(start, event.target.clientWidth);\r\n\r\n\r\n processTaskForResize(task, dates, event.target);\r\n };\r\n\r\n /**\r\n * Function that handles the start events\r\n * @param {any} event\r\n */\r\n function onStartEvent(event) {\r\n lastX = event.target.getAttribute('data-x');\r\n lastY = event.target.getAttribute('data-y');\r\n lastWidth = event.target.style.width;\r\n };\r\n\r\n /**\r\n * Function that handles the drag event\r\n * @param {any} event\r\n */\r\n function onDragMove(event) {\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n target.style.webkitTransform = target.style.transform = target.style.msTransform = 'translate(' + x + 'px, ' + y + 'px)';\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the left\r\n * @param {any} task\r\n */\r\n function canResizeToLeft(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, workingDays.resourcePlanner.startDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartsAtADifferentHourResizeLeft') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be resized to the right\r\n * @param {any} task\r\n */\r\n function canResizeToRight(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return false;\r\n }\r\n\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isEndDateInRange(taskEndDate, workingDays.resourcePlanner.endDate)) {\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourResizeRight') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n };\r\n\r\n /**\r\n * Function that checks whether the task can be dragged\r\n * @param {any} task\r\n */\r\n function canDrag(task) {\r\n\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n task.warningInfo += $translate.instant('TASKLIST_MODEL.WARNINGS.NOT_INTERACTABLE_TASK') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n var taskStartDate = DateUtilService.getDateWithoutTimezone(task.StartDate);\r\n var taskEndDate = DateUtilService.getDateWithoutTimezone(task.EndDate);\r\n\r\n if (task.IsPrivate && task.User.id != sessionInformationService.getUser().id) {\r\n task.warningInfo += $filter('translate')('txtTaskIsPrivateDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (task.Parent && task.Parent.id) {\r\n task.warningInfo += $filter('translate')('txtAtLeastOneDayDeletedDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!ResourcePlannerService.isStartDateInRange(taskStartDate, workingDays.resourcePlanner.startDate) &&\r\n !ResourcePlannerService.isEndDateInRange(taskEndDate, workingDays.resourcePlanner.endDate)) {\r\n\r\n task.warningInfo += $filter('translate')('txtStartsInAnotherDayDrag') + '\\n';\r\n task.warningInfo += $filter('translate')('txtEndsInAnotherDayDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n\r\n }\r\n\r\n if (!isStartDateInDayRange(taskStartDate)) {\r\n task.warningInfo += $filter('translate')('txtStartAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n if (!isEndDateInDayRange(taskEndDate)) {\r\n task.warningInfo += $filter('translate')('txtEndAtADifferentHourDrag') + '\\n';\r\n task.canDrag = false;\r\n return false;\r\n }\r\n\r\n task.canDrag = true;\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Get the Y coordinate of any given task\r\n * @param {any} task\r\n */\r\n function getYCoordinate(task) {\r\n //get the user that has this task\r\n var user = ResourcePlannerService.getUserByTask(task, workingDays.resourcePlanner.users);\r\n //get the index in array\r\n if (!user || user.Collapsed)\r\n return 5;\r\n\r\n var index = ResourcePlannerService.getIndexOfTheTask(task, user);\r\n if (index == null)\r\n return 5;\r\n return index * 60 + 5;//return y for ease of calculations\r\n };\r\n\r\n /**\r\n * Get the position in the overview of the task\r\n * @param {any} startHour\r\n * @param {any} endHour\r\n * @param {any} task\r\n */\r\n function getPosition(startHour, endHour, task) {\r\n var x = 0, width = 0, start, end;\r\n\r\n //check if task start hour less than day start -> year, month, day\r\n if (!ResourcePlannerService.isStartDateInRange(startHour, workingDays.resourcePlanner.startDate)) //same day, check hours\r\n start = ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.startDate);\r\n else if (!isStartDateInDayRange(startHour)) {\r\n if (startHour.getHours() < workingDays.resourcePlanner.startDate.getHours())\r\n start = ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.startDate);\r\n else\r\n start = ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.endDate);\r\n } else\r\n start = ResourcePlannerService.hoursToPx(startHour);\r\n\r\n //check if task end hour is greater than day end -> year, month, day\r\n if (!ResourcePlannerService.isEndDateInRange(endHour, workingDays.resourcePlanner.endDate)) //same day, check hours\r\n end = ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.endDate);\r\n else if (!isEndDateInDayRange(endHour)) {\r\n if (endHour.getHours() < workingDays.resourcePlanner.startDate.getHours())\r\n end = ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.startDate);\r\n else\r\n end = ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.endDate);\r\n } else\r\n end = ResourcePlannerService.hoursToPx(endHour);\r\n\r\n\r\n x = ((start - ResourcePlannerService.hoursToPx(workingDays.resourcePlanner.startDate)) * hourWidth) + (getDayNumberInGrid(startHour, true) * dayWidth);//where the task begins\r\n width = (end * hourWidth + getDayNumberInGrid(endHour, false) * dayWidth) - (start * hourWidth + getDayNumberInGrid(startHour, true) * dayWidth);\r\n\r\n\r\n\r\n return { x: x, y: getYCoordinate(task), width: width, height: ResourcePlannerService.USER_HEIGHT - 10 - (task.currentOrder ? 2 : 0) };\r\n };\r\n\r\n /**\r\n * Set the position of the task\r\n * @param {any} task\r\n */\r\n function setPositionForTask(task) {\r\n //get the html task\r\n var taskElement = document.getElementById('task' + task.id.toString());\r\n //get the user height; if it's not set get from html\r\n ResourcePlannerService.USER_HEIGHT = ResourcePlannerService.USER_HEIGHT ? ResourcePlannerService.USER_HEIGHT : document.getElementsByClassName('rp-hour-task')[0].offsetHeight;\r\n\r\n //get start position and width\r\n var position = getPosition(DateUtilService.getDateWithoutTimezone(task.StartDate), DateUtilService.getDateWithoutTimezone(task.EndDate), task);\r\n\r\n //set initial position\r\n try {\r\n taskElement.style.webkitTransform = taskElement.style.transform = 'translate(' + position.x + 'px, ' +\r\n position.y + 'px)';\r\n taskElement.style.width = position.width + 'px';\r\n taskElement.style.height = position.height + 'px';\r\n //taskElement.style.minWidth = hourWidth / 2 + 'px';//set min width to 30 min\r\n if (task.id < 1) {\r\n taskElement.style.zIndex = 10;\r\n taskElement.style.border = '1px solid #000';\r\n } else\r\n taskElement.style.zIndex = 10;\r\n\r\n taskElement.setAttribute('data-x', position.x);\r\n taskElement.setAttribute('data-y', (position.y));\r\n } catch (ex) {\r\n throw ex;\r\n }\r\n\r\n return taskElement;\r\n };\r\n\r\n /**\r\n * Init drag and drop for task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n workingDays.initTask = function (task) {\r\n var taskElement = setPositionForTask(task);\r\n\r\n task.warningInfo = '';\r\n interact(taskElement).resizable({\r\n preserveAspectRatio: false,\r\n edges: {\r\n left: canResizeToLeft(task),\r\n right: canResizeToRight(task),\r\n bottom: false,\r\n top: false\r\n },\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n invert: 'none' //don't allow to resize less than half a hour\r\n }).draggable({\r\n snap: {\r\n targets: [interact.createSnapGrid({ x: (hourWidth / 2), y: ResourcePlannerService.USER_HEIGHT })]\r\n },\r\n autoScroll: true,\r\n enabled: canDrag(task)\r\n })\r\n .on('resizemove', onResizeMove)\r\n .on('resizeend', onEndEvent)\r\n .on('resizestart', onStartEvent)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onEndEvent)\r\n .on('dragstart', onStartEvent);\r\n };\r\n\r\n workingDays.getTaskInfo = function (task) {\r\n return ResourcePlannerService.getTaskInfo(task, sessionInformationService.getUser());\r\n };\r\n\r\n workingDays.onMouseOver = function (event, task) {\r\n workingDays.overlayedTasksInfo = ResourcePlannerService.getPopupInfo(event, task, sessionInformationService.getUser());\r\n };\r\n\r\n /**\r\n * Function that handles on finish render event\r\n * @param {} task \r\n * @param {} user \r\n * @returns {} \r\n */\r\n workingDays.finishedRender = function (task, user) {\r\n $timeout(function () {\r\n //get the last task;\r\n var lastTask = {};\r\n for (var i = workingDays.resourcePlanner.users.length - 1; i >= 0; i--) {\r\n if (workingDays.resourcePlanner.users[i].Tasks && workingDays.resourcePlanner.users[i].Tasks.length > 0) {\r\n lastTask = workingDays.resourcePlanner.users[i].Tasks[workingDays.resourcePlanner.users[i].Tasks.length - 1];\r\n break;\r\n }\r\n }\r\n if (lastTask.id == task.id) {\r\n for (var i = 0; i < workingDays.resourcePlanner.users.length; i++) {\r\n var userLooped = workingDays.resourcePlanner.users[i];\r\n if (userLooped.Tasks && userLooped.Tasks.length > 0) {\r\n for (var j = 0; j < userLooped.Tasks.length; j++)\r\n workingDays.initTask(userLooped.Tasks[j]);\r\n }\r\n }\r\n }\r\n //timeout so that everyting loads up nicely\r\n $timeout(function () {\r\n workingDays.resourcePlanner.loading = false;\r\n if (!user.Collapsed)\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n }, 200);\r\n });\r\n };\r\n\r\n /**\r\n * Get the opacity of the task\r\n * @param {} task \r\n * @returns {} \r\n */\r\n workingDays.getOpacityValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1';\r\n\r\n if (task.Table == 'GOT_USER' && task.PendingResponse)\r\n return '0.2';\r\n\r\n if (task.Execution && task.Execution.InitiatedProcessList && task.Execution.InitiatedProcessList.Status && task.Execution.InitiatedProcessList.Status.ProgId == 'DONE')\r\n return '0.3';\r\n\r\n return '0.5';\r\n };\r\n\r\n workingDays.getBorderValue = function (task) {\r\n if (task.currentOrder || task.id < 1)\r\n return '1px solid black';\r\n\r\n return 'none';\r\n }\r\n\r\n /**\r\n * Get the color of the task\r\n * If the task does not have any color provide a default value\r\n * @param {} task \r\n * @returns {} \r\n */\r\n workingDays.getBackgroundColor = function (task) {\r\n //if (task.currentOrder)\r\n // return '#000';\r\n\r\n if (task.ColorSetting && task.ColorSetting.Name)\r\n return task.ColorSetting.Name;\r\n\r\n return 'rgb(0, 114, 188)';\r\n };\r\n \r\n /**\r\n * Function that handles double click event on a given task\r\n * @param {} event \r\n * @param {} task \r\n * @returns {} \r\n */\r\n workingDays.onDoubleClick = function (event, task) {\r\n if (task.Parent && task.Parent.id) {\r\n workingDays.resourcePlanner.getTaskById(task.Parent.id)\r\n .then(function (result) {\r\n task.ForeignKey = result.ForeignKey;\r\n task.StartDate = result.StartDate;\r\n task.EndDate = result.EndDate;\r\n workingDays.resourcePlanner.toggleTaskDetailsPanel(task);\r\n });\r\n } else\r\n workingDays.resourcePlanner.toggleTaskDetailsPanel(task);\r\n };\r\n\r\n function cancelCurrentDateInterval() {\r\n $interval.cancel(currentDatePromise);\r\n currentDatePromise = null;\r\n };\r\n\r\n function getContextMenuForTask(task) {\r\n\r\n // if the task it's not interactable, no context menu is shown\r\n if (!TaskListService.isTaskInteractable(task)) {\r\n return [];\r\n }\r\n\r\n return workingDays.resourcePlanner.taskContextOptions;\r\n }\r\n\r\n workingDays.$onDestroy = function () {\r\n cancelCurrentDateInterval();\r\n interact('.rp-hour-task').unset();\r\n oldHourLineElement = null;\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerOrderListController.$inject = [\r\n '$timeout',\r\n 'ParticipantResourcePlannerPanelService',\r\n '$filter',\r\n 'DateUtilService',\r\n '$document',\r\n '$scope',\r\n 'errorService',\r\n 'ResourcePlannerService',\r\n '_'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerOrderListController', ResourcePlannerOrderListController)\r\n .directive('participantResourcePlannerOrderList', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ResourcePlannerOrderListController as orderList',\r\n templateUrl: 'Scripts/order/resourcePlanner/resourcePlannerPanel/resourcePlannerOrderList.html',\r\n bindToController: true,\r\n scope: {\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n function ResourcePlannerOrderListController(\r\n $timeout,\r\n ParticipantResourcePlannerPanelService,\r\n $filter,\r\n DateUtilService,\r\n $document,\r\n $scope,\r\n errorService,\r\n ResourcePlannerService,\r\n _\r\n ) {\r\n var orderList = this;\r\n orderList.orders = [];\r\n var panelBodyElement = null, lastX = null, lastY = null;\r\n\r\n /**\r\n * Function that handles the drag start event\r\n * @param event\r\n */\r\n function onDragStart(event) {\r\n lastX = event.target.getAttribute('data-x') || 0;\r\n lastY = event.target.getAttribute('data-y') || 0;\r\n angular.element(event.target).css('z-index', '900');\r\n };\r\n\r\n /**\r\n * Function that handles the drag move event\r\n * @param event\r\n */\r\n function onDragMove(event) {\r\n var element = angular.element(event.target);\r\n var target = event.target;\r\n var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;\r\n var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;\r\n\r\n // translate the element\r\n element.css('transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-webkit-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-moz-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-ms-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n element.css('-o-transform', 'translate(' + x + 'px, ' + y + 'px)');\r\n\r\n // update the position attributes\r\n target.setAttribute('data-x', x);\r\n target.setAttribute('data-y', y);\r\n };\r\n\r\n /**\r\n * Function that handles the drag end event\r\n * @param event\r\n */\r\n function onDragEnd(event) {\r\n var element = angular.element(event.target);\r\n element.removeAttr('data-x');\r\n element.removeAttr('data-y');\r\n\r\n element.css('transform', '');\r\n element.css('-webkit-transform', '');\r\n element.css('-moz-transform', '');\r\n element.css('-ms-transform', '');\r\n element.css('-o-transform', '');\r\n element.css('position', '');\r\n\r\n lastX = null;\r\n lastY = null;\r\n\r\n document.body.removeChild(event.target);\r\n };\r\n\r\n /**\r\n * When the users clicks the order, the participants are checked to see if the user is already assigned\r\n * If the user isn't assigned the order is marked\r\n * @param order\r\n */\r\n orderList.onOrderClick = function (order) {\r\n if (!orderList.resourcePlanner.selectOrdersForTimeline)\r\n return;\r\n\r\n order.selected = !order.selected;\r\n\r\n //if (order.selected) {\r\n // //check if the user is already assigned to this order\r\n // orderList.resourcePlanner.isUserAssignedToOrder(orderList.resourcePlanner.timelinedTask.User.id, order.id)\r\n // .then(function (result) {\r\n // if (result.id) {\r\n // errorService.changeError($filter('translate')(\"errUserAlreadyAssigned\"));\r\n // order.selected = false;\r\n // return;\r\n // }\r\n // });\r\n //}\r\n };\r\n\r\n /**\r\n * Checks whether the save button is disabled\r\n * @returns\r\n */\r\n orderList.isSaveSelectedOrdersDisabled = function () {\r\n if ($filter('filter')(orderList.orders, function (o) { return o.selected }).length == 0)\r\n return true;\r\n return false;\r\n };\r\n\r\n /**\r\n * Creates a list of tasks based on the selected orders\r\n */\r\n orderList.saveSelectedOrders = function () {\r\n var selectedOrders = $filter('filter')(orderList.orders, function (o) { return o.selected });\r\n\r\n if (!selectedOrders || selectedOrders.length == 0)\r\n return;\r\n\r\n orderList.resourcePlanner.timelinedTask.id = null;\r\n var tasksToCreate = [];\r\n for (var i = 0; i < selectedOrders.length; i++) {\r\n var taskToCreate = angular.copy(orderList.resourcePlanner.timelinedTask);\r\n taskToCreate.ForeignKey = selectedOrders[i].id;\r\n tasksToCreate.push(taskToCreate);\r\n }\r\n\r\n orderList.resourcePlanner.assignUser(tasksToCreate)\r\n .then(function (tasks) {\r\n //processDatesForOrder(tasks);\r\n orderList.close(true);\r\n\r\n for (var i = 0; i < orderList.orders.length; i++)\r\n orderList.orders[i].selected = undefined;\r\n\r\n orderList.resourcePlanner.processDatesForOrder(tasks);\r\n orderList.resourcePlanner.getTasksForSelectedUsers();\r\n });\r\n };\r\n\r\n /**\r\n * Init drag and drop for orders\r\n * Orders are in a scrollable list so they need to be copied to body without losing the scope\r\n */\r\n function initOrderElements() {\r\n interact('.resource-planner-order-list')\r\n .draggable({\r\n autoScroll: true,\r\n enabled: true,\r\n manualStart: true\r\n })\r\n .on('dragstart', onDragStart)\r\n .on('dragmove', onDragMove)\r\n .on('dragend', onDragEnd)\r\n .on('move', function (event) {\r\n var interaction = event.interaction;\r\n if (interaction.pointerIsDown && !interaction.interacting()) {\r\n var original = event.currentTarget,\r\n clone = event.currentTarget.cloneNode(true),\r\n xCoordinate = event.pageX, yCoordinate = event.pageY,\r\n elementWidth = window.getComputedStyle(original, null).getPropertyValue('width').split('px')[0],\r\n elementHeight = window.getComputedStyle(original, null).getPropertyValue('height').split('px')[0];\r\n\r\n clone.style.left = (xCoordinate - elementWidth / 2) + 'px';\r\n clone.style.top = (yCoordinate - elementHeight / 2) + 'px';\r\n clone.style.position = 'absolute';\r\n clone.style.width = window.getComputedStyle(original, null).getPropertyValue('width');\r\n\r\n //keep track of the order that is dragged\r\n ResourcePlannerService.resourcePlannerOrderDragged = angular.element(original).scope().order;\r\n\r\n document.body.appendChild(clone);\r\n\r\n // start a drag interaction targeting the clone\r\n interaction.start({ name: 'drag' },\r\n event.interactable,\r\n clone);\r\n }\r\n });\r\n\r\n panelBodyElement = angular.element('.resource-planner-panel-body');\r\n panelBodyElement.css('overflow', 'auto');\r\n\r\n //init dropzone\r\n interact('.resource-planner-panel-body')\r\n .dropzone({\r\n accept: '.resource-planner-order-list',\r\n overlap: 0.5\r\n\r\n });\r\n };\r\n\r\n function init() {\r\n\r\n orderList.orders = orderList.resourcePlanner.getOrderList();\r\n\r\n // if the order list is not empty filter it by keeping only the active ones\r\n orderList.orders = _.filter(orderList.orders, function (order) { return order.Active; });\r\n\r\n if (!orderList.resourcePlanner.selectOrdersForTimeline)\r\n //wait for $digest\r\n $timeout(initOrderElements);\r\n };\r\n\r\n /**\r\n * Closes the order side pannel\r\n * @param fromSave\r\n */\r\n orderList.close = function (fromSave) {\r\n if (orderList.resourcePlanner.selectOrdersForTimeline) {\r\n var user = $filter('filter')(orderList.resourcePlanner.users, function (user) { return user.id == orderList.resourcePlanner.timelinedTask.User.id })[0];\r\n if (user) {\r\n if (user.Tasks && user.Tasks.length > 0)\r\n user.Tasks.removeIf(function (task) {\r\n return task.id < 1;\r\n });\r\n if (!user.Collapsed)\r\n ResourcePlannerService.recalculateCollapsedTasks([user]);\r\n //uncheck the user\r\n if (!fromSave) {\r\n //if the user is assigned to one of these orders\r\n //TODO: make request on server and check if user is assigned to the order\r\n if (user.Tasks &&\r\n _.intersectionWith(user.Tasks, orderList.orders,\r\n function (first, second) {\r\n return first.ForeignKey == second.id;\r\n }).length > 0)\r\n user.IsAssignedToOrder = true;\r\n else\r\n user.IsAssignedToOrder = false;\r\n }\r\n //check if the participant was added on main order\r\n var participant = _.find(orderList.resourcePlanner.getParticipantsForCurrentOrder(),\r\n function (p) { return p.User.id == orderList.resourcePlanner.timelinedTask.User.id });\r\n\r\n if (!!participant) {\r\n //get selected orders\r\n var selectedOrders = _.filter(orderList.orders, function (o) { return o.selected });\r\n //if the main is present in the selected orders\r\n if (_.some(selectedOrders, function (o) { return !o.ParentId }))\r\n //set the participant active = true\r\n participant.Active = true;\r\n else\r\n //set the participant active = false\r\n participant.Active = false;\r\n }\r\n orderList.resourcePlanner.createActionTimeline = false;\r\n }\r\n }\r\n\r\n\r\n\r\n ParticipantResourcePlannerPanelService.close();\r\n $timeout(function () {\r\n orderList.resourcePlanner.orderListPanel = false;\r\n }, 500);\r\n };\r\n\r\n /**\r\n * Returns either the order external id or id\r\n * @param order\r\n * @returns\r\n */\r\n orderList.getOrderId = function (order) {\r\n if (!order)\r\n return '';\r\n if (!order.id)\r\n return $filter('translate')('NEW');\r\n if (order.OrderNumber)\r\n return 'Ext. ID ' + order.OrderNumber;\r\n return 'ID ' + order.id;\r\n };\r\n\r\n /**\r\n * Returns the customer full name\r\n * @returns\r\n */\r\n orderList.getCustomerName = function () {\r\n var order = orderList.orders[0];\r\n\r\n if (!order)\r\n return ' - ';\r\n\r\n if (!order.Customer || !order.Customer.id)\r\n return ' - ';\r\n var nameToReturn = '';\r\n if (order.Customer.FirstName) {\r\n nameToReturn += order.Customer.FirstName;\r\n if (order.Customer.LastName)\r\n nameToReturn += ' ' + order.Customer.LastName;\r\n } else if (order.Customer.LastName)\r\n nameToReturn += order.Customer.LastName;\r\n return nameToReturn;\r\n };\r\n\r\n /**\r\n * Returns the order color\r\n * @returns\r\n */\r\n orderList.getOrderColor = function () {\r\n var order = orderList.orders[0];\r\n\r\n\r\n if (!order || !order.OrderType || !order.OrderType.id || order.selected)\r\n return '#0072bc';\r\n\r\n return $filter('filter')(orderList.resourcePlanner.colors, function (color) {\r\n return order.OrderType.id == color.ForeignKey;\r\n })[0].Name;\r\n };\r\n\r\n /**\r\n * Returns the order process list\r\n * @param order\r\n * @returns\r\n */\r\n orderList.getProcessList = function (order) {\r\n if (!order)\r\n return '-';\r\n\r\n if (!order.ProcessList || !order.ProcessList.id)\r\n return '-';\r\n\r\n return order.ProcessList.Name;\r\n };\r\n\r\n /**\r\n * Checks whether the order has start and end date\r\n * @param order\r\n * @returns\r\n */\r\n orderList.hasStartAndEndDate = function (order) {\r\n if (!order)\r\n return false;\r\n\r\n if (order.StartDate && order.EndDate)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Gets the start date\r\n * @param order\r\n * @returns\r\n */\r\n orderList.getStartDate = function (order) {\r\n if (!order.StartDate)\r\n return '';\r\n\r\n return $filter('date')(order.StartDate, 'dd-MM-yyyy HH:mm');\r\n };\r\n\r\n /**\r\n * Gets the end date\r\n * @param order\r\n * @returns\r\n */\r\n orderList.getEndDate = function (order) {\r\n if (!order.EndDate)\r\n return '';\r\n\r\n return $filter('date')(order.EndDate, 'dd-MM-yyyy HH:mm');\r\n };\r\n\r\n $scope.$on('$destroy', function () {\r\n interact('.resource-planner-order-list').unset();\r\n interact('.resource-planner-panel-body').unset();\r\n orderList.resourcePlanner.timelinedTask = null;\r\n orderList.resourcePlanner.selectOrdersForTimeline = false;\r\n });\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerPanelController.$inject = [\r\n 'ParticipantResourcePlannerPanelService',\r\n '$timeout',\r\n '$scope'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerPanelController', ResourcePlannerPanelController)\r\n .directive('participantResourcePlannerPanel', function () {\r\n return {\r\n restrict: 'E',\r\n transclude: true,\r\n controller: 'ResourcePlannerPanelController as panel',\r\n bindToContoller: true,\r\n template: '
\\\r\n \\\r\n
',\r\n link: function (scope, element, attrs, ctrl) {\r\n scope.panel.element = element[0];\r\n }\r\n }\r\n });\r\n\r\n function ResourcePlannerPanelController(\r\n ParticipantResourcePlannerPanelService,\r\n $timeout,\r\n $scope\r\n ) {\r\n var panel = this;\r\n\r\n\r\n /**\r\n * Watch for the pannel state\r\n * When closed set the right to -500px TODO: set this as constant\r\n * When opened set 0px\r\n */\r\n function init() {\r\n $scope.$watch(function () {\r\n return ParticipantResourcePlannerPanelService.getCurrentState();\r\n }, function (result) {\r\n if (result == ParticipantResourcePlannerPanelService.getStates().OPEN) {\r\n panel.element.style.right = '0px';\r\n } else {\r\n panel.element.style.right = '-500px';\r\n }\r\n }, false);\r\n };\r\n\r\n $timeout(init);\r\n\r\n $scope.$on('$destroy', function () {\r\n ParticipantResourcePlannerPanelService.close();\r\n panel.element.style.right = '-500px';\r\n });\r\n\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular.module('resourcePlanner')\r\n .service('ParticipantResourcePlannerPanelService', ParticipantResourcePlannerPanelService);\r\n\r\n /**\r\n * Service used to keep track of the resource planner side pannel state\r\n */\r\n function ParticipantResourcePlannerPanelService() {\r\n var states = { OPEN: { value: 0 }, CLOSED: { value: 1 } };\r\n var currentState = states.CLOSED;\r\n\r\n this.open = function () {\r\n currentState = states.OPEN;\r\n };\r\n\r\n this.close = function () {\r\n currentState = states.CLOSED;\r\n };\r\n\r\n this.getCurrentState = function () {\r\n return currentState;\r\n };\r\n\r\n this.getStates = function () {\r\n return states;\r\n }\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ResourcePlannerUserListController.$inject = [\r\n '$timeout',\r\n 'ParticipantResourcePlannerPanelService',\r\n '$filter'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .controller('ResourcePlannerUserListController', ResourcePlannerUserListController)\r\n .directive('participantResourcePlannerUserList', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ResourcePlannerUserListController as userList',\r\n templateUrl: 'Scripts/order/resourcePlanner/resourcePlannerPanel/resourcePlannerUserList.html',\r\n bindToController: true,\r\n scope: {\r\n resourcePlanner: '='\r\n }\r\n }\r\n });\r\n\r\n function ResourcePlannerUserListController(\r\n $timeout,\r\n ParticipantResourcePlannerPanelService,\r\n $filter\r\n ) {\r\n var userList = this;\r\n userList.participantSearch = '';\r\n userList.users = [];\r\n\r\n /**\r\n * Gets the full name of the user\r\n * @param user\r\n * @returns\r\n */\r\n userList.getFullName = function (user) {\r\n return (user.FirstName ? user.FirstName.trim() + ' ' : '') + (user.LastName ? user.LastName.trim() : '');\r\n };\r\n\r\n /**\r\n * Adds the user as participant\r\n * @param user\r\n */\r\n userList.addUser = function (user) {\r\n userList.resourcePlanner.addUserAsParticipant(user);\r\n userList.participantSearch = '';\r\n userList.users = userList.resourcePlanner.allUsers;\r\n };\r\n\r\n /**\r\n * Filters the user list based on the search criteria\r\n */\r\n userList.onParticipantSearchChange = function () {\r\n userList.users = userList.resourcePlanner.allUsers;\r\n if (!userList.participantSearch)\r\n return;\r\n else\r\n userList.users = $filter('participantSearch')(userList.users, userList.participantSearch);\r\n };\r\n\r\n /**\r\n * Closes the side pannel\r\n */\r\n userList.close = function () {\r\n ParticipantResourcePlannerPanelService.close();\r\n $timeout(function () {\r\n userList.resourcePlanner.userListPanel = false;\r\n }, 500);\r\n };\r\n\r\n $timeout(function () {\r\n userList.users = userList.resourcePlanner.allUsers;\r\n });\r\n };\r\n\r\n})();\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n participantSearch.$inject = [\r\n '$filter'\r\n ];\r\n\r\n angular.module('resourcePlanner')\r\n .filter('participantSearch', participantSearch);\r\n\r\n /**\r\n * Filter used for searching in a list of users\r\n * @param $filter\r\n */\r\n function participantSearch($filter) {\r\n return function (input, searchText) {\r\n var returnArray = [];\r\n var searchTextSplit = searchText.toLowerCase().split(' ');\r\n\r\n for (var i = 0; i < input.length; i++) {\r\n var count = 0,\r\n firstName = input[i].FirstName ? input[i].FirstName.toLowerCase() : '',\r\n lastName = input[i].LastName ? input[i].LastName.toLowerCase() : '';\r\n for (var j = 0; j < searchTextSplit.length; j++) {\r\n if (firstName.indexOf(searchTextSplit[j]) !== -1 ||\r\n lastName.indexOf(searchTextSplit[j]) !== -1)\r\n count++;\r\n }\r\n if (count == searchTextSplit.length) {\r\n returnArray.push(input[i]);\r\n }\r\n }\r\n return returnArray;\r\n };\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n notificationSettingsService.$inject = [\r\n '_',\r\n 'TableResources'\r\n ];\r\n\r\n function notificationSettingsService(\r\n _,\r\n TableResources\r\n ) {\r\n\r\n function addNotificationSettingIfNotExists(notificationSetting, mandatoryNotificationTypes) {\r\n\r\n if (_.isNil(notificationSetting) || _.isNil(mandatoryNotificationTypes)) {\r\n return;\r\n }\r\n\r\n // check if the setting exists in the list by searching its index\r\n var index = _.findIndex(mandatoryNotificationTypes, function(item) {\r\n return item.Table === notificationSetting.Table;\r\n });\r\n\r\n // if the index = -1 means the setting doesn't exist\r\n if (index === -1) {\r\n mandatoryNotificationTypes.push(notificationSetting);\r\n } else {\r\n // otherwise we replace the existent value\r\n mandatoryNotificationTypes[index] = notificationSetting;\r\n }\r\n }\r\n\r\n function findMandatoryNotificationTypeObjectByTable(table, mandatoryNotificationTypes) {\r\n\r\n return _.find(mandatoryNotificationTypes,\r\n function (item) {\r\n return item.Table === table;\r\n });\r\n }\r\n\r\n function splitMandatoryNotificationTypes(mandatoryNotificationTypes) {\r\n\r\n var mandatoryNotificationTypesPerTable = {\r\n orderNotificationTypes: [],\r\n managementProcessListNotificationTypes: [],\r\n deviationNotificationTypes: [],\r\n processListNotificationTypes: [],\r\n qualityHandbookNotificationTypes: [],\r\n courseNotificationTypes: [],\r\n competenceNotificationTypes: []\r\n };\r\n\r\n if (_.isNil(mandatoryNotificationTypes) || _.isEmpty(mandatoryNotificationTypes)) {\r\n return mandatoryNotificationTypesPerTable;\r\n }\r\n\r\n // get the notification types for order\r\n var notificationTypesForOrder\r\n = findMandatoryNotificationTypeObjectByTable(TableResources.OrderTable, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForOrder)\r\n mandatoryNotificationTypesPerTable.orderNotificationTypes = notificationTypesForOrder.NotificationTypes;\r\n\r\n // get the notification types for management process list\r\n var notificationTypesForManagementProcessList\r\n = findMandatoryNotificationTypeObjectByTable(TableResources.ProcessListManagement, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForManagementProcessList)\r\n mandatoryNotificationTypesPerTable.managementProcessListNotificationTypes =\r\n notificationTypesForManagementProcessList.NotificationTypes;\r\n\r\n // get notification types for deviation\r\n var notificationTypesForDeviation\r\n = findMandatoryNotificationTypeObjectByTable(TableResources.DeviationTable, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForDeviation)\r\n mandatoryNotificationTypesPerTable.deviationNotificationTypes =\r\n notificationTypesForDeviation.NotificationTypes;\r\n\r\n // get notification types for process list\r\n var notificationTypesForProcessList =\r\n findMandatoryNotificationTypeObjectByTable(TableResources.ProcessListTable, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForProcessList)\r\n mandatoryNotificationTypesPerTable.processListNotificationTypes =\r\n notificationTypesForProcessList.NotificationTypes;\r\n\r\n // get notification types for quality handbook\r\n var notificationTypesForQualityHandbook =\r\n findMandatoryNotificationTypeObjectByTable(TableResources.QualityHandbookTable, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForQualityHandbook)\r\n mandatoryNotificationTypesPerTable.qualityHandbookNotificationTypes =\r\n notificationTypesForQualityHandbook.NotificationTypes;\r\n\r\n // get notification types for course\r\n var notificationTypesForCourse =\r\n findMandatoryNotificationTypeObjectByTable(TableResources.CourseTable, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForCourse)\r\n mandatoryNotificationTypesPerTable.courseNotificationTypes =\r\n notificationTypesForCourse.NotificationTypes;\r\n\r\n // get notification types for competence\r\n var notificationTypesForCompetence =\r\n findMandatoryNotificationTypeObjectByTable(TableResources.CompetenceTable, mandatoryNotificationTypes);\r\n\r\n if (notificationTypesForCompetence)\r\n mandatoryNotificationTypesPerTable.competenceNotificationTypes =\r\n notificationTypesForCompetence.NotificationTypes;\r\n\r\n return mandatoryNotificationTypesPerTable;\r\n }\r\n\r\n return {\r\n addNotificationSettingIfNotExists: addNotificationSettingIfNotExists,\r\n splitMandatoryNotificationTypes: splitMandatoryNotificationTypes\r\n };\r\n }\r\n\r\n angular\r\n .module('organization')\r\n .service('NotificationSettingsService', notificationSettingsService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationNotificationSettingsTab',\r\n {\r\n templateUrl: 'Scripts/organization/settings/organization-notification-settings-tab/organization-notification-settings-tab.component.html',\r\n controller: 'OrganizationNotificationSettingsTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organization: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n organizationNotificationSettingsTabController.$inject = [\r\n 'NotificationSettingsService',\r\n 'sessionInformationService',\r\n 'notificationSettingsTabSet'\r\n ];\r\n\r\n function organizationNotificationSettingsTabController(\r\n NotificationSettingsService,\r\n sessionInformationService,\r\n notificationSettingsTabSet\r\n ) {\r\n\r\n var vm = this;\r\n var _activeTab = notificationSettingsTabSet.orderTab;\r\n\r\n Object.defineProperties(vm,\r\n {\r\n activeTab: {\r\n get: function() {\r\n return _activeTab;\r\n }\r\n },\r\n orderTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.orderTab;\r\n }\r\n },\r\n managementProcessListTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.managementProcessListTab;\r\n }\r\n },\r\n deviationTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.deviationTab;\r\n }\r\n },\r\n processListTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.processListTab;\r\n }\r\n },\r\n qualityHandbookTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.qualityHandbookTab;\r\n }\r\n },\r\n courseTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.courseTab;\r\n }\r\n },\r\n competenceTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.competenceTab;\r\n }\r\n }\r\n });\r\n\r\n // controller API\r\n vm.mandatoryNotificationTypesPerTable = {};\r\n\r\n vm.$onInit = onInit;\r\n vm.onNotificationSettingChange = onNotificationSettingChange;\r\n vm.isLoggedUserOrganization = isLoggedUserOrganization;\r\n vm.selectTab = selectTab;\r\n\r\n function onInit() {\r\n\r\n vm.mandatoryNotificationTypesPerTable\r\n = NotificationSettingsService.splitMandatoryNotificationTypes(vm.organization.MandatoryNotificationTypesList);\r\n }\r\n\r\n function onNotificationSettingChange(notificationSetting) {\r\n\r\n NotificationSettingsService\r\n .addNotificationSettingIfNotExists(notificationSetting, vm.organization.MandatoryNotificationTypesList);\r\n }\r\n\r\n function isLoggedUserOrganization() {\r\n return sessionInformationService.isLoggedUserOrganization(vm.organization.id);\r\n }\r\n\r\n function selectTab(tab) {\r\n _activeTab = tab;\r\n }\r\n }\r\n\r\n angular\r\n .module('organization')\r\n .controller('OrganizationNotificationSettingsTabController', organizationNotificationSettingsTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbCompanySettings',\r\n {\r\n templateUrl: 'Scripts/organization/settings/company-settings/company-settings.component.html',\r\n controller: 'CompanySettingsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organization: '<'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n companySettingsController.$inject = [\r\n 'sessionInformationService',\r\n 'dialogService',\r\n '$filter',\r\n 'OrganizationSettingFactory',\r\n '$uibModal',\r\n 'AttachmentFactory'\r\n ];\r\n\r\n function companySettingsController(\r\n sessionInformationService,\r\n dialogService,\r\n $filter,\r\n OrganizationSettingFactory,\r\n $uibModal,\r\n AttachmentFactory\r\n ) {\r\n\r\n var vm = this;\r\n vm.reportLogos = [];\r\n\r\n vm.$onInit = onInit;\r\n vm.isLoggedUserOrganization = isLoggedUserOrganization;\r\n vm.initSalaryPeriodIntervalDates = initSalaryPeriodIntervalDates;\r\n vm.onSalaryPeriodFromChange = onSalaryPeriodFromChange;\r\n vm.onSalaryPeriodToChange = onSalaryPeriodToChange;\r\n vm.onIsCentralAllowedToViewChange = onIsCentralAllowedToViewChange;\r\n vm.onAllowImpersonateChange = onAllowImpersonateChange;\r\n vm.isLoggedUserFromCentral = isLoggedUserFromCentral;\r\n vm.onOrganizationSettingsTypeChange = onOrganizationSettingsTypeChange;\r\n vm.addReportLogo = addReportLogo;\r\n vm.setReportLogo = setReportLogo;\r\n\r\n function onInit() {\r\n\r\n initSalaryPeriodIntervalDates();\r\n getAttachments();\r\n }\r\n\r\n function formatSalaryDates(settings) {\r\n settings.SalaryPeriodFrom = $filter('date')(settings.SalaryPeriodFrom, 'dd-MM-yyyy');\r\n settings.SalaryPeriodTo = $filter('date')(settings.SalaryPeriodTo, 'dd-MM-yyyy');\r\n }\r\n\r\n function isLoggedUserOrganization() {\r\n\r\n return sessionInformationService.isLoggedUserOrganization(vm.organization.id);\r\n }\r\n\r\n /**\r\n * Inits salary period setting dates if the 'Use salary period' setting is set\r\n * and if they aren't set to a value \r\n */\r\n function initSalaryPeriodIntervalDates() {\r\n\r\n if (vm.organization.Settings.UseSalaryPeriod) {\r\n\r\n if (!vm.organization.Settings.SalaryPeriodFrom)\r\n vm.organization.Settings.SalaryPeriodFrom = moment().toDate();\r\n\r\n if (!vm.organization.Settings.SalaryPeriodTo)\r\n vm.organization.Settings.SalaryPeriodTo = moment().add(1, 'months').toDate();\r\n\r\n // format dates to string because on some browsers \r\n // the date won't be displayed in the datepicker\r\n // formatSalaryDates(vm.organization.Settings);\r\n\r\n } else {\r\n vm.organization.Settings.SalaryPeriodFrom = null;\r\n vm.organization.Settings.SalaryPeriodTo = null;\r\n }\r\n\r\n }\r\n\r\n function onSalaryPeriodFromChange() {\r\n\r\n // when the user changes 'Salary period from' we\r\n // set 'Salary period to' to the previous day next month\r\n vm.organization.Settings.SalaryPeriodTo = moment(vm.organization.Settings.SalaryPeriodFrom).add(1, 'months')\r\n .subtract(1, 'days').toDate();\r\n }\r\n\r\n function onSalaryPeriodToChange() {\r\n\r\n // when the user changes 'Salary period to' we\r\n // set 'Salary period from' to the next day previous month\r\n vm.organization.Settings.SalaryPeriodFrom = moment(vm.organization.Settings.SalaryPeriodTo).subtract(1, 'months')\r\n .add(1, 'days').toDate();\r\n }\r\n\r\n /**\r\n * Triggered when the user changes the allow central to view setting\r\n */\r\n function onIsCentralAllowedToViewChange() {\r\n\r\n if (!vm.organization) {\r\n return;\r\n }\r\n\r\n if (!vm.organization.Settings) {\r\n return;\r\n }\r\n\r\n if (!vm.organization.Settings.IsCentralAllowedToView)\r\n alertUserForSupport()\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n vm.organization.Settings.IsCentralAllowedToView = true;\r\n });\r\n }\r\n\r\n /**\r\n * Triggered when the user changes the impersonate setting\r\n */\r\n function onAllowImpersonateChange() {\r\n\r\n if (!vm.organization) {\r\n return;\r\n }\r\n\r\n if (!vm.organization.Settings) {\r\n return;\r\n }\r\n\r\n if (!vm.organization.Settings.AllowImpersonate)\r\n alertUserForSupport()\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n vm.organization.Settings.AllowImpersonate = true;\r\n });\r\n }\r\n\r\n /**\r\n * Displays a confirm dialog for the user to confirm if he wants to accept the change\r\n */\r\n function alertUserForSupport() {\r\n return dialogService\r\n .showConfirmDialog('ORGANIZATION_MODEL.ORGANIZATION_SETTING_WARNING', 'ORGANIZATION_MODEL.ORGANIZATION_SETTING_SUPPORT_HARD');\r\n }\r\n\r\n function isLoggedUserFromCentral() {\r\n return sessionInformationService.isLoggedUserAdminFromCentral();\r\n }\r\n\r\n function onOrganizationSettingsTypeChange() {\r\n if (!vm.organization.id)\r\n return;\r\n\r\n OrganizationSettingFactory\r\n .saveOrganizationSettingTypes(\r\n vm.organization.Settings.IsVBOrganization,\r\n vm.organization.Settings.IsVBCustomer,\r\n vm.organization.id\r\n );\r\n }\r\n\r\n function addReportLogo() {\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (!loggedUser.Organization.Central)\r\n return;\r\n\r\n var modalRef = $uibModal.open({\r\n component: 'vbReportLogoUpload',\r\n size: 'x-lg',\r\n keyboard: false,\r\n backdrop: 'static',\r\n resolve: {\r\n foreignKey: function () { return loggedUser.Organization.id; },\r\n table: function () { return 'GOT_REPORT_LOGO'; }\r\n }\r\n });\r\n\r\n modalRef.result.then(function () {\r\n getAttachments();\r\n });\r\n }\r\n\r\n function setReportLogo(logo) {\r\n vm.organization.Settings.ReportLogo = logo;\r\n }\r\n\r\n function getAttachments() {\r\n var loggedUser = sessionInformationService.getUser();\r\n\r\n if (!loggedUser.Organization.Central)\r\n return;\r\n\r\n return AttachmentFactory.getAttachments('GOT_REPORT_LOGO', loggedUser.Organization.id)\r\n .then(function (result) {\r\n vm.reportLogos = result;\r\n });\r\n }\r\n\r\n /**\r\n * Triggered when the user changes automile integration\r\n */\r\n //function onIsAutomileEnabledChange() {\r\n // if (!vm.settings)\r\n // return;\r\n\r\n // if (!vm.settings.IsAutomileEnabled)\r\n // alertUserForSupport()\r\n // .then(function (result) {\r\n // if (result != dialogService.DIALOG_RESULT_OK)\r\n // vm.settings.IsCentralAllowedToView = true;\r\n // });\r\n //};\r\n }\r\n\r\n angular\r\n .module('organization')\r\n .controller('CompanySettingsController', companySettingsController);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbReportLogoUpload', {\r\n templateUrl: 'Scripts/organization/settings/report-logo-upload/report-logo-upload.component.html',\r\n controller: 'ReportLogoUploadController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n foreignKey: '=?',\r\n table: '=?',\r\n resolve: '<',\r\n close: '&',\r\n dismiss: '&'\r\n }\r\n });\r\n}) ();","(function () {\r\n 'use strict';\r\n\r\n ReportLogoUploadController.$inject = [\r\n 'OrderFactory',\r\n '$scope',\r\n 'fileReader',\r\n '$q',\r\n 'AttachmentFactory'\r\n ];\r\n\r\n angular\r\n .module('organization')\r\n .controller('ReportLogoUploadController', ReportLogoUploadController);\r\n\r\n function ReportLogoUploadController(\r\n OrderFactory,\r\n $scope,\r\n fileReader,\r\n $q,\r\n AttachmentFactory\r\n ) {\r\n var vm = this;\r\n vm.foreignKey = null;\r\n vm.table = null;\r\n vm.fileUpload = {\r\n file: null,\r\n name: '',\r\n extension: '',\r\n files: []\r\n };\r\n vm.attachments = [];\r\n\r\n vm.$onInit = function () {\r\n console.log(vm);\r\n vm.foreignKey = vm.resolve.foreignKey;\r\n vm.table = vm.resolve.table;\r\n\r\n getAttachments();\r\n }\r\n\r\n vm.isFileEligible = function () {\r\n if (!vm.fileUpload.files || vm.fileUpload.files.length == 0)\r\n return true;\r\n\r\n for (var i = 0; i < vm.fileUpload.files.length; i++) {\r\n if (!(/(jpg|jpeg|png)$/i).test(vm.fileUpload.files[i].extension))\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n vm.clearFileUpload = function () {\r\n vm.fileUpload = {\r\n file: null,\r\n name: '',\r\n extension: '',\r\n files: []\r\n };\r\n };\r\n\r\n vm.addImage = function () {\r\n if (!vm.isFileEligible())\r\n return;\r\n\r\n if (vm.fileUpload.files.length === 0)\r\n return;\r\n\r\n var attachmentPromises = [];\r\n for (var i = 0; i < vm.fileUpload.files.length; i++) {\r\n //just fetch the base64\r\n attachmentPromises.push(readAttachmentFile(vm.fileUpload.files[i].file));\r\n }\r\n\r\n $q.all(attachmentPromises)\r\n .then(function (result) {\r\n return saveAttachments(result);\r\n }).then(function () {\r\n vm.clearFileUpload();\r\n return getAttachments();\r\n });\r\n }\r\n\r\n function readAttachmentFile(file) {\r\n var attachmentToReturn = OrderFactory.Attachment();\r\n attachmentToReturn.AttachmentName = file.name;\r\n attachmentToReturn.ForeignKey = vm.foreignKey;\r\n attachmentToReturn.Table = vm.table;\r\n\r\n return fileReader.readAsDataUrl(file, $scope)\r\n .then(function (bytes) {\r\n attachmentToReturn.AttachmentBytes = bytes;\r\n return attachmentToReturn;\r\n });\r\n };\r\n\r\n function saveAttachments(attachments) {\r\n var attachmentsSaved = [];\r\n return attachments.reduce(function (promise, value) {\r\n return promise.then(function () {\r\n return AttachmentFactory.addAttachment(value)\r\n .then(function (result) {\r\n attachmentsSaved.push(result);\r\n });\r\n });\r\n }, $q.when()).then(function () {\r\n //free memory\r\n angular.forEach(attachmentsSaved, function (attachment) {\r\n attachment.AttachmentBytes = null;\r\n });\r\n });\r\n };\r\n\r\n function getAttachments() {\r\n return AttachmentFactory.getAttachments(vm.table, vm.foreignKey)\r\n .then(function (result) {\r\n vm.attachments = result;\r\n });\r\n }\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CategoryAddAttachmentController.$inject = [\r\n '$timeout',\r\n 'OrderFactory',\r\n 'fileReader',\r\n 'DownloadService',\r\n '$scope',\r\n '$q',\r\n 'ProjectFactory',\r\n '$filter'\r\n ];\r\n\r\n angular.module('project').controller('CategoryAddAttachmentController', CategoryAddAttachmentController);\r\n\r\n function CategoryAddAttachmentController(\r\n $timeout,\r\n OrderFactory,\r\n fileReader,\r\n DownloadService,\r\n $scope,\r\n $q,\r\n ProjectFactory,\r\n $filter\r\n ) {\r\n var categoryAttachmentCtrl = this;\r\n var fileUpload = {\r\n file: null,\r\n name: '',\r\n extension: '',\r\n files: []\r\n };\r\n\r\n function init() {\r\n categoryAttachmentCtrl.fileUpload = angular.copy(fileUpload);\r\n categoryAttachmentCtrl.selectedCategory = $scope.$parent.selectedCategory;\r\n };\r\n\r\n /**\r\n * The file is read and the base64 is retrieved for it\r\n * @param {*} file \r\n * @param {*} attachment \r\n */\r\n function readFile(file, attachment) {\r\n return fileReader.readAsDataUrl(file, $scope).then(function (result) {\r\n attachment.AttachmentBytes = result;\r\n return attachment;\r\n });\r\n };\r\n\r\n /**\r\n * Function that saves a list of attachments one by one\r\n * Each attachment is saved after the previous attachment has been saved\r\n * @param {} attachments \r\n * @returns {} \r\n */\r\n function saveAttachments(attachments) {\r\n var attachmentsSaved = [];\r\n return attachments.reduce(function (promise, value) {\r\n return promise.then(function () {\r\n return value.$save().then(function (result) {\r\n attachmentsSaved.push(result);\r\n });\r\n });\r\n }, $q.when()).then(function () {\r\n return attachmentsSaved;\r\n });\r\n };\r\n\r\n categoryAttachmentCtrl.getCategoryAttachments = function () {\r\n if (!categoryAttachmentCtrl.selectedCategory)\r\n return [];\r\n\r\n return $filter('filter')(categoryAttachmentCtrl.selectedCategory.CategoryAttachments, function (a) {\r\n return a.Table == 'BOT_CATEGORY';\r\n });\r\n };\r\n\r\n categoryAttachmentCtrl.clearAttachments = function () {\r\n categoryAttachmentCtrl.fileUpload = angular.copy(fileUpload);\r\n };\r\n\r\n categoryAttachmentCtrl.openAttachment = function (attachment) {\r\n DownloadService.download(attachment.URL);\r\n };\r\n\r\n categoryAttachmentCtrl.deleteProjectAttachment = function (attachment, index) {\r\n return OrderFactory.deleteAttachment(attachment).then(function () {\r\n categoryAttachmentCtrl.selectedCategory.CategoryAttachments.splice(index, 1);\r\n });\r\n };\r\n\r\n /**\r\n * Adds the attachments and saves them \r\n */\r\n categoryAttachmentCtrl.addAttachments = function () {\r\n if (!categoryAttachmentCtrl.fileUpload || !categoryAttachmentCtrl.fileUpload.files || categoryAttachmentCtrl.fileUpload.files.length == 0)\r\n return;\r\n\r\n var filePromises = [];\r\n for (var i = 0; i < categoryAttachmentCtrl.fileUpload.files.length; i++) {\r\n var file = categoryAttachmentCtrl.fileUpload.files[i];\r\n var attachment = OrderFactory.Attachment();\r\n\r\n attachment.AttachmentName = file.fileName + '.' + file.extension;\r\n attachment.Table = 'BOT_CATEGORY';\r\n attachment.ForeignKey = categoryAttachmentCtrl.selectedCategory.id;\r\n\r\n filePromises.push(readFile(file.file, attachment));\r\n }\r\n\r\n $q.all(filePromises).then(function (attachments) {\r\n if (!attachments || attachments.length == 0)\r\n return $q.when([]);\r\n\r\n return saveAttachments(attachments);\r\n }).then(function (result) {\r\n if (!categoryAttachmentCtrl.selectedCategory.CategoryAttachments)\r\n categoryAttachmentCtrl.selectedCategory.CategoryAttachments = [];\r\n\r\n Array.prototype.push.apply(categoryAttachmentCtrl.selectedCategory.CategoryAttachments, result);\r\n\r\n categoryAttachmentCtrl.clearAttachments();\r\n });\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectProcessListController.$inject = [\r\n 'sessionInformationService',\r\n 'ExecutionFactory',\r\n '$scope',\r\n '$timeout',\r\n 'ProcessListFactory',\r\n '$location',\r\n 'ProjectFactory',\r\n '$q',\r\n 'UserFactory',\r\n '$filter',\r\n '$uibModal',\r\n '$route',\r\n 'ExecutionService',\r\n '$anchorScroll'\r\n ];\r\n\r\n angular.module('project')\r\n .directive('projectProcessList', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProjectProcessListController as processListCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/project/projectManagement/projectProcessList/projectProcessListPartial.html',\r\n scope: {\r\n execution: '=',\r\n removeProcessList: '&',\r\n startExecution: '&',\r\n projectId: '=',\r\n connectId: '=',\r\n projectObject: '='\r\n }\r\n };\r\n })\r\n .controller('ProjectProcessListController', ProjectProcessListController)\r\n .directive('projectExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ExecutionManagementController',\r\n templateUrl: 'Scripts/execution/executionManagementPartial.html',\r\n scope: {\r\n initiatedProcessListId: '=',\r\n foreignKey: '=',\r\n isProjectPage: '=',\r\n managementObject: '='\r\n }\r\n };\r\n });\r\n\r\n function ProjectProcessListController(\r\n sessionInformationService,\r\n ExecutionFactory,\r\n $scope,\r\n $timeout,\r\n ProcessListFactory,\r\n $location,\r\n ProjectFactory,\r\n $q,\r\n UserFactory,\r\n $filter,\r\n $uibModal,\r\n $route,\r\n ExecutionService,\r\n $anchorScroll\r\n ) {\r\n var processListCtrl = this;\r\n processListCtrl.managementObject = {};\r\n processListCtrl.isExecutionStarted = false;\r\n processListCtrl.users = [];\r\n processListCtrl.participants = [];\r\n\r\n processListCtrl.isProjectPage = true;\r\n processListCtrl.fromExecution = true;\r\n\r\n processListCtrl.$onInit = function () {\r\n initDelegateFunctions();\r\n\r\n init();\r\n };\r\n\r\n function initDelegateFunctions() {\r\n /**\r\n * Set the execution as finished\r\n * @returns {} \r\n */\r\n processListCtrl.managementObject.finishExecution = function () {\r\n return updateExecution();\r\n };\r\n\r\n /**\r\n * Collapses the current list\r\n * @returns {} \r\n */\r\n processListCtrl.managementObject.collapseExecution = function () {\r\n processListCtrl.isExecutionStarted = false;\r\n };\r\n };\r\n\r\n /**\r\n * Function that calls the save for any open execution\r\n * @returns {} \r\n */\r\n function saveExecutionOnExit() {\r\n if (!processListCtrl.isExecutionStarted)\r\n return $q.when();\r\n return processListCtrl.managementObject.saveExecution();\r\n };\r\n\r\n function init() {\r\n $scope.isProjectPage = true;\r\n $scope.initiatedProcessListId = processListCtrl.execution.InitiatedProcessList.InitiatedId;\r\n $scope.projectId = processListCtrl.projectId;\r\n processListCtrl.execution.saveExecution = saveExecutionOnExit;\r\n\r\n var idOfExecutionToOpenFromProjectPage\r\n = ExecutionService.getIdOfExecutionToOpenFromProjectPage();\r\n\r\n if (idOfExecutionToOpenFromProjectPage == $scope.initiatedProcessListId) {\r\n processListCtrl.resumeExecution();\r\n $timeout(function() {\r\n $anchorScroll('execution' + $scope.initiatedProcessListId);\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Function that fetches the progress and lastupdated from server and updates the project management list\r\n * @returns {} \r\n */\r\n function updateExecution() {\r\n return ProjectFactory.getManagementProcessLists(processListCtrl.connectId).then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n //it should return only one because we gave the connect id\r\n ProjectFactory.updateManagementProcessList(result[0]);\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the edit processlist button should show\r\n * @returns {} \r\n */\r\n processListCtrl.showEditProcessListButton = function () {\r\n var user = sessionInformationService.getUser();\r\n if (!user.Organization)\r\n return false;\r\n\r\n return user.Organization.Central && !processListCtrl.execution.InitiatedProcessList.InitiatedId;\r\n };\r\n\r\n processListCtrl.resumeExecution = function () {\r\n processListCtrl.isExecutionStarted = true;\r\n };\r\n\r\n processListCtrl.saveExecution = function () {\r\n return processListCtrl.managementObject.saveExecution().then(function () {\r\n return updateExecution();\r\n });\r\n };\r\n\r\n /**\r\n * Creates execution for the current list and the list expands\r\n * @returns {} \r\n */\r\n processListCtrl.initiateProcessList = function () {\r\n processListCtrl.startExecution().then(function (result) {\r\n processListCtrl.execution = result.Execution;\r\n processListCtrl.resumeExecution();\r\n });\r\n };\r\n\r\n processListCtrl.deactiveExecution = function () {\r\n ExecutionFactory.deactivateExecution(processListCtrl.execution.id).then(function () {\r\n processListCtrl.removeProcessList();\r\n });\r\n };\r\n\r\n /**\r\n * Edit current list\r\n * @returns {} \r\n */\r\n processListCtrl.editProcessList = function () {\r\n ProcessListFactory.ProcessListType = processListCtrl.execution.InitiatedProcessList.ProcessListType.ProgId;\r\n $location.path('/processListElement/' + processListCtrl.execution.InitiatedProcessList.id);\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CategoryReportBuilderController.$inject = [\r\n '$timeout',\r\n 'baseUrlService',\r\n '$filter',\r\n 'DownloadService',\r\n 'ProjectFactory',\r\n 'infoService',\r\n '$q'\r\n ];\r\n\r\n angular.module('project')\r\n .controller('CategoryReportBuilderController', CategoryReportBuilderController)\r\n .directive('categoryReportBuilder', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/project/projectReportBuilder/categoryReportBuilder/categoryReportBuilderPartial.html',\r\n controller: 'CategoryReportBuilderController as categoryReportCtrl',\r\n bindToController: true,\r\n scope: {\r\n category: '='\r\n }\r\n };\r\n });\r\n\r\n function CategoryReportBuilderController(\r\n $timeout,\r\n baseUrlService,\r\n $filter,\r\n DownloadService,\r\n ProjectFactory,\r\n infoService,\r\n $q\r\n ) {\r\n var categoryReportCtrl = this;\r\n\r\n /**\r\n * Prepares the link for the attachments in the category\r\n * @param {any} category\r\n */\r\n function setBaseUrl(category) {\r\n if (!category.Attachments || category.Attachments.length == 0)\r\n return;\r\n\r\n angular.forEach(category.Attachments, function (attachment) {\r\n attachment.URL = baseUrlService.getBaseUrl() + attachment.URL;\r\n });\r\n };\r\n\r\n /**\r\n * Checks if the category given has any attachments and splits them appropiately\r\n * @param {any} category\r\n */\r\n function checkForAttachments(category) {\r\n if (!category.Attachments || category.Attachments.length == 0) {\r\n category.ExcludedAttachments = [];\r\n category.IncludedAttachments = [];\r\n return;\r\n }\r\n\r\n category.ExcludedAttachments = $filter('filter')(category.Attachments, function (a) { return !a.IncludeInReport; });\r\n category.IncludedAttachments = $filter('filter')(category.Attachments, function (a) { return a.IncludeInReport; });\r\n };\r\n\r\n function init() {\r\n categoryReportCtrl.category.reportCollapse = true;\r\n //set the base url for all attachments\r\n setBaseUrl(categoryReportCtrl.category);\r\n //check for attachments and split them accordingly\r\n checkForAttachments(categoryReportCtrl.category);\r\n };\r\n\r\n categoryReportCtrl.collapseCategory = function (category) {\r\n category.reportCollapse = !category.reportCollapse;\r\n };\r\n\r\n /**\r\n * Return the class name for the icon\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n categoryReportCtrl.getAttachmentIcon = function (attachment) {\r\n var extension = attachment.AttachmentName.split('.').pop();\r\n switch (extension) {\r\n case 'pdf':\r\n return 'fa-file-pdf-o';\r\n case 'doc':\r\n case 'docx':\r\n return 'fa-file-word-o';\r\n case 'xls':\r\n case 'xlsx':\r\n return 'fa-file-excel-o';\r\n default:\r\n return 'fa-file-o';\r\n }\r\n };\r\n\r\n categoryReportCtrl.showFileIcon = function (attachment) {\r\n return !(/(jpg|jpeg|png|gif)$/i).test(attachment.AttachmentName.split('.').pop());\r\n };\r\n\r\n categoryReportCtrl.downloadAttachment = function (attachment) {\r\n DownloadService.download(attachment.URL);\r\n };\r\n\r\n //options for drag and drop for included attachments\r\n categoryReportCtrl.includedAttachmentsTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceCategory = sourceNodeScope.$treeScope.$parent.categoryReportCtrl.category;\r\n var destCategory = destNodesScope.$treeScope.$parent.categoryReportCtrl.category;\r\n\r\n //if categories are different dont' allow\r\n if (sourceCategory.id != destCategory.id)\r\n return false;\r\n\r\n return true;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id)\r\n return;\r\n\r\n var attachment = event.source.nodeScope.attachment;\r\n attachment.IncludeInReport = false;\r\n\r\n ProjectFactory.saveAttachmentIncludeReport(attachment).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n });\r\n }\r\n };\r\n\r\n //options for drag and drop for excluded attachments\r\n categoryReportCtrl.excludedAttachmentsTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceCategory = sourceNodeScope.$treeScope.$parent.categoryReportCtrl.category;\r\n var destCategory = destNodesScope.$treeScope.$parent.categoryReportCtrl.category;\r\n\r\n //if categories are different dont' allow\r\n if (sourceCategory.id != destCategory.id)\r\n return false;\r\n\r\n return true;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id)\r\n return;\r\n\r\n var attachment = event.source.nodeScope.attachment;\r\n attachment.IncludeInReport = true;\r\n\r\n ProjectFactory.saveAttachmentIncludeReport(attachment).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Excludes all attachments from end report\r\n * @param {} category \r\n * @returns {} \r\n */\r\n categoryReportCtrl.excludeAllAttachments = function (category) {\r\n if (!category.IncludedAttachments || category.IncludedAttachments.length == 0)\r\n return;\r\n\r\n var promises = [];\r\n angular.forEach(category.IncludedAttachments, function (attachment) {\r\n attachment.IncludeInReport = false;\r\n\r\n var existingAttachment = $filter('filter')(category.ExcludedAttachments, function (a) { return a.id == attachment.id })[0];\r\n if (!existingAttachment)\r\n category.ExcludedAttachments.push(attachment);\r\n else\r\n existingAttachment.IncludeInReport = false;\r\n\r\n promises.push(ProjectFactory.saveAttachmentIncludeReport(attachment));\r\n });\r\n\r\n $q.all(promises).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n category.IncludedAttachments = [];\r\n });\r\n };\r\n\r\n /**\r\n * Includes all attachments in the end report\r\n * @param {} category \r\n * @returns {} \r\n */\r\n categoryReportCtrl.includeAllAttachments = function (category) {\r\n if (!category.ExcludedAttachments || category.ExcludedAttachments.length == 0)\r\n return;\r\n\r\n var promises = [];\r\n angular.forEach(category.ExcludedAttachments, function (attachment) {\r\n attachment.IncludeInReport = true;\r\n\r\n var existingAttachment = $filter('filter')(category.IncludedAttachments, function (a) { return a.id == attachment.id; })[0];\r\n if (!existingAttachment)\r\n category.IncludedAttachments.push(attachment);\r\n else\r\n existingAttachment.IncludeInReport = true;\r\n\r\n promises.push(ProjectFactory.saveAttachmentIncludeReport(attachment));\r\n });\r\n\r\n $q.all(promises).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n category.ExcludedAttachments = [];\r\n });\r\n };\r\n\r\n categoryReportCtrl.isExcludeButtonDisabled = function (category) {\r\n if (!category.IncludedAttachments || category.IncludedAttachments.length == 0)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n categoryReportCtrl.isIncludeButtonDisabled = function (category) {\r\n if (!category.ExcludedAttachments || category.ExcludedAttachments.length == 0)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProcessListReportBuilderController.$inject = [\r\n 'ProjectFactory',\r\n '$timeout',\r\n 'baseUrlService',\r\n '$filter',\r\n 'ExecutionFactory',\r\n 'infoService',\r\n '$uibModal',\r\n '$scope',\r\n 'DownloadService',\r\n '$q',\r\n '_',\r\n 'ReportBuilderService'\r\n ];\r\n\r\n angular.module('project').controller('ProcessListReportBuilderController', ProcessListReportBuilderController)\r\n .directive('processListReportBuilder', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProcessListReportBuilderController as processListCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/project/projectReportBuilder/processListReportBuilder/processListReportBuilderPartial.html',\r\n scope: {\r\n processListManagement: '='\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Report builder for management lists\r\n */\r\n function ProcessListReportBuilderController(\r\n ProjectFactory,\r\n $timeout,\r\n baseUrlService,\r\n $filter,\r\n ExecutionFactory,\r\n infoService,\r\n $uibModal,\r\n $scope,\r\n DownloadService,\r\n $q,\r\n _,\r\n ReportBuilderService\r\n ) {\r\n var processListCtrl = this;\r\n\r\n /**\r\n * Sets the base url to all images in the given list\r\n * @param {any} processList\r\n */\r\n function setBaseUrl(processList) {\r\n if (!processList.Questions || processList.Questions.length == 0)\r\n return;\r\n\r\n angular.forEach(processList.Questions, function (question) {\r\n if (question.CameraImages && question.CameraImages.length > 0)\r\n angular.forEach(question.CameraImages, function (image) {\r\n image.CameraImageOriginal.URL = baseUrlService.getBaseUrl() + image.CameraImageOriginal.URL;\r\n });\r\n\r\n if (question.Answers && question.Answers.length > 0)\r\n angular.forEach(question.Answers, function (answer) {\r\n if (answer.CameraImages && answer.CameraImages.length > 0)\r\n angular.forEach(answer.CameraImages, function (image) {\r\n image.CameraImageOriginal.URL = baseUrlService.getBaseUrl() + image.CameraImageOriginal.URL;\r\n });\r\n\r\n if (answer.AnotherProcessList)\r\n setBaseUrl(answer.AnotherProcessList);\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Checks if the list has any images\r\n * @param {any} processList\r\n */\r\n function checkForCameraImages(processList) {\r\n processList.show = false;\r\n\r\n angular.forEach(processList.Questions, function (question) {\r\n question.show = true;\r\n if (question.CameraImages && question.CameraImages.length > 0) {\r\n processList.show = true;\r\n question.show = true;\r\n question.IncludedCameraImages = $filter('filter')(question.CameraImages, function (image) { return image.IncludeInReport });\r\n //bug fix for ui tree => ui tree doesn't allow list with filter in html\r\n question.CameraImages = $filter('filter')(question.CameraImages, function (image) { return !image.IncludeInReport });\r\n }\r\n else\r\n question.IncludedCameraImages = [];\r\n\r\n if (question.ProcessListItemAttachments && question.ProcessListItemAttachments.length > 0) {\r\n processList.show = true;\r\n question.show = true;\r\n question.IncludedAttachments = $filter('filter')(question.ProcessListItemAttachments, function (a) { return a.IncludeInReport; });\r\n question.ProcessListItemAttachments = $filter('filter')(question.ProcessListItemAttachments, function (a) { return !a.IncludeInReport; });\r\n } else\r\n question.IncludedAttachments = [];\r\n\r\n if (question.Answers && question.Answers.length > 0)\r\n angular.forEach(question.Answers, function (answer) {\r\n answer.show = false;\r\n if (answer.CameraImages && answer.CameraImages.length > 0) {\r\n processList.show = true;\r\n question.show = true;\r\n answer.show = true;\r\n answer.IncludedCameraImages = $filter('filter')(answer.CameraImages, function (image) { return image.IncludeInReport });\r\n //bug fix for ui tree => ui tree doesn't allow list with filter in html\r\n answer.CameraImages = $filter('filter')(answer.CameraImages, function (image) { return !image.IncludeInReport });\r\n //generate random key to avoid drag and drop on other answers\r\n answer.key = Math.random();\r\n }\r\n if (answer.AnotherProcessList) {\r\n checkForCameraImages(answer.AnotherProcessList);\r\n if (answer.AnotherProcessList.show) {\r\n processList.show = true;\r\n question.show = true;\r\n answer.show = true;\r\n }\r\n }\r\n\r\n });\r\n });\r\n };\r\n\r\n /**\r\n * Saves any given images\r\n * @param {any} images\r\n */\r\n function saveImages(images) {\r\n return ExecutionFactory.saveCameraImages(images)\r\n .then(function () {\r\n infoService.changeInfo($filter('translate')('txtImageSaved'));\r\n });\r\n };\r\n\r\n /**\r\n * Collapses or expands the list\r\n * When the list is expanded get the images\r\n * @param {} projectManagement \r\n * @returns {} \r\n */\r\n processListCtrl.collapseProcessList = function (projectManagement) {\r\n //projectManagement.reportCollapse = !projectManagement.reportCollapse;\r\n if (projectManagement.reportCollapse) { //if the process list is collapsed get the images\r\n ProjectFactory.getProjectCameraImages(projectManagement.Execution.InitiatedProcessList.InitiatedId).$promise.then(function (result) {\r\n //set the baseurl and check if the order has any images\r\n setBaseUrl(result);\r\n checkForCameraImages(result);\r\n\r\n //set the property\r\n projectManagement.ProcessListImage = result;\r\n //wait for digest to finish\r\n $timeout(function () {\r\n projectManagement.reportCollapse = false;\r\n });\r\n });\r\n } else\r\n projectManagement.reportCollapse = !projectManagement.reportCollapse;\r\n };\r\n\r\n /**\r\n * Excludes all the images from the report for the question given\r\n * @param {} question \r\n * @returns {} \r\n */\r\n processListCtrl.excludeAllImagesFromReport = function (question) {\r\n //first exclude images\r\n if (question.IncludedCameraImages && question.IncludedCameraImages.length > 0) {\r\n angular.forEach(question.IncludedCameraImages, function (image) {\r\n image.IncludeInReport = false;\r\n //put the image back if not exists\r\n var existingImage = $filter('filter')(question.CameraImages, function (i) { return i.id == image.id })[0];\r\n if (!existingImage)\r\n question.CameraImages.push(image);\r\n else //set the include in report false\r\n existingImage.IncludeInReport = false;\r\n });\r\n\r\n question.IncludedCameraImages = [];\r\n\r\n saveImages(question.CameraImages);\r\n }\r\n\r\n //exclude attachments\r\n if (question.IncludedAttachments && question.IncludedAttachments.length > 0) {\r\n var promises = [];\r\n angular.forEach(question.IncludedAttachments, function (attachment) {\r\n attachment.IncludeInReport = false;\r\n\r\n //put the attachment back\r\n var existingAttachment = $filter('filter')(question.ProcessListItemAttachments, function (a) { return a.id == attachment.id })[0];\r\n if (!existingAttachment)\r\n question.ProcessListItemAttachments.push(attachment);\r\n else\r\n existingAttachment.IncludeInReport = false;\r\n\r\n promises.push(ProjectFactory.saveAttachmentIncludeReport(attachment));\r\n });\r\n\r\n question.IncludedAttachments = [];\r\n\r\n $q.all(promises).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n });\r\n }\r\n };\r\n\r\n //options for drag and drop for the included images in answers\r\n processListCtrl.includedAnswerCameraImagesTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceAnswer = sourceNodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var destAnswer = destNodesScope.$treeScope.$parent.$parent.$parent.answer;\r\n\r\n //accept only those that came from the same question\r\n if (sourceAnswer.key == destAnswer.key)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n var image = event.source.nodeScope.image;\r\n if (event.source.nodesScope.$id != event.dest.nodesScope.$id) {\r\n image.IncludeInReport = false;\r\n saveImages([image]);\r\n } else {\r\n var answer = event.source.nodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var includedImages = answer.IncludedCameraImages;\r\n\r\n if (image.SortNumber == includedImages.indexOf(image))\r\n return;\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n saveImages(includedImages);\r\n }\r\n }\r\n };\r\n\r\n //options for drag and drop for the excluded images in answers\r\n processListCtrl.answerCameraImageTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceAnswer = sourceNodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var destAnswer = destNodesScope.$treeScope.$parent.$parent.$parent.answer;\r\n\r\n //accept only those that came from the same question\r\n if (sourceAnswer.key == destAnswer.key)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n\r\n var image = event.source.nodeScope.image;\r\n var answer = event.source.nodeScope.$treeScope.$parent.$parent.$parent.answer;\r\n var includedImages = answer.IncludedCameraImages;\r\n // image = includedImages[includedImages.indexOf(image)];\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n image.IncludeInReport = true;\r\n saveImages(includedImages);\r\n }\r\n };\r\n\r\n //options for the included images in questions\r\n processListCtrl.includedCameraImagesTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceQuestion = sourceNodeScope.$treeScope.$parent.$parent.question;\r\n var destQuestion = destNodesScope.$treeScope.$parent.$parent.question;\r\n\r\n if (!sourceNodeScope.$modelValue.CameraImageOriginal)\r\n return false;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n var image = event.source.nodeScope.image;\r\n if (event.source.nodesScope.$id != event.dest.nodesScope.$id) {\r\n image.IncludeInReport = false;\r\n saveImages([image]);\r\n } else {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n var includedImages = question.IncludedCameraImages;\r\n\r\n if (image.SortNumber == includedImages.indexOf(image))\r\n return;\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n saveImages(includedImages);\r\n }\r\n },\r\n dragStart: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n if (!question.CameraImages || question.CameraImages.length == 0) {\r\n var element = angular.element('#questionExclude' + question.InitiatedId);\r\n element.css('min-width', '100px');\r\n element.css('min-height', '100px');\r\n }\r\n\r\n },\r\n dragStop: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n var element = angular.element('#questionExclude' + question.InitiatedId);\r\n element.css('min-width', '');\r\n element.css('min-height', '');\r\n }\r\n };\r\n\r\n //options for the images excluded in the question\r\n processListCtrl.cameraImagesTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceQuestion = sourceNodeScope.$treeScope.$parent.$parent.question;\r\n var destQuestion = destNodesScope.$treeScope.$parent.$parent.question;\r\n\r\n if (!sourceNodeScope.$modelValue.CameraImageOriginal)\r\n return false;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n\r\n var image = event.source.nodeScope.image;\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n var includedImages = question.IncludedCameraImages;\r\n // image = includedImages[includedImages.indexOf(image)];\r\n\r\n for (var i = 0; i < includedImages.length; i++)\r\n includedImages[i].SortNumber = i;\r\n\r\n image.IncludeInReport = true;\r\n\r\n if (!image.Size)\r\n image.Size = \"25%\";\r\n\r\n saveImages(includedImages);\r\n },\r\n dragStart: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n if (!question.IncludedCameraImages || question.IncludedCameraImages.length == 0) {\r\n var element = angular.element('#questionInclude' + question.InitiatedId);\r\n element.css('min-width', '100px');\r\n element.css('min-height', '100px');\r\n }\r\n\r\n },\r\n dragStop: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n var element = angular.element('#questionInclude' + question.InitiatedId);\r\n element.css('min-width', '');\r\n element.css('min-height', '');\r\n }\r\n };\r\n\r\n //options for drag and drop for included attachments\r\n processListCtrl.includedAttachmentsTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceQuestion = sourceNodeScope.$treeScope.$parent.$parent.question;\r\n var destQuestion = destNodesScope.$treeScope.$parent.$parent.question;\r\n\r\n if (sourceNodeScope.$modelValue.CameraImageOriginal)\r\n return false;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id)\r\n return;\r\n\r\n var attachment = event.source.nodeScope.attachment;\r\n attachment.IncludeInReport = false;\r\n\r\n ProjectFactory.saveAttachmentIncludeReport(attachment).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n });\r\n },\r\n dragStart: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n if (!question.ProcessListItemAttachments || question.ProcessListItemAttachments.length == 0) {\r\n var element = angular.element('#attachmentExclude' + question.InitiatedId);\r\n element.css('min-width', '100px');\r\n element.css('min-height', '100px');\r\n }\r\n\r\n },\r\n dragStop: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n var element = angular.element('#attachmentExclude' + question.InitiatedId);\r\n element.css('min-width', '');\r\n element.css('min-height', '');\r\n }\r\n };\r\n\r\n //options for drag and drop for excluded attachments\r\n processListCtrl.attachmentsTreeOptions = {\r\n accept: function (sourceNodeScope, destNodesScope, destIndex) {\r\n var sourceQuestion = sourceNodeScope.$treeScope.$parent.$parent.question;\r\n var destQuestion = destNodesScope.$treeScope.$parent.$parent.question;\r\n\r\n if (sourceNodeScope.$modelValue.CameraImageOriginal)\r\n return false;\r\n\r\n //accept only those that came from the same question\r\n if (sourceQuestion.InitiatedId == destQuestion.InitiatedId)\r\n return true;\r\n\r\n return false;\r\n },\r\n dropped: function (event) {\r\n //if it's the same tree => ignore it\r\n if (event.source.nodesScope.$id == event.dest.nodesScope.$id) {\r\n return;\r\n }\r\n\r\n var attachment = event.source.nodeScope.attachment;\r\n attachment.IncludeInReport = true;\r\n\r\n ProjectFactory.saveAttachmentIncludeReport(attachment).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n });\r\n },\r\n dragStart: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n if (!question.IncludedAttachments || question.IncludedAttachments.length == 0) {\r\n var element = angular.element('#attachmentInclude' + question.InitiatedId);\r\n element.css('min-width', '100px');\r\n element.css('min-height', '100px');\r\n }\r\n\r\n },\r\n dragStop: function (event) {\r\n var question = event.source.nodeScope.$treeScope.$parent.$parent.question;\r\n var element = angular.element('#attachmentInclude' + question.InitiatedId);\r\n element.css('min-width', '');\r\n element.css('min-height', '');\r\n }\r\n };\r\n\r\n /**\r\n * Opens a given image in a modal\r\n * @param {} image \r\n * @returns {} \r\n */\r\n processListCtrl.openImage = function (image) {\r\n var modalScope = $scope.$new(true);\r\n modalScope.cameraImage = {};\r\n modalScope.cameraImage.selectedImage = image;\r\n\r\n modalScope.cameraImage.downloadImage = processListCtrl.downloadImage;\r\n modalScope.cameraImage.saveImage = processListCtrl.saveImage;\r\n\r\n $uibModal.open({\r\n scope: modalScope,\r\n templateUrl: 'template/orderCameraImage.html',\r\n size: 'lg'\r\n }).result.finally(function () {\r\n delete modalScope.cameraImage;\r\n });\r\n };\r\n\r\n /**\r\n * Opens a modal with the given image at the selected size\r\n * Value is approximate\r\n * @param {} image \r\n * @param {} size \r\n * @returns {} \r\n */\r\n processListCtrl.previewImageSize = function (image, size) {\r\n processListCtrl.selectedImage = angular.copy(image);\r\n processListCtrl.selectedImage.Size = size;\r\n $uibModal.open({\r\n scope: $scope,\r\n template: '
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
',\r\n size: 'lg'\r\n });\r\n };\r\n\r\n processListCtrl.setImageSize = function (image, size) {\r\n image.Size = size;\r\n\r\n saveImages([image]);\r\n };\r\n\r\n /**\r\n * Includes all the images in the end report for the given question\r\n * @param {} question \r\n * @returns {} \r\n */\r\n processListCtrl.includeAllImagesInReport = function (question) {\r\n if (question.CameraImages && question.CameraImages.length > 0) {\r\n angular.forEach(question.CameraImages, function (image) {\r\n image.IncludeInReport = true;\r\n //put the image back if not exists\r\n var existingImage = $filter('filter')(question.IncludedCameraImages, function (i) { return i.id == image.id })[0];\r\n if (!existingImage)\r\n question.IncludedCameraImages.push(image);\r\n else //set the include in report false\r\n existingImage.IncludeInReport = true;\r\n });\r\n\r\n question.CameraImages = [];\r\n\r\n for (var i = 0; i < question.IncludedCameraImages.length; i++)\r\n question.IncludedCameraImages[i].SortNumber = i;\r\n\r\n saveImages(question.IncludedCameraImages);\r\n }\r\n\r\n if (question.ProcessListItemAttachments && question.ProcessListItemAttachments.length > 0) {\r\n var promises = [];\r\n angular.forEach(question.ProcessListItemAttachments, function (attachment) {\r\n attachment.IncludeInReport = true;\r\n\r\n var existingAttachment = $filter('filter')(question.IncludedAttachments, function (a) { return a.id == attachment.id })[0];\r\n if (!existingAttachment)\r\n question.IncludedAttachments.push(attachment);\r\n else\r\n existingAttachment.IncludeInReport = true;\r\n\r\n promises.push(ProjectFactory.saveAttachmentIncludeReport(attachment));\r\n });\r\n\r\n question.ProcessListItemAttachments = [];\r\n\r\n $q.all(promises).then(function () {\r\n infoService.changeInfo($filter('translate')('msgAttachmentSaved'));\r\n });\r\n }\r\n };\r\n\r\n processListCtrl.onIncludeInReportChange = function (execution) {\r\n return ProjectFactory.saveManagementProcessListIncludeReport({ id: execution.id, Execution: execution.Execution, IncludeInReport: execution.IncludeInReport });\r\n };\r\n\r\n processListCtrl.downloadImage = function (attachment) {\r\n var url = '';\r\n if (attachment.CameraImageOriginal)\r\n url = attachment.CameraImageOriginal.URL;\r\n else\r\n url = attachment.URL;\r\n DownloadService.download(url);\r\n };\r\n\r\n /**\r\n * Checks whether the container for images should be showed\r\n * @param {} question \r\n * @returns {} \r\n */\r\n processListCtrl.showQuestionImagesContainer = function (question) {\r\n if (question.CameraImages && question.CameraImages.length > 0)\r\n return true;\r\n\r\n if (question.IncludedCameraImages && question.IncludedCameraImages.length > 0)\r\n return true;\r\n\r\n if (question.ProcessListItemAttachments && question.ProcessListItemAttachments.length > 0)\r\n return true;\r\n\r\n if (question.IncludedAttachments && question.IncludedAttachments.length > 0)\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n processListCtrl.isIncludeButtonDisabled = function (question) {\r\n if ((!question.CameraImages || question.CameraImages.length == 0) && (!question.ProcessListItemAttachments || question.ProcessListItemAttachments.length == 0))\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n processListCtrl.isExcludeButtonDisabled = function (question) {\r\n if ((!question.IncludedCameraImages || question.IncludedCameraImages.length == 0) && (!question.IncludedAttachments || question.IncludedAttachments.length == 0))\r\n return true;\r\n\r\n return false;\r\n };\r\n\r\n /**\r\n * Gets the corresponding icon based on the attachment type\r\n * @param {} attachment \r\n * @returns {} \r\n */\r\n processListCtrl.getAttachmentIcon = function (attachment) {\r\n var extension = attachment.AttachmentName.split('.').pop();\r\n switch (extension) {\r\n case 'pdf':\r\n return 'fa-file-pdf-o';\r\n case 'doc':\r\n case 'docx':\r\n return 'fa-file-word-o';\r\n case 'xls':\r\n case 'xlsx':\r\n return 'fa-file-excel-o';\r\n default:\r\n return 'fa-file-o';\r\n }\r\n };\r\n\r\n processListCtrl.saveImage = function (image) {\r\n ExecutionFactory.saveCameraImage(image).$promise.then(function () {\r\n infoService.changeInfo($filter('translate')('txtImageSaved'));\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the upload button should be showed\r\n * @param {} question \r\n * @returns {} \r\n */\r\n processListCtrl.showUploadPictureOnAllPointsButton = function (question) {\r\n if (question.CameraImages && question.CameraImages.length > 0)\r\n return false;\r\n\r\n if (question.IncludedCameraImages && question.IncludedCameraImages.length > 0)\r\n return false;\r\n\r\n if (question.ProcessListItemAttachments && question.ProcessListItemAttachments.length > 0)\r\n return false;\r\n\r\n if (question.IncludedAttachments && question.IncludedAttachments.length > 0)\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Toggles the visibility for another process lists\r\n * @param {any} processList\r\n */\r\n processListCtrl.toggleVisibilityForProcessList = function (processList) {\r\n\r\n if (!processList) {\r\n return;\r\n }\r\n\r\n if (_.isNil(processList.collapseState)) {\r\n processList.collapseState = true;\r\n } else {\r\n processList.collapseState = !processList.collapseState;\r\n }\r\n }\r\n\r\n processListCtrl.canOptionBeDisplayedForQuestion = function(question) {\r\n\r\n return ReportBuilderService.canOptionBeDisplayedForQuestion(question);\r\n }\r\n };\r\n\r\n})();","//TODO: add multiple settings here\r\n(function () {\r\n 'use strict';\r\n\r\n PointSettingsController.$inject = [\r\n '$timeout'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('PointSettingsController', PointSettingsController)\r\n .directive('centralApprovalPointSettings', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'PointSettingsController as pointSettingCtrl',\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/pointSettings/pointSettingsPartial.html',\r\n bindToController: true\r\n };\r\n });\r\n\r\n function PointSettingsController($timeout) {\r\n var pointSettingCtrl = this;\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CentralApprovalViewController.$inject = [\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n '$sce',\r\n 'sessionInformationService',\r\n 'UserFactory',\r\n '$filter',\r\n '$q',\r\n 'PrintService',\r\n 'F5ReportFactory'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('CentralApprovalViewController', CentralApprovalViewController)\r\n .directive('centralApprovalView', function () {\r\n return {\r\n restrict: 'E',\r\n bindToController: true,\r\n controller: 'CentralApprovalViewController as centralViewCtrl',\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookView/centralApprovalView/centralApprovalViewPartial.html',\r\n scope: {\r\n organizationId: '=',\r\n sharedObject: '='\r\n }\r\n };\r\n });\r\n\r\n function CentralApprovalViewController(\r\n $timeout,\r\n QualityHandbookFactory,\r\n $sce,\r\n sessionInformationService,\r\n UserFactory,\r\n $filter,\r\n $q,\r\n PrintService,\r\n F5ReportFactory\r\n ) {\r\n var centralViewCtrl = this;\r\n\r\n centralViewCtrl.centralApprovalViewList = null;\r\n centralViewCtrl.listLoaded = false;\r\n centralViewCtrl.educationLevels = [];\r\n centralViewCtrl.printMode = true;\r\n\r\n /**\r\n * Gets the highest education level\r\n */\r\n function getUserHighestEducationLevels() {\r\n return UserFactory.getEducationLevels().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n centralViewCtrl.educationLevels = result;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the view version of the lists\r\n */\r\n function getCentralApprovalListView() {\r\n return QualityHandbookFactory.getCentralApprovalListView(centralViewCtrl.organizationId).then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n centralViewCtrl.centralApprovalViewList = result;\r\n });\r\n };\r\n\r\n /**\r\n * Sets up the variables\r\n * @param {any} processListItem\r\n */\r\n function initCentralApprovalVariables(processListItem) {\r\n switch (processListItem.ReportingCode) {\r\n case '##UsernameAndPassword##':\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE') {\r\n processListItem.CentralApproval = JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType);\r\n\r\n } else {\r\n if (processListItem.InitiatedOption.SelectedValues && processListItem.InitiatedOption.SelectedValues.length > 0)\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length > 0; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.indexOf('Username') > -1) {\r\n processListItem.CentralApproval = JSON.parse(selectedValue.CustomDataType);\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case '##ProjectReferences##':\r\n if (processListItem.InitiatedOption.SelectedValue)\r\n processListItem.CentralApproval = { ProjectReferences: JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType) };\r\n processListItem.ProjectReferenceLoaded = true;\r\n break;\r\n case '##CompanyPrimaryContact##':\r\n if (processListItem.InitiatedOption.SelectedValue)\r\n processListItem.CentralApproval = JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType);\r\n processListItem.CompanyPrimaryContactLoaded = true;\r\n break;\r\n case '##CompanyInfoDetailed##':\r\n default:\r\n if (!processListItem.InitiatedOption.SelectedValues || processListItem.InitiatedOption.SelectedValues.length == 0)\r\n break;\r\n\r\n for (var i = 0; i < processListItem.InitiatedOption.SelectedValues.length > 0; i++) {\r\n var selectedValue = processListItem.InitiatedOption.SelectedValues[i];\r\n\r\n if (selectedValue.CustomDataType && selectedValue.CustomDataType.indexOf('MultipleChoiceHeaderComment') > -1) {\r\n selectedValue.CustomDataType = JSON.parse(selectedValue.CustomDataType).MultipleChoiceHeaderComment;\r\n }\r\n }\r\n }\r\n };\r\n\r\n function getSelectedValueForChoice(choice, initiatedOption) {\r\n for (var i = 0; i < initiatedOption.SelectedValues.length; i++) {\r\n if (initiatedOption.SelectedValues[i].OptionItem && initiatedOption.SelectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n return initiatedOption.SelectedValues[i];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Inits the execution of the list for view mode\r\n * @param {any} processList\r\n */\r\n function initExecution(processList) {\r\n var index = 0;\r\n angular.forEach(processList.ProcessListItems, function (item) {\r\n if (processList.FlexibleExecution)\r\n item.isLocked = false;\r\n else\r\n item.isLocked = true;\r\n\r\n item.isOpen = false;\r\n\r\n //if it's not \"jumped\", unlock the item\r\n if (item.InitiatedOption.SelectedValue) {\r\n if (item.InitiatedOption.SelectedValue.OptionItem && item.InitiatedOption.SelectedValue.OptionItem.InitiatedId > 0) {\r\n item.isLocked = false;\r\n processList.lastItem = index;\r\n\r\n item.InitiatedOption.SelectedValue.OptionItem = $filter('filter')(item.InitiatedOption.Items, { InitiatedId: item.InitiatedOption.SelectedValue.OptionItem.InitiatedId })[0];\r\n\r\n\r\n //if(item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction && item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST')\r\n //init()\r\n } else {\r\n if (item.InitiatedOption.SelectedValue.CustomDataType && item.InitiatedOption.SelectedValue.CustomDataType.length > 0) {\r\n item.isLocked = false;\r\n processList.lastItem = index;\r\n }\r\n }\r\n }\r\n\r\n else if (item.InitiatedOption.Type.ProgId == 'STANDARD_TEXT') {\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItemEdited)\r\n item.InitiatedOption.SelectedValue.OptionItem.Text = item.InitiatedOption.SelectedValue.OptionItemEdited;\r\n }\r\n //multiple choice\r\n else if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n var choice = item.InitiatedOption.Items[j];\r\n choice.Order = parseInt(choice.Order);\r\n var selectedValueForChoice = getSelectedValueForChoice(choice, item.InitiatedOption);\r\n if (!!selectedValueForChoice) {\r\n choice.isChecked = true;\r\n // assign the selected value as a choice property for easy access\r\n choice.selectedValue = selectedValueForChoice;\r\n\r\n processList.lastItem = index;\r\n item.isLocked = false;\r\n }\r\n }\r\n }\r\n\r\n initCentralApprovalVariables(item);\r\n index++;\r\n });\r\n\r\n if (!processList.lastItem && processList.ProcessListItems.length > 0) {\r\n processList.ProcessListItems[0].isOpen = true;\r\n processList.ProcessListItems[0].isLocked = false;\r\n processList.lastItem = 0;\r\n } else {\r\n if (processList.ProcessListItems[processList.lastItem])\r\n processList.ProcessListItems[processList.lastItem].isLocked = false;\r\n if (processList.lastItem != processList.ProcessListItems.length - 1)\r\n processList.ProcessListItems[processList.lastItem].isOpen = true;\r\n }\r\n\r\n if (processList.lastItem + 1 == processList.ProcessListItems.length)\r\n processList.IsCompleted = true;\r\n };\r\n\r\n /**\r\n * Inits execution for all lists including those that are in another list action\r\n * @param {any} initiatedProcessList\r\n */\r\n function initExecutionForAllProcessLists(initiatedProcessList) {\r\n\r\n if (!initiatedProcessList.ProcessListItems || initiatedProcessList.ProcessListItems.length == 0)\r\n return;\r\n\r\n //init execution for the current processlist\r\n initExecution(initiatedProcessList);\r\n\r\n var selectedValue;\r\n for (var i = 0; i < initiatedProcessList.ProcessListItems.length; i++) {\r\n var processListItem = initiatedProcessList.ProcessListItems[i];\r\n if (!processListItem)\r\n continue;\r\n\r\n if (!processListItem.InitiatedOption)\r\n continue;\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE') {\r\n selectedValue = processListItem.InitiatedOption.SelectedValue;\r\n\r\n if (!selectedValue)\r\n continue;\r\n\r\n if (!selectedValue.OptionItem)\r\n continue;\r\n\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n continue;\r\n\r\n //if we find an another processlist, initExecution for it\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n initExecutionForAllProcessLists(selectedValue.OptionItem.ProcessListAction.ProcessList);\r\n }\r\n } else if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n if (!processListItem.InitiatedOption.SelectedValues)\r\n continue;\r\n\r\n for (var j = 0; j < processListItem.InitiatedOption.SelectedValues.length; j++) {\r\n selectedValue = processListItem.InitiatedOption.SelectedValues[j];\r\n\r\n if (!selectedValue)\r\n continue;\r\n if (!selectedValue.OptionItem)\r\n continue;\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n continue;\r\n\r\n\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n initExecutionForAllProcessLists(selectedValue.OptionItem.ProcessListAction.ProcessList);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Gets the central approval template\r\n */\r\n function getCentralApprovalTemplate() {\r\n //get the template\r\n return QualityHandbookFactory.getQualityHandbookTemplate('CENTRAL_APPROVAL').$promise.then(function (result) {\r\n if (result.id)\r\n centralViewCtrl.centralTemplate = result.FrontPage;\r\n });\r\n };\r\n\r\n function init() {\r\n getCentralApprovalTemplate();\r\n getCentralApprovalListView().then(function () {\r\n if (!centralViewCtrl.centralApprovalViewList || centralViewCtrl.centralApprovalViewList.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < centralViewCtrl.centralApprovalViewList.length; i++)\r\n initExecutionForAllProcessLists(centralViewCtrl.centralApprovalViewList[i]);\r\n\r\n\r\n centralViewCtrl.listLoaded = true;\r\n });\r\n //delegate functions\r\n centralViewCtrl.sharedObject.print = printDelegate;\r\n centralViewCtrl.sharedObject.reinit = reinit;\r\n };\r\n\r\n centralViewCtrl.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n /**\r\n * Reloads the list\r\n */\r\n function reinit() {\r\n centralViewCtrl.listLoaded = false;\r\n\r\n $timeout(function () {\r\n init();\r\n });\r\n };\r\n\r\n /**\r\n * Gets the company info \r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n centralViewCtrl.getCompanyInfo = function (processListItem) {\r\n QualityHandbookFactory.getCentralApprovalCompanyInfo(centralViewCtrl.organizationId).then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n processListItem.CentralApproval = { CompanyInfo: result };\r\n });\r\n };\r\n\r\n /**\r\n * Gets the primary contact details of the selected organization id\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n centralViewCtrl.getPrimaryContact = function (processListItem) {\r\n QualityHandbookFactory.getCentralApprovalPrimaryContact(centralViewCtrl.organizationId).then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n result.FullName = (result.FirstName ? result.FirstName + ' ' : '') + (result.LastName ? result.LastName : '');\r\n\r\n processListItem.CentralApproval = { PrimaryContact: result };\r\n });\r\n };\r\n\r\n /**\r\n * Gets the revision data of the selected organization\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n centralViewCtrl.getRevisionData = function (processListItem) {\r\n QualityHandbookFactory.getCentralApprovalRevisionData().then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n if (result.LastUpdatedBy)\r\n result.LastUpdatedBy.FullName = (result.LastUpdatedBy.FirstName ? result.LastUpdatedBy.FirstName + ' ' : '') + (result.LastUpdatedBy.LastName ? result.LastUpdatedBy.LastName : '');\r\n\r\n processListItem.CentralApproval = { RevisionData: result };\r\n });\r\n };\r\n\r\n /**\r\n * Gets the users competence details\r\n * @param {} processListItem \r\n * @returns {} \r\n */\r\n centralViewCtrl.getUsersCompetence = function (processListItem) {\r\n getUserHighestEducationLevels();\r\n QualityHandbookFactory.getCentralApprovalUsers(centralViewCtrl.organizationId).then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n angular.forEach(result, function (user) {\r\n user.FullName = (user.FirstName ? user.FirstName + ' ' : '') + (user.LastName ? user.LastName : '');\r\n\r\n if (user.Manager)\r\n user.Manager.FullName = (user.Manager.FirstName ? user.Manager.FirstName + ' ' : '') + (user.Manager.LastName ? user.Manager.LastName : '');\r\n\r\n user.FieldOfStudy = 'Rørlegger';\r\n\r\n if (processListItem.InitiatedOption.SelectedValue && processListItem.InitiatedOption.SelectedValue.CustomDataType) {\r\n var properties = JSON.parse(processListItem.InitiatedOption.SelectedValue.CustomDataType);\r\n var customProperties = $filter('filter')(properties, function (p) { return p.id == user.id })[0];\r\n\r\n if (customProperties) {\r\n user.Experience = customProperties.Experience;\r\n user.FieldOfStudy = customProperties.FieldOfStudy;\r\n }\r\n }\r\n //calculate the experience\r\n if (user.ExperienceInMilliseconds && !user.Experience) {\r\n var duration = moment.duration(Number(user.ExperienceInMilliseconds));\r\n\r\n user.Experience = {};\r\n user.Experience.Years = duration.years();\r\n user.Experience.Months = duration.months();\r\n user.Experience.Days = duration.days();\r\n }\r\n });\r\n result.push({});\r\n processListItem.CentralApproval = { Users: result };\r\n });\r\n };\r\n\r\n centralViewCtrl.getFormattedExperienceTotal = function (user) {\r\n if (user.Experience) {\r\n return user.Experience.Years + \" \" + $filter(\"translate\")(\"YEARS\") + \", \" + user.Experience.Months + \" \" + $filter(\"translate\")(\"MONTHS\") + \", \" + user.Experience.Days + \" \" + $filter(\"translate\")(\"DAYS\");\r\n }\r\n };\r\n\r\n centralViewCtrl.checkIfItHasEducation = function (education, user) {\r\n if (!user.Competences)\r\n return false;\r\n\r\n return $filter('filter')(user.Competences, function (c) {\r\n return c.HighestEducationLevel && c.HighestEducationLevel.id == education.id;\r\n }).length > 0;\r\n };\r\n\r\n /**\r\n * Generates a full html document which contain in the body a given html element\r\n * @param {HtmlDivElement} htmlElement\r\n */\r\n function generateFullHTMLDocument(htmlElement) {\r\n\r\n if (!htmlElement)\r\n return null;\r\n\r\n var htmlDocument = ' \\n\\\r\n \\n\\\r\n \\n\\\r\n \\n\\\r\n \\n\\\r\n \\n\\\r\n \\n';\r\n\r\n htmlDocument += htmlElement.outerHTML; + '\\n'\r\n htmlDocument += ' \\n\\\r\n ';\r\n\r\n return htmlDocument;\r\n };\r\n\r\n /**\r\n * Print the view \r\n * @param {HtmlDivElement} htmlElement\r\n */\r\n function print(htmlElement) {\r\n\r\n $timeout(function () {\r\n var htmlDocument = generateFullHTMLDocument(htmlElement);\r\n F5ReportFactory.printCentralApprovalDocument(htmlDocument);\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Parse the organization chart html and make it an image\r\n * @param {any} organizationChart\r\n */\r\n function processOrganizationChart(organizationChart) {\r\n return html2canvas(organizationChart).then(function (canvas) {\r\n var dataUrl = canvas.toDataURL();\r\n var img = new Image();\r\n img.src = dataUrl;\r\n organizationChart.innerHTML = img.outerHTML;\r\n resolve();\r\n })\r\n // fix for IE and Edge, because dom-to-image doesn't offer support for them\r\n .catch(function (err) {\r\n throw err;\r\n });\r\n };\r\n\r\n /**\r\n * Function that handles the print logic of the view\r\n */\r\n function printDelegate() {\r\n\r\n var htmlElement = document.getElementsByClassName('central-approval-body')[0];\r\n\r\n var organizationChartsHtml = document.getElementsByClassName('central-approval-organization-chart');\r\n if (organizationChartsHtml && organizationChartsHtml.length > 0) {\r\n var promises = [];\r\n for (var i = 0; i < organizationChartsHtml.length; i++) {\r\n var organizationChart = organizationChartsHtml[i];\r\n promises.push(processOrganizationChart(organizationChart));\r\n }\r\n $q.all(promises)\r\n .then(function () {\r\n print(htmlElement);\r\n })\r\n .catch(function () {\r\n print(htmlElement);\r\n });\r\n } else\r\n print(htmlElement);\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ChapterViewController.$inject = [\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n '$sce',\r\n '$filter',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('ChapterViewController', ChapterViewController)\r\n .directive('chapterView', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookView/chapterView/chapterViewPartial.html',\r\n controller: 'ChapterViewController as chapterViewCtrl',\r\n bindToController: true,\r\n scope: {\r\n executionId: '=',\r\n qualityHandbookId: '=',\r\n userId: '=',\r\n organizationId: '='\r\n }\r\n };\r\n });\r\n\r\n function ChapterViewController(\r\n $timeout,\r\n QualityHandbookFactory,\r\n $sce,\r\n $filter,\r\n baseUrlService\r\n ) {\r\n var chapterViewCtrl = this;\r\n chapterViewCtrl.chapter = null;\r\n chapterViewCtrl.processListLoaded = false;\r\n\r\n /**\r\n * Get the selected value based on the given choice\r\n * @param {any} choice\r\n * @param {any} initiatedOption\r\n */\r\n function getSelectedValueForChoice(choice, initiatedOption) {\r\n for (var i = 0; i < initiatedOption.SelectedValues.length; i++) {\r\n if (initiatedOption.SelectedValues[i].OptionItem && initiatedOption.SelectedValues[i].OptionItem.InitiatedId == choice.InitiatedId) {\r\n return initiatedOption.SelectedValues[i];\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets up the list for viewing\r\n * @param {any} processList\r\n */\r\n function initExecution(processList) {\r\n //flag for knowing if the processlist has a deviation\r\n processList.hasDeviation = false;\r\n var index = 0;\r\n angular.forEach(processList.ProcessListItems, function (item) {\r\n item.hasDeviation = false;\r\n if (processList.FlexibleExecution)\r\n item.isLocked = false;\r\n else\r\n item.isLocked = true;\r\n\r\n item.isOpen = false;\r\n\r\n //if it's not \"jumped\", unlock the item\r\n if (item.InitiatedOption.SelectedValue) {\r\n if (item.InitiatedOption.SelectedValue.OptionItem && item.InitiatedOption.SelectedValue.OptionItem.InitiatedId > 0) {\r\n item.isLocked = false;\r\n processList.lastItem = index;\r\n\r\n item.InitiatedOption.SelectedValue.OptionItem = $filter('filter')(item.InitiatedOption.Items, { InitiatedId: item.InitiatedOption.SelectedValue.OptionItem.InitiatedId })[0];\r\n\r\n\r\n //if(item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction && item.InitiatedOption.SelectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST')\r\n //init()\r\n } else {\r\n if (item.InitiatedOption.SelectedValue.CustomDataType && item.InitiatedOption.SelectedValue.CustomDataType.length > 0) {\r\n item.isLocked = false;\r\n processList.lastItem = index;\r\n }\r\n }\r\n }\r\n\r\n else if (item.InitiatedOption.Type.ProgId == 'STANDARD_TEXT') {\r\n if (item.InitiatedOption.SelectedValue && item.InitiatedOption.SelectedValue.OptionItemEdited)\r\n item.InitiatedOption.SelectedValue.OptionItem.Text = item.InitiatedOption.SelectedValue.OptionItemEdited;\r\n }\r\n //multiple choice\r\n else if (item.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n for (var j = 0; j < item.InitiatedOption.Items.length; j++) {\r\n var choice = item.InitiatedOption.Items[j];\r\n var selectedValueForChoice = getSelectedValueForChoice(choice, item.InitiatedOption);\r\n if (!!selectedValueForChoice) {\r\n choice.isChecked = true;\r\n // assign the selected value as a choice property for easy access\r\n choice.selectedValue = selectedValueForChoice;\r\n\r\n processList.lastItem = index;\r\n item.isLocked = false;\r\n }\r\n }\r\n }\r\n index++;\r\n });\r\n\r\n if (!processList.lastItem && processList.ProcessListItems.length > 0) {\r\n processList.ProcessListItems[0].isOpen = true;\r\n processList.ProcessListItems[0].isLocked = false;\r\n processList.lastItem = 0;\r\n } else {\r\n if (processList.ProcessListItems[processList.lastItem])\r\n processList.ProcessListItems[processList.lastItem].isLocked = false;\r\n if (processList.lastItem != processList.ProcessListItems.length - 1)\r\n processList.ProcessListItems[processList.lastItem].isOpen = true;\r\n }\r\n\r\n if (processList.lastItem + 1 == processList.ProcessListItems.length)\r\n processList.IsCompleted = true;\r\n\r\n return processList.hasDeviation;\r\n };\r\n\r\n /**\r\n * Sets up the execution for all lists including those from another list action\r\n * @param {any} initiatedProcessList\r\n */\r\n function initExecutionForAllProcessLists(initiatedProcessList) {\r\n //init execution for the current processlist\r\n if (initiatedProcessList.ProcessListType.ProgId != 'HORIZONTAL')\r\n initExecution(initiatedProcessList);\r\n\r\n\r\n if (!initiatedProcessList.ProcessListItems || initiatedProcessList.ProcessListItems.length == 0)\r\n return;\r\n var selectedValue;\r\n for (var i = 0; i < initiatedProcessList.ProcessListItems.length; i++) {\r\n var processListItem = initiatedProcessList.ProcessListItems[i];\r\n if (!processListItem)\r\n continue;\r\n\r\n if (!processListItem.InitiatedOption)\r\n continue;\r\n\r\n if (processListItem.InitiatedOption.Type.ProgId != 'MULTIPLE_CHOICE') {\r\n selectedValue = processListItem.InitiatedOption.SelectedValue;\r\n\r\n if (!selectedValue)\r\n continue;\r\n\r\n if (!selectedValue.OptionItem)\r\n continue;\r\n\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n continue;\r\n\r\n //if we find an another processlist, initExecution for it\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n initExecutionForAllProcessLists(selectedValue.OptionItem.ProcessListAction.ProcessList);\r\n }\r\n } else if (processListItem.InitiatedOption.Type.ProgId == 'MULTIPLE_CHOICE') {\r\n if (!processListItem.InitiatedOption.SelectedValues)\r\n continue;\r\n\r\n for (var j = 0; j < processListItem.InitiatedOption.SelectedValues.length; j++) {\r\n selectedValue = processListItem.InitiatedOption.SelectedValues[j];\r\n\r\n if (!selectedValue)\r\n continue;\r\n if (!selectedValue.OptionItem)\r\n continue;\r\n if (!selectedValue.OptionItem.ProcessListAction)\r\n continue;\r\n\r\n\r\n if (selectedValue.OptionItem.ProcessListAction.Type.ProgId == 'ANOTHER_PROCESSLIST') {\r\n initExecutionForAllProcessLists(selectedValue.OptionItem.ProcessListAction.ProcessList);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Init the signature url\r\n */\r\n function initSignature() {\r\n if (chapterViewCtrl.chapter.Sign && chapterViewCtrl.chapter.Sign.Signature && chapterViewCtrl.chapter.Sign.Signature.id)\r\n chapterViewCtrl.chapter.Sign.Signature.URL = baseUrlService.getBaseUrl() + chapterViewCtrl.chapter.Sign.Signature.URL;\r\n };\r\n\r\n function init() {\r\n QualityHandbookFactory.getChapterView(chapterViewCtrl.executionId, chapterViewCtrl.qualityHandbookId, chapterViewCtrl.organizationId, chapterViewCtrl.userId).$promise.then(function (result) {\r\n chapterViewCtrl.chapter = result;\r\n initSignature();\r\n\r\n initExecutionForAllProcessLists(chapterViewCtrl.chapter.InitiatedProcessList);\r\n\r\n chapterViewCtrl.processListLoaded = true;\r\n });\r\n };\r\n\r\n /**\r\n * Gets the selected default answer\r\n * @param {} initiatedId \r\n * @param {} defaultAnswers \r\n * @returns {} \r\n */\r\n chapterViewCtrl.getSelectedDefaultAnswer = function (initiatedId, defaultAnswers) {\r\n return $filter('filter')(defaultAnswers, function (defaultAnswer) { return defaultAnswer.InitiatedId == initiatedId })[0];\r\n };\r\n\r\n chapterViewCtrl.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .component('vbDatepicker',\r\n {\r\n templateUrl: 'Scripts/shared/components/datepicker/datepicker.component.html',\r\n controller: 'DatepickerController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n labelName: '@',\r\n name: '@',\r\n model: '=',\r\n onDateChange: '&?',\r\n readonly: ' \\\r\n

{{\\'txtSelectOrCreateForAccess\\' | translate}}

\\\r\n \\\r\n
\\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n \\\r\n
\\\r\n \\\r\n {{\\'txtId\\'| translate}} \\\r\n \\\r\n {{\\'Ext. ID\\'}} \\\r\n \\\r\n {{\\'txtName\\'| translate}} \\\r\n \\\r\n {{\\'txtActive\\'| translate}} \\\r\n
\\\r\n \\\r\n \\\r\n {{user.id}} \\\r\n \\\r\n {{user.ExternalId ? user.ExternalId : \\' - \\'}} \\\r\n \\\r\n {{(user.FirstName ? user.FirstName + \\' \\' : \\'\\') + (user.LastName ? user.LastName: \\'\\')}} \\\r\n \\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n \\\r\n
'\r\n );\r\n }]);\r\n\r\n /*\r\n * Controller that handles the User Access tab\r\n */\r\n function UserAccessController(\r\n $scope,\r\n $uibModal,\r\n $filter,\r\n UserFactory\r\n ) {\r\n var vm = this;\r\n \r\n vm.currentPage = 1;\r\n vm.itemsPerPage = 30;\r\n vm.numPages = 1;\r\n \r\n var selectedOrganizationAccess = null;\r\n vm.onOrganizationChange = function (organization) {\r\n //organization.HasAccess = !organization.HasAccess;\r\n\r\n if (!organization.HasAccess) {\r\n //check if there is an user in that organization that has the same username\r\n UserFactory.checkUsersForOrganizationAccess(vm.user.id, organization.id)\r\n .then(function (result) {\r\n if (result && result.length > 0) {\r\n vm.existingOrganizationUsers = result;\r\n $uibModal.open({\r\n scope: $scope,\r\n templateUrl: 'template/userOrganizationAccess.html',\r\n size: 'lg'\r\n });\r\n selectedOrganizationAccess = organization;\r\n } else\r\n organization.HasAccess = true;\r\n });\r\n } else {\r\n //remove access\r\n organization.HasAccess = false;\r\n\r\n //remove the shadowId\r\n organization.SelectedUserId = null;\r\n }\r\n };\r\n\r\n vm.isOkAccessDisabled = function () {\r\n if (!vm.existingOrganizationUsers || vm.existingOrganizationUsers.length == 0)\r\n return true;\r\n\r\n return $filter('filter')(vm.existingOrganizationUsers, { Selected: true }).length == 0 || $filter('filter')(vm.existingOrganizationUsers, { Selected: true }).length > 1;\r\n };\r\n\r\n vm.updateExistingUserWithShadow = function () {\r\n //get the selected user\r\n var selectedUser = $filter('filter')(vm.existingOrganizationUsers, { Selected: true })[0];\r\n\r\n //set the shadowId so that we know which user to update to shadow user\r\n selectedOrganizationAccess.SelectedUserId = selectedUser.id;\r\n\r\n //set the access for the organization\r\n selectedOrganizationAccess.HasAccess = true;\r\n };\r\n\r\n vm.createANewShadowUser = function () {\r\n selectedOrganizationAccess.HasAccess = true;\r\n\r\n selectedOrganizationAccess.SelectedUserId = null;\r\n };\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserImpersonate', {\r\n templateUrl: 'Scripts/user/user-details/user-impersonate/user-impersonate.component.html',\r\n controller: 'UserImpersonateController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n user: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserImpersonateController.$inject = [\r\n '_',\r\n 'dialogService',\r\n '$translate',\r\n '$q',\r\n 'SessionFactory',\r\n '$scope',\r\n 'UserFactory'\r\n ];\r\n\r\n angular\r\n .module('user')\r\n .controller('UserImpersonateController', UserImpersonateController);\r\n\r\n /**\r\n * Controller that handles the user impersonation\r\n */\r\n function UserImpersonateController(\r\n _,\r\n dialogService,\r\n $translate,\r\n $q,\r\n SessionFactory,\r\n $scope,\r\n UserFactory\r\n ) {\r\n var vm = this;\r\n\r\n var ASK_USER_CONSTANT = 'ASK_USER';\r\n\r\n vm.$onInit = onInit;\r\n vm.impersonate = impersonate;\r\n\r\n function onInit() {\r\n\r\n };\r\n\r\n /**\r\n * Triggered when the user chooses to impersonate the current user\r\n */\r\n function impersonate() {\r\n if (_.isNil(vm.user))\r\n return;\r\n\r\n if (_.isNil(UserFactory.organizationSettings))\r\n return;\r\n\r\n\r\n var promise = null;\r\n\r\n //if the company does not allow impersonate\r\n if (!UserFactory.organizationSettings.AllowImpersonate)\r\n promise = handleNoCompanyImpersonationSetting();\r\n else if (!vm.user.Settings || (!vm.user.Settings.AllowImpersonation && !vm.user.Settings.AllowImpersonationOnce)) //show you're not allowed message\r\n promise = handleNoImpersonationSetting();\r\n else if (vm.user.Settings.AllowImpersonation && !vm.user.Settings.AllowImpersonationOnce) //handle impersonation based on settings\r\n promise = handleImpersonation();\r\n else if (vm.user.Settings.AllowImpersonationOnce)\r\n promise = handleImpersonationOnce();\r\n else\r\n promise = $q.when(null);\r\n\r\n promise.then(function (result) {\r\n if (!result)\r\n return $q.when();\r\n //if we need to ask the user then\r\n if (result == ASK_USER_CONSTANT)\r\n return askUserToAllowImpersonation();\r\n\r\n return SessionFactory.impersonate(vm.user.id, result.password, result.reason);\r\n }).then(function (result) {\r\n\r\n if (result && result.SessionId)\r\n $scope.$emit('onShadowLogin', true, result);\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a dialog informing user that he's not allowed to impersonate\r\n * The user is given the opportunity to inform the user that he wants to impersonate his user\r\n */\r\n function handleNoImpersonationSetting() {\r\n return dialogService.showConfirmDialog('COMMON.WARNING', 'USER_MODEL.USER_DOES_NOT_ALLOW_IMPERSONATE')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(null);\r\n\r\n return $q.when(ASK_USER_CONSTANT);\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a dialog informing user that he's not allowed by the comapny to impersonate\r\n * The user cannot ask the user for impersonation. He must contact the company instead.\r\n */\r\n function handleNoCompanyImpersonationSetting() {\r\n return dialogService.showAlertDialog('COMMON.WARNING', 'USER_MODEL.COMPANY_DOES_NOT_ALLOW_IMPERSONATE')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(null);\r\n\r\n return $q.when(null);\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a series of dialogs informing the user if he's allowed or not to impersonate the user\r\n * Also, the user is given here the opportunity to inform the user if the from-to has expired or not there yet\r\n */\r\n function handleImpersonation() {\r\n //check if the user has from and to\r\n var from = null, to = null;\r\n\r\n if (vm.user.Settings.FromDate)\r\n from = moment(vm.user.Settings.FromDate).toISOString();\r\n\r\n if (vm.user.Settings.ToDate)\r\n to = moment(vm.user.Settings.ToDate).toISOString();\r\n\r\n //if the user has from date set -> he can be impersonated from that date until the end of times\r\n if (from && !to) {\r\n if (moment().isBefore(moment(from)))\r\n return showAskUserDialog(from, to);\r\n\r\n return dialogService.showConfirmDialog('COMMON.WARNING', 'USER_MODEL.USER_IMPERSONATE_MESSAGE')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(null);\r\n\r\n return handlePassword();\r\n });\r\n } else if (from && to) {\r\n //if we have from and to we have to check if current date fits between these dates\r\n if (moment().isBetween(from, to, 'day', '[]'))\r\n return dialogService.showConfirmDialog('COMMON.WARNING', $translate.instant('USER_MODEL.USER_IMPERSONATE_MESSAGE_FROM_TO', {\r\n fromDate: moment(from).format('DD.MM.YYYY'),\r\n toDate: moment(to).format('DD.MM.YYYY')\r\n }))\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(null);\r\n\r\n return handlePassword();\r\n });\r\n else //well... the current date does not fit so we inform the user\r\n return showAskUserDialog(from, to);\r\n }\r\n\r\n return $q.when(null);\r\n };\r\n\r\n /**\r\n * Triggered when the user has selected impersonate once and a dialog is presented with some additional information\r\n */\r\n function handleImpersonationOnce() {\r\n return dialogService.showConfirmDialog('COMMON.WARNING', 'USER_MODEL.USER_IMPERSOANTE_ONCE_MESSAGE')\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(null);\r\n\r\n return handlePassword();\r\n });\r\n }\r\n\r\n /**\r\n * A dialog is presented that the user can no longer be impersonated and asks the user if he wants to notify the user\r\n * @param {any} from\r\n * @param {any} to\r\n */\r\n function showAskUserDialog(from, to) {\r\n return dialogService.showConfirmDialog('COMMON.WARNING', [\r\n $translate.instant('USER_MODEL.CAN_NO_LONGER_IMPERSONATE', {\r\n fromDate: moment(from).format('DD.MM.YYYY'),\r\n toDate: to ? moment(to).format('DD.MM.YYYY') : $translate.instant('USER_MODEL.NO_LIMIT')\r\n }), 'USER_MODEL.CAN_NO_LONGER_IMPERSONATE_INFORM_USER'\r\n ])\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n return $q.when(null);\r\n\r\n return $q.when(ASK_USER_CONSTANT);\r\n });\r\n };\r\n\r\n /**\r\n * Function that displays a dialog where the users needs to type in the password and the reason why he's impersonating this user\r\n */\r\n function handlePassword() {\r\n return dialogService.showDialogWithInputs('COMMON.CONFIRM', 'USER_MODEL.ENTER_PASSWORD_FOR_IMPERSONATE', null, [\r\n { type: null, model: null, label: 'USER_MODEL.REASON_FOR_IMPERSONATION', inputType: 'textarea', name: 'reasonInput' },\r\n { type: 'password', model: null, label: 'COMMON.PASSWORD', inputType: 'input', name: 'passwordInput' }\r\n ])\r\n .then(function (result) {\r\n if (!result || (result.result != dialogService.DIALOG_RESULT_OK))\r\n return $q.when(null);\r\n\r\n var resultedInputs = result.inputs;\r\n\r\n if (_.isNil(resultedInputs) || _.isEmpty(resultedInputs))\r\n return $q.when();\r\n\r\n var password = resultedInputs[1].model;\r\n var reason = resultedInputs[0].model;\r\n\r\n return { password: btoa(password), reason: reason };\r\n });\r\n };\r\n\r\n function askUserToAllowImpersonation() {\r\n return UserFactory.requestImpersonateAccess(vm.user.id);\r\n };\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserIntranettInfo', {\r\n templateUrl: 'Scripts/user/user-details/user-intranett-info/user-intranett-info.component.html',\r\n controller: 'UserIntranettController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n userId: '=vbUserId'\r\n }\r\n })\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserIntranettController.$inject = [\r\n 'UserFactory'\r\n ];\r\n\r\n angular\r\n .module('user')\r\n .controller('UserIntranettController', UserIntranettController);\r\n\r\n function UserIntranettController(\r\n UserFactory\r\n ) {\r\n var vm = this;\r\n\r\n vm.intranettInfo = null;\r\n\r\n vm.$onInit = function () {\r\n getIntranettInfo();\r\n }\r\n\r\n function getIntranettInfo() {\r\n UserFactory.getIntranettDetails(vm.userId)\r\n .then(function (result) {\r\n vm.intranettInfo = result;\r\n });\r\n }\r\n }\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserSettings', {\r\n templateUrl: 'Scripts/user/user-details/user-settings/user-settings.component.html',\r\n controller: 'UserSettingsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n settings: '=',\r\n organizationId: '<',\r\n user: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserSettingsController.$inject = [\r\n 'OrganizationSettingFactory',\r\n 'UserFactory',\r\n 'sessionInformationService',\r\n 'userSettingsTabSet'\r\n ];\r\n\r\n angular\r\n .module('user')\r\n .controller('UserSettingsController', UserSettingsController);\r\n\r\n /**\r\n * Controller that handles the settings for user\r\n */\r\n function UserSettingsController(\r\n OrganizationSettingFactory,\r\n UserFactory,\r\n sessionInformationService,\r\n userSettingsTabSet\r\n ) {\r\n var vm = this;\r\n var loggedUser = sessionInformationService.getUser();\r\n var _activeTab = userSettingsTabSet.userSettingsTab;\r\n\r\n Object.defineProperties(vm,\r\n {\r\n activeTab: {\r\n get: function() {\r\n return _activeTab;\r\n }\r\n },\r\n userSettingsTab: {\r\n get: function() {\r\n return userSettingsTabSet.userSettingsTab;\r\n }\r\n },\r\n notificationSettingsTab: {\r\n get: function() {\r\n return userSettingsTabSet.notificationSettingsTab;\r\n }\r\n }\r\n });\r\n\r\n vm.organizationSettings = null;\r\n vm.loaded = false;\r\n\r\n vm.$onInit = onInit;\r\n vm.isLoggedUser = isLoggedUser;\r\n vm.selectTab = selectTab;\r\n\r\n function onInit() {\r\n //first get the settings for the company\r\n getCompanySettings();\r\n //format the dates accordingly\r\n // formatDates();\r\n\r\n vm.loaded = true;\r\n\r\n if (!vm.user.EventNotificationTypeSettings) {\r\n vm.user.EventNotificationTypeSettings = [];\r\n }\r\n };\r\n\r\n /**\r\n * Gets the company settings\r\n */\r\n function getCompanySettings() {\r\n return OrganizationSettingFactory.getOrganizationSettingsByOrganizationId(vm.organizationId)\r\n .then(function (result) {\r\n vm.organizationSettings = UserFactory.organizationSettings = result;\r\n });\r\n };\r\n\r\n function isLoggedUser() {\r\n return vm.user && vm.user.id == loggedUser.id;\r\n }\r\n\r\n function selectTab(tab) {\r\n _activeTab = tab;\r\n }\r\n };\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserSettingsFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular\r\n .module('user')\r\n .factory('UserSettingsFactory', UserSettingsFactory);\r\n\r\n function UserSettingsFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n var api = baseUrlService.getBaseUrl();\r\n\r\n var UserSettingsApi = $resource(api + 'REST/UserSettings.svc/UserSettings');\r\n\r\n this.get = function () {\r\n return UserSettingsApi.get()\r\n .$promise;\r\n };\r\n\r\n return this;\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseAgendaItem')\r\n .component('vbCourseAgendaItemList',\r\n {\r\n templateUrl: 'Scripts/course/course-agenda/course-agenda-item/course-agenda-item-list/course-agenda-item-list.component.html',\r\n controller: 'CourseAgendaItemListController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n items: '<',\r\n clickableItems: '<',\r\n onCourseAgendaItemClick: '&?',\r\n showActiveTooltip: '';\r\n\r\n return ModalService.openModal($scope, htmlComponent, 'md');\r\n }\r\n\r\n function addHours() {\r\n openCourseHoursModal()\r\n .then(function (hours) {\r\n vm.hoursList.push(hours);\r\n });\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDayHours')\r\n .controller('CourseDayHoursListController', courseDayHoursListController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDayHours')\r\n .component('vbCourseDayHoursModal',\r\n {\r\n templateUrl: 'Scripts/course/course-day/course-day-hours/course-day-hours-modal/course-day-hours-modal.component.html',\r\n controller: 'CourseDayHoursModalController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n dismiss: '&',\r\n close: '&'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n courseDayHoursModalController.$inject = [\r\n 'CourseDayHoursService'\r\n ];\r\n\r\n function courseDayHoursModalController(\r\n CourseDayHoursService\r\n ) {\r\n var vm = this;\r\n\r\n vm.$onInit = onInit;\r\n vm.addHours = addHours;\r\n vm.isAddButtonDisabled = isAddButtonDisabled;\r\n vm.isStartTimeGreaterThanEndTime = isStartTimeGreaterThanEndTime;\r\n\r\n function onInit() {\r\n\r\n var startTime = new Date();\r\n startTime.setHours(8, 0, 0);\r\n\r\n var endTime = new Date();\r\n endTime.setHours(16, 0, 0);\r\n\r\n vm.hours = {\r\n Active: true,\r\n StartTime: startTime.getTime(),\r\n EndTime: endTime.getTime()\r\n };\r\n }\r\n\r\n function addHours() {\r\n vm.close({ hours: vm.hours });\r\n }\r\n\r\n function isStartTimeGreaterThanEndTime() {\r\n\r\n if (!vm.hours) {\r\n return false;\r\n }\r\n\r\n if (!vm.hours.StartTime || !vm.hours.EndTime) {\r\n return false;\r\n }\r\n\r\n return CourseDayHoursService.isStartTimeGreaterThanEndTime(vm.hours);\r\n }\r\n\r\n function isAddButtonDisabled() {\r\n\r\n if (!vm.hours) {\r\n return true;\r\n }\r\n\r\n if (!vm.hours.StartTime || !vm.hours.EndTime) {\r\n return true;\r\n }\r\n\r\n if (isStartTimeGreaterThanEndTime()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDayHours')\r\n .controller('CourseDayHoursModalController', courseDayHoursModalController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbDayPicker',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-time-interval-tab/day-picker/day-picker.component.html',\r\n controller: 'DayPickerController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n days: '<',\r\n onDaySelectionToggle: '&?',\r\n onDaysSelectionToggle: '&?'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function dayPickerController() {\r\n\r\n var vm = this;\r\n var _groupsOfDates = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n groupsOfDates: {\r\n get: function() {\r\n return _groupsOfDates;\r\n }\r\n }\r\n });\r\n\r\n vm.$onChanges = onChanges;\r\n vm.onDayClick = onDayClick;\r\n vm.toggleGroupSelection = toggleGroupSelection;\r\n \r\n function onChanges() {\r\n if (!vm.days) {\r\n vm.days = [];\r\n }\r\n _groupsOfDates = [];\r\n formatDays();\r\n }\r\n\r\n function formatDays() {\r\n\r\n vm.days.forEach(function (day) {\r\n\r\n var momentDate = moment(day.Date);\r\n\r\n var month = momentDate.month();\r\n var year = momentDate.year();\r\n\r\n var group = _groupsOfDates.find(function (group) {\r\n return group.month === month &&\r\n group.year === year;\r\n });\r\n\r\n if (!group) {\r\n _groupsOfDates.push({\r\n month: month,\r\n year: year,\r\n monthString: momentDate.format('MMMM'),\r\n days: [day]\r\n });\r\n } else {\r\n group.days.push(day);\r\n }\r\n });\r\n }\r\n\r\n function toggleDaySelection(day) {\r\n day.isSelected = !day.isSelected;\r\n notifyParentComponentAboutDaySelection(day);\r\n }\r\n\r\n function onDayClick(day) {\r\n toggleDaySelection(day);\r\n }\r\n\r\n function toggleGroupSelection(group) {\r\n group.areAllSelected = !group.areAllSelected;\r\n toggleDaysSelection(group.days, group.areAllSelected);\r\n }\r\n\r\n function toggleDaysSelection(days, selected) {\r\n\r\n days.forEach(function(day) {\r\n day.isSelected = selected;\r\n });\r\n\r\n notifyParentComponentAboutDaysSelection(days, selected);\r\n }\r\n\r\n function notifyParentComponentAboutDaySelection(day) {\r\n if (vm.onDaySelectionToggle && typeof vm.onDaySelectionToggle === 'function') {\r\n vm.onDaySelectionToggle({\r\n day: day\r\n });\r\n }\r\n }\r\n\r\n function notifyParentComponentAboutDaysSelection(days, selection) {\r\n if (vm.onDaysSelectionToggle && typeof vm.onDaysSelectionToggle === 'function') {\r\n vm.onDaysSelectionToggle({\r\n days: days,\r\n selection: selection\r\n });\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('DayPickerController', dayPickerController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseDetails')\r\n .component('vbStartSessionForDayButton',\r\n {\r\n templateUrl: 'Scripts/course/course-details/course-details-time-interval-tab/start-session-for-day-button/start-session-for-day-button.component.html',\r\n controller: 'StartSessionForDayButtonController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n courseDay: '<',\r\n course: '<'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n startSessionForDayButtonController.$inject = [\r\n 'sessionInformationService',\r\n 'CourseEnrollmentFactory',\r\n '$translate',\r\n 'CourseSessionFactory',\r\n '$location',\r\n '$scope',\r\n 'CourseFactory'\r\n ];\r\n\r\n function startSessionForDayButtonController(\r\n sessionInformationService,\r\n CourseEnrollmentFactory,\r\n $translate,\r\n CourseSessionFactory,\r\n $location,\r\n $scope,\r\n CourseFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.canStartSessionButtonBeDisplayed = canStartSessionButtonBeDisplayed;\r\n vm.isStartSessionButtonDisabled = isStartSessionButtonDisabled;\r\n vm.getTooltipMessage = getTooltipMessage;\r\n vm.startSessionForDay = startSessionForDay;\r\n vm.getButtonText = getButtonText;\r\n vm.$onDestroy = onDestroy;\r\n\r\n function getEnrollmentsByCourseDay() {\r\n\r\n if (!vm.courseDay || !vm.courseDay.id) {\r\n return;\r\n }\r\n\r\n CourseEnrollmentFactory.getEnrollmentsByCourseDay(vm.courseDay.id)\r\n .then(function (enrollments) {\r\n vm.courseDay.Enrollments = enrollments;\r\n });\r\n }\r\n\r\n function canStartSessionButtonBeDisplayed() {\r\n return sessionInformationService.isLoggedUserAdminFromCentral() &&\r\n vm.course && vm.course.id &&\r\n vm.courseDay && vm.courseDay.id;\r\n }\r\n\r\n function isStartSessionButtonDisabled() {\r\n\r\n if (!vm.courseDay || !vm.courseDay.id) {\r\n return true;\r\n }\r\n\r\n if (!vm.courseDay.Enrollments || vm.courseDay.Enrollments.length === 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function getTooltipMessage() {\r\n\r\n if (!vm.courseDay || !vm.courseDay.id) {\r\n return $translate.instant('COURSE_SESSION.MESSAGES.CANNOT_START_SESSION_FOR_DAY');\r\n }\r\n\r\n if (!vm.courseDay.Enrollments || vm.courseDay.Enrollments.length === 0) {\r\n return $translate.instant('COURSE_SESSION.MESSAGES.CANNOT_START_SESSION_BECAUSE_NO_ENROLLED_USERS');\r\n }\r\n\r\n return '';\r\n }\r\n\r\n function startSessionForDay() {\r\n\r\n if (!vm.courseDay || !vm.courseDay.id) {\r\n return;\r\n }\r\n\r\n if (!vm.course || !vm.course.id) {\r\n return;\r\n }\r\n CourseFactory.saveCourse(vm.course).then(function () {\r\n if (vm.courseDay.CourseSession && vm.courseDay.CourseSession.id) {\r\n $location.path('/course-session/' + vm.courseDay.CourseSession.id);\r\n } else {\r\n CourseSessionFactory.createSessionForCourse(vm.course.id, vm.courseDay.id)\r\n .then(function (session) {\r\n $location.path('/course-session/' + session.id);\r\n });\r\n }\r\n });\r\n }\r\n\r\n function getButtonText() {\r\n\r\n if (!vm.courseDay) {\r\n return '';\r\n }\r\n\r\n if (!vm.courseDay.CourseSession || !vm.courseDay.CourseSession.id) {\r\n return $translate.instant('COURSE.START_SESSION');\r\n }\r\n\r\n return $translate.instant('COURSE_PAGE.VIEW_SESSION');\r\n }\r\n\r\n var onAfterEnrollmentSaveDeregistrationFunction = $scope.$on('onAfterEnrollmentSave',\r\n function (event, args) {\r\n\r\n // the day on which the enrollment was saved\r\n var courseDay = args.courseDay;\r\n\r\n // refresh enrollments only if the day on which the enrollment was saved is the current day (vm.courseDay)\r\n if (courseDay.id === vm.courseDay.id) {\r\n getEnrollmentsByCourseDay();\r\n }\r\n });\r\n\r\n function onDestroy() {\r\n\r\n if (onAfterEnrollmentSaveDeregistrationFunction) {\r\n // unsubscribe from the event\r\n onAfterEnrollmentSaveDeregistrationFunction();\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('courseDetails')\r\n .controller('StartSessionForDayButtonController', startSessionForDayButtonController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseSessionDetails')\r\n .constant('courseSessionDetailsTabsetTabs',\r\n {\r\n enrolledUsersTab: 'ENROLLED_USERS',\r\n courseInformationTab: 'COURSE_INFORMATION',\r\n agendaTab: 'AGENDA'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('courseSessionDetails')\r\n .component('vbCourseInformationTab',\r\n {\r\n templateUrl: 'Scripts/course/course-session/course-session-details/course-information-tab/course-information-tab.component.html',\r\n controller: 'CourseInformationTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n course: '<',\r\n courseSession: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function courseInformationTabController() {\r\n var vm = this;\r\n }\r\n\r\n angular\r\n .module('courseSessionDetails')\r\n .controller('CourseInformationTabController', courseInformationTabController);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n EmailSettingsFactory.$inject = [\r\n '$resource',\r\n 'baseUrlService'\r\n ];\r\n\r\n angular.module(\"deviation\").factory(\"EmailSettingsFactory\", EmailSettingsFactory);\r\n\r\n function EmailSettingsFactory(\r\n $resource,\r\n baseUrlService\r\n ) {\r\n\r\n var EmailSettingsForDeviationType = $resource(baseUrlService.getBaseUrl() + 'REST/DeviationEmailSettings.svc/DeviationEmailSettings/:deviationTypeId');\r\n\r\n /**\r\n * Fetch the settings for a given type id\r\n * @param deviationTypeId\r\n * @returns\r\n */\r\n var getEmailSettingsForDeviationType = function (deviationTypeId) {\r\n return EmailSettingsForDeviationType.get({ deviationTypeId: deviationTypeId }).$promise;\r\n };\r\n\r\n /**\r\n * Saves any given settings\r\n * @param emailSettings\r\n * @returns\r\n */\r\n var saveEmailSettingsForDeviationType = function (emailSettings) {\r\n return EmailSettingsForDeviationType.save(emailSettings).$promise;\r\n };\r\n\r\n return {\r\n getEmailSettingsForDeviationType: getEmailSettingsForDeviationType,\r\n saveEmailSettingsForDeviationType: saveEmailSettingsForDeviationType\r\n };\r\n\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ModalDeviationTypeEmailSettingsController.$inject = [\r\n '$scope',\r\n 'EmailSettingsFactory',\r\n 'DeviationFactory'\r\n ];\r\n\r\n angular.module(\"deviation\").controller(\"ModalDeviationTypeEmailSettingsController\", ModalDeviationTypeEmailSettingsController);\r\n\r\n function ModalDeviationTypeEmailSettingsController(\r\n $scope,\r\n EmailSettingsFactory,\r\n DeviationFactory\r\n ) {\r\n\r\n function init() {\r\n\r\n $scope.deviationSelectedType = $scope.deviationListCtrl.currentSelectedTab;\r\n\r\n getSelectedDeviationTypeEmailSettings($scope.deviationSelectedType);\r\n\r\n }\r\n\r\n function getSelectedDeviationTypeEmailSettings(selectedDeviationType) {\r\n\r\n if (selectedDeviationType && selectedDeviationType.id) {\r\n\r\n EmailSettingsFactory.getEmailSettingsForDeviationType(selectedDeviationType.id).then(function (result) {\r\n $scope.deviationTypeEmailSettings = result;\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n $scope.saveSelectedDeviationTypeEmailSettings = function () {\r\n\r\n $scope.deviationTypeEmailSettings.DeviationType = $scope.deviationListCtrl.currentSelectedTab;\r\n\r\n EmailSettingsFactory.saveEmailSettingsForDeviationType($scope.deviationTypeEmailSettings).then(function () {\r\n\r\n $scope.closeModal();\r\n\r\n });\r\n\r\n };\r\n\r\n $scope.closeModal = function () {\r\n\r\n if (DeviationFactory.modalInstance != null) {\r\n DeviationFactory.modalInstance.dismiss();\r\n DeviationFactory.modalInstance = null;\r\n }\r\n\r\n }\r\n\r\n\r\n init();\r\n\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n deviationEmailTemplateService.$inject = [\r\n 'TableResources'\r\n ];\r\n\r\n function deviationEmailTemplateService(\r\n TableResources\r\n ) {\r\n\r\n function getTableByEmailTemplate(emailTemplate) {\r\n\r\n if (!emailTemplate || !emailTemplate.Table) {\r\n return null;\r\n }\r\n\r\n switch (emailTemplate.Table) {\r\n\r\n case TableResources.DeviationInternalTable:\r\n return TableResources.UserTable;\r\n case TableResources.DeviationCustomerTable:\r\n return TableResources.CustomerTable;\r\n default:\r\n return null;\r\n }\r\n }\r\n\r\n return {\r\n getTableByEmailTemplate: getTableByEmailTemplate\r\n };\r\n }\r\n\r\n angular\r\n .module('deviation')\r\n .service('DeviationEmailTemplateService', deviationEmailTemplateService);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module(\"deviation\")\r\n .directive(\"deviationEmailTemplate\", function () {\r\n\r\n return {\r\n restrict: \"E\",\r\n scope: {\r\n templateFor: \"=?\",\r\n emailTemplate: \"=?\",\r\n isPreview: \"=?\",\r\n notificationRecipients: \"=?\",\r\n organizationId : \"=\"\r\n },\r\n templateUrl: \"Scripts/deviation/email/emailTemplate/modalEmailTemplates/deviationEmailTemplatePartial.html\",\r\n controller: \"DeviationEmailTemplateController\"\r\n\r\n };\r\n\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n DeviationEmailTemplateController.$inject = [\r\n '$scope',\r\n '$sce',\r\n 'EmailTemplateFactory',\r\n 'DeviationFactory',\r\n '$timeout',\r\n 'DeviationEmailTemplateService'\r\n ];\r\n\r\n angular.module(\"deviation\").controller(\"DeviationEmailTemplateController\", DeviationEmailTemplateController);\r\n\r\n function DeviationEmailTemplateController(\r\n $scope,\r\n $sce,\r\n EmailTemplateFactory,\r\n DeviationFactory,\r\n $timeout,\r\n DeviationEmailTemplateService\r\n ) {\r\n\r\n $scope.search = { freeText: '' };\r\n\r\n function init() {\r\n\r\n $scope.editor = {\r\n editingHeader: false,\r\n editingFooter: false,\r\n editingContent: false,\r\n editingRecipients: false,\r\n tempContent: '',\r\n tempHeader: '',\r\n tempFooter: '',\r\n tempRecipients: []\r\n };\r\n\r\n var associatedEntityType = \"\";\r\n\r\n if ($scope.templateFor) {\r\n associatedEntityType = $scope.templateFor;\r\n } else {\r\n associatedEntityType = $scope.emailTemplate.Table;\r\n }\r\n\r\n $scope.variables = EmailTemplateFactory.getTemplateVariables(associatedEntityType);\r\n\r\n if ($scope.notificationRecipients != null && $scope.notificationRecipients.length > 0) {\r\n $scope.editor.tempRecipients = $scope.notificationRecipients;\r\n };\r\n $scope.search.freeText = '';\r\n\r\n }\r\n\r\n /**\r\n * Enables editing for any given section\r\n * @param section\r\n */\r\n $scope.editNotificationTemplate = function (section) {\r\n if (section == 'HEADER') {\r\n $scope.editor.tempHeader = $scope.emailTemplate.Header;\r\n $scope.editor.editingHeader = true;\r\n } else if (section == 'FOOTER') {\r\n $scope.editor.tempFooter = $scope.emailTemplate.Footer;\r\n $scope.editor.editingFooter = true;\r\n } else if (section == 'CONTENT') {\r\n $scope.editor.tempContent = $scope.emailTemplate.Content;\r\n $scope.editor.editingContent = true;\r\n }\r\n };\r\n\r\n /**\r\n * Disables editing for any given section\r\n * @param section\r\n * @param saveChanges\r\n */\r\n $scope.closeNotificationTemplate = function (section, saveChanges) {\r\n if (section == 'HEADER') {\r\n if (saveChanges) $scope.emailTemplate.Header = $scope.editor.tempHeader;\r\n $scope.editor.tempHeader = '';\r\n $scope.editor.editingHeader = false;\r\n } else if (section == 'FOOTER') {\r\n if (saveChanges) $scope.emailTemplate.Footer = $scope.editor.tempFooter;\r\n $scope.editor.tempFooter = '';\r\n $scope.editor.editingFooter = false;\r\n } else if (section == 'CONTENT') {\r\n if (saveChanges) $scope.emailTemplate.Content = $scope.editor.tempContent;\r\n $scope.editor.tempContent = '';\r\n $scope.editor.editingContent = false;\r\n }\r\n };\r\n\r\n $scope.trustedText = function (text) {\r\n return $sce.trustAsHtml(text);\r\n };\r\n\r\n /**\r\n * Inserts any given hash variable into the content\r\n * @param variable\r\n * @param section\r\n */\r\n $scope.insertVariable = function (variable, section) {\r\n\r\n switch (section) {\r\n case \"HEADER\":\r\n\r\n if (!$scope.editor.tempHeader)\r\n $scope.editor.tempHeader = '';\r\n\r\n $scope.editor.tempHeader += variable.hashtag + \" \";\r\n\r\n break;\r\n case \"CONTENT\":\r\n\r\n if (!$scope.editor.tempContent)\r\n $scope.editor.tempContent = '';\r\n\r\n $scope.editor.tempContent += variable.hashtag + \" \";\r\n\r\n break;\r\n case \"FOOTER\":\r\n\r\n if (!$scope.editor.tempContent)\r\n $scope.editor.tempContent = '';\r\n\r\n $scope.editor.tempFooter += variable.hashtag + \" \";\r\n\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Removes a recipient at the given index\r\n * @param index\r\n */\r\n $scope.removeRecipient = function (index) {\r\n $scope.editor.tempRecipients.splice(index, 1);\r\n $scope.notificationRecipients = $scope.editor.tempRecipients;\r\n };\r\n\r\n $scope.getNewEntitiesToNotify = function (freetext, templateTable) {\r\n\r\n DeviationFactory.getNewEntitiesToNotify(freetext, templateTable, $scope.organizationId)\r\n .then(function (result) {\r\n $scope.entitiesFound = result;\r\n });\r\n\r\n };\r\n\r\n var notificationPattern = function (value) {\r\n var regexp = /^([\\w.\\-\\_]{2,30})+@([\\w-\\_]{1,30})+([\\.]{1,1}[\\w]{1,30}|[\\.]{1,1})+([\\w]{1,10})$/;\r\n\r\n return regexp.test(value);\r\n };\r\n\r\n /**\r\n * Transform a given string into a list of notifications\r\n * @param string\r\n * @returns\r\n */\r\n var notificationStringToList = function (string) {\r\n string = string.replace(/^[\\s,\\|;]+/, '');\r\n string = string.replace(/[\\s,\\|;]+$/, '');\r\n\r\n if (!string && !string.replace(/[\\s,\\|;]+/, '')) {\r\n return [];\r\n }\r\n\r\n var list = string.split(/[\\s,\\|;]+/);\r\n\r\n var error = false;\r\n angular.forEach(list, function (item) {\r\n if (notificationPattern(item) == false) error = true;\r\n });\r\n\r\n if (!error) {\r\n $scope.recipientsError = false;\r\n return list;\r\n }\r\n else {\r\n $scope.recipientsError = true;\r\n return null;\r\n }\r\n };\r\n\r\n /**\r\n * Adds a new recipient to the list of recipients\r\n * @param entity\r\n */\r\n $scope.addRecipient = function (entity) {\r\n\r\n if (recipientExists(entity) == false) {\r\n\r\n var newRecipient = {\r\n Email: entity.Email,\r\n id: entity.id,\r\n Table: entity.Table\r\n };\r\n\r\n $scope.editor.tempRecipients.push(newRecipient);\r\n $scope.notificationRecipients = $scope.editor.tempRecipients;\r\n $scope.search.freeText = '';\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Adds a custom recipient to the list of recipients\r\n * @param freeText\r\n */\r\n $scope.addCustomRecipients = function (freeText) {\r\n\r\n if (!freeText || !notificationPattern(freeText))\r\n return;\r\n\r\n $scope.addRecipient({\r\n Email: freeText,\r\n Table: DeviationEmailTemplateService.getTableByEmailTemplate($scope.emailTemplate)\r\n });\r\n\r\n };\r\n\r\n $scope.isCustomRecipientValid = function (freeText) {\r\n\r\n if (!freeText || !notificationPattern(freeText))\r\n return false;\r\n\r\n return true;\r\n\r\n };\r\n\r\n /**\r\n * Removes a recipient from the list of recipients\r\n * @param entity\r\n * @returns\r\n */\r\n function recipientExists(entity) {\r\n\r\n var returnData = false;\r\n\r\n if ($scope.editor.tempRecipients != null && $scope.editor.tempRecipients.length > 0) {\r\n angular.forEach($scope.editor.tempRecipients, function (notif) {\r\n if (notif.Email == entity.Email) {\r\n returnData = true;\r\n };\r\n });\r\n } else {\r\n return false;\r\n }\r\n\r\n return returnData;\r\n }\r\n\r\n $timeout(init);\r\n\r\n };\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n ModalDeviationEmailTemplatesController.$inject = [\r\n '$scope',\r\n 'EmailTemplateFactory',\r\n 'DeviationFactory'\r\n ];\r\n\r\n angular.module(\"deviation\").controller(\"ModalDeviationEmailTemplatesController\", ModalDeviationEmailTemplatesController);\r\n\r\n function ModalDeviationEmailTemplatesController(\r\n $scope,\r\n EmailTemplateFactory,\r\n DeviationFactory\r\n ) {\r\n\r\n function init() {\r\n\r\n $scope.emailTemplateSettings = {\r\n emailTemplateFor: \"\",\r\n showEmailTemplate: false\r\n };\r\n\r\n getEmailTemplatesForDeviation();\r\n\r\n }\r\n\r\n /**\r\n * Retrieve the email templates for deviation\r\n */\r\n function getEmailTemplatesForDeviation() {\r\n\r\n EmailTemplateFactory.getEmailTemplatesForDeviation().then(function (result) {\r\n\r\n $scope.deviationEmailTemplates = result;\r\n\r\n });\r\n\r\n }\r\n \r\n $scope.createEmailTemplate = function (table) {\r\n\r\n if (table) {\r\n\r\n $scope.selectedEmailTemplate = {\r\n Header: \"\",\r\n Content: \"\",\r\n Footer: \"\"\r\n };\r\n\r\n $scope.emailTemplateSettings.emailTemplateFor = table;\r\n $scope.emailTemplateSettings.showEmailTemplate = true;\r\n\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Saves the email template\r\n * @param deviationEmailTemplate\r\n * @param table\r\n */\r\n $scope.saveDeviationEmailTemplate = function (deviationEmailTemplate, table) {\r\n\r\n if (deviationEmailTemplate) {\r\n\r\n deviationEmailTemplate.Table = table;\r\n\r\n EmailTemplateFactory.saveDeviationEmailTemplate(deviationEmailTemplate).then(function () {\r\n\r\n $scope.closeModal();\r\n $scope.resetEmailTemplate();\r\n\r\n });\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Checks whether the template already exists\r\n * @param table\r\n * @param checkForAll\r\n * @returns\r\n */\r\n $scope.existTemplate = function (table, checkForAll) {\r\n\r\n\r\n if ($scope.deviationEmailTemplates && $scope.deviationEmailTemplates.length > 0) {\r\n\r\n if (checkForAll) {\r\n\r\n return $scope.deviationEmailTemplates.length === 2;\r\n\r\n } else {\r\n\r\n for (var index = 0; index < $scope.deviationEmailTemplates.length; index++) {\r\n\r\n var currentTemplate = $scope.deviationEmailTemplates[index];\r\n\r\n if (currentTemplate.Table === table) {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n return false;\r\n\r\n }\r\n\r\n $scope.getAssociatedEntityType = function (table) {\r\n return EmailTemplateFactory.getAssociatedEntityType(table);\r\n }\r\n\r\n $scope.resetEmailTemplate = function () {\r\n\r\n $scope.emailTemplateSettings.emailTemplateFor = \"\";\r\n $scope.emailTemplateSettings.showEmailTemplate = false;\r\n\r\n }\r\n\r\n $scope.closeModal = function () {\r\n\r\n if (DeviationFactory.modalInstance != null) {\r\n DeviationFactory.modalInstance.dismiss();\r\n DeviationFactory.modalInstance = null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Sets any given template as the selected one\r\n * @param template\r\n */\r\n $scope.selectEmailTemplate = function (template) {\r\n\r\n if (template) {\r\n\r\n $scope.selectedEmailTemplate = template;\r\n\r\n $scope.emailTemplateSettings.emailTemplateFor = template.Table;\r\n $scope.emailTemplateSettings.showEmailTemplate = true;\r\n\r\n }\r\n\r\n }\r\n\r\n init();\r\n\r\n };\r\n\r\n})();","(function () {\r\n\r\n 'use strict';\r\n\r\n ModalPreviewEmailTemplateController.$inject = [\r\n '$scope',\r\n 'associatedEntityType',\r\n 'emailTemplate',\r\n 'notificationRecipients',\r\n 'EmailTemplateFactory',\r\n 'DeviationFactory',\r\n 'organizationId'\r\n ];\r\n\r\n angular.module(\"deviation\").controller(\"ModalPreviewEmailTemplateController\", ModalPreviewEmailTemplateController);\r\n\r\n function ModalPreviewEmailTemplateController(\r\n $scope,\r\n associatedEntityType,\r\n emailTemplate,\r\n notificationRecipients,\r\n EmailTemplateFactory,\r\n DeviationFactory,\r\n organizationId\r\n ) {\r\n\r\n function init() {\r\n\r\n $scope.associatedEntityType = associatedEntityType;\r\n $scope.emailTemplate = emailTemplate;\r\n $scope.notificationRecipients = notificationRecipients;\r\n $scope.organizationId = organizationId;\r\n\r\n $scope.emailData = {\r\n notificationRecipients: $scope.notificationRecipients,\r\n emailTemplate: $scope.emailTemplate\r\n };\r\n\r\n }\r\n\r\n $scope.getAssociatedEntityType = function (templateFor) {\r\n\r\n var table;\r\n\r\n if (templateFor)\r\n table = templateFor;\r\n else\r\n table = emailTemplate.Table;\r\n\r\n return EmailTemplateFactory.getAssociatedEntityType(table);\r\n }\r\n\r\n $scope.closeModal = function (emailData) {\r\n\r\n if (DeviationFactory.emailPreviewModalInstance != null) {\r\n\r\n if (emailData) {\r\n DeviationFactory.emailPreviewModalInstance.close(emailData);\r\n } else {\r\n DeviationFactory.emailPreviewModalInstance.dismiss();\r\n }\r\n\r\n DeviationFactory.emailPreviewModalInstance = null;\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n init();\r\n\r\n };\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n organizationNotificationSettingController.$inject = [\r\n 'TypeFactory',\r\n 'ListService',\r\n 'sessionInformationService'\r\n ];\r\n\r\n function organizationNotificationSettingController(\r\n TypeFactory,\r\n ListService,\r\n sessionInformationService\r\n ) {\r\n\r\n var vm = this;\r\n var notificationSetting = { NotificationTypes: [] };\r\n\r\n // controller \r\n vm.notificationTypes = [];\r\n \r\n vm.$onInit = onInit;\r\n vm.toggleNotificationTypeSelection = toggleNotificationTypeSelection;\r\n vm.onNotificationTypeToggle = onNotificationTypeToggle;\r\n\r\n function onInit() {\r\n\r\n notificationSetting.Table = vm.table;\r\n\r\n getNotificationTypes()\r\n .then(function() {\r\n\r\n if (vm.existentNotificationTypes)\r\n notificationSetting.NotificationTypes = vm.existentNotificationTypes;\r\n\r\n ListService.markExistentItemsAsSelected(vm.notificationTypes, vm.existentNotificationTypes, 'id');\r\n });\r\n }\r\n\r\n function getNotificationTypes() {\r\n\r\n return TypeFactory.getNotificationTypes()\r\n .then(function (notificationTypes) {\r\n\r\n vm.notificationTypes = notificationTypes;\r\n });\r\n }\r\n\r\n function selectNotificationType(selectedItem) {\r\n\r\n ListService.addItemIfNotExists(selectedItem, notificationSetting.NotificationTypes, 'id');\r\n\r\n // notify the parent component\r\n notifyParentComponentAboutChange();\r\n }\r\n\r\n function unselectNotificationType(unselectedItem) {\r\n\r\n ListService.removeItemFromList(unselectedItem, notificationSetting.NotificationTypes);\r\n\r\n // notify the parent component\r\n notifyParentComponentAboutChange();\r\n }\r\n\r\n function notifyParentComponentAboutChange() {\r\n\r\n if (vm.onNotificationSettingChange) {\r\n vm.onNotificationSettingChange({ notificationSetting: notificationSetting });\r\n }\r\n }\r\n\r\n function isLoggedUserOrganization() {\r\n return sessionInformationService.isLoggedUserOrganization(vm.organizationId);\r\n }\r\n\r\n function toggleNotificationTypeSelection(notificationType) {\r\n\r\n if (!isLoggedUserOrganization()) {\r\n return;\r\n }\r\n\r\n notificationType.checked = !notificationType.checked;\r\n\r\n onNotificationTypeToggle(notificationType);\r\n }\r\n\r\n function onNotificationTypeToggle(notificationType) {\r\n\r\n if (notificationType.checked) {\r\n selectNotificationType(notificationType);\r\n } else {\r\n unselectNotificationType(notificationType);\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('organization')\r\n .controller('OrganizationNotificationSettingController', organizationNotificationSettingController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('organization')\r\n .component('vbOrganizationNotificationSetting',\r\n {\r\n templateUrl: 'Scripts/organization/settings/organization-notification-settings-tab/organization-notification-setting/organization-notification-setting.component.html',\r\n controller: 'OrganizationNotificationSettingController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n table: '@',\r\n model: '=',\r\n existentNotificationTypes: '<',\r\n onNotificationSettingChange: '&?',\r\n organizationId: '<'\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CompanyInfoExecutionController.$inject = [\r\n 'QualityHandbookFactory',\r\n '$timeout',\r\n '$sce'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('CompanyInfoExecutionController', CompanyInfoExecutionController)\r\n .directive('companyInfoExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'CompanyInfoExecutionController as companyInfoCtrl',\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/variables/companyInfo/companyInfoExecutionPartial.html',\r\n bindToController: true,\r\n scope: {\r\n model: '=',\r\n printMode: '=',\r\n organizationId: '=',\r\n selectedValues: '='\r\n }\r\n };\r\n });\r\n\r\n function CompanyInfoExecutionController(\r\n QualityHandbookFactory,\r\n $timeout,\r\n $sce\r\n ) {\r\n var companyInfoCtrl = this;\r\n\r\n /**\r\n * Get the company info by the given organization id\r\n */\r\n function getCentralApprovalCompanyInfo() {\r\n return QualityHandbookFactory.getCentralApprovalCompanyInfo(companyInfoCtrl.organizationId).then(function (result) {\r\n companyInfoCtrl.model.CompanyInfo = result;\r\n });\r\n };\r\n\r\n function init() {\r\n if (!companyInfoCtrl.model)\r\n companyInfoCtrl.model = {};\r\n\r\n getCentralApprovalCompanyInfo();\r\n\r\n if (companyInfoCtrl.selectedValues && companyInfoCtrl.selectedValues.length > 0) {\r\n angular.forEach(companyInfoCtrl.selectedValues, function (s) {\r\n //if we have custom data process it and add new line tags\r\n if (s.CustomDataType) {\r\n var customDataType = JSON.parse(s.CustomDataType);\r\n if (customDataType) {\r\n s.MultipleChoiceComment = customDataType.MultipleChoiceComment;\r\n if (s.MultipleChoiceComment) {\r\n s.MultipleChoiceComment = s.MultipleChoiceComment.replaceAll('\\r\\n', '
');\r\n s.MultipleChoiceComment = s.MultipleChoiceComment.replaceAll('\\n', '
');\r\n s.MultipleChoiceComment = s.MultipleChoiceComment.replaceAll('\\r', '
');\r\n }\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n companyInfoCtrl.trustHtml = function (html) {\r\n return $sce.trustAsHtml(html);\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n CompanyInfoDetailedExecutionController.$inject = [\r\n '$timeout',\r\n 'QualityHandbookFactory',\r\n '$sce',\r\n '$filter'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('CompanyInfoDetailedExecutionController', CompanyInfoDetailedExecutionController)\r\n .directive('companyInfoDetailedExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'CompanyInfoDetailedExecutionController as companyInfoDetailedCtrl',\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/variables/companyInfoDetailed/companyInfoDetailedExecutionPartial.html',\r\n bindToController: true,\r\n scope: {\r\n model: '=',\r\n printMode: '=',\r\n organizationId: '=',\r\n selectedValues: '='\r\n }\r\n };\r\n });\r\n\r\n function CompanyInfoDetailedExecutionController(\r\n $timeout,\r\n QualityHandbookFactory,\r\n $sce,\r\n $filter\r\n ) {\r\n var companyInfoDetailedCtrl = this;\r\n\r\n /**\r\n * Get more details about the given company\r\n */\r\n function getCompanyInfoDetailed() {\r\n return QualityHandbookFactory.getCentralApprovalCompanyInfo(companyInfoDetailedCtrl.organizationId, true).then(function (result) {\r\n companyInfoDetailedCtrl.companyInfoDetailed = result;\r\n });\r\n };\r\n\r\n /**\r\n * Get the value of the reporting code provided\r\n * @param {any} reportCode\r\n */\r\n function getValueForReportCode(reportCode) {\r\n switch (reportCode) {\r\n case '$CompanyName$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.OrganizationName;\r\n case '$CompanyNumber$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.OrganizationNumber;\r\n case '$City$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.City;\r\n case '$PostalAddress$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.Address ? companyInfoDetailedCtrl.companyInfoDetailed.Address.Street : '';\r\n case '$PostalNumber/PostalCode$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.Address ? companyInfoDetailedCtrl.companyInfoDetailed.Address.PostalCode : '';\r\n case '$Phone$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.Phone;\r\n case '$Email$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.Email;\r\n case '$Homepage$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.HomePage;\r\n case '$CEO$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.CEOFullName;\r\n case '$NumberOfEmployees$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.SeniorPositions + ' i ledende stillinger \\n' + companyInfoDetailedCtrl.companyInfoDetailed.NonSeniorPositions + ' i ikke-ledende stillinger';\r\n case '$CompanyForm$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.OrganizationCompanyFormInfo.replace(/<(?:.|\\n)*?>/gm, '');\r\n case '$CompanyRegisteredIn$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.OrganizationCompanyRegistrationInfo.replace(/<(?:.|\\n)*?>/gm, '');\r\n case '$EstablishedDate$':\r\n return $filter('date')(companyInfoDetailedCtrl.companyInfoDetailed.OrganizationLaunchDate, 'dd.MM.yyyy');\r\n case '$Owner$':\r\n return companyInfoDetailedCtrl.companyInfoDetailed.OrganizationOwnersName;\r\n default:\r\n return '';\r\n }\r\n };\r\n\r\n /**\r\n * Gets the reporting code from the default answers\r\n * @param {any} defaultAnswers\r\n */\r\n function getReportCodeFromDefaultAnswers(defaultAnswers) {\r\n if (!defaultAnswers || defaultAnswers.length == 0)\r\n return '';\r\n\r\n for (var i = 0; i < defaultAnswers.length; i++) {\r\n var defaultAnswer = defaultAnswers[i];\r\n\r\n if (defaultAnswer.ProgId != 'PROG_ANNET')\r\n return defaultAnswer.Name;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n /**\r\n * Goes through the selected values and gets the appropriate values\r\n */\r\n function processSelectedValues() {\r\n if (!companyInfoDetailedCtrl.selectedValues || companyInfoDetailedCtrl.selectedValues.length == 0)\r\n return;\r\n\r\n for (var i = 0; i < companyInfoDetailedCtrl.selectedValues.length; i++) {\r\n var selectedValue = companyInfoDetailedCtrl.selectedValues[i];\r\n\r\n if (selectedValue.MultipleChoiceHeaderComment)\r\n continue;\r\n\r\n selectedValue.MultipleChoiceHeaderComment = getValueForReportCode(getReportCodeFromDefaultAnswers(selectedValue.ProcessListAction.DefaultAnswers));\r\n }\r\n };\r\n\r\n function init() {\r\n getCompanyInfoDetailed().then(function () {\r\n processSelectedValues();\r\n });\r\n };\r\n\r\n /**\r\n * Checks whether the default answers have any usefull info besides annet\r\n * @param {} defaultAnswers \r\n * @returns {} \r\n */\r\n companyInfoDetailedCtrl.hasAnyRelevantDefaultAnswer = function (defaultAnswers) {\r\n if (!defaultAnswers || defaultAnswers.length == 0)\r\n return false;\r\n\r\n for (var i = 0; i < defaultAnswers.length; i++) {\r\n var defaultAnswer = defaultAnswers[i];\r\n\r\n if (defaultAnswer.ProgId != 'PROG_ANNET')\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n companyInfoDetailedCtrl.replaceNewLines = function (string) {\r\n if (!string)\r\n return '';\r\n\r\n string = string.replaceAll('\\n', '
');\r\n string = string.replaceAll('\\r', '
');\r\n string = string.replaceAll('\\r\\n', '
');\r\n\r\n return string;\r\n }\r\n\r\n companyInfoDetailedCtrl.trustHtml = function (html) {\r\n return $sce.trustAsHtml(html);\r\n };\r\n \r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n PrimaryContactExecutionController.$inject = [\r\n '$timeout',\r\n 'QualityHandbookFactory'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('PrimaryContactExecutionController', PrimaryContactExecutionController)\r\n .directive('centralApprovalPrimaryContact', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'PrimaryContactExecutionController as contactCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/variables/primaryContact/primaryContactExecutionPartial.html',\r\n scope: {\r\n model: '=',\r\n printMode: '=',\r\n organizationId: '='\r\n }\r\n };\r\n });\r\n\r\n function PrimaryContactExecutionController(\r\n $timeout,\r\n QualityHandbookFactory\r\n ) {\r\n var contactCtrl = this;\r\n contactCtrl.primaryContact = null;\r\n\r\n /**\r\n * Gets details about the primary contact of the given organization\r\n */\r\n function getPrimaryContact() {\r\n return QualityHandbookFactory.getCentralApprovalPrimaryContact(contactCtrl.organizationId).then(function (result) {\r\n if (!result)\r\n return;\r\n\r\n result.FullName = (result.FirstName ? result.FirstName + ' ' : '') + (result.LastName ? result.LastName : '');\r\n contactCtrl.primaryContact = { PrimaryContact: result }\r\n });\r\n };\r\n\r\n function init() {\r\n getPrimaryContact().then(function () {\r\n if (!contactCtrl.model) {\r\n contactCtrl.model = contactCtrl.primaryContact;\r\n return;\r\n }\r\n\r\n var primaryContact = contactCtrl.model.PrimaryContact;\r\n //if any of the properties changes, update them properly\r\n if (primaryContact) {\r\n if (!primaryContact.FullNameChanged)\r\n primaryContact.FullName = contactCtrl.primaryContact.PrimaryContact.FullName;\r\n\r\n if (!primaryContact.PhoneChanged)\r\n primaryContact.Phone = contactCtrl.primaryContact.PrimaryContact.Phone;\r\n\r\n if (!primaryContact.EmailChanged)\r\n primaryContact.Email = contactCtrl.primaryContact.PrimaryContact.Email;\r\n\r\n }\r\n });\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n ProjectReferenceExecutionController.$inject = [\r\n '$timeout',\r\n '$sce',\r\n '$q',\r\n 'QualityHandbookFactory'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('ProjectReferenceExecutionController', ProjectReferenceExecutionController)\r\n .directive('projectReferenceExecution', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'ProjectReferenceExecutionController as projectRefCtrl',\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/variables/projectReference/projectReferenceExecutionPartial.html',\r\n bindToController: true,\r\n scope: {\r\n model: '=',\r\n printMode: '=',\r\n organizationId: '='\r\n }\r\n };\r\n });\r\n\r\n function ProjectReferenceExecutionController(\r\n $timeout,\r\n $sce,\r\n $q,\r\n QualityHandbookFactory\r\n ) {\r\n var projectRefCtrl = this;\r\n\r\n /**\r\n * Gets references\r\n */\r\n function getCentralApprovalReferences() {\r\n if (projectRefCtrl.printMode)\r\n return $q.when();\r\n\r\n return QualityHandbookFactory.getCentralApprovalOrderReferences(projectRefCtrl.organizationId).then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n projectRefCtrl.orderReferences = result;\r\n });\r\n };\r\n\r\n function init() {\r\n if (!projectRefCtrl.model)\r\n projectRefCtrl.model = {};\r\n\r\n if (!projectRefCtrl.model.ProjectReferences)\r\n projectRefCtrl.model.ProjectReferences = [{}];\r\n\r\n getCentralApprovalReferences();\r\n };\r\n\r\n /**\r\n * Adds manually a reference\r\n * @returns {} \r\n */\r\n projectRefCtrl.addNewProjectReference = function () {\r\n projectRefCtrl.model.ProjectReferences.push({});\r\n };\r\n \r\n /**\r\n * This field can have multiple lines\r\n * @param {} whatDidYouDo \r\n * @returns {} \r\n */\r\n projectRefCtrl.initWhatDidYouDo = function (whatDidYouDo) {\r\n if (!whatDidYouDo)\r\n return '';\r\n\r\n whatDidYouDo = whatDidYouDo.replaceAll('\\n', '
');\r\n whatDidYouDo = whatDidYouDo.replaceAll('\\r', '
');\r\n whatDidYouDo = whatDidYouDo.replaceAll('\\r\\n', '
');\r\n\r\n return whatDidYouDo;\r\n };\r\n\r\n projectRefCtrl.trustHtml = function (html) {\r\n return $sce.trustAsHtml(html);\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UsernameAndPasswordExecutionController.$inject = [\r\n '$timeout'\r\n ];\r\n\r\n angular.module('qualityHandbook')\r\n .controller('UsernameAndPasswordExecutionController', UsernameAndPasswordExecutionController)\r\n .directive('centralApprovalUsernameAndPassword', function () {\r\n return {\r\n restrict: 'E',\r\n controller: 'UsernameAndPasswordExecutionController as usernamePassCtrl',\r\n bindToController: true,\r\n templateUrl: 'Scripts/qualityHandbook/centralApproval/variables/usernameAndPassword/usernameAndPasswordExecutionPartial.html',\r\n\r\n scope: {\r\n model: '=',\r\n printMode: '=',\r\n organizationId: '=',\r\n items: '=',\r\n selectedValues: '=',\r\n isUsernameAndPasswordDisabled: '='\r\n }\r\n };\r\n });\r\n\r\n function UsernameAndPasswordExecutionController(\r\n $timeout\r\n ) {\r\n var usernamePassCtrl = this;\r\n\r\n function init() {\r\n if (!usernamePassCtrl.model)\r\n usernamePassCtrl.model = {};\r\n\r\n //if we have selected values, means that the user has typed something\r\n if (usernamePassCtrl.selectedValues && usernamePassCtrl.selectedValues.length > 0) {\r\n angular.forEach(usernamePassCtrl.selectedValues, function (s) {\r\n if (s.CustomDataType) {\r\n var customDataType = JSON.parse(s.CustomDataType);\r\n if (customDataType) {\r\n s.MultipleChoiceComment = customDataType.MultipleChoiceComment;\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n $timeout(init);\r\n };\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module('qualityHandbook')\r\n .component('vbPersonalHandbookSignature', {\r\n templateUrl: 'Scripts/qualityHandbook/qualityHandbookView/chapterView/personal-handbook-signature/personal-handbook-signature.component.html',\r\n controller: 'PersonalHandbookSignatureController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n foreignKey: '=',\r\n table: '@',\r\n getSignature: '='\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular.module('qualityHandbook')\r\n .controller('PersonalHandbookSignatureController', PersonalHandbookSignatureController);\r\n\r\n PersonalHandbookSignatureController.$inject = [\r\n '$filter'\r\n ];\r\n\r\n function PersonalHandbookSignatureController(\r\n $filter\r\n ) {\r\n var vm = this;\r\n vm.signature = {};\r\n\r\n vm.$onInit = function () {\r\n vm.signature = {\r\n Table: vm.table,\r\n Active: true,\r\n AttachmentName: 'signature_' + $filter('date')(new Date().getTime(), 'yyyyMMddhhmmss') + '.jpeg',\r\n AttachmentBytes:null\r\n };\r\n\r\n vm.getSignature = function () {\r\n if (!vm.signature.AttachmentBytes)\r\n return null;\r\n\r\n\r\n return vm.signature;\r\n };\r\n }\r\n\r\n vm.onSignatureDone = function (signature) {\r\n vm.signature.AttachmentBytes = signature;\r\n }\r\n }\r\n\r\n angular.module('qualityHandbook')\r\n .directive('vbSignature', VbSignatureDirective)\r\n\r\n function VbSignatureDirective() {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n\r\n var callbackFunction = scope.$eval(attrs['vbSignature']);\r\n var clearButtonClass = attrs['clearsignature'];\r\n\r\n angular.element(clearButtonClass).bind('click', function () {\r\n context.clearRect(0, 0, element[0].width, element[0].height);\r\n //white background because jpeg doesn't support transparency\r\n context.fillStyle = '#fff';\r\n context.fillRect(0, 0, element[0].width, element[0].height);\r\n callbackFunction(null);\r\n });\r\n\r\n var canvasElement = element[0];\r\n\r\n canvasElement.width = 300;\r\n canvasElement.height = 150;\r\n\r\n var context = canvasElement.getContext('2d');\r\n\r\n //white background because jpeg doesn't support transparency\r\n context.fillStyle = '#fff';\r\n context.fillRect(0, 0, element[0].width, element[0].height);\r\n\r\n //set style\r\n context.strokeStyle = \"#000000\";\r\n context.lineWidth = 2;\r\n context.lineJoin = context.lineCap = 'round';\r\n context.shadowBlur = 1;\r\n context.shadowColor = 'rgb(0, 0, 0)';\r\n\r\n // variable that decides if something should be drawn on mousemove\r\n var drawing = false, points = [];\r\n\r\n // the last coordinates before the current move\r\n var lastX;\r\n var lastY;\r\n var currentX;\r\n var currentY;\r\n var snapper;\r\n\r\n function draw() {\r\n\r\n var p1 = points[0];;\r\n\r\n context.beginPath();\r\n context.moveTo(p1.x, p1.y);\r\n\r\n for (var i = 1, len = points.length; i < len; i++) {\r\n context.lineTo(points[i].x, points[i].y);\r\n }\r\n context.stroke();\r\n\r\n }\r\n\r\n element.bind('mousedown', function (event) {\r\n //get canvas coordinates\r\n var canvasCoordinates = event.currentTarget.getBoundingClientRect();\r\n\r\n lastX = event.offsetX;\r\n lastY = event.offsetY;\r\n\r\n points.push({ x: lastX, y: lastY });\r\n\r\n drawing = true;\r\n });\r\n\r\n element.bind('mousemove', function (event) {\r\n\r\n if (drawing) {\r\n //get canvas coordinates\r\n var canvasCoordinates = event.currentTarget.getBoundingClientRect();\r\n\r\n currentX = event.offsetX;\r\n currentY = event.offsetY\r\n\r\n points.push({ x: currentX, y: currentY });\r\n\r\n draw();\r\n }\r\n });\r\n\r\n element.bind('mouseup', function (event) {\r\n // stop drawing\r\n drawing = false;\r\n\r\n //reset points\r\n points.length = 0;\r\n\r\n callbackFunction(canvasElement.toDataURL('image/jpeg'));\r\n });\r\n\r\n element.bind('mouseout', function (event) {\r\n // stop drawing\r\n drawing = false;\r\n\r\n //reset points\r\n points.length = 0;\r\n\r\n callbackFunction(canvasElement.toDataURL('image/jpeg'));\r\n });\r\n }\r\n }\r\n }\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('shared')\r\n .component('vbKeywordsList',\r\n {\r\n templateUrl: 'Scripts/shared/components/keywords/keywords-list/keywords-list.component.html',\r\n controller: 'KeywordsListController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n keywords: '=',\r\n readonly: '\\\r\n ';\r\n\r\n ModalService.openModal($scope, htmlComponent, 'lg')\r\n .then(function() {\r\n getCoursesOverview();\r\n });\r\n }\r\n\r\n function getEnrollButtonNameForCourse(course) {\r\n return $translate.instant('COURSE.ENROLL');\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('CoursesOverviewController', coursesOverviewController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbMyCourses',\r\n {\r\n templateUrl: 'Scripts/user/user-details/courses-and-competences/my-courses/my-courses.component.html',\r\n controller: 'MyCoursesController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n user: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n myCoursesController.$inject = [\r\n 'CourseFactory',\r\n '$location',\r\n 'CourseService',\r\n 'dialogService',\r\n '$q',\r\n 'infoService',\r\n '$translate',\r\n 'UserService',\r\n 'eventTypes',\r\n 'AppRoutes',\r\n 'errorService'\r\n ];\r\n\r\n function myCoursesController(\r\n CourseFactory,\r\n $location,\r\n CourseService,\r\n dialogService,\r\n $q,\r\n infoService,\r\n $translate,\r\n UserService,\r\n eventTypes,\r\n AppRoutes,\r\n errorService\r\n ) {\r\n var vm = this;\r\n var _myCourses = [];\r\n\r\n Object.defineProperties(vm, {\r\n myCourses: {\r\n get: function() {\r\n return _myCourses;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.onCourseClick = onCourseClick;\r\n vm.onUnsubscribeClick = onUnsubscribeClick;\r\n\r\n function onInit() {\r\n getMyCourses();\r\n }\r\n\r\n function getMyCourses() {\r\n CourseFactory.getMyCourses()\r\n .then(function(myCourses) {\r\n _myCourses = myCourses;\r\n });\r\n }\r\n\r\n function onCourseClick(course) {\r\n CourseService.setCourseDetailsPageOpenedFromRoute(AppRoutes.userDetails);\r\n $location.path('/course/' + course.id);\r\n }\r\n\r\n function unsubscribeFromCourse(course) {\r\n CourseFactory.unsubscribeFromCourse(course)\r\n .then(function () {\r\n infoService.changeInfo($translate.instant('MESSAGES.SUCCESSFULLY_UNSUBSCRIBED'));\r\n getMyCourses();\r\n });\r\n }\r\n\r\n function onUnsubscribeClick(course) {\r\n\r\n if (CourseService.isCancellationDeadlineOver(course)) {\r\n\r\n if (!UserService.isUserAvailableToNotifyForCourseEvents(vm.user)) {\r\n openNotAvailableForNotificationsDialog();\r\n } else if (!UserService.hasUserSelectedAtLeastOneNotificationTypeForEvent(vm.user, eventTypes.withdrawFromCourse)) {\r\n openNotificationTypeNotSelectedDialog();\r\n } else {\r\n openUnsubscribeFeeConfirmDialog(course);\r\n }\r\n \r\n } else {\r\n openUnsubscribeConfirmDialog(course);\r\n }\r\n }\r\n\r\n function openUnsubscribeFeeConfirmDialog(course) {\r\n\r\n dialogService.showConfirmDialog('COURSE.WARNING_UNSUBSCRIBE_FEE', 'COURSE.UNSUBSCRIBE_FEE_CONFIRM_DIALOG_MESSAGE', 'md', true)\r\n .then(function (dialogResult) {\r\n\r\n if (dialogResult === dialogService.DIALOG_RESULT_OK) {\r\n return CourseFactory.notifyUserAboutCourseUnsubscribeFee(course.id);\r\n }\r\n\r\n return $q.when(null);\r\n })\r\n .then(function (response) {\r\n\r\n if (!response) {\r\n return;\r\n }\r\n\r\n var wasAtLeastOneNotificationSent = response.NotifyUserAboutUnsubscribeFeeResult;\r\n\r\n if (wasAtLeastOneNotificationSent) {\r\n unsubscribeFromCourse(course);\r\n } else {\r\n var translatedErrorMessage = $translate.instant('ERRORS.FAILED_TO_SEND_NOTIFICATION');\r\n errorService.changeError(translatedErrorMessage);\r\n }\r\n });\r\n }\r\n\r\n function openUnsubscribeConfirmDialog(course) {\r\n\r\n dialogService.showConfirmDialog('COMMON.WARNING', 'COURSE.WARNING_UNSUBSCRIBE_MESSAGE', 'md', true)\r\n .then(function (dialogResult) {\r\n\r\n if (dialogResult === dialogService.DIALOG_RESULT_OK) {\r\n unsubscribeFromCourse(course);\r\n }\r\n });\r\n }\r\n\r\n function openNotAvailableForNotificationsDialog() {\r\n\r\n dialogService.showAlertDialog('COMMON.WARNING',\r\n 'COURSE.MESSAGES.WARNING_NOT_AVAILABLE_FOR_NOTIFICATIONS',\r\n 'md',\r\n true);\r\n }\r\n\r\n function openNotificationTypeNotSelectedDialog() {\r\n\r\n dialogService.showAlertDialog('COMMON.WARNING',\r\n 'COURSE.MESSAGES.WARNING_NOTIFICATION_TYPE_NOT_SELECTED',\r\n 'md',\r\n true);\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('MyCoursesController', myCoursesController);\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbRelevantCourses',\r\n {\r\n templateUrl: 'Scripts/user/user-details/courses-and-competences/relevant-courses/relevant-courses.component.html',\r\n controller: 'RelevantCoursesController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n user: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n relevantCoursesController.$inject = [\r\n 'CourseFactory',\r\n '$location',\r\n 'CourseService',\r\n 'AppRoutes'\r\n ];\r\n\r\n function relevantCoursesController(\r\n CourseFactory,\r\n $location,\r\n CourseService,\r\n AppRoutes\r\n ) {\r\n\r\n var vm = this;\r\n var _relevantCourses = [];\r\n\r\n Object.defineProperties(vm,\r\n {\r\n relevantCourses: {\r\n get: function() {\r\n return _relevantCourses;\r\n }\r\n }\r\n });\r\n\r\n vm.$onInit = onInit;\r\n vm.onCourseClick = onCourseClick;\r\n\r\n function onInit() {\r\n getRelevantCoursesForUser();\r\n }\r\n\r\n function getRelevantCoursesForUser() {\r\n CourseFactory.getRelevantCoursesForUser(vm.user.id)\r\n .then(function(relevantCourses) {\r\n _relevantCourses = relevantCourses;\r\n });\r\n }\r\n\r\n function onCourseClick(course) {\r\n CourseService.setCourseDetailsPageOpenedFromRoute(AppRoutes.userDetails);\r\n $location.path('/course/' + course.id);\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('RelevantCoursesController', relevantCoursesController);\r\n})();","(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('userCompetence', {\r\n templateUrl: 'Scripts/user/user-details/courses-and-competences/user-competence/user-competence.component.html',\r\n controller: 'UserCompetenceController',\r\n controllerAs: 'vm'\r\n ,bindings: {\r\n user: '<'\r\n }\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n UserCompetenceController.$inject = [\r\n '$scope',\r\n '$uibModal',\r\n 'UserFactory',\r\n 'fileReader',\r\n '_',\r\n 'UserCompetenceService',\r\n 'CompetenceService'\r\n ];\r\n\r\n angular.module('user').controller('UserCompetenceController', UserCompetenceController);\r\n\r\n function UserCompetenceController(\r\n $scope,\r\n $uibModal,\r\n UserFactory,\r\n fileReader,\r\n _,\r\n UserCompetenceService,\r\n CompetenceService\r\n ) {\r\n var vm = this;\r\n vm.$onInit = onInit;\r\n vm.$onDestroy = onDestroy;\r\n\r\n vm.educations = [];\r\n vm.includeDeactivatedCompetences = {\r\n value: false\r\n };\r\n var competenceModal;\r\n\r\n function onInit() {\r\n getEducationLevels()\r\n .then(function() {\r\n\r\n // if a competence id exists in this variable, means the user\r\n // wants to open a competence for which he received a notification\r\n if (CompetenceService.idOfCompetenceToOpenFromNotification) {\r\n openCompetenceFromNotification();\r\n }\r\n });\r\n };\r\n\r\n function openCompetenceFromNotification() {\r\n\r\n var competenceId = CompetenceService.idOfCompetenceToOpenFromNotification;\r\n var competences = vm.user.Competences;\r\n\r\n if (!competences || competences.length === 0) {\r\n return;\r\n }\r\n\r\n var competenceFound = competences.find(function(competence) {\r\n return competence.id === competenceId;\r\n });\r\n\r\n if (!competenceFound) {\r\n return;\r\n }\r\n\r\n // prepare the competence for the modal window\r\n vm.newCompetence = angular.copy(competenceFound);\r\n UserCompetenceService.convertCompetenceDatesToLong(vm.newCompetence);\r\n\r\n openCompetenceModal();\r\n }\r\n\r\n function openCompetenceModal() {\r\n competenceModal = $uibModal.open({\r\n templateUrl: 'Scripts/user/user-details/courses-and-competences/user-competence/user-competence.modal.html',\r\n size: 'md',\r\n scope: $scope\r\n });\r\n }\r\n\r\n vm.addNewCompetence = function (competence) {\r\n\r\n if (competence) {\r\n vm.newCompetence = angular.copy(competence);\r\n } else {\r\n vm.newCompetence = { Active: true };\r\n }\r\n\r\n UserCompetenceService.convertCompetenceDatesToLong(vm.newCompetence);\r\n\r\n openCompetenceModal();\r\n };\r\n\r\n vm.disableCompetenceSave = function (competence) {\r\n return !competence.Name;\r\n };\r\n\r\n /**\r\n * Gets the competences for the current user\r\n * @param {} includeDeactivatedItems \r\n * @returns {} \r\n */\r\n vm.getCompetences = function (includeDeactivatedItems) {\r\n return UserFactory.getCompetences(vm.user.id, includeDeactivatedItems)\r\n .$promise\r\n .then(function (result) {\r\n var competences = result;\r\n\r\n for (var i = 0; i < competences.length; i++) {\r\n competences[i].StartDate = competences[i].StartDate ? moment(competences[i].StartDate).toISOString() : null;\r\n competences[i].EndDate = competences[i].EndDate ? moment(competences[i].EndDate).toISOString() : null;\r\n }\r\n\r\n vm.user.Competences = competences;\r\n });\r\n };\r\n\r\n function fixDate(date) {\r\n return date ? moment(date).add(moment().utcOffset(), 'minutes').valueOf() : null;\r\n }\r\n\r\n /**\r\n * Checks whether the given competence is valid\r\n * @param competence\r\n * @returns\r\n */\r\n vm.competenceIsValid = function (competence) {\r\n if (competence.EndDate) {\r\n var today = fixDate(new Date());\r\n var enddate = fixDate(competence.EndDate);\r\n\r\n if (today <= enddate) return true;\r\n else return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n function formatCompetenceDate(index) {\r\n if (!index || index === -1)\r\n return;\r\n\r\n if (vm.user.Competences[index].StartDate)\r\n vm.user.Competences[index].StartDate = moment(vm.user.Competences[index].StartDate).toISOString();\r\n if (vm.user.Competences[index].EndDate)\r\n vm.user.Competences[index].EndDate = moment(vm.user.Competences[index].EndDate).toISOString();\r\n }\r\n\r\n var saveCompetence = function (competence) {\r\n if (!vm.user.Competences)\r\n vm.user.Competences = [];\r\n\r\n\r\n competence.StartDate = fixDate(competence.StartDate);\r\n competence.EndDate = fixDate(competence.EndDate);\r\n\r\n UserFactory.saveCompetence(competence)\r\n .then(function (result) {\r\n\r\n var competenceTemp = _.find(vm.user.Competences, function (competence) { return competence.id == result.id; });\r\n\r\n var index;\r\n\r\n if (competenceTemp) {\r\n index = vm.user.Competences.indexOf(competenceTemp);\r\n\r\n if (!competence.Active && !vm.includeDeactivatedCompetences.value) {\r\n vm.user.Competences.splice(index, 1);\r\n } else {\r\n vm.user.Competences[index] = angular.copy(result);\r\n formatCompetenceDate(index);\r\n }\r\n } else {\r\n vm.user.Competences.push(result);\r\n index = vm.user.Competences.length - 1;\r\n formatCompetenceDate(index);\r\n }\r\n\r\n competenceModal.close();\r\n });\r\n }\r\n\r\n /**\r\n * Saves any new competence\r\n * @param competence\r\n * @param myFile\r\n * @param fileName \r\n */\r\n vm.saveNewCompetence = function (competence, myFile, fileName) {\r\n var newAttachment = {};\r\n\r\n competence.Table = 'GOT_USER';\r\n competence.ForeignKey = vm.user.id;\r\n\r\n if (competence.Certificate && competence.Certificate.id) {\r\n newAttachment.id = competence.Certificate.id;\r\n }\r\n\r\n newAttachment.AttachmentName = fileName;\r\n newAttachment.ForeignKey = vm.user.id;\r\n newAttachment.Table = 'BOT_COMPETENCE';\r\n newAttachment.Active = true;\r\n\r\n if (myFile) {\r\n var response = fileReader.readAsDataUrl(myFile, $scope);\r\n\r\n response.then(function (result) {\r\n newAttachment.AttachmentBytes = result;\r\n competence.Certificate = newAttachment;\r\n saveCompetence(competence);\r\n\r\n });\r\n\r\n myFile.clear();\r\n } else {\r\n saveCompetence(competence);\r\n }\r\n };\r\n\r\n vm.attachmentNamePattern = function (name) {\r\n if (name) {\r\n //allow characters, digits, norwegian characters, '-', '_', '.' and space \r\n var regexp = /^[\\w\\d\\u00C5\\u00E5\\u00C6\\u00E6\\u00D8\\u00F8\\-\\_\\.\\ ]{1,250}$/;\r\n if (regexp.test(name))\r\n return true;\r\n else {\r\n return false;\r\n }\r\n } else\r\n return true;\r\n };\r\n\r\n /**\r\n * Gets the education levels\r\n */\r\n function getEducationLevels() {\r\n return UserFactory.getEducationLevels().then(function (result) {\r\n if (!result || result.length == 0)\r\n return;\r\n\r\n vm.educations = result;\r\n });\r\n };\r\n\r\n vm.openAttachment = function (attach) {\r\n downloadFile(attach.URL);\r\n\r\n return;\r\n };\r\n\r\n //TODO: use download service\r\n window.downloadFile = function (sUrl) {\r\n //If in Chrome or Safari - download via virtual link click\r\n if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 || navigator.userAgent.toLowerCase().indexOf('safari') > -1) {\r\n //Creating new link node.\r\n var link = document.createElement('a');\r\n link.href = sUrl;\r\n\r\n if (link.download !== undefined) {\r\n //Set HTML5 download attribute. This will prevent file from opening if supported.\r\n var fileName = sUrl.substring(sUrl.lastIndexOf('/') + 1, sUrl.length);\r\n link.download = fileName;\r\n }\r\n\r\n //Dispatching click event.\r\n if (document.createEvent) {\r\n var e = document.createEvent('MouseEvents');\r\n e.initEvent('click', true, true);\r\n link.dispatchEvent(e);\r\n return true;\r\n }\r\n }\r\n\r\n // Force file download (whether supported by server).\r\n window.open(sUrl);\r\n return true;\r\n };\r\n\r\n vm.resetAttachment = function (myFile, competence) {\r\n if (competence.Certificate) {\r\n //competence.Certificate.AttachmentName = null;\r\n competence.Certificate.URL = null;\r\n competence.Certificate.Active = false;\r\n }\r\n\r\n if (myFile != null) {\r\n myFile.clear();\r\n }\r\n };\r\n\r\n function onDestroy() {\r\n\r\n // clear competence id\r\n CompetenceService.idOfCompetenceToOpenFromNotification = null;\r\n }\r\n };\r\n})();","(function() {\r\n 'use strict';\r\n\r\n function userCompetenceService() {\r\n\r\n function convertCompetenceDatesToLong(competence) {\r\n\r\n if (!competence) {\r\n return;\r\n }\r\n\r\n if (competence.StartDate) {\r\n competence.StartDate = moment(competence.StartDate).valueOf();\r\n }\r\n\r\n if (competence.EndDate) {\r\n competence.EndDate = moment(competence.EndDate).valueOf();\r\n }\r\n }\r\n\r\n return {\r\n convertCompetenceDatesToLong: convertCompetenceDatesToLong\r\n };\r\n }\r\n\r\n angular\r\n .module('user')\r\n .service('UserCompetenceService', userCompetenceService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .constant('userSettingsTabSet',\r\n {\r\n userSettingsTab: 'USER_SETTINGS',\r\n notificationSettingsTab: 'NOTIFICATION_SETTINGS'\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserNotificationSettings',\r\n {\r\n templateUrl: 'Scripts/user/user-details/user-settings/user-notification-settings/user-notification-settings.component.html',\r\n controller: 'UserNotificationSettingsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n userSettings: '<',\r\n eventNotificationTypeSettings: '<',\r\n organizationId: '<',\r\n organizationSettings: '<',\r\n isLoggedUserViewingHisProfile: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userNotificationSettingsController.$inject = [\r\n 'TypeFactory',\r\n 'UserNotificationSettingsService',\r\n 'notificationSettingsTabSet'\r\n ];\r\n\r\n function userNotificationSettingsController(\r\n TypeFactory,\r\n UserNotificationSettingsService,\r\n notificationSettingsTabSet\r\n ) {\r\n\r\n var vm = this;\r\n var _activeTab = notificationSettingsTabSet.orderTab;\r\n\r\n Object.defineProperties(vm,\r\n {\r\n activeTab: {\r\n get: function() {\r\n return _activeTab;\r\n }\r\n },\r\n orderTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.orderTab;\r\n }\r\n },\r\n managementProcessListTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.managementProcessListTab;\r\n }\r\n },\r\n deviationTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.deviationTab;\r\n }\r\n },\r\n processListTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.processListTab;\r\n }\r\n },\r\n qualityHandbookTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.qualityHandbookTab;\r\n }\r\n },\r\n courseTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.courseTab;\r\n }\r\n },\r\n competenceTab: {\r\n get: function() {\r\n return notificationSettingsTabSet.competenceTab;\r\n }\r\n }\r\n });\r\n\r\n // controller API\r\n vm.$onInit = onInit;\r\n vm.onNotificationTypeAddForEvent = onNotificationTypeAddForEvent;\r\n vm.onNotificationTypeRemoveForEvent = onNotificationTypeRemoveForEvent;\r\n vm.selectTab = selectTab;\r\n vm.eventsPerType = {};\r\n\r\n function onInit() {\r\n getEventTypes();\r\n }\r\n\r\n function getEventTypes() {\r\n\r\n TypeFactory.getEventTypes()\r\n .then(function(eventTypes) {\r\n vm.eventsPerType = UserNotificationSettingsService.splitEventTypes(eventTypes);\r\n });\r\n }\r\n\r\n function onNotificationTypeAddForEvent(data) {\r\n\r\n UserNotificationSettingsService.addEventNotificationTypeSettingIfNotExists(data, vm.eventNotificationTypeSettings);\r\n }\r\n\r\n function onNotificationTypeRemoveForEvent(data) {\r\n \r\n UserNotificationSettingsService.removeEventNotificationTypeSetting(data, vm.eventNotificationTypeSettings);\r\n }\r\n\r\n function selectTab(tab) {\r\n _activeTab = tab;\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('UserNotificationSettingsController', userNotificationSettingsController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userNotificationSettingsService.$inject = [\r\n '_',\r\n 'TableResources'\r\n ];\r\n\r\n function userNotificationSettingsService(\r\n _,\r\n TableResources\r\n ) {\r\n\r\n function getEventTypesByTable(table, eventTypes) {\r\n\r\n return _.filter(eventTypes, function(item) {\r\n return item.Table === table;\r\n });\r\n }\r\n\r\n /**\r\n * Split a given list of event types into an object containing event types per entity type\r\n * @param {any} eventTypes A list of event type objects\r\n * @returns {any} An object containing event types per entity type\r\n * */\r\n function splitEventTypes(eventTypes) {\r\n\r\n var eventsPerEntityType = {\r\n orderEvents: [],\r\n managementProcessListEvents: [],\r\n deviationEvents: [],\r\n processListEvents: [],\r\n qualityHandbookEvents: [],\r\n courseEvents: [],\r\n competenceEvents: []\r\n };\r\n\r\n // get order events\r\n eventsPerEntityType.orderEvents = getEventTypesByTable(TableResources.OrderEventTable, eventTypes);\r\n\r\n // get management process list events\r\n eventsPerEntityType.managementProcessListEvents = getEventTypesByTable(TableResources.ManagementProcessListEventTable, eventTypes);\r\n\r\n // get deviation events\r\n eventsPerEntityType.deviationEvents = getEventTypesByTable(TableResources.DeviationEventTable, eventTypes);\r\n\r\n // get process list events\r\n eventsPerEntityType.processListEvents = getEventTypesByTable(TableResources.ProcessListEventTable, eventTypes);\r\n\r\n // get quality handbook events\r\n eventsPerEntityType.qualityHandbookEvents = getEventTypesByTable(TableResources.QualityHandbookEventTable, eventTypes);\r\n\r\n // get course events\r\n eventsPerEntityType.courseEvents = getEventTypesByTable(TableResources.CourseEventTable, eventTypes);\r\n\r\n // get competence events\r\n eventsPerEntityType.competenceEvents = getEventTypesByTable(TableResources.CompetenceEventTable, eventTypes);\r\n\r\n return eventsPerEntityType;\r\n }\r\n\r\n function addEventNotificationTypeSettingIfNotExists(eventNotificationTypeSetting, eventNotificationTypeSettings) {\r\n\r\n if (_.isNil(eventNotificationTypeSetting) || _.isNil(eventNotificationTypeSettings)) {\r\n return;\r\n }\r\n\r\n // check if the item already exists\r\n var itemFound = _.find(eventNotificationTypeSettings, function (item) {\r\n\r\n return item.NotificationType.id === eventNotificationTypeSetting.NotificationType.id &&\r\n item.Event.id === eventNotificationTypeSetting.Event.id;\r\n });\r\n\r\n // if no item was found then add it to the list\r\n if (!itemFound) {\r\n eventNotificationTypeSettings.push(eventNotificationTypeSetting);\r\n }\r\n }\r\n\r\n function removeEventNotificationTypeSetting(eventNotificationTypeSetting, eventNotificationTypeSettings) {\r\n\r\n if (_.isNil(eventNotificationTypeSetting) || _.isNil(eventNotificationTypeSettings)) {\r\n return;\r\n }\r\n\r\n _.remove(eventNotificationTypeSettings, function(item) {\r\n return item.NotificationType.id === eventNotificationTypeSetting.NotificationType.id &&\r\n item.Event.id === eventNotificationTypeSetting.Event.id;\r\n });\r\n }\r\n\r\n return {\r\n splitEventTypes: splitEventTypes,\r\n addEventNotificationTypeSettingIfNotExists: addEventNotificationTypeSettingIfNotExists,\r\n removeEventNotificationTypeSetting: removeEventNotificationTypeSetting\r\n };\r\n }\r\n\r\n angular\r\n .module('user')\r\n .service('UserNotificationSettingsService', userNotificationSettingsService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserNotificationSettingsTab',\r\n {\r\n templateUrl: 'Scripts/user/user-details/user-settings/user-notification-settings-tab/user-notification-settings-tab.component.html',\r\n controller: 'UserNotificationSettingsTabController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n organizationSettings: '<',\r\n userSettings: '<',\r\n user: '<',\r\n organizationId: '<'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userNotificationSettingsTabController.$inject = [\r\n 'sessionInformationService'\r\n ];\r\n\r\n function userNotificationSettingsTabController(\r\n sessionInformationService\r\n ) {\r\n\r\n var vm = this;\r\n\r\n vm.isLoggedUserViewingHisProfile = isLoggedUserViewingHisProfile;\r\n\r\n function isLoggedUserViewingHisProfile() {\r\n return sessionInformationService.isUserLoggedUser(vm.user);\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('UserNotificationSettingsTabController', userNotificationSettingsTabController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserSettingParticipants',\r\n {\r\n templateUrl: 'Scripts/user/user-details/user-settings/user-setting-participants/user-setting-participants.component.html',\r\n controller: 'UserSettingParticipantsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n table: '@vbTable',\r\n foreignKey: '' + $translate.instant('USER_SETTINGS.MESSAGES.CAN_SIGN_UP_FOR_COURSES_INFO') + '');\r\n\r\n if (!canCourseSettingsBeChangedByLoggedUser()) {\r\n html += $sce.trustAsHtml('
' + $translate.instant('USER_MODEL.COURSE_SETTINGS_INFO') + '
');\r\n }\r\n\r\n _canSignUpForCoursesSettingInfo = html;\r\n }\r\n\r\n function initCanEnrollOthersSettingInfo() {\r\n var html\r\n = $sce.trustAsHtml('
' + $translate.instant('USER_SETTINGS.MESSAGES.CAN_ENROLL_OTHERS_INFO') + '
');\r\n\r\n if (!canCourseSettingsBeChangedByLoggedUser()) {\r\n html += $sce.trustAsHtml('
' + $translate.instant('USER_MODEL.COURSE_SETTINGS_INFO') + '
');\r\n }\r\n\r\n _canEnrollOthersSettingInfo = html;\r\n }\r\n\r\n function isLoggedUserViewingHisProfile() {\r\n return sessionInformationService.isUserLoggedUser(vm.user);\r\n }\r\n\r\n /**\r\n * Triggered when the user selects the allow impersonation toggle\r\n */\r\n function onAllowImpersonationChange() {\r\n if (!vm.userSettings)\r\n vm.userSettings = {};\r\n\r\n if (!vm.userSettings.AllowImpersonation)\r\n alertUserForSupport()\r\n .then(function (result) {\r\n if (result != dialogService.DIALOG_RESULT_OK)\r\n vm.userSettings.AllowImpersonation = true;\r\n });\r\n else {\r\n vm.userSettings.FromDate = (new Date()).toString();\r\n vm.userSettings.ToDate = null;\r\n //disable once impersonation\r\n vm.userSettings.AllowImpersonationOnce = false;\r\n }\r\n }\r\n\r\n /**\r\n * Triggered when the user selects the allow impersonation once toggle\r\n */\r\n function onAllowImpersonationOnceChange() {\r\n if (!vm.userSettings)\r\n vm.userSettings = {};\r\n\r\n if (vm.userSettings.AllowImpersonationOnce) {\r\n //we must disable allow impersonation\r\n vm.userSettings.AllowImpersonation = false;\r\n }\r\n }\r\n\r\n /**\r\n * Displays a confirm dialog for the user to confirm if he wants to accept the change\r\n */\r\n function alertUserForSupport() {\r\n return dialogService.showConfirmDialog('ORGANIZATION_MODEL.ORGANIZATION_SETTING_WARNING', 'ORGANIZATION_MODEL.ORGANIZATION_SETTING_SUPPORT_HARD');\r\n }\r\n\r\n function canCourseSettingsBeChangedByLoggedUser() {\r\n return _loggedUser.Group.ProgId === userGroups.admin ||\r\n _loggedUser.Group.ProgId === userGroups.manager;\r\n }\r\n\r\n /**\r\n * Checks whether the start date is greater than end date\r\n */\r\n function isStartDateGreater() {\r\n if (!vm.userSettings)\r\n return false;\r\n\r\n var startDate = moment(vm.userSettings.FromDate);\r\n var endDate = moment(vm.userSettings.ToDate);\r\n\r\n return startDate.isAfter(endDate);\r\n }\r\n\r\n _translateChangeSuccessSubscription = $rootScope.$on('$translateChangeSuccess', function() {\r\n initCanSignUpForCoursesSettingInfo();\r\n initCanEnrollOthersSettingInfo();\r\n });\r\n\r\n function onDestroy() {\r\n if (_translateChangeSuccessSubscription) {\r\n // call the subscription function to unsubscribe\r\n _translateChangeSuccessSubscription();\r\n }\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('UserSettingsTabController', userSettingsTabController);\r\n\r\n})();","(function() { \r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserEventNotificationTypeSettings',\r\n {\r\n templateUrl: 'Scripts/user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-settings.component.html',\r\n controller: 'UserEventNotificationTypeSettingsController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n table: '@',\r\n eventTypes: '<',\r\n hasNotificationsForEntityType: '=',\r\n onNotificationTypeAddForEvent: '&',\r\n onNotificationTypeRemoveForEvent: '&',\r\n eventNotificationTypeSettings: '<',\r\n organizationId: '<',\r\n hasNotificationsForEntityTypeOnOrganization: '<',\r\n isLoggedUserViewingHisProfile: '<',\r\n notificationsStateInfoMessage: '@?'\r\n }\r\n });\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userEventNotificationTypeSettingsController.$inject = [\r\n 'UserEventNotificationTypeSettingsService',\r\n 'TypeFactory'\r\n ];\r\n\r\n function userEventNotificationTypeSettingsController(\r\n UserEventNotificationTypeSettingsService,\r\n TypeFactory\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.$onInit = onInit;\r\n vm.$onDestroy = onDestroy;\r\n vm.onNotificationTypeAdd = onNotificationTypeAdd;\r\n vm.onNotificationTypeRemove = onNotificationTypeRemove;\r\n vm.getExistentNotificationTypesForEvent = getExistentNotificationTypesForEvent;\r\n vm.getPopoverInfoMessage = getPopoverInfoMessage;\r\n\r\n vm.mandatoryNotificationTypes = null;\r\n\r\n function onInit() {\r\n\r\n getMandatoryNotificationTypesByOrganizationId();\r\n\r\n // cache existent event notification type settings\r\n\r\n // we do this to avoid infinite digest cycles when\r\n // calling getExistentNotificationTypesForEvent for the\r\n // binding of 's\r\n // existent-notification-types attribute\r\n UserEventNotificationTypeSettingsService.cacheExistentEventNotificationTypeSettings(vm.eventNotificationTypeSettings, vm.eventTypes);\r\n }\r\n\r\n function getMandatoryNotificationTypesByOrganizationId() {\r\n\r\n TypeFactory.getMandatoryNotificationTypesByOrganizationId(vm.organizationId, vm.table)\r\n .then(function(mandatoryNotificationTypes) {\r\n\r\n vm.mandatoryNotificationTypes = mandatoryNotificationTypes;\r\n });\r\n }\r\n\r\n function onNotificationTypeAdd(data) {\r\n\r\n if (vm.onNotificationTypeAddForEvent && typeof vm.onNotificationTypeAddForEvent === 'function') {\r\n\r\n vm.onNotificationTypeAddForEvent({\r\n data: data\r\n });\r\n }\r\n }\r\n\r\n function onNotificationTypeRemove(data) {\r\n\r\n if (vm.onNotificationTypeRemoveForEvent && typeof vm.onNotificationTypeRemoveForEvent === 'function') {\r\n\r\n vm.onNotificationTypeRemoveForEvent({\r\n data: data\r\n });\r\n }\r\n }\r\n\r\n function getExistentNotificationTypesForEvent(eventType) {\r\n\r\n return UserEventNotificationTypeSettingsService.getExistentNotificationTypesForEvent(eventType);\r\n }\r\n\r\n function getPopoverInfoMessage() {\r\n\r\n return UserEventNotificationTypeSettingsService.getPopoverInfoMessage(vm.table);\r\n }\r\n\r\n function onDestroy() {\r\n\r\n UserEventNotificationTypeSettingsService.clearCachedEventNotificationTypeSettings();\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('UserEventNotificationTypeSettingsController', userEventNotificationTypeSettingsController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userEventNotificationTypeSettingsService.$inject = [\r\n '_',\r\n '$translate'\r\n ];\r\n\r\n function userEventNotificationTypeSettingsService(\r\n _,\r\n $translate\r\n ) {\r\n\r\n var cachedEventNotificationTypeSettings = [];\r\n var emptyArray = []; // used to avoid infinite digest cycles\r\n\r\n function cacheExistentEventNotificationTypeSettings(eventNotificationTypeSettings, eventTypes) {\r\n\r\n if (_.isNil(eventNotificationTypeSettings) || _.isEmpty(eventNotificationTypeSettings)) {\r\n return;\r\n }\r\n\r\n eventTypes.forEach(function(currentEventType) {\r\n\r\n // filter eventNotificationTypeSettings list\r\n var settingsForCurrentEvent = _.filter(eventNotificationTypeSettings, function(item) {\r\n return item.Event.id === currentEventType.id;\r\n });\r\n\r\n // cache the current event with its notification types\r\n cachedEventNotificationTypeSettings.push({\r\n eventType: currentEventType,\r\n notificationTypes: _.map(settingsForCurrentEvent, function(item) { return item.NotificationType; })\r\n });\r\n });\r\n }\r\n\r\n function getExistentNotificationTypesForEvent(eventType) {\r\n\r\n // find the settings for this event\r\n var eventSettings = _.find(cachedEventNotificationTypeSettings,\r\n function(item) {\r\n return item.eventType.id === eventType.id;\r\n });\r\n\r\n // return the notification types\r\n return eventSettings ? eventSettings.notificationTypes : emptyArray;\r\n }\r\n\r\n function getPopoverInfoMessage(table) {\r\n\r\n var message = $translate.instant('NOTIFICATION_SETTINGS.DISABLED_TYPE') + ' ' +\r\n $translate.instant('NOTIFICATION_SETTINGS.' + table).toLowerCase();\r\n\r\n return message;\r\n }\r\n\r\n function clearCachedEventNotificationTypeSettings() {\r\n cachedEventNotificationTypeSettings = [];\r\n }\r\n\r\n return {\r\n getExistentNotificationTypesForEvent: getExistentNotificationTypesForEvent,\r\n cacheExistentEventNotificationTypeSettings: cacheExistentEventNotificationTypeSettings,\r\n getPopoverInfoMessage: getPopoverInfoMessage,\r\n clearCachedEventNotificationTypeSettings: clearCachedEventNotificationTypeSettings\r\n };\r\n }\r\n\r\n angular\r\n .module('user')\r\n .service('UserEventNotificationTypeSettingsService', userEventNotificationTypeSettingsService);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('user')\r\n .component('vbUserEventNotificationTypeSetting',\r\n {\r\n templateUrl: 'Scripts/user/user-details/user-settings/user-notification-settings/user-event-notification-type-settings/user-event-notification-type-setting/user-event-notification-type-setting.component.html',\r\n controller: 'UserEventNotificationTypeSettingController',\r\n controllerAs: 'vm',\r\n bindings: {\r\n eventType: '<',\r\n existentNotificationTypes: '<',\r\n organizationMandatoryNotificationTypes: '<',\r\n onNotificationTypeAdd: '&',\r\n onNotificationTypeRemove: '&',\r\n isLoggedUserViewingHisProfile: '<'\r\n }\r\n });\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userEventNotificationTypeSettingController.$inject = [\r\n 'TypeFactory',\r\n 'ListService',\r\n 'UserEventNotificationTypeService',\r\n 'TypeService',\r\n '$translate'\r\n ];\r\n\r\n function userEventNotificationTypeSettingController(\r\n TypeFactory,\r\n ListService,\r\n UserEventNotificationTypeService,\r\n TypeService,\r\n $translate\r\n ) {\r\n\r\n var vm = this;\r\n\r\n // controller API\r\n vm.$onInit = onInit;\r\n vm.getEventTypeTranslation = getEventTypeTranslation;\r\n vm.onNotificationTypeToggle = onNotificationTypeToggle;\r\n vm.toggleNotificationType = toggleNotificationType;\r\n vm.getEventTypeInfoMessage = getEventTypeInfoMessage;\r\n \r\n vm.notificationTypes = [];\r\n\r\n function onInit() {\r\n getNotificationTypes();\r\n }\r\n\r\n function getNotificationTypes() {\r\n\r\n TypeFactory.getNotificationTypes()\r\n .then(function (notificationTypes) {\r\n\r\n vm.notificationTypes = notificationTypes;\r\n\r\n ListService.markExistentItemsAsSelected(vm.notificationTypes, vm.existentNotificationTypes, 'id');\r\n\r\n UserEventNotificationTypeService.markMandatoryNotificationTypes(vm.notificationTypes,\r\n vm.organizationMandatoryNotificationTypes);\r\n\r\n addMandatoryNotificationTypesIfNotExists();\r\n });\r\n }\r\n\r\n /**\r\n * Iterates over the notification types and sends each mandatory notification type\r\n * to the parent component in order to be added to the list if not exists\r\n */\r\n function addMandatoryNotificationTypesIfNotExists() {\r\n\r\n vm.notificationTypes.forEach(function(notificationType) {\r\n\r\n if (notificationType.mandatory) {\r\n\r\n notifyParentComponentAboutNotificationTypeAdd(notificationType);\r\n }\r\n });\r\n }\r\n\r\n function selectNotificationType(notificationType) {\r\n\r\n // notify the parent component about the change\r\n notifyParentComponentAboutNotificationTypeAdd(notificationType);\r\n }\r\n\r\n function notifyParentComponentAboutNotificationTypeAdd(notificationType) {\r\n\r\n if (vm.onNotificationTypeAdd && typeof vm.onNotificationTypeAdd === 'function') {\r\n\r\n vm.onNotificationTypeAdd({\r\n data: {\r\n NotificationType: notificationType,\r\n Event: vm.eventType\r\n }\r\n });\r\n }\r\n }\r\n\r\n function unselectNotificationType(notificationType) {\r\n\r\n if (vm.onNotificationTypeRemove && typeof vm.onNotificationTypeRemove === 'function') {\r\n\r\n vm.onNotificationTypeRemove({\r\n data: {\r\n NotificationType: notificationType,\r\n Event: vm.eventType\r\n }\r\n });\r\n }\r\n }\r\n\r\n function getEventTypeTranslation() {\r\n return TypeService.getTypeTranslation(vm.eventType);\r\n }\r\n\r\n function onNotificationTypeToggle(notificationType) {\r\n\r\n if (notificationType.checked) {\r\n selectNotificationType(notificationType);\r\n } else {\r\n unselectNotificationType(notificationType);\r\n }\r\n }\r\n\r\n function toggleNotificationType(notificationType) {\r\n\r\n if (!vm.isLoggedUserViewingHisProfile || notificationType.mandatory) {\r\n return;\r\n }\r\n\r\n notificationType.checked = !notificationType.checked;\r\n onNotificationTypeToggle(notificationType);\r\n }\r\n\r\n function getEventTypeInfoMessage() {\r\n if (!vm.eventType || !vm.eventType.ProgId) {\r\n return '';\r\n }\r\n\r\n return $translate.instant('TYPE_MODEL.MESSAGES.' + vm.eventType.ProgId + '_EVENT_TYPE_INFO');\r\n }\r\n }\r\n\r\n angular\r\n .module('user')\r\n .controller('UserEventNotificationTypeSettingController', userEventNotificationTypeSettingController);\r\n\r\n})();","(function() {\r\n 'use strict';\r\n\r\n userEventNotificationTypeService.$inject = [\r\n '_'\r\n ];\r\n\r\n function userEventNotificationTypeService(\r\n _\r\n ) {\r\n\r\n function markMandatoryNotificationTypes(notificationTypes, mandatoryNotificationTypes) {\r\n\r\n if (_.isNil(mandatoryNotificationTypes) || _.isEmpty(mandatoryNotificationTypes)) {\r\n return;\r\n }\r\n\r\n notificationTypes.forEach(function(notificationType) {\r\n\r\n // check if the current notification type is mandatory\r\n var itemFound = _.find(mandatoryNotificationTypes, function(mandatoryNotificationType) {\r\n return mandatoryNotificationType.id === notificationType.id;\r\n });\r\n\r\n // if the notification type was found, then we mark it as mandatory and we check it if it's not checked\r\n if (itemFound) {\r\n\r\n notificationType.mandatory = true;\r\n\r\n if (!notificationType.checked)\r\n notificationType.checked = true;\r\n }\r\n });\r\n }\r\n\r\n return {\r\n markMandatoryNotificationTypes: markMandatoryNotificationTypes\r\n };\r\n }\r\n\r\n angular\r\n .module('user')\r\n .service('UserEventNotificationTypeService', userEventNotificationTypeService);\r\n\r\n})();"]}